diff options
Diffstat (limited to '')
-rw-r--r-- | src/usr.bin/openssl/pkcs8.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/usr.bin/openssl/pkcs8.c b/src/usr.bin/openssl/pkcs8.c index 7e590aa41d..b3ccd1966e 100644 --- a/src/usr.bin/openssl/pkcs8.c +++ b/src/usr.bin/openssl/pkcs8.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pkcs8.c,v 1.5 2015/08/19 18:25:31 deraadt Exp $ */ | 1 | /* $OpenBSD: pkcs8.c,v 1.6 2015/09/11 14:30:23 bcook Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999-2004. | 3 | * project 1999-2004. |
4 | */ | 4 | */ |
@@ -69,9 +69,6 @@ | |||
69 | 69 | ||
70 | static struct { | 70 | static struct { |
71 | const EVP_CIPHER *cipher; | 71 | const EVP_CIPHER *cipher; |
72 | #ifndef OPENSSL_NO_ENGINE | ||
73 | char *engine; | ||
74 | #endif | ||
75 | char *infile; | 72 | char *infile; |
76 | int informat; | 73 | int informat; |
77 | int iter; | 74 | int iter; |
@@ -115,15 +112,6 @@ static struct option pkcs8_options[] = { | |||
115 | .value = PKCS8_EMBEDDED_PARAM, | 112 | .value = PKCS8_EMBEDDED_PARAM, |
116 | .opt.value = &pkcs8_config.p8_broken, | 113 | .opt.value = &pkcs8_config.p8_broken, |
117 | }, | 114 | }, |
118 | #ifndef OPENSSL_NO_ENGINE | ||
119 | { | ||
120 | .name = "engine", | ||
121 | .argname = "id", | ||
122 | .desc = "Use the engine specified by the given identifier", | ||
123 | .type = OPTION_ARG, | ||
124 | .opt.arg = &pkcs8_config.engine, | ||
125 | }, | ||
126 | #endif | ||
127 | { | 115 | { |
128 | .name = "in", | 116 | .name = "in", |
129 | .argname = "file", | 117 | .argname = "file", |
@@ -220,7 +208,7 @@ static struct option pkcs8_options[] = { | |||
220 | static void | 208 | static void |
221 | pkcs8_usage() | 209 | pkcs8_usage() |
222 | { | 210 | { |
223 | fprintf(stderr, "usage: pkcs8 [-embed] [-engine id] [-in file] " | 211 | fprintf(stderr, "usage: pkcs8 [-embed] [-in file] " |
224 | "[-inform fmt] [-nocrypt]\n" | 212 | "[-inform fmt] [-nocrypt]\n" |
225 | " [-noiter] [-nooct] [-nsdb] [-out file] [-outform fmt] " | 213 | " [-noiter] [-nooct] [-nsdb] [-out file] [-outform fmt] " |
226 | "[-passin src]\n" | 214 | "[-passin src]\n" |
@@ -231,7 +219,6 @@ pkcs8_usage() | |||
231 | int | 219 | int |
232 | pkcs8_main(int argc, char **argv) | 220 | pkcs8_main(int argc, char **argv) |
233 | { | 221 | { |
234 | ENGINE *e = NULL; | ||
235 | BIO *in = NULL, *out = NULL; | 222 | BIO *in = NULL, *out = NULL; |
236 | X509_SIG *p8 = NULL; | 223 | X509_SIG *p8 = NULL; |
237 | PKCS8_PRIV_KEY_INFO *p8inf = NULL; | 224 | PKCS8_PRIV_KEY_INFO *p8inf = NULL; |
@@ -252,10 +239,6 @@ pkcs8_main(int argc, char **argv) | |||
252 | return (1); | 239 | return (1); |
253 | } | 240 | } |
254 | 241 | ||
255 | #ifndef OPENSSL_NO_ENGINE | ||
256 | e = setup_engine(bio_err, pkcs8_config.engine, 0); | ||
257 | #endif | ||
258 | |||
259 | if (!app_passwd(bio_err, pkcs8_config.passargin, | 242 | if (!app_passwd(bio_err, pkcs8_config.passargin, |
260 | pkcs8_config.passargout, &passin, &passout)) { | 243 | pkcs8_config.passargout, &passin, &passout)) { |
261 | BIO_printf(bio_err, "Error getting passwords\n"); | 244 | BIO_printf(bio_err, "Error getting passwords\n"); |
@@ -285,7 +268,7 @@ pkcs8_main(int argc, char **argv) | |||
285 | } | 268 | } |
286 | if (pkcs8_config.topk8) { | 269 | if (pkcs8_config.topk8) { |
287 | pkey = load_key(bio_err, pkcs8_config.infile, | 270 | pkey = load_key(bio_err, pkcs8_config.infile, |
288 | pkcs8_config.informat, 1, passin, e, "key"); | 271 | pkcs8_config.informat, 1, passin, "key"); |
289 | if (!pkey) | 272 | if (!pkey) |
290 | goto end; | 273 | goto end; |
291 | if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, | 274 | if (!(p8inf = EVP_PKEY2PKCS8_broken(pkey, |