Skip to content

Commit

Permalink
DH_check[_params]() use libctx of the dh for prime checks
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)

(cherry picked from commit 7c639f0)
  • Loading branch information
t8m authored and hlandau committed Nov 18, 2022
1 parent 52ca4c4 commit b049d9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/dh/dh_check.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b049d9a

Please sign in to comment.