diff --git a/src/Mayaqua/Secure.c b/src/Mayaqua/Secure.c index 1cf81944..ac7d665e 100644 --- a/src/Mayaqua/Secure.c +++ b/src/Mayaqua/Secure.c @@ -156,6 +156,7 @@ HINSTANCE Win32SecureLoadLibraryEx(char *dllname, DWORD flags) char tmp1[MAX_PATH]; char tmp2[MAX_PATH]; char tmp3[MAX_PATH]; + char tmp4[MAX_PATH]; HINSTANCE h; // Validate arguments if (dllname == NULL) @@ -166,6 +167,7 @@ HINSTANCE Win32SecureLoadLibraryEx(char *dllname, DWORD flags) Format(tmp1, sizeof(tmp1), "%s\\%s", MsGetSystem32Dir(), dllname); Format(tmp2, sizeof(tmp2), "%s\\JPKI\\%s", MsGetProgramFilesDir(), dllname); Format(tmp3, sizeof(tmp3), "%s\\LGWAN\\%s", MsGetProgramFilesDir(), dllname); + Format(tmp4, sizeof(tmp4), "%s\\OpenSC Project\\OpenSC\\pkcs11\\%s", MsGetProgramFilesDir(), dllname); h = LoadLibraryEx(dllname, NULL, flags); if (h != NULL) @@ -191,6 +193,12 @@ HINSTANCE Win32SecureLoadLibraryEx(char *dllname, DWORD flags) return h; } + h = LoadLibraryEx(tmp4, NULL, flags); + if (h != NULL) + { + return h; + } + return NULL; } diff --git a/src/Mayaqua/Secure.h b/src/Mayaqua/Secure.h index d34c6cb3..37760e44 100644 --- a/src/Mayaqua/Secure.h +++ b/src/Mayaqua/Secure.h @@ -309,6 +309,7 @@ SECURE_DEVICE SupportedList[] = {21, SECURE_USB_TOKEN, "ePass 1000ND/2000/3000", "Feitian Technologies", "ngp11v211.dll"}, {22, SECURE_USB_TOKEN, "CryptoID", "Longmai Technology", "cryptoide_pkcs11.dll"}, {23, SECURE_USB_TOKEN, "RuToken", "Aktiv Co.", "rtPKCS11.dll"}, + {24, SECURE_USB_TOKEN, "OpenSC", "OpenSC Project", "opensc-pkcs11.dll"} }; #ifdef OS_WIN32