[smartcard] fix smartcard listing with /kerberos:pkcs11-module:<path>

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.
This commit is contained in:
David Fort
2023-05-11 23:12:35 +02:00
committed by akallabeth
parent c06be5dc35
commit a659290bd9

View File

@@ -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)
{