summaryrefslogtreecommitdiffstats
path: root/apps/smime.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/smime.c
parentc54cc2b15d96944fcf13ccd24baca79f9593cbf0 (diff)
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/smime.c')
-rw-r--r--apps/smime.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/smime.c b/apps/smime.c
index 532446f49f..0c683f5b3c 100644
--- a/apps/smime.c
+++ b/apps/smime.c
@@ -164,7 +164,7 @@ int smime_main(int argc, char **argv)
X509_VERIFY_PARAM *vpm = NULL;
const EVP_CIPHER *cipher = NULL;
const EVP_MD *sign_md = NULL;
- char *CAfile = NULL, *CApath = NULL, *inrand = NULL, *engine = NULL;
+ char *CAfile = NULL, *CApath = NULL, *inrand = NULL;
char *certfile = NULL, *keyfile = NULL, *contfile = NULL, *prog;
char *infile = NULL, *outfile = NULL, *signerfile = NULL, *recipfile =
NULL;
@@ -177,9 +177,7 @@ int smime_main(int argc, char **argv)
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME, keyform =
FORMAT_PEM;
int vpmtouched = 0, rv = 0;
-#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
-#endif
if ((vpm = X509_VERIFY_PARAM_new()) == NULL)
return 1;
@@ -276,7 +274,7 @@ int smime_main(int argc, char **argv)
need_rand = 1;
break;
case OPT_ENGINE:
- engine = opt_arg();
+ e = setup_engine(opt_arg(), 0);
break;
case OPT_PASSIN:
passinarg = opt_arg();
@@ -408,10 +406,6 @@ int smime_main(int argc, char **argv)
} else if (!operation)
goto opthelp;
-#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;