summaryrefslogtreecommitdiff
path: root/apps/ec.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-04-25 15:41:29 -0400
committerRich Salz <rsalz@openssl.org>2015-04-25 15:41:29 -0400
commit333b070ec06d7a67538ee9d5312656a19e802dc1 (patch)
treeaa630fe4f89d2333f82e2aeeba61f66e86e1349c /apps/ec.c
parentc54cc2b15d96944fcf13ccd24baca79f9593cbf0 (diff)
downloadopenssl-new-333b070ec06d7a67538ee9d5312656a19e802dc1.tar.gz
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 <levitte@openssl.org>
Diffstat (limited to 'apps/ec.c')
-rw-r--r--apps/ec.c11
1 files changed, 3 insertions, 8 deletions
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;