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/ec.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'apps/ec.c') diff --git a/apps/ec.c b/apps/ec.c index d6bce6d28a..471de474e4 100644 --- a/apps/ec.c +++ b/apps/ec.c @@ -116,9 +116,8 @@ int ec_main(int argc, char **argv) const EC_GROUP *group; const EVP_CIPHER *enc = NULL; point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; - char *infile = NULL, *outfile = NULL, *prog, *engine = NULL; - char *passin = NULL, *passout = NULL, *passinarg = NULL, *passoutarg = - NULL; + char *infile = NULL, *outfile = NULL, *prog; + char *passin = NULL, *passout = NULL, *passinarg = NULL, *passoutarg = NULL; OPTION_CHOICE o; int asn1_flag = OPENSSL_EC_NAMED_CURVE, new_form = 0, new_asn1_flag = 0; int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, noout = 0; @@ -172,7 +171,7 @@ int ec_main(int argc, char **argv) passoutarg = opt_arg(); break; case OPT_ENGINE: - engine = opt_arg(); + (void)setup_engine(opt_arg(), 0); break; case OPT_CIPHER: if (!opt_cipher(opt_unknown(), &enc)) @@ -194,10 +193,6 @@ int ec_main(int argc, char **argv) argc = opt_num_rest(); argv = opt_rest(); -# ifndef OPENSSL_NO_ENGINE - setup_engine(engine, 0); -# endif - if (!app_passwd(passinarg, passoutarg, &passin, &passout)) { BIO_printf(bio_err, "Error getting passwords\n"); goto end; -- cgit v1.2.3