From 2714e2ac89f47168c88f7d0f7e0bfc8b8f44c155 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 24 Apr 2007 11:34:19 +0000 Subject: [PATCH] Merge from stable branch. --- crypto/bn/bn_div.c | 3 ++- crypto/bn/bn_gcd.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 9addaf158f..514b2c2c82 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -422,7 +422,7 @@ int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, if (BN_is_zero(divisor)) { - BNerr(BN_F_BN_DIV,BN_R_DIV_BY_ZERO); + BNerr(BN_F_BN_DIV_NO_BRANCH,BN_R_DIV_BY_ZERO); return(0); } @@ -618,6 +618,7 @@ X) -> 0x%08X\n", rm->neg = neg; bn_check_top(rm); } + bn_correct_top(res); BN_CTX_end(ctx); return(1); err: diff --git a/crypto/bn/bn_gcd.c b/crypto/bn/bn_gcd.c index 5fb8090c52..85e4b50c10 100644 --- a/crypto/bn/bn_gcd.c +++ b/crypto/bn/bn_gcd.c @@ -640,7 +640,7 @@ BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in, } else { - BNerr(BN_F_BN_MOD_INVERSE,BN_R_NO_INVERSE); + BNerr(BN_F_BN_MOD_INVERSE_NO_BRANCH,BN_R_NO_INVERSE); goto err; } ret=R; -- 2.40.0