mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 23:14:37 +08:00
Bug fix.
This commit is contained in:
parent
7a2dfc2a20
commit
0b8fa44ef0
@ -73,6 +73,7 @@ int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b,
|
||||
BN_MONT_CTX *mont, BN_CTX *ctx)
|
||||
{
|
||||
BIGNUM *tmp,*tmp2;
|
||||
int ret=0;
|
||||
|
||||
BN_CTX_start(ctx);
|
||||
tmp = BN_CTX_get(ctx);
|
||||
@ -101,10 +102,10 @@ int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b,
|
||||
}
|
||||
/* reduce from aRR to aR */
|
||||
if (!BN_from_montgomery(r,tmp,mont,ctx)) goto err;
|
||||
BN_CTX_end(ctx);
|
||||
return(1);
|
||||
ret=1;
|
||||
err:
|
||||
return(0);
|
||||
BN_CTX_end(ctx);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont,
|
||||
|
Loading…
Reference in New Issue
Block a user