| OLD | NEW |
| 1 /* apps/gendsa.c */ | 1 /* apps/gendsa.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include <openssl/pem.h> | 71 #include <openssl/pem.h> |
| 72 | 72 |
| 73 #define DEFBITS 512 | 73 #define DEFBITS 512 |
| 74 #undef PROG | 74 #undef PROG |
| 75 #define PROG gendsa_main | 75 #define PROG gendsa_main |
| 76 | 76 |
| 77 int MAIN(int, char **); | 77 int MAIN(int, char **); |
| 78 | 78 |
| 79 int MAIN(int argc, char **argv) | 79 int MAIN(int argc, char **argv) |
| 80 { | 80 { |
| 81 #ifndef OPENSSL_NO_ENGINE | |
| 82 ENGINE *e = NULL; | |
| 83 #endif | |
| 84 DSA *dsa=NULL; | 81 DSA *dsa=NULL; |
| 85 int ret=1; | 82 int ret=1; |
| 86 char *outfile=NULL; | 83 char *outfile=NULL; |
| 87 char *inrand=NULL,*dsaparams=NULL; | 84 char *inrand=NULL,*dsaparams=NULL; |
| 88 char *passargout = NULL, *passout = NULL; | 85 char *passargout = NULL, *passout = NULL; |
| 89 BIO *out=NULL,*in=NULL; | 86 BIO *out=NULL,*in=NULL; |
| 90 const EVP_CIPHER *enc=NULL; | 87 const EVP_CIPHER *enc=NULL; |
| 91 #ifndef OPENSSL_NO_ENGINE | 88 #ifndef OPENSSL_NO_ENGINE |
| 92 char *engine=NULL; | 89 char *engine=NULL; |
| 93 #endif | 90 #endif |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 #endif | 196 #endif |
| 200 BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CH
AR, LIST_SEPARATOR_CHAR); | 197 BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CH
AR, LIST_SEPARATOR_CHAR); |
| 201 BIO_printf(bio_err," - load the file (or the files in
the directory) into\n"); | 198 BIO_printf(bio_err," - load the file (or the files in
the directory) into\n"); |
| 202 BIO_printf(bio_err," the random number generator\n")
; | 199 BIO_printf(bio_err," the random number generator\n")
; |
| 203 BIO_printf(bio_err," dsaparam-file\n"); | 200 BIO_printf(bio_err," dsaparam-file\n"); |
| 204 BIO_printf(bio_err," - a DSA parameter file as generat
ed by the dsaparam command\n"); | 201 BIO_printf(bio_err," - a DSA parameter file as generat
ed by the dsaparam command\n"); |
| 205 goto end; | 202 goto end; |
| 206 } | 203 } |
| 207 | 204 |
| 208 #ifndef OPENSSL_NO_ENGINE | 205 #ifndef OPENSSL_NO_ENGINE |
| 209 e = setup_engine(bio_err, engine, 0); | 206 setup_engine(bio_err, engine, 0); |
| 210 #endif | 207 #endif |
| 211 | 208 |
| 212 if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) { | 209 if(!app_passwd(bio_err, NULL, passargout, NULL, &passout)) { |
| 213 BIO_printf(bio_err, "Error getting password\n"); | 210 BIO_printf(bio_err, "Error getting password\n"); |
| 214 goto end; | 211 goto end; |
| 215 } | 212 } |
| 216 | 213 |
| 217 | 214 |
| 218 in=BIO_new(BIO_s_file()); | 215 in=BIO_new(BIO_s_file()); |
| 219 if (!(BIO_read_filename(in,dsaparams))) | 216 if (!(BIO_read_filename(in,dsaparams))) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 apps_shutdown(); | 276 apps_shutdown(); |
| 280 OPENSSL_EXIT(ret); | 277 OPENSSL_EXIT(ret); |
| 281 } | 278 } |
| 282 #else /* !OPENSSL_NO_DSA */ | 279 #else /* !OPENSSL_NO_DSA */ |
| 283 | 280 |
| 284 # if PEDANTIC | 281 # if PEDANTIC |
| 285 static void *dummy=&dummy; | 282 static void *dummy=&dummy; |
| 286 # endif | 283 # endif |
| 287 | 284 |
| 288 #endif | 285 #endif |
| OLD | NEW |