summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-10-16 04:18:50 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-10-16 04:40:50 +0100
commitf33636faf77aa2b8bb96f75b9719cd3f5b41e3ba (patch)
treef996e1f854bea500a8280333296f667d9b0961b6 /crypto/bn
parent94f735cade663bc2126bab20f3f16c10b6b9f464 (diff)
Don't try 1**0 test with FIPS.
The 1**0 test will fail for FIPS capable builds because it uses the old BIGNUM code in the 1.2 FIPS module which can't be fixed. Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/exptest.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/bn/exptest.c b/crypto/bn/exptest.c
index 44a90e2c84..329a05dee2 100644
--- a/crypto/bn/exptest.c
+++ b/crypto/bn/exptest.c
@@ -71,6 +71,11 @@
static const char rnd_seed[] = "string to make the random number generator think it has entropy";
+/*
+ * Disabled for FIPS capable builds because they use the FIPS BIGNUM library
+ * which will fail this test.
+ */
+#ifndef OPENSSL_FIPS
/* test_exp_mod_zero tests that x**0 mod 1 == 0. It returns zero on success. */
static int test_exp_mod_zero() {
BIGNUM a, p, m;
@@ -107,7 +112,7 @@ static int test_exp_mod_zero() {
return ret;
}
-
+#endif
int main(int argc, char *argv[])
{
BN_CTX *ctx;
@@ -228,10 +233,10 @@ int main(int argc, char *argv[])
CRYPTO_mem_leaks(out);
BIO_free(out);
printf("\n");
-
+#ifndef OPENSSL_FIPS
if (test_exp_mod_zero() != 0)
goto err;
-
+#endif
printf("done\n");
EXIT(0);