diff options
-rw-r--r-- | src/lib/libcrypto/bn/bn_recp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_recp.c b/src/lib/libcrypto/bn/bn_recp.c index 5990413052..44c5b05e4d 100644 --- a/src/lib/libcrypto/bn/bn_recp.c +++ b/src/lib/libcrypto/bn/bn_recp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_recp.c,v 1.24 2025/01/08 20:18:12 tb Exp $ */ | 1 | /* $OpenBSD: bn_recp.c,v 1.25 2025/01/08 20:21:28 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 | * |
@@ -101,9 +101,11 @@ BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx) | |||
101 | { | 101 | { |
102 | if (!bn_copy(&recp->N, d)) | 102 | if (!bn_copy(&recp->N, d)) |
103 | return 0; | 103 | return 0; |
104 | recp->num_bits = BN_num_bits(&recp->N); | ||
105 | |||
104 | BN_zero(&recp->Nr); | 106 | BN_zero(&recp->Nr); |
105 | recp->num_bits = BN_num_bits(d); | ||
106 | recp->shift = 0; | 107 | recp->shift = 0; |
108 | |||
107 | return 1; | 109 | return 1; |
108 | } | 110 | } |
109 | 111 | ||
@@ -229,7 +231,6 @@ err: | |||
229 | return ret; | 231 | return ret; |
230 | } | 232 | } |
231 | 233 | ||
232 | |||
233 | int | 234 | int |
234 | BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, | 235 | BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, |
235 | BN_RECP_CTX *recp, BN_CTX *ctx) | 236 | BN_RECP_CTX *recp, BN_CTX *ctx) |