mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-27 20:27:12 +09:00
Do not directly return the result of crypto_verify()
This commit is contained in:
@@ -42,7 +42,10 @@ crypto_sign_verify_detached(const unsigned char *sig, const unsigned char *m,
|
||||
ge_double_scalarmult_vartime(&R, h, &A, sig + 32);
|
||||
ge_tobytes(rcheck, &R);
|
||||
|
||||
return crypto_verify_32(rcheck, sig);
|
||||
if (crypto_verify_32(rcheck, sig) != 0) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user