OLD | NEW |
1 /* apps/dhparam.c */ | 1 /* apps/dhparam.c */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 131 matching lines...) Loading... |
142 * -text | 142 * -text |
143 * -C | 143 * -C |
144 */ | 144 */ |
145 | 145 |
146 static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb); | 146 static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb); |
147 | 147 |
148 int MAIN(int, char **); | 148 int MAIN(int, char **); |
149 | 149 |
150 int MAIN(int argc, char **argv) | 150 int MAIN(int argc, char **argv) |
151 { | 151 { |
152 #ifndef OPENSSL_NO_ENGINE | |
153 ENGINE *e = NULL; | |
154 #endif | |
155 DH *dh=NULL; | 152 DH *dh=NULL; |
156 int i,badops=0,text=0; | 153 int i,badops=0,text=0; |
157 #ifndef OPENSSL_NO_DSA | 154 #ifndef OPENSSL_NO_DSA |
158 int dsaparam=0; | 155 int dsaparam=0; |
159 #endif | 156 #endif |
160 BIO *in=NULL,*out=NULL; | 157 BIO *in=NULL,*out=NULL; |
161 int informat,outformat,check=0,noout=0,C=0,ret=1; | 158 int informat,outformat,check=0,noout=0,C=0,ret=1; |
162 char *infile,*outfile,*prog; | 159 char *infile,*outfile,*prog; |
163 char *inrand=NULL; | 160 char *inrand=NULL; |
164 #ifndef OPENSSL_NO_ENGINE | 161 #ifndef OPENSSL_NO_ENGINE |
(...skipping 98 matching lines...) Loading... |
263 BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CH
AR, LIST_SEPARATOR_CHAR); | 260 BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CH
AR, LIST_SEPARATOR_CHAR); |
264 BIO_printf(bio_err," - load the file (or the files
in the directory) into\n"); | 261 BIO_printf(bio_err," - load the file (or the files
in the directory) into\n"); |
265 BIO_printf(bio_err," the random number generator\n
"); | 262 BIO_printf(bio_err," the random number generator\n
"); |
266 BIO_printf(bio_err," -noout no output\n"); | 263 BIO_printf(bio_err," -noout no output\n"); |
267 goto end; | 264 goto end; |
268 } | 265 } |
269 | 266 |
270 ERR_load_crypto_strings(); | 267 ERR_load_crypto_strings(); |
271 | 268 |
272 #ifndef OPENSSL_NO_ENGINE | 269 #ifndef OPENSSL_NO_ENGINE |
273 e = setup_engine(bio_err, engine, 0); | 270 setup_engine(bio_err, engine, 0); |
274 #endif | 271 #endif |
275 | 272 |
276 if (g && !num) | 273 if (g && !num) |
277 num = DEFBITS; | 274 num = DEFBITS; |
278 | 275 |
279 #ifndef OPENSSL_NO_DSA | 276 #ifndef OPENSSL_NO_DSA |
280 if (dsaparam) | 277 if (dsaparam) |
281 { | 278 { |
282 if (g) | 279 if (g) |
283 { | 280 { |
(...skipping 263 matching lines...) Loading... |
547 if (p == 2) c='*'; | 544 if (p == 2) c='*'; |
548 if (p == 3) c='\n'; | 545 if (p == 3) c='\n'; |
549 BIO_write(cb->arg,&c,1); | 546 BIO_write(cb->arg,&c,1); |
550 (void)BIO_flush(cb->arg); | 547 (void)BIO_flush(cb->arg); |
551 #ifdef LINT | 548 #ifdef LINT |
552 p=n; | 549 p=n; |
553 #endif | 550 #endif |
554 return 1; | 551 return 1; |
555 } | 552 } |
556 | 553 |
| 554 #else /* !OPENSSL_NO_DH */ |
| 555 |
| 556 # if PEDANTIC |
| 557 static void *dummy=&dummy; |
| 558 # endif |
| 559 |
557 #endif | 560 #endif |
OLD | NEW |