summaryrefslogtreecommitdiffstats
path: root/apps/genrsa.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/genrsa.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/genrsa.c')
-rw-r--r--apps/genrsa.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/apps/genrsa.c b/apps/genrsa.c
index cd4490c25e..51dcfcaea0 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -91,9 +91,7 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
BN_GENCB cb;
-# ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
-# endif
int ret = 1;
int i, num = DEFBITS;
long l;
@@ -101,9 +99,7 @@ int MAIN(int argc, char **argv)
unsigned long f4 = RSA_F4;
char *outfile = NULL;
char *passargout = NULL, *passout = NULL;
-# ifndef OPENSSL_NO_ENGINE
char *engine = NULL;
-# endif
char *inrand = NULL;
BIO *out = NULL;
BIGNUM *bn = BN_new();
@@ -240,9 +236,7 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err, "Error getting password\n");
goto err;
}
-# ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
-# endif
if (outfile == NULL) {
BIO_set_fp(out, stdout, BIO_NOCLOSE);
@@ -314,10 +308,7 @@ int MAIN(int argc, char **argv)
RSA_free(rsa);
if (out)
BIO_free_all(out);
-# ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- release_engine(e);
-# endif
+ release_engine(e);
if (passout)
OPENSSL_free(passout);
if (ret != 0)