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/enc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'apps/enc.c') diff --git a/apps/enc.c b/apps/enc.c index 06b056b45d..61a64d4469 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -132,7 +132,7 @@ int enc_main(int argc, char **argv) EVP_CIPHER_CTX *ctx = NULL; const EVP_CIPHER *cipher = NULL, *c; const EVP_MD *dgst = NULL; - char *engine = NULL, *hkey = NULL, *hiv = NULL, *hsalt = NULL, *p; + char *hkey = NULL, *hiv = NULL, *hsalt = NULL, *p; char *infile = NULL, *outfile = NULL, *prog; char *str = NULL, *passarg = NULL, *pass = NULL, *strbuf = NULL; char mbuf[sizeof magic - 1]; @@ -193,7 +193,7 @@ int enc_main(int argc, char **argv) passarg = opt_arg(); break; case OPT_ENGINE: - engine = opt_arg(); + (void)setup_engine(opt_arg(), 0); break; case OPT_D: enc = 0; @@ -294,10 +294,6 @@ int enc_main(int argc, char **argv) argc = opt_num_rest(); argv = opt_rest(); -#ifndef OPENSSL_NO_ENGINE - setup_engine(engine, 0); -#endif - if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) { BIO_printf(bio_err, "%s: AEAD ciphers not supported\n", prog); goto end; -- cgit v1.2.3