summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/bn/bn_mul.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2017-11-02 18:30:41 +0000
committerRenato Botelho <renato@netgate.com>2017-11-13 15:16:56 -0200
commit3c265be35a8193948998f35886be227dff6eab48 (patch)
tree736b8c2419a99e19b4e8237112412c9e4a1cba66 /crypto/openssl/crypto/bn/bn_mul.c
parent70ee3cb33663d3f5f9666994a129f8053d8ef7b5 (diff)
downloadFreeBSD-src-3c265be35a8193948998f35886be227dff6eab48.zip
FreeBSD-src-3c265be35a8193948998f35886be227dff6eab48.tar.gz
MFC: r325328
Merge OpenSSL 1.0.2m. (cherry picked from commit a88f0513c4cf81f98bab740e4f112f1a6d7f4d42)
Diffstat (limited to 'crypto/openssl/crypto/bn/bn_mul.c')
-rw-r--r--crypto/openssl/crypto/bn/bn_mul.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/crypto/openssl/crypto/bn/bn_mul.c b/crypto/openssl/crypto/bn/bn_mul.c
index 3c618dc..6b455a7 100644
--- a/crypto/openssl/crypto/bn/bn_mul.c
+++ b/crypto/openssl/crypto/bn/bn_mul.c
@@ -1032,46 +1032,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)
OpenPOWER on IntegriCloud