diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_crpt.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_crpt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_crpt.c b/src/lib/libcrypto/rsa/rsa_crpt.c index ccb677c12b..8063a83263 100644 --- a/src/lib/libcrypto/rsa/rsa_crpt.c +++ b/src/lib/libcrypto/rsa/rsa_crpt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_crpt.c,v 1.16 2016/07/07 11:53:12 bcook Exp $ */ | 1 | /* $OpenBSD: rsa_crpt.c,v 1.17 2017/01/21 11:00:47 beck 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 | * |
@@ -66,6 +66,8 @@ | |||
66 | #include <openssl/lhash.h> | 66 | #include <openssl/lhash.h> |
67 | #include <openssl/rsa.h> | 67 | #include <openssl/rsa.h> |
68 | 68 | ||
69 | #include "bn_lcl.h" | ||
70 | |||
69 | #ifndef OPENSSL_NO_ENGINE | 71 | #ifndef OPENSSL_NO_ENGINE |
70 | #include <openssl/engine.h> | 72 | #include <openssl/engine.h> |
71 | #endif | 73 | #endif |
@@ -160,7 +162,7 @@ rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q, | |||
160 | if (!BN_mul(r0, r1, r2, ctx)) | 162 | if (!BN_mul(r0, r1, r2, ctx)) |
161 | goto err; | 163 | goto err; |
162 | 164 | ||
163 | ret = BN_mod_inverse(NULL, d, r0, ctx); | 165 | ret = BN_mod_inverse_ct(NULL, d, r0, ctx); |
164 | err: | 166 | err: |
165 | BN_CTX_end(ctx); | 167 | BN_CTX_end(ctx); |
166 | return ret; | 168 | return ret; |