aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dsaparam.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/dsaparam.c
parent96f7065f6392e19f1449578aaeabb8dc39294fa7 (diff)
downloadopenssl-0b13e9f055d3f7be066dc2e89fc9f9822b12eca7.tar.gz
Add the possibility to build without the ENGINE framework.
PR: 287
Diffstat (limited to 'apps/dsaparam.c')
-rw-r--r--apps/dsaparam.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index b6abe785ab..14e79f9a21 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -110,7 +110,9 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
+#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
+#endif
DSA *dsa=NULL;
int i,badops=0,text=0;
BIO *in=NULL,*out=NULL;
@@ -118,7 +120,9 @@ int MAIN(int argc, char **argv)
char *infile,*outfile,*prog,*inrand=NULL;
int numbits= -1,num,genkey=0;
int need_rand=0;
+#ifndef OPENSSL_NO_ENGINE
char *engine=NULL;
+#endif
#ifdef GENCB_TEST
int timebomb=0;
#endif
@@ -162,11 +166,13 @@ int MAIN(int argc, char **argv)
if (--argc < 1) goto bad;
outfile= *(++argv);
}
+#ifndef OPENSSL_NO_ENGINE
else if(strcmp(*argv, "-engine") == 0)
{
if (--argc < 1) goto bad;
engine = *(++argv);
}
+#endif
#ifdef GENCB_TEST
else if(strcmp(*argv, "-timebomb") == 0)
{
@@ -221,7 +227,9 @@ bad:
BIO_printf(bio_err," -noout no output\n");
BIO_printf(bio_err," -genkey generate a DSA key\n");
BIO_printf(bio_err," -rand files to use for random number input\n");
+#ifndef OPENSSL_NO_ENGINE
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
+#endif
#ifdef GENCB_TEST
BIO_printf(bio_err," -timebomb n interrupt keygen after <n> seconds\n");
#endif
@@ -268,7 +276,9 @@ bad:
}
}
+#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
+#endif
if (need_rand)
{