mirror of
https://github.com/henrydcase/pqc.git
synced 2024-11-22 15:39:07 +00:00
Further fix the zero return codes for bad kem ops
This commit is contained in:
parent
66d5284e43
commit
c2747e6860
@ -101,8 +101,8 @@ static int test_invalid_sk_a(void) {
|
|||||||
randombytes(sk_a, CRYPTO_SECRETKEYBYTES);
|
randombytes(sk_a, CRYPTO_SECRETKEYBYTES);
|
||||||
|
|
||||||
// Alice uses Bobs response to get her secret key
|
// Alice uses Bobs response to get her secret key
|
||||||
if ((returncode = crypto_kem_dec(key_a, sendb, sk_a)) > -1) {
|
if ((returncode = crypto_kem_dec(key_a, sendb, sk_a)) > 0) {
|
||||||
printf("ERROR failing crypto_kem_dec returned %d instead of negative code\n", returncode);
|
printf("ERROR failing crypto_kem_dec returned %d instead of negative or zero code\n", returncode);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user