summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-24 22:59:41 +0800
committerTomas Mraz <tomas@openssl.org>2022-05-27 07:58:47 +0200
commit275037b3fd7c0b3d3a22eaa66fdb41ed86510b96 (patch)
tree8a23649eccc26afb07af3d12872ce7afbc2bdeaf /test
parentacd6338ff0afa31730a0cff62d993a8ebc63db5c (diff)
Fix the incorrect checks of EVP_CIPHER_CTX_rand_key
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18397) (cherry picked from commit f15e3f3aa95df743f0da793da952f87370efb4ff)
Diffstat (limited to 'test')
-rw-r--r--test/evp_libctx_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/evp_libctx_test.c b/test/evp_libctx_test.c
index 65f5f694bf..2448c35a14 100644
--- a/test/evp_libctx_test.c
+++ b/test/evp_libctx_test.c
@@ -576,7 +576,7 @@ static int test_cipher_tdes_randkey(void)
&& TEST_int_ne(EVP_CIPHER_get_flags(tdes_cipher) & EVP_CIPH_RAND_KEY, 0)
&& TEST_ptr(ctx = EVP_CIPHER_CTX_new())
&& TEST_true(EVP_CipherInit_ex(ctx, tdes_cipher, NULL, NULL, NULL, 1))
- && TEST_true(EVP_CIPHER_CTX_rand_key(ctx, key));
+ && TEST_int_gt(EVP_CIPHER_CTX_rand_key(ctx, key), 0);
EVP_CIPHER_CTX_free(ctx);
EVP_CIPHER_free(tdes_cipher);