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>
This commit is contained in:
Rich Salz
2015-04-25 15:41:29 -04:00
parent c54cc2b15d
commit 333b070ec0
31 changed files with 88 additions and 218 deletions

View File

@@ -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;