From a659290bd9ef22012557142deabc7f61628ca209 Mon Sep 17 00:00:00 2001 From: David Fort Date: Thu, 11 May 2023 23:12:35 +0200 Subject: [PATCH] [smartcard] fix smartcard listing with /kerberos:pkcs11-module: When a PKCS11 module was provided, the CSP could not be set by command line arguments, leading to an error when loading the ncrypt module, and an empty smartcard list. --- libfreerdp/core/smartcardlogon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libfreerdp/core/smartcardlogon.c b/libfreerdp/core/smartcardlogon.c index 6cdfb6264..6cd1cc511 100644 --- a/libfreerdp/core/smartcardlogon.c +++ b/libfreerdp/core/smartcardlogon.c @@ -603,6 +603,9 @@ static BOOL smartcard_hw_enumerateCerts(const rdpSettings* settings, LPCWSTR csp /* load a unique CSP by pkcs11 module path */ LPCSTR paths[] = { Pkcs11Module, NULL }; + if (!csp) + csp = MS_SCARD_PROV; + status = winpr_NCryptOpenStorageProviderEx(&provider, csp, 0, paths); if (status != ERROR_SUCCESS) {