X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fdh.c;h=7465442e49f1c07f8d766029ca8bdfe599c0eb43;hb=c29dbb9562f275485c1266af523cd5d59311d583;hp=6162e442bae86d67353d4517ec9effa17b4f3e94;hpb=bc36ee6227517edae802bcb0da68d4f04fe1fb5e;p=oweals%2Fopenssl.git diff --git a/apps/dh.c b/apps/dh.c index 6162e442ba..7465442e49 100644 --- a/apps/dh.c +++ b/apps/dh.c @@ -57,7 +57,7 @@ * [including the GNU Public Licence.] */ -#ifndef OPENSSL_NO_DH +#ifndef NO_DH #include #include #include @@ -69,7 +69,6 @@ #include #include #include -#include #undef PROG #define PROG dh_main @@ -88,12 +87,11 @@ int MAIN(int, char **); int MAIN(int argc, char **argv) { - ENGINE *e = NULL; 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; apps_startup(); @@ -101,7 +99,6 @@ int MAIN(int argc, char **argv) if ((bio_err=BIO_new(BIO_s_file())) != NULL) BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); - engine=NULL; infile=NULL; outfile=NULL; informat=FORMAT_PEM; @@ -132,11 +129,6 @@ int MAIN(int argc, char **argv) if (--argc < 1) goto bad; outfile= *(++argv); } - else if (strcmp(*argv,"-engine") == 0) - { - if (--argc < 1) goto bad; - engine= *(++argv); - } else if (strcmp(*argv,"-check") == 0) check=1; else if (strcmp(*argv,"-text") == 0) @@ -168,30 +160,11 @@ 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"); - BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); goto end; } ERR_load_crypto_strings(); - if (engine != NULL) - { - if((e = ENGINE_by_id(engine)) == NULL) - { - BIO_printf(bio_err,"invalid engine \"%s\"\n", - engine); - goto end; - } - if(!ENGINE_set_default(e, ENGINE_METHOD_ALL)) - { - BIO_printf(bio_err,"can't use that engine\n"); - goto end; - } - BIO_printf(bio_err,"engine \"%s\" set.\n", engine); - /* Free our "structural" reference. */ - ENGINE_free(e); - } - in=BIO_new(BIO_s_file()); out=BIO_new(BIO_s_file()); if ((in == NULL) || (out == NULL)) @@ -213,7 +186,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef OPENSSL_SYS_VMS +#ifdef VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out);