summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r--src/lib/libcrypto/dsa/dsagen.c2
-rw-r--r--src/lib/libcrypto/dsa/dsatest.c17
2 files changed, 12 insertions, 7 deletions
diff --git a/src/lib/libcrypto/dsa/dsagen.c b/src/lib/libcrypto/dsa/dsagen.c
index a0b0976640..1b6a1cca0f 100644
--- a/src/lib/libcrypto/dsa/dsagen.c
+++ b/src/lib/libcrypto/dsa/dsagen.c
@@ -103,7 +103,7 @@ main()
103 bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); 103 bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
104 104
105 memcpy(seed_buf,seed,20); 105 memcpy(seed_buf,seed,20);
106 dsa=DSA_generate_parameters(1024,seed,20,&counter,&h,cb); 106 dsa=DSA_generate_parameters(1024,seed,20,&counter,&h,cb,bio_err);
107 107
108 if (dsa == NULL) 108 if (dsa == NULL)
109 DSA_print(bio_err,dsa,0); 109 DSA_print(bio_err,dsa,0);
diff --git a/src/lib/libcrypto/dsa/dsatest.c b/src/lib/libcrypto/dsa/dsatest.c
index 12da64f9f4..4734ce4af8 100644
--- a/src/lib/libcrypto/dsa/dsatest.c
+++ b/src/lib/libcrypto/dsa/dsatest.c
@@ -61,14 +61,13 @@
61#include <string.h> 61#include <string.h>
62#include <sys/types.h> 62#include <sys/types.h>
63#include <sys/stat.h> 63#include <sys/stat.h>
64
65#include "../e_os.h"
66
64#include <openssl/crypto.h> 67#include <openssl/crypto.h>
65#include <openssl/rand.h> 68#include <openssl/rand.h>
66#include <openssl/bio.h> 69#include <openssl/bio.h>
67#include <openssl/err.h> 70#include <openssl/err.h>
68#include <openssl/engine.h>
69#ifdef OPENSSL_SYS_WINDOWS
70#include "../bio/bss_file.c"
71#endif
72 71
73#ifdef OPENSSL_NO_DSA 72#ifdef OPENSSL_NO_DSA
74int main(int argc, char *argv[]) 73int main(int argc, char *argv[])
@@ -212,10 +211,16 @@ end:
212 BIO_free(bio_err); 211 BIO_free(bio_err);
213 bio_err = NULL; 212 bio_err = NULL;
214 } 213 }
215 exit(!ret); 214 EXIT(!ret);
216 return(0); 215 return(0);
217 } 216 }
218 217
218static int cb_exit(int ec)
219 {
220 EXIT(ec);
221 return(0); /* To keep some compilers quiet */
222 }
223
219static void MS_CALLBACK dsa_cb(int p, int n, void *arg) 224static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
220 { 225 {
221 char c='*'; 226 char c='*';
@@ -231,7 +236,7 @@ static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
231 if (!ok && (p == 0) && (num > 1)) 236 if (!ok && (p == 0) && (num > 1))
232 { 237 {
233 BIO_printf((BIO *)arg,"error in dsatest\n"); 238 BIO_printf((BIO *)arg,"error in dsatest\n");
234 exit(1); 239 cb_exit(1);
235 } 240 }
236 } 241 }
237#endif 242#endif