diff options
author | tb <> | 2025-02-13 11:09:51 +0000 |
---|---|---|
committer | tb <> | 2025-02-13 11:09:51 +0000 |
commit | f307469b52e7ab66fc7c5acb93cf47fa6b32d3e5 (patch) | |
tree | aac55683e32e36bd597962a03f9e0bca87e5021a | |
parent | ade8722cf772f75a9dd24ace7878bf2f0730171c (diff) | |
download | openbsd-f307469b52e7ab66fc7c5acb93cf47fa6b32d3e5.tar.gz openbsd-f307469b52e7ab66fc7c5acb93cf47fa6b32d3e5.tar.bz2 openbsd-f307469b52e7ab66fc7c5acb93cf47fa6b32d3e5.zip |
Convert BN_MONT_CTX_set_locked() to BN_MONT_CTX_create()
ok jsing
-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); |