mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-25 02:49:52 +03:00
Mayaqua/Secure.h: add support for the OpenSC PKCS#11 module
This commit is contained in:
parent
080edcdb81
commit
77e4bbb493
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user