[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Andy Polyakov appro at openssl.org
Sat Jun 17 12:20:54 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  efd10d34b3d3d3e694d6f4667e09efba1fde51f1 (commit)
      from  562f060dea132cdcd6a671c14e09e52387c2ad46 (commit)


- Log -----------------------------------------------------------------
commit efd10d34b3d3d3e694d6f4667e09efba1fde51f1
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Wed Jun 14 21:54:15 2017 +0200

    Remove a pointless "#if 0" block from BN_mul.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3683)
    
    (cherry picked from commit 93a8b3ba793c769a3634e56642dac55a8d44023f)

-----------------------------------------------------------------------

Summary of changes:
 crypto/bn/bn_mul.c | 40 ----------------------------------------
 1 file changed, 40 deletions(-)

diff --git a/crypto/bn/bn_mul.c b/crypto/bn/bn_mul.c
index 4a0a950..0892704 100644
--- a/crypto/bn/bn_mul.c
+++ b/crypto/bn/bn_mul.c
@@ -918,46 +918,6 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
             rr->top = top;
             goto end;
         }
-# if 0
-        if (i == 1 && !BN_get_flags(b, BN_FLG_STATIC_DATA)) {
-            BIGNUM *tmp_bn = (BIGNUM *)b;
-            if (bn_wexpand(tmp_bn, al) == NULL)
-                goto err;
-            tmp_bn->d[bl] = 0;
-            bl++;
-            i--;
-        } else if (i == -1 && !BN_get_flags(a, BN_FLG_STATIC_DATA)) {
-            BIGNUM *tmp_bn = (BIGNUM *)a;
-            if (bn_wexpand(tmp_bn, bl) == NULL)
-                goto err;
-            tmp_bn->d[al] = 0;
-            al++;
-            i++;
-        }
-        if (i == 0) {
-            /* symmetric and > 4 */
-            /* 16 or larger */
-            j = BN_num_bits_word((BN_ULONG)al);
-            j = 1 << (j - 1);
-            k = j + j;
-            t = BN_CTX_get(ctx);
-            if (al == j) {      /* exact multiple */
-                if (bn_wexpand(t, k * 2) == NULL)
-                    goto err;
-                if (bn_wexpand(rr, k * 2) == NULL)
-                    goto err;
-                bn_mul_recursive(rr->d, a->d, b->d, al, t->d);
-            } else {
-                if (bn_wexpand(t, k * 4) == NULL)
-                    goto err;
-                if (bn_wexpand(rr, k * 4) == NULL)
-                    goto err;
-                bn_mul_part_recursive(rr->d, a->d, b->d, al - j, j, t->d);
-            }
-            rr->top = top;
-            goto end;
-        }
-# endif
     }
 #endif                          /* BN_RECURSION */
     if (bn_wexpand(rr, top) == NULL)


More information about the openssl-commits mailing list