Commit c3b1424c authored by Bodo Möller's avatar Bodo Möller
Browse files

Use BN_CTX_end when exiting early from BN_mod_exp_mont_word because

BN_mod_exp_atalla could be used.
parent 8ba6d1b0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -692,8 +692,11 @@ 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