diff options
author | Geoff Thorpe <geoff@openssl.org> | 2003-10-29 20:47:49 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2003-10-29 20:47:49 +0000 |
commit | 31166ec8f33f1d1af25901be4411d47ef15ff340 (patch) | |
tree | 736dc02aad43cb6ec9740c40419af02a3534307a /crypto/bn/bn_nist.c | |
parent | 27545970134d703ed96027aac9b67eced124eec3 (diff) |
Some provisional bignum debugging has begun to detect inconsistent BIGNUM
structures being passed in to or out of API functions, and this corrects a
couple of cases found so far.
Also, lop off a couple of bytes of white-space.
Diffstat (limited to 'crypto/bn/bn_nist.c')
-rw-r--r-- | crypto/bn/bn_nist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/bn/bn_nist.c b/crypto/bn/bn_nist.c index 19bd540725..2ababfbed1 100644 --- a/crypto/bn/bn_nist.c +++ b/crypto/bn/bn_nist.c @@ -823,6 +823,7 @@ int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, if (tmp->top == BN_NIST_521_TOP) tmp->d[BN_NIST_521_TOP-1] &= BN_NIST_521_TOP_MASK; + bn_fix_top(tmp); if (!BN_uadd(r, tmp, r)) return 0; top = r->top; @@ -838,6 +839,6 @@ int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, ret = 1; err: BN_CTX_end(ctx); - + return ret; } |