diff options
Diffstat (limited to 'src/usr.bin/openssl/pkey.c')
-rw-r--r-- | src/usr.bin/openssl/pkey.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/usr.bin/openssl/pkey.c b/src/usr.bin/openssl/pkey.c index 47fa2dd362..d3c9f27d25 100644 --- a/src/usr.bin/openssl/pkey.c +++ b/src/usr.bin/openssl/pkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pkey.c,v 1.20 2023/07/23 11:39:29 tb Exp $ */ | 1 | /* $OpenBSD: pkey.c,v 1.21 2024/08/29 17:01:02 tb 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 2006 | 3 | * project 2006 |
4 | */ | 4 | */ |
@@ -66,7 +66,6 @@ | |||
66 | #include <openssl/pem.h> | 66 | #include <openssl/pem.h> |
67 | 67 | ||
68 | static struct { | 68 | static struct { |
69 | int check; | ||
70 | const EVP_CIPHER *cipher; | 69 | const EVP_CIPHER *cipher; |
71 | char *infile; | 70 | char *infile; |
72 | int informat; | 71 | int informat; |
@@ -75,7 +74,6 @@ static struct { | |||
75 | int outformat; | 74 | int outformat; |
76 | char *passargin; | 75 | char *passargin; |
77 | char *passargout; | 76 | char *passargout; |
78 | int pubcheck; | ||
79 | int pubin; | 77 | int pubin; |
80 | int pubout; | 78 | int pubout; |
81 | int pubtext; | 79 | int pubtext; |
@@ -101,12 +99,6 @@ pkey_opt_cipher(int argc, char **argv, int *argsused) | |||
101 | 99 | ||
102 | static const struct option pkey_options[] = { | 100 | static const struct option pkey_options[] = { |
103 | { | 101 | { |
104 | .name = "check", | ||
105 | .desc = "Check validity of key", | ||
106 | .type = OPTION_FLAG, | ||
107 | .opt.flag = &cfg.check, | ||
108 | }, | ||
109 | { | ||
110 | .name = "in", | 102 | .name = "in", |
111 | .argname = "file", | 103 | .argname = "file", |
112 | .desc = "Input file (default stdin)", | 104 | .desc = "Input file (default stdin)", |
@@ -155,12 +147,6 @@ static const struct option pkey_options[] = { | |||
155 | .opt.arg = &cfg.passargout, | 147 | .opt.arg = &cfg.passargout, |
156 | }, | 148 | }, |
157 | { | 149 | { |
158 | .name = "pubcheck", | ||
159 | .desc = "Check validity of public key", | ||
160 | .type = OPTION_FLAG, | ||
161 | .opt.flag = &cfg.pubcheck, | ||
162 | }, | ||
163 | { | ||
164 | .name = "pubin", | 150 | .name = "pubin", |
165 | .desc = "Expect a public key (default private key)", | 151 | .desc = "Expect a public key (default private key)", |
166 | .type = OPTION_VALUE, | 152 | .type = OPTION_VALUE, |
@@ -200,9 +186,9 @@ pkey_usage(void) | |||
200 | int n = 0; | 186 | int n = 0; |
201 | 187 | ||
202 | fprintf(stderr, | 188 | fprintf(stderr, |
203 | "usage: pkey [-check] [-ciphername] [-in file] [-inform fmt] " | 189 | "usage: pkey [-ciphername] [-in file] [-inform fmt] " |
204 | "[-noout] [-out file]\n" | 190 | "[-noout] [-out file]\n" |
205 | " [-outform fmt] [-passin src] [-passout src] [-pubcheck] " | 191 | " [-outform fmt] [-passin src] [-passout src] " |
206 | "[-pubin] [-pubout]\n" | 192 | "[-pubin] [-pubout]\n" |
207 | " [-text] [-text_pub]\n\n"); | 193 | " [-text] [-text_pub]\n\n"); |
208 | options_usage(pkey_options); | 194 | options_usage(pkey_options); |
@@ -264,14 +250,6 @@ pkey_main(int argc, char **argv) | |||
264 | if (!pkey) | 250 | if (!pkey) |
265 | goto end; | 251 | goto end; |
266 | 252 | ||
267 | if (cfg.check) { | ||
268 | if (!pkey_check(out, pkey, EVP_PKEY_check, "Key pair")) | ||
269 | goto end; | ||
270 | } else if (cfg.pubcheck) { | ||
271 | if (!pkey_check(out, pkey, EVP_PKEY_public_check, "Public key")) | ||
272 | goto end; | ||
273 | } | ||
274 | |||
275 | if (!cfg.noout) { | 253 | if (!cfg.noout) { |
276 | if (cfg.outformat == FORMAT_PEM) { | 254 | if (cfg.outformat == FORMAT_PEM) { |
277 | if (cfg.pubout) | 255 | if (cfg.pubout) |