summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dhtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dh/dhtest.c')
-rw-r--r--src/lib/libcrypto/dh/dhtest.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/libcrypto/dh/dhtest.c b/src/lib/libcrypto/dh/dhtest.c
index d75077f9fa..34894ced73 100644
--- a/src/lib/libcrypto/dh/dhtest.c
+++ b/src/lib/libcrypto/dh/dhtest.c
@@ -59,9 +59,9 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62 62#ifdef OPENSSL_SYS_WINDOWS
63#include "../e_os.h" 63#include "../bio/bss_file.c"
64 64#endif
65#include <openssl/crypto.h> 65#include <openssl/crypto.h>
66#include <openssl/bio.h> 66#include <openssl/bio.h>
67#include <openssl/bn.h> 67#include <openssl/bn.h>
@@ -84,6 +84,10 @@ int main(int argc, char *argv[])
84#endif 84#endif
85 85
86static void MS_CALLBACK cb(int p, int n, void *arg); 86static void MS_CALLBACK cb(int p, int n, void *arg);
87#ifdef OPENSSL_NO_STDIO
88#define APPS_WIN16
89#include "bss_file.c"
90#endif
87 91
88static const char rnd_seed[] = "string to make the random number generator think it has entropy"; 92static const char rnd_seed[] = "string to make the random number generator think it has entropy";
89 93
@@ -107,7 +111,7 @@ int main(int argc, char *argv[])
107 RAND_seed(rnd_seed, sizeof rnd_seed); 111 RAND_seed(rnd_seed, sizeof rnd_seed);
108 112
109 out=BIO_new(BIO_s_file()); 113 out=BIO_new(BIO_s_file());
110 if (out == NULL) EXIT(1); 114 if (out == NULL) exit(1);
111 BIO_set_fp(out,stdout,BIO_NOCLOSE); 115 BIO_set_fp(out,stdout,BIO_NOCLOSE);
112 116
113 a=DH_generate_parameters(64,DH_GENERATOR_5,cb,out); 117 a=DH_generate_parameters(64,DH_GENERATOR_5,cb,out);
@@ -191,7 +195,7 @@ err:
191 CRYPTO_cleanup_all_ex_data(); 195 CRYPTO_cleanup_all_ex_data();
192 ERR_remove_state(0); 196 ERR_remove_state(0);
193 CRYPTO_mem_leaks_fp(stderr); 197 CRYPTO_mem_leaks_fp(stderr);
194 EXIT(ret); 198 exit(ret);
195 return(ret); 199 return(ret);
196 } 200 }
197 201