summaryrefslogtreecommitdiff
path: root/apps/genrsa.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-04-04 15:19:19 +0000
committerRichard Levitte <levitte@openssl.org>2003-04-04 15:19:19 +0000
commit1891d5b1ff305f07ad407ec142752f9fcd9e9bb3 (patch)
tree709261f70e0df0c8e8e57b5ab2ef6dfa57d20f7e /apps/genrsa.c
parent5abe0cdad4a2cd74867c023f37cc94a699488cb3 (diff)
downloadopenssl-new-1891d5b1ff305f07ad407ec142752f9fcd9e9bb3.tar.gz
All the changes from HEAD since last merge.
Diffstat (limited to 'apps/genrsa.c')
-rw-r--r--apps/genrsa.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/genrsa.c b/apps/genrsa.c
index 6079688ce9..0ce23946ef 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -87,7 +87,9 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
+#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
+#endif
int ret=1;
RSA *rsa=NULL;
int i,num=DEFBITS;
@@ -96,7 +98,9 @@ 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;
@@ -128,11 +132,13 @@ int MAIN(int argc, char **argv)
f4=3;
else if (strcmp(*argv,"-F4") == 0 || strcmp(*argv,"-f4") == 0)
f4=RSA_F4;
+#ifndef OPENSSL_NO_ENGINE
else if (strcmp(*argv,"-engine") == 0)
{
if (--argc < 1) goto bad;
engine= *(++argv);
}
+#endif
else if (strcmp(*argv,"-rand") == 0)
{
if (--argc < 1) goto bad;
@@ -183,7 +189,9 @@ bad:
BIO_printf(bio_err," -passout arg output file pass phrase source\n");
BIO_printf(bio_err," -f4 use F4 (0x10001) for the E value\n");
BIO_printf(bio_err," -3 use 3 for the E value\n");
+#ifndef OPENSSL_NO_ENGINE
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
+#endif
BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
BIO_printf(bio_err," load the file (or the files in the directory) into\n");
BIO_printf(bio_err," the random number generator\n");
@@ -197,7 +205,9 @@ bad:
goto err;
}
+#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
+#endif
if (outfile == NULL)
{