diff options
author | Bodo Möller <bodo@openssl.org> | 2000-06-13 13:50:42 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-06-13 13:50:42 +0000 |
commit | c3b1424cc0c61fe0d7c0cdeccc50b001f8f66167 (patch) | |
tree | 60c81a68b718ef8cc38a6d154d94fc918705cb58 | |
parent | 8ba6d1b0cc9e2437901e5ee88fa8ac4146554105 (diff) | |
download | openssl-c3b1424cc0c61fe0d7c0cdeccc50b001f8f66167.tar.gz |
Use BN_CTX_end when exiting early from BN_mod_exp_mont_word because
BN_mod_exp_atalla could be used.
-rw-r--r-- | crypto/bn/bn_exp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c index 470946e536..863df241f8 100644 --- a/crypto/bn/bn_exp.c +++ b/crypto/bn/bn_exp.c @@ -692,7 +692,10 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, { BN_set_word(t, a); if (BN_mod_exp_atalla(rr, t, p, m)) + { + BN_CTX_end(ctx); return 1; + } } /* If it fails, try the other methods */ #endif |