aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/apps/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/apps/rand.c')
-rw-r--r--crypto/openssl/apps/rand.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/openssl/apps/rand.c b/crypto/openssl/apps/rand.c
index e159da37be18e..96dcb7273a4df 100644
--- a/crypto/openssl/apps/rand.c
+++ b/crypto/openssl/apps/rand.c
@@ -86,9 +86,8 @@ int MAIN(int argc, char **argv)
int hex = 0;
BIO *out = NULL;
int num = -1;
-#ifndef OPENSSL_NO_ENGINE
+ ENGINE *e = NULL;
char *engine = NULL;
-#endif
apps_startup();
@@ -162,9 +161,7 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err, "-hex - hex encode output\n");
goto err;
}
-#ifndef OPENSSL_NO_ENGINE
- setup_engine(bio_err, engine, 0);
-#endif
+ e = setup_engine(bio_err, engine, 0);
app_RAND_load_file(NULL, bio_err, (inrand != NULL));
if (inrand != NULL)
@@ -222,6 +219,7 @@ int MAIN(int argc, char **argv)
err:
ERR_print_errors(bio_err);
+ release_engine(e);
if (out)
BIO_free_all(out);
apps_shutdown();