diff options
author | Rich Salz <rsalz@openssl.org> | 2015-04-25 21:41:29 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-04-25 21:41:29 +0200 |
commit | 333b070ec06d7a67538ee9d5312656a19e802dc1 (patch) | |
tree | aa630fe4f89d2333f82e2aeeba61f66e86e1349c /apps/rand.c | |
parent | Add missing BIO_flush() calls (diff) | |
download | openssl-333b070ec06d7a67538ee9d5312656a19e802dc1.tar.xz openssl-333b070ec06d7a67538ee9d5312656a19e802dc1.zip |
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/rand.c')
-rw-r--r-- | apps/rand.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/rand.c b/apps/rand.c index 9a73935acc..498e7dae70 100644 --- a/apps/rand.c +++ b/apps/rand.c @@ -85,7 +85,7 @@ OPTIONS rand_options[] = { int rand_main(int argc, char **argv) { BIO *out = NULL; - char *engine = NULL, *inrand = NULL, *outfile = NULL, *prog; + char *inrand = NULL, *outfile = NULL, *prog; OPTION_CHOICE o; int base64 = 0, hex = 0, i, num = -1, r, ret = 1; @@ -105,7 +105,7 @@ int rand_main(int argc, char **argv) outfile = opt_arg(); break; case OPT_ENGINE: - engine = opt_arg(); + (void)setup_engine(opt_arg(), 0); break; case OPT_RAND: inrand = opt_arg(); @@ -126,10 +126,6 @@ int rand_main(int argc, char **argv) if (sscanf(argv[0], "%d", &num) != 1 || num < 0) goto opthelp; -#ifndef OPENSSL_NO_ENGINE - setup_engine(engine, 0); -#endif - app_RAND_load_file(NULL, (inrand != NULL)); if (inrand != NULL) BIO_printf(bio_err, "%ld semi-random bytes loaded\n", |