summaryrefslogtreecommitdiffstats
path: root/test/acvp_test.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-24 23:57:33 +0800
committerTomas Mraz <tomas@openssl.org>2022-06-02 11:09:36 +0200
commit4bd3fc8d74ce663692d7169ab8ee744e43e61a66 (patch)
tree06ffc5054e42cd92a57461209d54b03486a8f3ea /test/acvp_test.c
parent69e29db8873bcfd0f1befaad9fc3740e92f0de87 (diff)
Fix the checks of EVP_PKEY_CTX_set/get_* functions
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18399) (cherry picked from commit 2cba2e160d5b028e4a777e8038744a8bc4280629)
Diffstat (limited to 'test/acvp_test.c')
-rw-r--r--test/acvp_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c
index 7d404f3b5e..b451cafcd9 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -1091,9 +1091,9 @@ static int rsa_keygen_test(int id)
if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "RSA", NULL))
|| !TEST_ptr(e_bn = BN_bin2bn(tst->e, tst->e_len, NULL))
|| !TEST_int_gt(EVP_PKEY_keygen_init(ctx), 0)
- || !TEST_true(EVP_PKEY_CTX_set_params(ctx, params))
- || !TEST_true(EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, tst->mod))
- || !TEST_true(EVP_PKEY_CTX_set1_rsa_keygen_pubexp(ctx, e_bn))
+ || !TEST_int_gt(EVP_PKEY_CTX_set_params(ctx, params), 0)
+ || !TEST_int_gt(EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, tst->mod), 0)
+ || !TEST_int_gt(EVP_PKEY_CTX_set1_rsa_keygen_pubexp(ctx, e_bn), 0)
|| !TEST_int_gt(EVP_PKEY_keygen(ctx, &pkey), 0)
|| !TEST_true(pkey_get_bn_bytes(pkey, OSSL_PKEY_PARAM_RSA_TEST_P1,
&p1, &p1_len))