summaryrefslogtreecommitdiffstats
path: root/test/evp_extra_test.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-14 17:57:57 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-22 14:43:44 +0100
commit0650ac437b529274aca094c516a5a0127bbaf48c (patch)
treee336c56a5f94100e8433c8a890e676136c1469e4 /test/evp_extra_test.c
parent546b9f6b5cf6d0fde60aa37084eec1bb7d0fbc72 (diff)
Fix EVP_PKEY_decrypt return check
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17028)
Diffstat (limited to 'test/evp_extra_test.c')
-rw-r--r--test/evp_extra_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index 7026753965..444b2796de 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -1940,8 +1940,8 @@ static int test_EVP_SM2(void)
if (!TEST_true(EVP_PKEY_CTX_set_params(cctx, sparams)))
goto done;
- if (!TEST_true(EVP_PKEY_decrypt(cctx, plaintext, &ptext_len, ciphertext,
- ctext_len)))
+ if (!TEST_int_gt(EVP_PKEY_decrypt(cctx, plaintext, &ptext_len, ciphertext,
+ ctext_len), 0))
goto done;
if (!TEST_true(EVP_PKEY_CTX_get_params(cctx, gparams)))