mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
smartcard: take in account the module path for listing smartcards
The PKCS1 module was taken only for the kerberos part. Also make as exported the winpr_NCryptOpenStorageProviderEx function.
This commit is contained in:
@@ -268,7 +268,18 @@ static BOOL smartcard_hw_enumerateCerts(const rdpSettings* settings, LPCWSTR csp
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = NCryptOpenStorageProvider(&provider, csp, 0);
|
||||
if (settings->Pkcs11Module)
|
||||
{
|
||||
LPCSTR paths[] = {
|
||||
settings->Pkcs11Module,
|
||||
NULL
|
||||
};
|
||||
|
||||
status = winpr_NCryptOpenStorageProviderEx(&provider, csp, 0, paths);
|
||||
}
|
||||
else
|
||||
status = NCryptOpenStorageProvider(&provider, csp, 0);
|
||||
|
||||
if (status != ERROR_SUCCESS)
|
||||
{
|
||||
WLog_ERR(TAG, "unable to open provider");
|
||||
|
||||
@@ -198,7 +198,7 @@ extern "C"
|
||||
* @param modulePaths [in] an array of library path to try to load ended with a NULL string
|
||||
* @return ERROR_SUCCESS or an NTE error code something failed
|
||||
*/
|
||||
SECURITY_STATUS winpr_NCryptOpenStorageProviderEx(NCRYPT_PROV_HANDLE* phProvider,
|
||||
WINPR_API SECURITY_STATUS winpr_NCryptOpenStorageProviderEx(NCRYPT_PROV_HANDLE* phProvider,
|
||||
LPCWSTR pszProviderName, DWORD dwFlags,
|
||||
LPCSTR* modulePaths);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user