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

@@ -85,7 +85,7 @@ int pkeyparam_main(int argc, char **argv)
EVP_PKEY *pkey = NULL;
int text = 0, noout = 0, ret = 1;
OPTION_CHOICE o;
char *infile = NULL, *outfile = NULL, *prog, *engine = NULL;
char *infile = NULL, *outfile = NULL, *prog;
prog = opt_init(argc, argv, pkeyparam_options);
while ((o = opt_next()) != OPT_EOF) {
@@ -105,7 +105,7 @@ int pkeyparam_main(int argc, char **argv)
outfile = opt_arg();
break;
case OPT_ENGINE:
engine = opt_arg();
(void)setup_engine(opt_arg(), 0);
break;
case OPT_TEXT:
text = 1;
@@ -118,10 +118,6 @@ int pkeyparam_main(int argc, char **argv)
argc = opt_num_rest();
argv = opt_rest();
#ifndef OPENSSL_NO_ENGINE
setup_engine(engine, 0);
#endif
in = bio_open_default(infile, "r");
if (in == NULL)
goto end;