summaryrefslogtreecommitdiffstats
path: root/test/aesgcmtest.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-24 22:57:53 +0800
committerTomas Mraz <tomas@openssl.org>2022-05-27 07:57:43 +0200
commit8d9fec1781751d2106d899c6076eeb3da6930bfe (patch)
treedeec4da4593daac6aecf5cf605efaf1fd936a73b /test/aesgcmtest.c
parent7e5e91176b770a68bdaf73a5c647f1fc0d7f2900 (diff)
Fix the incorrect checks of EVP_CIPHER_CTX_set_key_length
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18397)
Diffstat (limited to 'test/aesgcmtest.c')
-rw-r--r--test/aesgcmtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/aesgcmtest.c b/test/aesgcmtest.c
index c371f4754e..119d316a26 100644
--- a/test/aesgcmtest.c
+++ b/test/aesgcmtest.c
@@ -111,7 +111,7 @@ static int badkeylen_test(void)
ret = TEST_ptr(cipher = EVP_aes_192_gcm())
&& TEST_ptr(ctx = EVP_CIPHER_CTX_new())
&& TEST_true(EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL))
- && TEST_false(EVP_CIPHER_CTX_set_key_length(ctx, 2));
+ && TEST_int_le(EVP_CIPHER_CTX_set_key_length(ctx, 2), 0);
EVP_CIPHER_CTX_free(ctx);
return ret;
}