From: Tomas Mraz Date: Fri, 11 Nov 2022 11:29:44 +0000 (+0100) Subject: DH_check[_params]() use libctx of the dh for prime checks X-Git-Tag: openssl-3.2.0-alpha1~1706 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c639f0b8e97b8290b9f935e83d5e948614c5bf7;p=thirdparty%2Fopenssl.git DH_check[_params]() use libctx of the dh for prime checks Reviewed-by: Paul Dale Reviewed-by: Shane Lontis Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/19656) --- diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c index e7f567bd3d7..0b8a17c6758 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);