diff options
Diffstat (limited to 'src/lib/libssl/src/apps/genrsa.c')
| -rw-r--r-- | src/lib/libssl/src/apps/genrsa.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c index 515bd7c901..63be873b7b 100644 --- a/src/lib/libssl/src/apps/genrsa.c +++ b/src/lib/libssl/src/apps/genrsa.c | |||
| @@ -81,7 +81,9 @@ int MAIN(int, char **); | |||
| 81 | 81 | ||
| 82 | int MAIN(int argc, char **argv) | 82 | int MAIN(int argc, char **argv) |
| 83 | { | 83 | { |
| 84 | #ifndef OPENSSL_NO_ENGINE | ||
| 84 | ENGINE *e = NULL; | 85 | ENGINE *e = NULL; |
| 86 | #endif | ||
| 85 | int ret=1; | 87 | int ret=1; |
| 86 | RSA *rsa=NULL; | 88 | RSA *rsa=NULL; |
| 87 | int i,num=DEFBITS; | 89 | int i,num=DEFBITS; |
| @@ -90,7 +92,9 @@ int MAIN(int argc, char **argv) | |||
| 90 | unsigned long f4=RSA_F4; | 92 | unsigned long f4=RSA_F4; |
| 91 | char *outfile=NULL; | 93 | char *outfile=NULL; |
| 92 | char *passargout = NULL, *passout = NULL; | 94 | char *passargout = NULL, *passout = NULL; |
| 95 | #ifndef OPENSSL_NO_ENGINE | ||
| 93 | char *engine=NULL; | 96 | char *engine=NULL; |
| 97 | #endif | ||
| 94 | char *inrand=NULL; | 98 | char *inrand=NULL; |
| 95 | BIO *out=NULL; | 99 | BIO *out=NULL; |
| 96 | 100 | ||
| @@ -122,11 +126,13 @@ int MAIN(int argc, char **argv) | |||
| 122 | f4=3; | 126 | f4=3; |
| 123 | else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0) | 127 | else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0) |
| 124 | f4=RSA_F4; | 128 | f4=RSA_F4; |
| 129 | #ifndef OPENSSL_NO_ENGINE | ||
| 125 | else if (strcmp(*argv,"-engine") == 0) | 130 | else if (strcmp(*argv,"-engine") == 0) |
| 126 | { | 131 | { |
| 127 | if (--argc < 1) goto bad; | 132 | if (--argc < 1) goto bad; |
| 128 | engine= *(++argv); | 133 | engine= *(++argv); |
| 129 | } | 134 | } |
| 135 | #endif | ||
| 130 | else if (strcmp(*argv,"-rand") == 0) | 136 | else if (strcmp(*argv,"-rand") == 0) |
| 131 | { | 137 | { |
| 132 | if (--argc < 1) goto bad; | 138 | if (--argc < 1) goto bad; |
| @@ -177,7 +183,9 @@ bad: | |||
| 177 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); | 183 | BIO_printf(bio_err," -passout arg output file pass phrase source\n"); |
| 178 | BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n"); | 184 | BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n"); |
| 179 | BIO_printf(bio_err," -3 use 3 for the E value\n"); | 185 | BIO_printf(bio_err," -3 use 3 for the E value\n"); |
| 186 | #ifndef OPENSSL_NO_ENGINE | ||
| 180 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); | 187 | BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); |
| 188 | #endif | ||
| 181 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 189 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); |
| 182 | BIO_printf(bio_err," load the file (or the files in the directory) into\n"); | 190 | BIO_printf(bio_err," load the file (or the files in the directory) into\n"); |
| 183 | BIO_printf(bio_err," the random number generator\n"); | 191 | BIO_printf(bio_err," the random number generator\n"); |
| @@ -191,7 +199,9 @@ bad: | |||
| 191 | goto err; | 199 | goto err; |
| 192 | } | 200 | } |
| 193 | 201 | ||
| 202 | #ifndef OPENSSL_NO_ENGINE | ||
| 194 | e = setup_engine(bio_err, engine, 0); | 203 | e = setup_engine(bio_err, engine, 0); |
| 204 | #endif | ||
| 195 | 205 | ||
| 196 | if (outfile == NULL) | 206 | if (outfile == NULL) |
| 197 | { | 207 | { |
| @@ -258,7 +268,7 @@ err: | |||
| 258 | if (ret != 0) | 268 | if (ret != 0) |
| 259 | ERR_print_errors(bio_err); | 269 | ERR_print_errors(bio_err); |
| 260 | apps_shutdown(); | 270 | apps_shutdown(); |
| 261 | EXIT(ret); | 271 | OPENSSL_EXIT(ret); |
| 262 | } | 272 | } |
| 263 | 273 | ||
| 264 | static void MS_CALLBACK genrsa_cb(int p, int n, void *arg) | 274 | static void MS_CALLBACK genrsa_cb(int p, int n, void *arg) |
