summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bntest.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-10-21 17:48:38 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-10-29 22:23:31 +0000
commitecb9966e7c44896cf04ab577d4a5d27c9c5ddfac (patch)
treef23b9ba47aea26299a7e9e1232368d3403b43560 /crypto/bn/bntest.c
parentc381b63764dfb4d5a812cc51abaef423e73c49e5 (diff)
Fix WIN32 build by disabling bn* calls.
The trial division and probable prime with coprime tests are disabled on WIN32 builds because they use internal functions not exported from the WIN32 DLLs. Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/bn/bntest.c')
-rw-r--r--crypto/bn/bntest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c
index 697d77a370..6e18a69363 100644
--- a/crypto/bn/bntest.c
+++ b/crypto/bn/bntest.c
@@ -273,8 +273,12 @@ int main(int argc, char *argv[])
if (!test_small_prime(out,ctx)) goto err;
(void)BIO_flush(out);
+#ifdef OPENSSL_SYS_WIN32
+ message(out,"Probable prime generation with coprimes disabled");
+#else
message(out,"Probable prime generation with coprimes");
if (!test_probable_prime_coprime(out,ctx)) goto err;
+#endif
(void)BIO_flush(out);
#ifndef OPENSSL_NO_EC2M
@@ -1929,7 +1933,7 @@ err:
BN_clear(&r);
return ret;
}
-
+#ifndef OPENSSL_SYS_WIN32
int test_probable_prime_coprime(BIO *bp, BN_CTX *ctx)
{
int i, j, ret = 0;
@@ -1960,7 +1964,7 @@ err:
BN_clear(&r);
return ret;
}
-
+#endif
int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_)
{
BIGNUM *a,*b,*c,*d;