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 openssl#19656)
  • Loading branch information
t8m authored and pull[bot] committed Nov 1, 2023
1 parent 53451b9 commit 1463574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/dh/dh_check.c
Original file line number Diff line number Diff line change
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 1463574

Please sign in to comment.