summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_sqr.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-11-26 16:42:38 +0000
committerBodo Möller <bodo@openssl.org>2000-11-26 16:42:38 +0000
commit78a0c1f18d5a1f0e51b7467ef7b153b8c29fbb03 (patch)
tree631b1606ee2f90a5fcaf2f141461113d30c7f5a8 /crypto/bn/bn_sqr.c
parent6cc5e19d4710d7d3355bf6fa05c3d7269e48428f (diff)
modular arithmetics
"make update"
Diffstat (limited to 'crypto/bn/bn_sqr.c')
-rw-r--r--crypto/bn/bn_sqr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c
index eb52c4e828..b75e6194d0 100644
--- a/crypto/bn/bn_sqr.c
+++ b/crypto/bn/bn_sqr.c
@@ -88,7 +88,6 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
max=(al+al);
if (bn_wexpand(rr,max+1) == NULL) goto err;
- r->neg=0;
if (al == 4)
{
#ifndef BN_SQR_COMBA
@@ -140,6 +139,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
}
rr->top=max;
+ rr->neg=0;
if ((max > 0) && (rr->d[max-1] == 0)) rr->top--;
if (rr != r) BN_copy(r,rr);
ret = 1;