diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index b778d5d67c..3525b50388 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_exp.c,v 1.31 2017/05/02 03:59:44 deraadt Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.32 2022/04/20 13:32:34 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 | * |
| @@ -278,13 +278,14 @@ BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, | |||
| 278 | return ret; | 278 | return ret; |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | BN_RECP_CTX_init(&recp); | ||
| 282 | |||
| 281 | BN_CTX_start(ctx); | 283 | BN_CTX_start(ctx); |
| 282 | if ((aa = BN_CTX_get(ctx)) == NULL) | 284 | if ((aa = BN_CTX_get(ctx)) == NULL) |
| 283 | goto err; | 285 | goto err; |
| 284 | if ((val[0] = BN_CTX_get(ctx)) == NULL) | 286 | if ((val[0] = BN_CTX_get(ctx)) == NULL) |
| 285 | goto err; | 287 | goto err; |
| 286 | 288 | ||
| 287 | BN_RECP_CTX_init(&recp); | ||
| 288 | if (m->neg) { | 289 | if (m->neg) { |
| 289 | /* ignore sign of 'm' */ | 290 | /* ignore sign of 'm' */ |
| 290 | if (!BN_copy(aa, m)) | 291 | if (!BN_copy(aa, m)) |
