diff options
author | Bodo Möller <bodo@openssl.org> | 2000-12-07 08:48:58 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-12-07 08:48:58 +0000 |
commit | 80d89e6a6aa6d9520336c78877c3cccb54c881cd (patch) | |
tree | cade543f271b28bf56ba601bc9f993dc2f5e8e95 /crypto/bn/bn_div.c | |
parent | bc5f2740d2a427d5e16bfb12aa8b70d5a5adcfc8 (diff) | |
download | openssl-80d89e6a6aa6d9520336c78877c3cccb54c881cd.tar.gz |
Sign-related fixes (and tests).
BN_mod_exp_mont does not work properly yet if modulus m
is negative (we want computations to be carried out
modulo |m|).
Diffstat (limited to 'crypto/bn/bn_div.c')
-rw-r--r-- | crypto/bn/bn_div.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 2e600c7c54..64b84ac1a7 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -241,6 +241,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, } else res->top--; + if (res->top == 0) + res->neg = 0; resp--; for (i=0; i<loop-1; i++) |