diff options
author | Richard Levitte <levitte@openssl.org> | 2003-01-30 18:39:26 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-01-30 18:39:26 +0100 |
commit | 0b13e9f055d3f7be066dc2e89fc9f9822b12eca7 (patch) | |
tree | 633b5d3e4c9356eaf9816541aaa079a0c3be9194 /apps/gendh.c | |
parent | Summarise the last couple of commits. (diff) | |
download | openssl-0b13e9f055d3f7be066dc2e89fc9f9822b12eca7.tar.xz openssl-0b13e9f055d3f7be066dc2e89fc9f9822b12eca7.zip |
Add the possibility to build without the ENGINE framework.
PR: 287
Diffstat (limited to 'apps/gendh.c')
-rw-r--r-- | apps/gendh.c | 10 |
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) |