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/x509.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 'src/usr.bin/openssl/x509.c')
-rw-r--r-- | src/usr.bin/openssl/x509.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/usr.bin/openssl/x509.c b/src/usr.bin/openssl/x509.c index 0e5594372b..a8812f7e74 100644 --- a/src/usr.bin/openssl/x509.c +++ b/src/usr.bin/openssl/x509.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.c,v 1.5 2015/08/22 16:36:05 jsing Exp $ */ | 1 | /* $OpenBSD: x509.c,v 1.6 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 | * |
@@ -140,9 +140,6 @@ static const char *x509_usage[] = { | |||
140 | " -extensions - section from config file with X509V3 extensions to add\n", | 140 | " -extensions - section from config file with X509V3 extensions to add\n", |
141 | " -clrext - delete extensions before signing and input certificate\n", | 141 | " -clrext - delete extensions before signing and input certificate\n", |
142 | " -nameopt arg - various certificate name options\n", | 142 | " -nameopt arg - various certificate name options\n", |
143 | #ifndef OPENSSL_NO_ENGINE | ||
144 | " -engine e - use engine e, possibly a hardware device.\n", | ||
145 | #endif | ||
146 | " -certopt arg - various certificate text options\n", | 143 | " -certopt arg - various certificate text options\n", |
147 | NULL | 144 | NULL |
148 | }; | 145 | }; |
@@ -160,7 +157,6 @@ static int reqfile = 0; | |||
160 | int | 157 | int |
161 | x509_main(int argc, char **argv) | 158 | x509_main(int argc, char **argv) |
162 | { | 159 | { |
163 | ENGINE *e = NULL; | ||
164 | int ret = 1; | 160 | int ret = 1; |
165 | X509_REQ *req = NULL; | 161 | X509_REQ *req = NULL; |
166 | X509 *x = NULL, *xca = NULL; | 162 | X509 *x = NULL, *xca = NULL; |
@@ -200,9 +196,6 @@ x509_main(int argc, char **argv) | |||
200 | char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL; | 196 | char *extsect = NULL, *extfile = NULL, *passin = NULL, *passargin = NULL; |
201 | int checkend = 0, checkoffset = 0; | 197 | int checkend = 0, checkoffset = 0; |
202 | unsigned long nmflag = 0, certflag = 0; | 198 | unsigned long nmflag = 0, certflag = 0; |
203 | #ifndef OPENSSL_NO_ENGINE | ||
204 | char *engine = NULL; | ||
205 | #endif | ||
206 | const char *errstr = NULL; | 199 | const char *errstr = NULL; |
207 | 200 | ||
208 | reqfile = 0; | 201 | reqfile = 0; |
@@ -345,13 +338,6 @@ x509_main(int argc, char **argv) | |||
345 | if (!set_name_ex(&nmflag, *(++argv))) | 338 | if (!set_name_ex(&nmflag, *(++argv))) |
346 | goto bad; | 339 | goto bad; |
347 | } | 340 | } |
348 | #ifndef OPENSSL_NO_ENGINE | ||
349 | else if (strcmp(*argv, "-engine") == 0) { | ||
350 | if (--argc < 1) | ||
351 | goto bad; | ||
352 | engine = *(++argv); | ||
353 | } | ||
354 | #endif | ||
355 | else if (strcmp(*argv, "-C") == 0) | 341 | else if (strcmp(*argv, "-C") == 0) |
356 | C = ++num; | 342 | C = ++num; |
357 | else if (strcmp(*argv, "-email") == 0) | 343 | else if (strcmp(*argv, "-email") == 0) |
@@ -441,9 +427,6 @@ bad: | |||
441 | BIO_printf(bio_err, "%s", *pp); | 427 | BIO_printf(bio_err, "%s", *pp); |
442 | goto end; | 428 | goto end; |
443 | } | 429 | } |
444 | #ifndef OPENSSL_NO_ENGINE | ||
445 | e = setup_engine(bio_err, engine, 0); | ||
446 | #endif | ||
447 | 430 | ||
448 | if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { | 431 | if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { |
449 | BIO_printf(bio_err, "Error getting password\n"); | 432 | BIO_printf(bio_err, "Error getting password\n"); |
@@ -575,12 +558,12 @@ bad: | |||
575 | X509_set_pubkey(x, pkey); | 558 | X509_set_pubkey(x, pkey); |
576 | EVP_PKEY_free(pkey); | 559 | EVP_PKEY_free(pkey); |
577 | } else | 560 | } else |
578 | x = load_cert(bio_err, infile, informat, NULL, e, "Certificate"); | 561 | x = load_cert(bio_err, infile, informat, NULL, "Certificate"); |
579 | 562 | ||
580 | if (x == NULL) | 563 | if (x == NULL) |
581 | goto end; | 564 | goto end; |
582 | if (CA_flag) { | 565 | if (CA_flag) { |
583 | xca = load_cert(bio_err, CAfile, CAformat, NULL, e, "CA Certificate"); | 566 | xca = load_cert(bio_err, CAfile, CAformat, NULL, "CA Certificate"); |
584 | if (xca == NULL) | 567 | if (xca == NULL) |
585 | goto end; | 568 | goto end; |
586 | } | 569 | } |
@@ -813,7 +796,7 @@ bad: | |||
813 | if (Upkey == NULL) { | 796 | if (Upkey == NULL) { |
814 | Upkey = load_key(bio_err, | 797 | Upkey = load_key(bio_err, |
815 | keyfile, keyformat, 0, | 798 | keyfile, keyformat, 0, |
816 | passin, e, "Private key"); | 799 | passin, "Private key"); |
817 | if (Upkey == NULL) | 800 | if (Upkey == NULL) |
818 | goto end; | 801 | goto end; |
819 | } | 802 | } |
@@ -825,8 +808,7 @@ bad: | |||
825 | if (CAkeyfile != NULL) { | 808 | if (CAkeyfile != NULL) { |
826 | CApkey = load_key(bio_err, | 809 | CApkey = load_key(bio_err, |
827 | CAkeyfile, CAkeyformat, | 810 | CAkeyfile, CAkeyformat, |
828 | 0, passin, e, | 811 | 0, passin, "CA Private Key"); |
829 | "CA Private Key"); | ||
830 | if (CApkey == NULL) | 812 | if (CApkey == NULL) |
831 | goto end; | 813 | goto end; |
832 | } | 814 | } |
@@ -845,7 +827,7 @@ bad: | |||
845 | } else { | 827 | } else { |
846 | pk = load_key(bio_err, | 828 | pk = load_key(bio_err, |
847 | keyfile, keyformat, 0, | 829 | keyfile, keyformat, 0, |
848 | passin, e, "request key"); | 830 | passin, "request key"); |
849 | if (pk == NULL) | 831 | if (pk == NULL) |
850 | goto end; | 832 | goto end; |
851 | } | 833 | } |