mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-23 09:54:26 +08:00
[winpr,ncrypt] use preferably p11-kit-proxy.so
Currently, the opensc-pkcs11.so library is used for ncrypt support. However, the p11-kit-proxy.so library is able to aggregate more pkcs11 modules at runtime (OpenSC is one of them, but also some third party modules that are not supported by OpenSC). Let's use preferably p11-kit-proxy.so if available.
This commit is contained in:
parent
5a28b046d5
commit
35d8bc1782
@ -1229,13 +1229,13 @@ SECURITY_STATUS NCryptOpenP11StorageProviderEx(NCRYPT_PROV_HANDLE* phProvider,
|
||||
LPCSTR* modulePaths)
|
||||
{
|
||||
SECURITY_STATUS status = ERROR_INVALID_PARAMETER;
|
||||
LPCSTR openscPaths[] = { "opensc-pkcs11.so", NULL };
|
||||
LPCSTR defaultPaths[] = { "p11-kit-proxy.so", "opensc-pkcs11.so", NULL };
|
||||
|
||||
if (!phProvider)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
if (!modulePaths)
|
||||
modulePaths = openscPaths;
|
||||
modulePaths = defaultPaths;
|
||||
|
||||
while (*modulePaths)
|
||||
{
|
||||
@ -1244,7 +1244,7 @@ SECURITY_STATUS NCryptOpenP11StorageProviderEx(NCRYPT_PROV_HANDLE* phProvider,
|
||||
c_get_function_list_t c_get_function_list = NULL;
|
||||
NCryptP11ProviderHandle* provider = NULL;
|
||||
|
||||
WLog_DBG(TAG, "Trying pkcs11-helper module '%s'", *modulePaths);
|
||||
WLog_DBG(TAG, "Trying pkcs11 module '%s'", *modulePaths);
|
||||
if (!library)
|
||||
{
|
||||
status = NTE_PROV_DLL_NOT_FOUND;
|
||||
|
Loading…
Reference in New Issue
Block a user