When OPENSSL_NO_DEPRECATED is defined, deprecated functions are (or should
[oweals/openssl.git] / crypto / bn / bn_gf2m.c
index dea1fd3b873c66d758aac81f2c9a7e88721eb503..6edd8ab22b746e903de69197a6d995f69c6281ad 100644 (file)
  *
  */
 
+/* NOTE: This file is licensed pursuant to the OpenSSL license below
+ * and may be modified; but after modifications, the above covenant
+ * may no longer apply!  In such cases, the corresponding paragraph
+ * ["In addition, Sun covenants ... causes the infringement."] and
+ * this note can be edited out; but please keep the Sun copyright
+ * notice and attribution. */
+
 /* ====================================================================
  * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
  *
@@ -846,7 +853,8 @@ 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;
+       int ret = 0, count = 0;
+       unsigned int j;
        BIGNUM *a, *z, *rho, *w, *w2, *tmp;
        
        BN_CTX_start(ctx);
@@ -867,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;
@@ -887,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;