summaryrefslogtreecommitdiffstats
path: root/apps/gendh.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-01-30 17:39:26 +0000
committerRichard Levitte <levitte@openssl.org>2003-01-30 17:39:26 +0000
commit0b13e9f055d3f7be066dc2e89fc9f9822b12eca7 (patch)
tree633b5d3e4c9356eaf9816541aaa079a0c3be9194 /apps/gendh.c
parent96f7065f6392e19f1449578aaeabb8dc39294fa7 (diff)
Add the possibility to build without the ENGINE framework.
PR: 287
Diffstat (limited to 'apps/gendh.c')
-rw-r--r--apps/gendh.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/gendh.c b/apps/gendh.c
index 574a13a57a..b90087493a 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -87,13 +87,17 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
+#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
+#endif
DH *dh=NULL;
int ret=1,num=DEFBITS;
int g=2;
char *outfile=NULL;
char *inrand=NULL;
+#ifndef OPENSSL_NO_ENGINE
char *engine=NULL;
+#endif
BIO *out=NULL;
apps_startup();
@@ -121,11 +125,13 @@ int MAIN(int argc, char **argv)
g=3; */
else if (strcmp(*argv,"-5") == 0)
g=5;
+#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;
@@ -144,14 +150,18 @@ bad:
BIO_printf(bio_err," -2 - use 2 as the generator value\n");
/* BIO_printf(bio_err," -3 - use 3 as the generator value\n"); */
BIO_printf(bio_err," -5 - use 5 as the generator 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");
goto end;
}
+#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
+#endif
out=BIO_new(BIO_s_file());
if (out == NULL)