diff options
Diffstat (limited to 'src/usr.bin/openssl/rsa.c')
| -rw-r--r-- | src/usr.bin/openssl/rsa.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/usr.bin/openssl/rsa.c b/src/usr.bin/openssl/rsa.c index 55b6f7399f..708332a8d1 100644 --- a/src/usr.bin/openssl/rsa.c +++ b/src/usr.bin/openssl/rsa.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa.c,v 1.4 2015/08/19 18:25:31 deraadt Exp $ */ | 1 | /* $OpenBSD: rsa.c,v 1.5 2015/09/11 14:30:23 bcook Exp $ */ |
| 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 | * |
| @@ -77,9 +77,6 @@ | |||
| 77 | static struct { | 77 | static struct { |
| 78 | int check; | 78 | int check; |
| 79 | const EVP_CIPHER *enc; | 79 | const EVP_CIPHER *enc; |
| 80 | #ifndef OPENSSL_NO_ENGINE | ||
| 81 | char *engine; | ||
| 82 | #endif | ||
| 83 | char *infile; | 80 | char *infile; |
| 84 | int informat; | 81 | int informat; |
| 85 | int modulus; | 82 | int modulus; |
| @@ -119,15 +116,6 @@ static struct option rsa_options[] = { | |||
| 119 | .type = OPTION_FLAG, | 116 | .type = OPTION_FLAG, |
| 120 | .opt.flag = &rsa_config.check, | 117 | .opt.flag = &rsa_config.check, |
| 121 | }, | 118 | }, |
| 122 | #ifndef OPENSSL_NO_ENGINE | ||
| 123 | { | ||
| 124 | .name = "engine", | ||
| 125 | .argname = "id", | ||
| 126 | .desc = "Use the engine specified by the given identifier", | ||
| 127 | .type = OPTION_ARG, | ||
| 128 | .opt.arg = &rsa_config.engine, | ||
| 129 | }, | ||
| 130 | #endif | ||
| 131 | { | 119 | { |
| 132 | .name = "in", | 120 | .name = "in", |
| 133 | .argname = "file", | 121 | .argname = "file", |
| @@ -258,7 +246,7 @@ static void | |||
| 258 | rsa_usage() | 246 | rsa_usage() |
| 259 | { | 247 | { |
| 260 | fprintf(stderr, | 248 | fprintf(stderr, |
| 261 | "usage: rsa [-ciphername] [-check] [-engine id] [-in file] " | 249 | "usage: rsa [-ciphername] [-check] [-in file] " |
| 262 | "[-inform fmt]\n" | 250 | "[-inform fmt]\n" |
| 263 | " [-modulus] [-noout] [-out file] [-outform fmt] " | 251 | " [-modulus] [-noout] [-out file] [-outform fmt] " |
| 264 | "[-passin src]\n" | 252 | "[-passin src]\n" |
| @@ -274,7 +262,6 @@ rsa_usage() | |||
| 274 | int | 262 | int |
| 275 | rsa_main(int argc, char **argv) | 263 | rsa_main(int argc, char **argv) |
| 276 | { | 264 | { |
| 277 | ENGINE *e = NULL; | ||
| 278 | int ret = 1; | 265 | int ret = 1; |
| 279 | RSA *rsa = NULL; | 266 | RSA *rsa = NULL; |
| 280 | int i; | 267 | int i; |
| @@ -291,10 +278,6 @@ rsa_main(int argc, char **argv) | |||
| 291 | goto end; | 278 | goto end; |
| 292 | } | 279 | } |
| 293 | 280 | ||
| 294 | #ifndef OPENSSL_NO_ENGINE | ||
| 295 | e = setup_engine(bio_err, rsa_config.engine, 0); | ||
| 296 | #endif | ||
| 297 | |||
| 298 | if (!app_passwd(bio_err, rsa_config.passargin, rsa_config.passargout, | 281 | if (!app_passwd(bio_err, rsa_config.passargin, rsa_config.passargout, |
| 299 | &passin, &passout)) { | 282 | &passin, &passout)) { |
| 300 | BIO_printf(bio_err, "Error getting passwords\n"); | 283 | BIO_printf(bio_err, "Error getting passwords\n"); |
| @@ -323,12 +306,12 @@ rsa_main(int argc, char **argv) | |||
| 323 | tmpformat = rsa_config.informat; | 306 | tmpformat = rsa_config.informat; |
| 324 | 307 | ||
| 325 | pkey = load_pubkey(bio_err, rsa_config.infile, | 308 | pkey = load_pubkey(bio_err, rsa_config.infile, |
| 326 | tmpformat, 1, passin, e, "Public Key"); | 309 | tmpformat, 1, passin, "Public Key"); |
| 327 | } else | 310 | } else |
| 328 | pkey = load_key(bio_err, rsa_config.infile, | 311 | pkey = load_key(bio_err, rsa_config.infile, |
| 329 | (rsa_config.informat == FORMAT_NETSCAPE && | 312 | (rsa_config.informat == FORMAT_NETSCAPE && |
| 330 | rsa_config.sgckey ? FORMAT_IISSGC : | 313 | rsa_config.sgckey ? FORMAT_IISSGC : |
| 331 | rsa_config.informat), 1, passin, e, "Private Key"); | 314 | rsa_config.informat), 1, passin, "Private Key"); |
| 332 | 315 | ||
| 333 | if (pkey != NULL) | 316 | if (pkey != NULL) |
| 334 | rsa = EVP_PKEY_get1_RSA(pkey); | 317 | rsa = EVP_PKEY_get1_RSA(pkey); |
