diff options
author | bcook <> | 2015-09-11 14:30:23 +0000 |
---|---|---|
committer | bcook <> | 2015-09-11 14:30:23 +0000 |
commit | e2fad4e6bdd4e404b3f4c186de52078738af2271 (patch) | |
tree | cc1109842924cab95a77b6863b32de51b6d4f960 /src/usr.bin/openssl/rsautl.c | |
parent | 7cea1ef22b79637be449efa70b99c6deaf74ef10 (diff) | |
download | openbsd-e2fad4e6bdd4e404b3f4c186de52078738af2271.tar.gz openbsd-e2fad4e6bdd4e404b3f4c186de52078738af2271.tar.bz2 openbsd-e2fad4e6bdd4e404b3f4c186de52078738af2271.zip |
Remove engine command and parameters from openssl(1).
We do not have any builtin or dynamic engines, meaning openssl(1) has
no way to use the engine command or parameters at all.
ok jsing@
Diffstat (limited to '')
-rw-r--r-- | src/usr.bin/openssl/rsautl.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/usr.bin/openssl/rsautl.c b/src/usr.bin/openssl/rsautl.c index 5f395e2245..2e9793297b 100644 --- a/src/usr.bin/openssl/rsautl.c +++ b/src/usr.bin/openssl/rsautl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsautl.c,v 1.6 2015/08/22 16:36:05 jsing Exp $ */ | 1 | /* $OpenBSD: rsautl.c,v 1.7 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 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -81,12 +81,8 @@ static void usage(void); | |||
81 | int | 81 | int |
82 | rsautl_main(int argc, char **argv) | 82 | rsautl_main(int argc, char **argv) |
83 | { | 83 | { |
84 | ENGINE *e = NULL; | ||
85 | BIO *in = NULL, *out = NULL; | 84 | BIO *in = NULL, *out = NULL; |
86 | char *infile = NULL, *outfile = NULL; | 85 | char *infile = NULL, *outfile = NULL; |
87 | #ifndef OPENSSL_NO_ENGINE | ||
88 | char *engine = NULL; | ||
89 | #endif | ||
90 | char *keyfile = NULL; | 86 | char *keyfile = NULL; |
91 | char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY; | 87 | char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY; |
92 | int keyform = FORMAT_PEM; | 88 | int keyform = FORMAT_PEM; |
@@ -133,13 +129,6 @@ rsautl_main(int argc, char **argv) | |||
133 | badarg = 1; | 129 | badarg = 1; |
134 | else | 130 | else |
135 | keyform = str2fmt(*(++argv)); | 131 | keyform = str2fmt(*(++argv)); |
136 | #ifndef OPENSSL_NO_ENGINE | ||
137 | } else if (!strcmp(*argv, "-engine")) { | ||
138 | if (--argc < 1) | ||
139 | badarg = 1; | ||
140 | else | ||
141 | engine = *(++argv); | ||
142 | #endif | ||
143 | } else if (!strcmp(*argv, "-pubin")) { | 132 | } else if (!strcmp(*argv, "-pubin")) { |
144 | key_type = KEY_PUBKEY; | 133 | key_type = KEY_PUBKEY; |
145 | } else if (!strcmp(*argv, "-certin")) { | 134 | } else if (!strcmp(*argv, "-certin")) { |
@@ -184,9 +173,6 @@ rsautl_main(int argc, char **argv) | |||
184 | BIO_printf(bio_err, "A private key is needed for this operation\n"); | 173 | BIO_printf(bio_err, "A private key is needed for this operation\n"); |
185 | goto end; | 174 | goto end; |
186 | } | 175 | } |
187 | #ifndef OPENSSL_NO_ENGINE | ||
188 | e = setup_engine(bio_err, engine, 0); | ||
189 | #endif | ||
190 | if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { | 176 | if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { |
191 | BIO_printf(bio_err, "Error getting password\n"); | 177 | BIO_printf(bio_err, "Error getting password\n"); |
192 | goto end; | 178 | goto end; |
@@ -195,17 +181,17 @@ rsautl_main(int argc, char **argv) | |||
195 | switch (key_type) { | 181 | switch (key_type) { |
196 | case KEY_PRIVKEY: | 182 | case KEY_PRIVKEY: |
197 | pkey = load_key(bio_err, keyfile, keyform, 0, | 183 | pkey = load_key(bio_err, keyfile, keyform, 0, |
198 | passin, e, "Private Key"); | 184 | passin, "Private Key"); |
199 | break; | 185 | break; |
200 | 186 | ||
201 | case KEY_PUBKEY: | 187 | case KEY_PUBKEY: |
202 | pkey = load_pubkey(bio_err, keyfile, keyform, 0, | 188 | pkey = load_pubkey(bio_err, keyfile, keyform, 0, |
203 | NULL, e, "Public Key"); | 189 | NULL, "Public Key"); |
204 | break; | 190 | break; |
205 | 191 | ||
206 | case KEY_CERT: | 192 | case KEY_CERT: |
207 | x = load_cert(bio_err, keyfile, keyform, | 193 | x = load_cert(bio_err, keyfile, keyform, |
208 | NULL, e, "Certificate"); | 194 | NULL, "Certificate"); |
209 | if (x) { | 195 | if (x) { |
210 | pkey = X509_get_pubkey(x); | 196 | pkey = X509_get_pubkey(x); |
211 | X509_free(x); | 197 | X509_free(x); |
@@ -336,10 +322,4 @@ usage() | |||
336 | BIO_printf(bio_err, "-encrypt encrypt with public key\n"); | 322 | BIO_printf(bio_err, "-encrypt encrypt with public key\n"); |
337 | BIO_printf(bio_err, "-decrypt decrypt with private key\n"); | 323 | BIO_printf(bio_err, "-decrypt decrypt with private key\n"); |
338 | BIO_printf(bio_err, "-hexdump hex dump output\n"); | 324 | BIO_printf(bio_err, "-hexdump hex dump output\n"); |
339 | #ifndef OPENSSL_NO_ENGINE | ||
340 | BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n"); | ||
341 | BIO_printf(bio_err, "-passin arg pass phrase source\n"); | ||
342 | #endif | ||
343 | |||
344 | } | 325 | } |
345 | |||