summaryrefslogtreecommitdiff
path: root/crypto/bn/bn_gf2m.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-19 11:28:28 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-19 11:28:28 +0000
commit821385ad0018be9d2e6821c8c933c48b9b79ecc6 (patch)
tree95fb899becdc2ce36c63f066aa8605b4a79766fa /crypto/bn/bn_gf2m.c
parent25ff76d565024196f48bc8f55d088d950911b369 (diff)
downloadopenssl-new-821385ad0018be9d2e6821c8c933c48b9b79ecc6.tar.gz
Fix an unsigned/signed mismatch.
Diffstat (limited to 'crypto/bn/bn_gf2m.c')
-rw-r--r--crypto/bn/bn_gf2m.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c
index 24906c9c32..826a0497e8 100644
--- a/crypto/bn/bn_gf2m.c
+++ b/crypto/bn/bn_gf2m.c
@@ -854,6 +854,7 @@ int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p[], BN_CTX *ctx)
{
int ret = 0, i, count = 0;
+ unsigned int j;
BIGNUM *a, *z, *rho, *w, *w2, *tmp;
BN_CTX_start(ctx);
@@ -874,7 +875,7 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p
{
/* compute half-trace of a */
if (!BN_copy(z, a)) goto err;
- for (i = 1; i <= (p[0] - 1) / 2; i++)
+ for (j = 1; j <= (p[0] - 1) / 2; j++)
{
if (!BN_GF2m_mod_sqr_arr(z, z, p, ctx)) goto err;
if (!BN_GF2m_mod_sqr_arr(z, z, p, ctx)) goto err;
@@ -894,7 +895,7 @@ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a_, const unsigned int p
if (!BN_GF2m_mod_arr(rho, rho, p)) goto err;
if (!BN_zero(z)) goto err;
if (!BN_copy(w, rho)) goto err;
- for (i = 1; i <= p[0] - 1; i++)
+ for (j = 1; j <= p[0] - 1; j++)
{
if (!BN_GF2m_mod_sqr_arr(z, z, p, ctx)) goto err;
if (!BN_GF2m_mod_sqr_arr(w2, w, p, ctx)) goto err;