summaryrefslogtreecommitdiffstats
path: root/apps/pkcs8.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-10-19 19:46:38 +0200
committerRichard Levitte <levitte@openssl.org>2016-10-20 09:04:00 +0200
commit0df1caa77b793d055714f4d78d9aac7a985babb8 (patch)
tree87eb3caf0026693522b38c28043f1beb3b37b888 /apps/pkcs8.c
parentaa01b82c69eeb0cfd255174111fc34a7ed5f8429 (diff)
apps: make setup_engine() and release_engine() available always
This removes some #ifndef clutter. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1644)
Diffstat (limited to 'apps/pkcs8.c')
-rw-r--r--apps/pkcs8.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/apps/pkcs8.c b/apps/pkcs8.c
index 1f1de0053d..71e31689df 100644
--- a/apps/pkcs8.c
+++ b/apps/pkcs8.c
@@ -87,9 +87,7 @@ int MAIN(int argc, char **argv)
char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
int badarg = 0;
int ret = 1;
-#ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-#endif
if (bio_err == NULL)
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
@@ -223,9 +221,7 @@ int MAIN(int argc, char **argv)
#endif
goto end;
}
-#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-#endif
if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) {
BIO_printf(bio_err, "Error getting passwords\n");
@@ -391,10 +387,7 @@ int MAIN(int argc, char **argv)
X509_SIG_free(p8);
PKCS8_PRIV_KEY_INFO_free(p8inf);
EVP_PKEY_free(pkey);
-#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-#endif
+ release_engine(e);
BIO_free_all(out);
BIO_free(in);
if (passin)