summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/bn/exptest.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/bn/exptest.c')
-rw-r--r--crypto/openssl/crypto/bn/exptest.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/crypto/openssl/crypto/bn/exptest.c b/crypto/openssl/crypto/bn/exptest.c
index 3e86f2e..621e6a9 100644
--- a/crypto/openssl/crypto/bn/exptest.c
+++ b/crypto/openssl/crypto/bn/exptest.c
@@ -59,11 +59,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
+#include "../e_os.h"
+
#include <openssl/bio.h>
#include <openssl/bn.h>
#include <openssl/rand.h>
#include <openssl/err.h>
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
#include "../bio/bss_file.c"
#endif
@@ -86,7 +89,7 @@ int main(int argc, char *argv[])
ERR_load_BN_strings();
ctx=BN_CTX_new();
- if (ctx == NULL) exit(1);
+ if (ctx == NULL) EXIT(1);
r_mont=BN_new();
r_recp=BN_new();
r_simple=BN_new();
@@ -99,7 +102,7 @@ int main(int argc, char *argv[])
out=BIO_new(BIO_s_file());
- if (out == NULL) exit(1);
+ if (out == NULL) EXIT(1);
BIO_set_fp(out,stdout,BIO_NOCLOSE);
for (i=0; i<200; i++)
@@ -124,7 +127,7 @@ int main(int argc, char *argv[])
{
printf("BN_mod_exp_mont() problems\n");
ERR_print_errors(out);
- exit(1);
+ EXIT(1);
}
ret=BN_mod_exp_recp(r_recp,a,b,m,ctx);
@@ -132,7 +135,7 @@ int main(int argc, char *argv[])
{
printf("BN_mod_exp_recp() problems\n");
ERR_print_errors(out);
- exit(1);
+ EXIT(1);
}
ret=BN_mod_exp_simple(r_simple,a,b,m,ctx);
@@ -140,7 +143,7 @@ int main(int argc, char *argv[])
{
printf("BN_mod_exp_simple() problems\n");
ERR_print_errors(out);
- exit(1);
+ EXIT(1);
}
if (BN_cmp(r_simple, r_mont) == 0
@@ -163,7 +166,7 @@ int main(int argc, char *argv[])
printf("\nrecp ="); BN_print(out,r_recp);
printf("\nmont ="); BN_print(out,r_mont);
printf("\n");
- exit(1);
+ EXIT(1);
}
}
BN_free(r_mont);
@@ -177,11 +180,11 @@ int main(int argc, char *argv[])
CRYPTO_mem_leaks(out);
BIO_free(out);
printf(" done\n");
- exit(0);
+ EXIT(0);
err:
ERR_load_crypto_strings();
ERR_print_errors(out);
- exit(1);
+ EXIT(1);
return(1);
}
OpenPOWER on IntegriCloud