summaryrefslogtreecommitdiffstats
path: root/test/acvp_test.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-14 16:52:56 +0100
committerTomas Mraz <tomas@openssl.org>2021-11-16 17:32:17 +0100
commit6e0b05f3008a3f22105fd2bed9314b0bfa381f93 (patch)
treebd96f31a34dda7b067425fac5a8992d879327390 /test/acvp_test.c
parentEVP_DigestVerifyFinal: fix test function and invocation (diff)
downloadopenssl-6e0b05f3008a3f22105fd2bed9314b0bfa381f93.tar.xz
openssl-6e0b05f3008a3f22105fd2bed9314b0bfa381f93.zip
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)
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))