summaryrefslogtreecommitdiffstats
path: root/test/acvp_test.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-14 23:52:56 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-16 17:32:45 +0100
commit84201d47b4a8f2c358f014448d89dfde5c6217fe (patch)
tree5ee5858380b6101642520eed9cee18485d618777 /test/acvp_test.c
parentee3928f23175b4e7248b8e48d46a0bbe84ebb7da (diff)
EVP_PKEY_paramgen_init: fix return check
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17030) (cherry picked from commit 6e0b05f3008a3f22105fd2bed9314b0bfa381f93)
Diffstat (limited to 'test/acvp_test.c')
-rw-r--r--test/acvp_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c
index 4b6632e689..89b5400fea 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -340,7 +340,7 @@ static EVP_PKEY *dsa_paramgen(int L, int N)
EVP_PKEY *param_key = NULL;
if (!TEST_ptr(paramgen_ctx = EVP_PKEY_CTX_new_from_name(libctx, "DSA", NULL))
- || !TEST_true(EVP_PKEY_paramgen_init(paramgen_ctx))
+ || !TEST_int_gt(EVP_PKEY_paramgen_init(paramgen_ctx), 0)
|| !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_bits(paramgen_ctx, L))
|| !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_q_bits(paramgen_ctx, N))
|| !TEST_true(EVP_PKEY_paramgen(paramgen_ctx, &param_key)))
@@ -416,7 +416,7 @@ static int dsa_paramgen_test(int id)
const struct dsa_paramgen_st *tst = &dsa_paramgen_data[id];
if (!TEST_ptr(paramgen_ctx = EVP_PKEY_CTX_new_from_name(libctx, "DSA", NULL))
- || !TEST_true(EVP_PKEY_paramgen_init(paramgen_ctx))
+ || !TEST_int_gt(EVP_PKEY_paramgen_init(paramgen_ctx), 0)
|| !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_bits(paramgen_ctx, tst->L))
|| !TEST_true(EVP_PKEY_CTX_set_dsa_paramgen_q_bits(paramgen_ctx, tst->N))
|| !TEST_true(EVP_PKEY_paramgen(paramgen_ctx, &param_key))