提交 c3b1424c 编写于 作者: B Bodo Möller

Use BN_CTX_end when exiting early from BN_mod_exp_mont_word because

BN_mod_exp_atalla could be used.
上级 8ba6d1b0
...@@ -692,8 +692,11 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, ...@@ -692,8 +692,11 @@ int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
{ {
BN_set_word(t, a); BN_set_word(t, a);
if (BN_mod_exp_atalla(rr, t, p, m)) if (BN_mod_exp_atalla(rr, t, p, m))
{
BN_CTX_end(ctx);
return 1; return 1;
} }
}
/* If it fails, try the other methods */ /* If it fails, try the other methods */
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册