From e2fad4e6bdd4e404b3f4c186de52078738af2271 Mon Sep 17 00:00:00 2001 From: bcook <> Date: Fri, 11 Sep 2015 14:30:23 +0000 Subject: 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@ --- src/usr.bin/openssl/rsa.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'src/usr.bin/openssl/rsa.c') diff --git a/src/usr.bin/openssl/rsa.c b/src/usr.bin/openssl/rsa.c index 55b6f7399f..708332a8d1 100644 --- a/src/usr.bin/openssl/rsa.c +++ b/src/usr.bin/openssl/rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.c,v 1.4 2015/08/19 18:25:31 deraadt Exp $ */ +/* $OpenBSD: rsa.c,v 1.5 2015/09/11 14:30:23 bcook Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -77,9 +77,6 @@ static struct { int check; const EVP_CIPHER *enc; -#ifndef OPENSSL_NO_ENGINE - char *engine; -#endif char *infile; int informat; int modulus; @@ -119,15 +116,6 @@ static struct option rsa_options[] = { .type = OPTION_FLAG, .opt.flag = &rsa_config.check, }, -#ifndef OPENSSL_NO_ENGINE - { - .name = "engine", - .argname = "id", - .desc = "Use the engine specified by the given identifier", - .type = OPTION_ARG, - .opt.arg = &rsa_config.engine, - }, -#endif { .name = "in", .argname = "file", @@ -258,7 +246,7 @@ static void rsa_usage() { fprintf(stderr, - "usage: rsa [-ciphername] [-check] [-engine id] [-in file] " + "usage: rsa [-ciphername] [-check] [-in file] " "[-inform fmt]\n" " [-modulus] [-noout] [-out file] [-outform fmt] " "[-passin src]\n" @@ -274,7 +262,6 @@ rsa_usage() int rsa_main(int argc, char **argv) { - ENGINE *e = NULL; int ret = 1; RSA *rsa = NULL; int i; @@ -291,10 +278,6 @@ rsa_main(int argc, char **argv) goto end; } -#ifndef OPENSSL_NO_ENGINE - e = setup_engine(bio_err, rsa_config.engine, 0); -#endif - if (!app_passwd(bio_err, rsa_config.passargin, rsa_config.passargout, &passin, &passout)) { BIO_printf(bio_err, "Error getting passwords\n"); @@ -323,12 +306,12 @@ rsa_main(int argc, char **argv) tmpformat = rsa_config.informat; pkey = load_pubkey(bio_err, rsa_config.infile, - tmpformat, 1, passin, e, "Public Key"); + tmpformat, 1, passin, "Public Key"); } else pkey = load_key(bio_err, rsa_config.infile, (rsa_config.informat == FORMAT_NETSCAPE && rsa_config.sgckey ? FORMAT_IISSGC : - rsa_config.informat), 1, passin, e, "Private Key"); + rsa_config.informat), 1, passin, "Private Key"); if (pkey != NULL) rsa = EVP_PKEY_get1_RSA(pkey); -- cgit v1.2.3-55-g6feb