summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/dh.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-02-19 23:17:42 +0000
committernectar <nectar@FreeBSD.org>2003-02-19 23:17:42 +0000
commit6c9986c446b6cf77f5e83d111dbcca682d6fdd71 (patch)
treee5eb3878430323e978956db174c9c51c7997ba4a /crypto/openssl/apps/dh.c
parentb6c07e9a21ba42613fc3906d3efb586dd5c9a846 (diff)
downloadFreeBSD-src-6c9986c446b6cf77f5e83d111dbcca682d6fdd71.zip
FreeBSD-src-6c9986c446b6cf77f5e83d111dbcca682d6fdd71.tar.gz
Vendor import of OpenSSL 0.9.7a.
Diffstat (limited to 'crypto/openssl/apps/dh.c')
-rw-r--r--crypto/openssl/apps/dh.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/crypto/openssl/apps/dh.c b/crypto/openssl/apps/dh.c
index c10ea96..cd01fed 100644
--- a/crypto/openssl/apps/dh.c
+++ b/crypto/openssl/apps/dh.c
@@ -87,12 +87,17 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
+#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
+#endif
DH *dh=NULL;
int i,badops=0,text=0;
BIO *in=NULL,*out=NULL;
int informat,outformat,check=0,noout=0,C=0,ret=1;
- char *infile,*outfile,*prog,*engine;
+ char *infile,*outfile,*prog;
+#ifndef OPENSSL_NO_ENGINE
+ char *engine;
+#endif
apps_startup();
@@ -103,7 +108,9 @@ int MAIN(int argc, char **argv)
if (!load_config(bio_err, NULL))
goto end;
+#ifndef OPENSSL_NO_ENGINE
engine=NULL;
+#endif
infile=NULL;
outfile=NULL;
informat=FORMAT_PEM;
@@ -134,11 +141,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
else if (strcmp(*argv,"-check") == 0)
check=1;
else if (strcmp(*argv,"-text") == 0)
@@ -170,13 +179,17 @@ bad:
BIO_printf(bio_err," -text print a text form of the DH parameters\n");
BIO_printf(bio_err," -C Output C code\n");
BIO_printf(bio_err," -noout no output\n");
+#ifndef OPENSSL_NO_ENGINE
BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n");
+#endif
goto end;
}
ERR_load_crypto_strings();
+#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
+#endif
in=BIO_new(BIO_s_file());
out=BIO_new(BIO_s_file());
OpenPOWER on IntegriCloud