summaryrefslogtreecommitdiff
path: root/crypto/dh
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh_gen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/dh/dh_gen.c b/crypto/dh/dh_gen.c
index 628410c0d3..b73bfb7f3b 100644
--- a/crypto/dh/dh_gen.c
+++ b/crypto/dh/dh_gen.c
@@ -170,7 +170,7 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator,
return 0;
}
- ctx = BN_CTX_new();
+ ctx = BN_CTX_new_ex(ret->libctx);
if (ctx == NULL)
goto err;
BN_CTX_start(ctx);
@@ -214,7 +214,7 @@ static int dh_builtin_genparams(DH *ret, int prime_len, int generator,
g = generator;
}
- if (!BN_generate_prime_ex(ret->params.p, prime_len, 1, t1, t2, cb))
+ if (!BN_generate_prime_ex2(ret->params.p, prime_len, 1, t1, t2, cb, ctx))
goto err;
if (!BN_GENCB_call(cb, 3, 0))
goto err;