diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bn/bn_mont.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_mont.c b/src/lib/libcrypto/bn/bn_mont.c index cfdc7e510f..9d0d2579d9 100644 --- a/src/lib/libcrypto/bn/bn_mont.c +++ b/src/lib/libcrypto/bn/bn_mont.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mont.c,v 1.64 2025/02/13 11:04:20 tb Exp $ */ | 1 | /* $OpenBSD: bn_mont.c,v 1.65 2025/02/13 11:09:51 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -293,9 +293,7 @@ BN_MONT_CTX_set_locked(BN_MONT_CTX **pmctx, int lock, const BIGNUM *mod, | |||
293 | if (mctx != NULL) | 293 | if (mctx != NULL) |
294 | goto done; | 294 | goto done; |
295 | 295 | ||
296 | if ((mctx = BN_MONT_CTX_new()) == NULL) | 296 | if ((mctx = BN_MONT_CTX_create(mod, ctx)) == NULL) |
297 | goto err; | ||
298 | if (!BN_MONT_CTX_set(mctx, mod, ctx)) | ||
299 | goto err; | 297 | goto err; |
300 | 298 | ||
301 | CRYPTO_w_lock(lock); | 299 | CRYPTO_w_lock(lock); |