summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-11-11 12:29:44 +0100
committerHugo Landau <hlandau@openssl.org>2022-11-18 06:58:21 +0000
commit2bc3854a6cf7e60f60ebc3932062b0dd456ea690 (patch)
tree89b76acd15f5873bef17893015c7ec7a2e339a71
parent9aa9d6a94266a8f21875035ab940f799429dabd1 (diff)
DH_check[_params]() use libctx of the dh for prime checks
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19656) (cherry picked from commit 7c639f0b8e97b8290b9f935e83d5e948614c5bf7)
-rw-r--r--crypto/dh/dh_check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c
index c4b4ee8ff0..0b391910d6 100644
--- a/crypto/dh/dh_check.c
+++ b/crypto/dh/dh_check.c
@@ -73,7 +73,7 @@ int DH_check_params(const DH *dh, int *ret)
BN_CTX *ctx = NULL;
*ret = 0;
- ctx = BN_CTX_new();
+ ctx = BN_CTX_new_ex(dh->libctx);
if (ctx == NULL)
goto err;
BN_CTX_start(ctx);
@@ -155,7 +155,7 @@ int DH_check(const DH *dh, int *ret)
if (!DH_check_params(dh, ret))
return 0;
- ctx = BN_CTX_new();
+ ctx = BN_CTX_new_ex(dh->libctx);
if (ctx == NULL)
goto err;
BN_CTX_start(ctx);