From c2747e6860c20d233d64946e8e6cb383337c0ff7 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Tue, 29 Jan 2019 17:32:30 +0100 Subject: [PATCH] Further fix the zero return codes for bad kem ops --- test/crypto_kem/functest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/crypto_kem/functest.c b/test/crypto_kem/functest.c index 51a3996e..46139be9 100644 --- a/test/crypto_kem/functest.c +++ b/test/crypto_kem/functest.c @@ -101,8 +101,8 @@ static int test_invalid_sk_a(void) { randombytes(sk_a, CRYPTO_SECRETKEYBYTES); // Alice uses Bobs response to get her secret key - if ((returncode = crypto_kem_dec(key_a, sendb, sk_a)) > -1) { - printf("ERROR failing crypto_kem_dec returned %d instead of negative code\n", returncode); + if ((returncode = crypto_kem_dec(key_a, sendb, sk_a)) > 0) { + printf("ERROR failing crypto_kem_dec returned %d instead of negative or zero code\n", returncode); return -1; }