From: Tomas Mraz Date: Fri, 11 Nov 2022 11:29:52 +0000 (+0100) Subject: evp_extra_test2: Test DH param checks with non-NULL libctx X-Git-Tag: openssl-3.2.0-alpha1~1705 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e38e0acf4e1681ae32fa1b164adbc08719bd613;p=thirdparty%2Fopenssl.git evp_extra_test2: Test DH param checks with non-NULL libctx Reviewed-by: Paul Dale Reviewed-by: Shane Lontis Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/19656) --- diff --git a/test/evp_extra_test2.c b/test/evp_extra_test2.c index 3daa2e19858..44ce4aed011 100644 --- a/test/evp_extra_test2.c +++ b/test/evp_extra_test2.c @@ -376,6 +376,13 @@ static int test_dh_paramgen(void) && TEST_true(EVP_PKEY_paramgen(gctx, &pkey)) && TEST_ptr(pkey); + EVP_PKEY_CTX_free(gctx); + gctx = NULL; + + ret = ret && TEST_ptr(gctx = EVP_PKEY_CTX_new_from_pkey(mainctx, pkey, NULL)) + && TEST_int_eq(EVP_PKEY_param_check(gctx), 1) + && TEST_int_eq(EVP_PKEY_param_check_quick(gctx), 1); + EVP_PKEY_CTX_free(gctx); EVP_PKEY_free(pkey); return ret;