From 333b070ec06d7a67538ee9d5312656a19e802dc1 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Sat, 25 Apr 2015 15:41:29 -0400 Subject: fewer NO_ENGINE #ifdef's Make setup_engine be a dummy if NO_ENGINE is enabled. The option is not enabled if NO_ENGINE is enabled, so the one "wasted" variable just sits there. Removes some variables and code. Reviewed-by: Richard Levitte --- apps/rsautl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'apps/rsautl.c') diff --git a/apps/rsautl.c b/apps/rsautl.c index 04667469f6..67cb76e8ce 100644 --- a/apps/rsautl.c +++ b/apps/rsautl.c @@ -116,7 +116,7 @@ int rsautl_main(int argc, char **argv) EVP_PKEY *pkey = NULL; RSA *rsa = NULL; X509 *x; - char *engine = NULL, *infile = NULL, *outfile = NULL, *keyfile = NULL; + char *infile = NULL, *outfile = NULL, *keyfile = NULL; char *passinarg = NULL, *passin = NULL, *prog; char rsa_mode = RSA_VERIFY, key_type = KEY_PRIVKEY; unsigned char *rsa_in = NULL, *rsa_out = NULL, pad = RSA_PKCS1_PADDING; @@ -147,7 +147,7 @@ int rsautl_main(int argc, char **argv) outfile = opt_arg(); break; case OPT_ENGINE: - engine = opt_arg(); + e = setup_engine(opt_arg(), 0); break; case OPT_ASN1PARSE: asn1parse = 1; @@ -208,9 +208,7 @@ int rsautl_main(int argc, char **argv) BIO_printf(bio_err, "A private key is needed for this operation\n"); goto end; } -# ifndef OPENSSL_NO_ENGINE - e = setup_engine(engine, 0); -# endif + if (!app_passwd(passinarg, NULL, &passin, NULL)) { BIO_printf(bio_err, "Error getting password\n"); goto end; -- cgit v1.2.3