summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2023-01-07 07:58:21 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2023-01-14 11:40:05 +0100
commit54eb24982b6bd94dc8dbe7792bab090d382dd4e5 (patch)
tree98fef0412021d70b7487fd7c439e111f41ab8d58 /test
parent18308d6616c13a19094b4fae5cd0d728cae4964c (diff)
Revert "Limit size of modulus for BN_mod_exp_mont_consttime()"
This reverts commit 4378e3cd2a4d73a97a2349efaa143059d8ed05e8. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/20005) (cherry picked from commit 92d306b32b63dd502531a89fb96c4172be0ddb49)
Diffstat (limited to 'test')
-rw-r--r--test/exptest.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/exptest.c b/test/exptest.c
index faef53e026..1844f5d69b 100644
--- a/test/exptest.c
+++ b/test/exptest.c
@@ -50,7 +50,6 @@ static int test_mod_exp_zero(void)
BN_ULONG one_word = 1;
BN_CTX *ctx = BN_CTX_new();
int ret = 0, failed = 0;
- BN_MONT_CTX *mont = NULL;
if (!TEST_ptr(m = BN_new())
|| !TEST_ptr(a = BN_new())
@@ -95,24 +94,6 @@ static int test_mod_exp_zero(void)
if (!TEST_true(a_is_zero_mod_one("BN_mod_exp_mont_consttime", r, a)))
failed = 1;
- if (!TEST_ptr(mont = BN_MONT_CTX_new()))
- goto err;
-
- ERR_set_mark();
- /* mont is not set but passed in */
- if (!TEST_false(BN_mod_exp_mont_consttime(r, a, p, m, ctx, mont)))
- goto err;
- ERR_pop_to_mark();
-
- if (!TEST_true(BN_MONT_CTX_set(mont, m, ctx)))
- goto err;
-
- if (!TEST_true(BN_mod_exp_mont_consttime(r, a, p, m, ctx, mont)))
- goto err;
-
- if (!TEST_true(a_is_zero_mod_one("BN_mod_exp_mont_consttime", r, a)))
- failed = 1;
-
/*
* A different codepath exists for single word multiplication
* in non-constant-time only.
@@ -133,7 +114,6 @@ static int test_mod_exp_zero(void)
BN_free(a);
BN_free(p);
BN_free(m);
- BN_MONT_CTX_free(mont);
BN_CTX_free(ctx);
return ret;