Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnobori <da.git@softether.co.jp>2021-06-07 16:18:30 +0300
committerdnobori <da.git@softether.co.jp>2021-06-07 16:18:30 +0300
commitddc99f085fd6c54feaf4e41912bc8ab5903bdf8e (patch)
tree7c60824b852a62ea79e528b4607f47a0ecf55009 /src/Mayaqua/Secure.c
parentec3d052e218281dc1aa734f1bf84cf42127744aa (diff)
v4.36-9754-betav4.36-9754-beta
Diffstat (limited to 'src/Mayaqua/Secure.c')
-rw-r--r--src/Mayaqua/Secure.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Mayaqua/Secure.c b/src/Mayaqua/Secure.c
index ea734ccd..24d70abc 100644
--- a/src/Mayaqua/Secure.c
+++ b/src/Mayaqua/Secure.c
@@ -283,6 +283,7 @@ bool Win32LoadSecModule(SECURE *sec)
if (get_function_list == NULL)
{
+ Debug("err:%x\n",GetLastError());
// Failure
FreeLibrary(hInst);
return false;
@@ -331,7 +332,7 @@ void Win32FreeSecModule(SECURE *sec)
// Whether the specified device is a JPKI
bool IsJPKI(bool id)
{
- if (id == 9 || id == 13)
+ if (id == 9 || id == 13 || id == 24)
{
return true;
}
@@ -1861,10 +1862,13 @@ bool LoadSecModule(SECURE *sec)
#ifdef OS_WIN32
ret = Win32LoadSecModule(sec);
+ if(!ret){
+ return false;
+ }
#endif // OS_WIN32
// Initialization
- if (sec->Api->C_Initialize(NULL) != CKR_OK)
+ if (sec->Api == NULL || sec->Api->C_Initialize(NULL) != CKR_OK)
{
// Initialization Failed
FreeSecModule(sec);