提交 39721132 编写于 作者: R Richard Levitte

nCipher callbacks shall return 0 on success, something else otherwise.

上级 a87f50fb
...@@ -1059,14 +1059,14 @@ static int hwcrhk_mutex_init(HWCryptoHook_Mutex* mt, ...@@ -1059,14 +1059,14 @@ static int hwcrhk_mutex_init(HWCryptoHook_Mutex* mt,
{ {
mt->lockid = CRYPTO_get_new_dynlockid(); mt->lockid = CRYPTO_get_new_dynlockid();
if (mt->lockid == 0) if (mt->lockid == 0)
return 0; return -1;
return 1; return 0;
} }
static int hwcrhk_mutex_lock(HWCryptoHook_Mutex *mt) static int hwcrhk_mutex_lock(HWCryptoHook_Mutex *mt)
{ {
CRYPTO_w_lock(mt->lockid); CRYPTO_w_lock(mt->lockid);
return 1; return 0;
} }
void hwcrhk_mutex_unlock(HWCryptoHook_Mutex * mt) void hwcrhk_mutex_unlock(HWCryptoHook_Mutex * mt)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册