summaryrefslogtreecommitdiff
path: root/test/evp_libctx_test.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-15 00:05:04 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-16 17:33:14 +0100
commitbf4ceeded1497c79e72fba4f9ff15febae58108d (patch)
tree43f9440ff190f53d5a5f3f89d7055f358613eb1b /test/evp_libctx_test.c
parent6e0b05f3008a3f22105fd2bed9314b0bfa381f93 (diff)
downloadopenssl-new-bf4ceeded1497c79e72fba4f9ff15febae58108d.tar.gz
EVP_PKEY_keygen_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/17031)
Diffstat (limited to 'test/evp_libctx_test.c')
-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 e3eac8a068..e2663dc029 100644
--- a/test/evp_libctx_test.c
+++ b/test/evp_libctx_test.c
@@ -669,7 +669,7 @@ static EVP_PKEY *gen_dh_key(void)
params[1] = OSSL_PARAM_construct_end();
if (!TEST_ptr(gctx = EVP_PKEY_CTX_new_from_name(libctx, "DH", NULL))
- || !TEST_true(EVP_PKEY_keygen_init(gctx))
+ || !TEST_int_gt(EVP_PKEY_keygen_init(gctx), 0)
|| !TEST_true(EVP_PKEY_CTX_set_params(gctx, params))
|| !TEST_true(EVP_PKEY_keygen(gctx, &pkey)))
goto err;