Do not directly return the result of crypto_verify()

This commit is contained in:
Frank Denis 2014-07-10 23:12:02 -07:00
parent 96b840cfcf
commit c9c49c61fd

View File

@ -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