aboutsummaryrefslogtreecommitdiff
path: root/apps/dhparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dhparam.c')
-rw-r--r--apps/dhparam.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c
index 57199a8d2ad8..1210adb104d9 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -159,9 +159,8 @@ int MAIN(int argc, char **argv)
int informat, outformat, check = 0, noout = 0, C = 0, ret = 1;
char *infile, *outfile, *prog;
char *inrand = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
+ ENGINE *e = NULL;
int num = 0, g = 0;
apps_startup();
@@ -270,9 +269,7 @@ int MAIN(int argc, char **argv)
ERR_load_crypto_strings();
-# ifndef OPENSSL_NO_ENGINE
- setup_engine(bio_err, engine, 0);
-# endif
+ e = setup_engine(bio_err, engine, 0);
if (g && !num)
num = DEFBITS;
@@ -512,6 +509,7 @@ int MAIN(int argc, char **argv)
BIO_free_all(out);
if (dh != NULL)
DH_free(dh);
+ release_engine(e);
apps_shutdown();
OPENSSL_EXIT(ret);
}