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/genrsa.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/genrsa.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/usr.bin/openssl/genrsa.c b/src/usr.bin/openssl/genrsa.c index 99f2bf3641..9f78f0d65d 100644 --- a/src/usr.bin/openssl/genrsa.c +++ b/src/usr.bin/openssl/genrsa.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: genrsa.c,v 1.4 2015/08/22 16:36:05 jsing Exp $ */ | 1 | /* $OpenBSD: genrsa.c,v 1.5 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 | * |
@@ -89,9 +89,6 @@ int | |||
89 | genrsa_main(int argc, char **argv) | 89 | genrsa_main(int argc, char **argv) |
90 | { | 90 | { |
91 | BN_GENCB cb; | 91 | BN_GENCB cb; |
92 | #ifndef OPENSSL_NO_ENGINE | ||
93 | ENGINE *e = NULL; | ||
94 | #endif | ||
95 | int ret = 1; | 92 | int ret = 1; |
96 | int i, num = DEFBITS; | 93 | int i, num = DEFBITS; |
97 | long l; | 94 | long l; |
@@ -99,9 +96,6 @@ genrsa_main(int argc, char **argv) | |||
99 | unsigned long f4 = RSA_F4; | 96 | unsigned long f4 = RSA_F4; |
100 | char *outfile = NULL; | 97 | char *outfile = NULL; |
101 | char *passargout = NULL, *passout = NULL; | 98 | char *passargout = NULL, *passout = NULL; |
102 | #ifndef OPENSSL_NO_ENGINE | ||
103 | char *engine = NULL; | ||
104 | #endif | ||
105 | BIO *out = NULL; | 99 | BIO *out = NULL; |
106 | BIGNUM *bn = BN_new(); | 100 | BIGNUM *bn = BN_new(); |
107 | RSA *rsa = NULL; | 101 | RSA *rsa = NULL; |
@@ -128,13 +122,6 @@ genrsa_main(int argc, char **argv) | |||
128 | f4 = 3; | 122 | f4 = 3; |
129 | else if (strcmp(*argv, "-F4") == 0 || strcmp(*argv, "-f4") == 0) | 123 | else if (strcmp(*argv, "-F4") == 0 || strcmp(*argv, "-f4") == 0) |
130 | f4 = RSA_F4; | 124 | f4 = RSA_F4; |
131 | #ifndef OPENSSL_NO_ENGINE | ||
132 | else if (strcmp(*argv, "-engine") == 0) { | ||
133 | if (--argc < 1) | ||
134 | goto bad; | ||
135 | engine = *(++argv); | ||
136 | } | ||
137 | #endif | ||
138 | #ifndef OPENSSL_NO_DES | 125 | #ifndef OPENSSL_NO_DES |
139 | else if (strcmp(*argv, "-des") == 0) | 126 | else if (strcmp(*argv, "-des") == 0) |
140 | enc = EVP_des_cbc(); | 127 | enc = EVP_des_cbc(); |
@@ -190,9 +177,6 @@ bad: | |||
190 | BIO_printf(bio_err, " -passout arg output file pass phrase source\n"); | 177 | BIO_printf(bio_err, " -passout arg output file pass phrase source\n"); |
191 | BIO_printf(bio_err, " -f4 use F4 (0x10001) for the E value\n"); | 178 | BIO_printf(bio_err, " -f4 use F4 (0x10001) for the E value\n"); |
192 | BIO_printf(bio_err, " -3 use 3 for the E value\n"); | 179 | BIO_printf(bio_err, " -3 use 3 for the E value\n"); |
193 | #ifndef OPENSSL_NO_ENGINE | ||
194 | BIO_printf(bio_err, " -engine e use engine e, possibly a hardware device.\n"); | ||
195 | #endif | ||
196 | goto err; | 180 | goto err; |
197 | } | 181 | } |
198 | 182 | ||
@@ -200,9 +184,6 @@ bad: | |||
200 | BIO_printf(bio_err, "Error getting password\n"); | 184 | BIO_printf(bio_err, "Error getting password\n"); |
201 | goto err; | 185 | goto err; |
202 | } | 186 | } |
203 | #ifndef OPENSSL_NO_ENGINE | ||
204 | e = setup_engine(bio_err, engine, 0); | ||
205 | #endif | ||
206 | 187 | ||
207 | if (outfile == NULL) { | 188 | if (outfile == NULL) { |
208 | BIO_set_fp(out, stdout, BIO_NOCLOSE); | 189 | BIO_set_fp(out, stdout, BIO_NOCLOSE); |
@@ -215,11 +196,7 @@ bad: | |||
215 | 196 | ||
216 | BIO_printf(bio_err, "Generating RSA private key, %d bit long modulus\n", | 197 | BIO_printf(bio_err, "Generating RSA private key, %d bit long modulus\n", |
217 | num); | 198 | num); |
218 | #ifdef OPENSSL_NO_ENGINE | ||
219 | rsa = RSA_new(); | 199 | rsa = RSA_new(); |
220 | #else | ||
221 | rsa = RSA_new_method(e); | ||
222 | #endif | ||
223 | if (!rsa) | 200 | if (!rsa) |
224 | goto err; | 201 | goto err; |
225 | 202 | ||