projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make Windows compilers happy.
[openssl.git]
/
crypto
/
bn
/
exptest.c
diff --git
a/crypto/bn/exptest.c
b/crypto/bn/exptest.c
index 67dc95d72602d20e1a8dda0a3048a6b5b4110ef4..1ec61c2c87be40b0bc1ccad2aca8990b545fe048 100644
(file)
--- a/
crypto/bn/exptest.c
+++ b/
crypto/bn/exptest.c
@@
-79,6
+79,8
@@
char *argv[];
unsigned char c;
BIGNUM *r_mont,*r_recp,*a,*b,*m;
unsigned char c;
BIGNUM *r_mont,*r_recp,*a,*b,*m;
+ ERR_load_BN_strings();
+
ctx=BN_CTX_new();
if (ctx == NULL) exit(1);
r_mont=BN_new();
ctx=BN_CTX_new();
if (ctx == NULL) exit(1);
r_mont=BN_new();
@@
-114,11
+116,19
@@
char *argv[];
ret=BN_mod_exp_mont(r_mont,a,b,m,ctx,NULL);
if (ret <= 0)
ret=BN_mod_exp_mont(r_mont,a,b,m,ctx,NULL);
if (ret <= 0)
- { printf("BN_mod_exp_mont() problems\n"); exit(1); }
+ {
+ printf("BN_mod_exp_mont() problems\n");
+ ERR_print_errors(out);
+ exit(1);
+ }
ret=BN_mod_exp_recp(r_recp,a,b,m,ctx);
if (ret <= 0)
ret=BN_mod_exp_recp(r_recp,a,b,m,ctx);
if (ret <= 0)
- { printf("BN_mod_exp_recp() problems\n"); exit(1); }
+ {
+ printf("BN_mod_exp_recp() problems\n");
+ ERR_print_errors(out);
+ exit(1);
+ }
if (BN_cmp(r_mont,r_recp) != 0)
{
if (BN_cmp(r_mont,r_recp) != 0)
{
@@
-137,6
+147,7
@@
char *argv[];
fflush(stdout);
}
}
fflush(stdout);
}
}
+ CRYPTO_mem_leaks(out);
printf(" done\n");
exit(0);
err:
printf(" done\n");
exit(0);
err: