Skip to content

Commit

Permalink
evp_extra_test2: Test DH param checks with non-NULL libctx
Browse files Browse the repository at this point in the history
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #19656)
  • Loading branch information
t8m authored and hlandau committed Nov 18, 2022
1 parent 7c639f0 commit 5e38e0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/evp_extra_test2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e38e0a

Please sign in to comment.