summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/spkac.c
diff options
context:
space:
mode:
authorbcook <>2015-09-11 14:30:23 +0000
committerbcook <>2015-09-11 14:30:23 +0000
commite2fad4e6bdd4e404b3f4c186de52078738af2271 (patch)
treecc1109842924cab95a77b6863b32de51b6d4f960 /src/usr.bin/openssl/spkac.c
parent7cea1ef22b79637be449efa70b99c6deaf74ef10 (diff)
downloadopenbsd-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/spkac.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/usr.bin/openssl/spkac.c b/src/usr.bin/openssl/spkac.c
index b5ce764eae..b635b5e3b2 100644
--- a/src/usr.bin/openssl/spkac.c
+++ b/src/usr.bin/openssl/spkac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: spkac.c,v 1.4 2015/08/19 18:25:31 deraadt Exp $ */ 1/* $OpenBSD: spkac.c,v 1.5 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. Based on an original idea by Massimiliano Pala 3 * project 1999. Based on an original idea by Massimiliano Pala
4 * (madwolf@openca.org). 4 * (madwolf@openca.org).
@@ -75,9 +75,6 @@
75 75
76static struct { 76static struct {
77 char *challenge; 77 char *challenge;
78#ifndef OPENSSL_NO_ENGINE
79 char *engine;
80#endif
81 char *infile; 78 char *infile;
82 char *keyfile; 79 char *keyfile;
83 int noout; 80 int noout;
@@ -97,15 +94,6 @@ static struct option spkac_options[] = {
97 .type = OPTION_ARG, 94 .type = OPTION_ARG,
98 .opt.arg = &spkac_config.challenge, 95 .opt.arg = &spkac_config.challenge,
99 }, 96 },
100#ifndef OPENSSL_NO_ENGINE
101 {
102 .name = "engine",
103 .argname = "id",
104 .desc = "Use the engine specified by the given identifier",
105 .type = OPTION_ARG,
106 .opt.arg = &spkac_config.engine,
107 },
108#endif
109 { 97 {
110 .name = "in", 98 .name = "in",
111 .argname = "file", 99 .argname = "file",
@@ -174,7 +162,7 @@ static void
174spkac_usage(void) 162spkac_usage(void)
175{ 163{
176 fprintf(stderr, 164 fprintf(stderr,
177 "usage: spkac [-challenge string] [-engine id] [-in file] " 165 "usage: spkac [-challenge string] [-in file] "
178 "[-key file] [-noout]\n" 166 "[-key file] [-noout]\n"
179 " [-out file] [-passin src] [-pubkey] [-spkac name] " 167 " [-out file] [-passin src] [-pubkey] [-spkac name] "
180 "[-spksect section]\n" 168 "[-spksect section]\n"
@@ -185,7 +173,6 @@ spkac_usage(void)
185int 173int
186spkac_main(int argc, char **argv) 174spkac_main(int argc, char **argv)
187{ 175{
188 ENGINE *e = NULL;
189 int i, ret = 1; 176 int i, ret = 1;
190 BIO *in = NULL, *out = NULL; 177 BIO *in = NULL, *out = NULL;
191 char *passin = NULL; 178 char *passin = NULL;
@@ -207,14 +194,11 @@ spkac_main(int argc, char **argv)
207 BIO_printf(bio_err, "Error getting password\n"); 194 BIO_printf(bio_err, "Error getting password\n");
208 goto end; 195 goto end;
209 } 196 }
210#ifndef OPENSSL_NO_ENGINE
211 e = setup_engine(bio_err, spkac_config.engine, 0);
212#endif
213 197
214 if (spkac_config.keyfile) { 198 if (spkac_config.keyfile) {
215 pkey = load_key(bio_err, 199 pkey = load_key(bio_err,
216 strcmp(spkac_config.keyfile, "-") ? spkac_config.keyfile 200 strcmp(spkac_config.keyfile, "-") ? spkac_config.keyfile
217 : NULL, FORMAT_PEM, 1, passin, e, "private key"); 201 : NULL, FORMAT_PEM, 1, passin, "private key");
218 if (!pkey) { 202 if (!pkey) {
219 goto end; 203 goto end;
220 } 204 }