summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2004-02-22 19:30:41 +0000
committerGeoff Thorpe <geoff@openssl.org>2004-02-22 19:30:41 +0000
commit1b06804491c8cd5a7bb1e4911578351bbe91a2af (patch)
tree3580439bc5b2b30a32fc5c9549d7612e089f9b7a /crypto
parentdc90f64d563f2c9709749d0731d6b26c6bce5325 (diff)
downloadopenssl-new-1b06804491c8cd5a7bb1e4911578351bbe91a2af.tar.gz
When adding positive elements, we can use BN_uadd() instead of BN_add().
Submitted by: Nils Larsch Reviewed by: Geoff Thorpe
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bn/bn_mod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_mod.c b/crypto/bn/bn_mod.c
index 61b7255098..77d6ddb91a 100644
--- a/crypto/bn/bn_mod.c
+++ b/crypto/bn/bn_mod.c
@@ -149,7 +149,7 @@ int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_
* and less than m */
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m)
{
- if (!BN_add(r, a, b)) return 0;
+ if (!BN_uadd(r, a, b)) return 0;
if (BN_ucmp(r, m) >= 0)
return BN_usub(r, r, m);
return 1;