X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fdhparam.c;h=5f9b60148d6fb60610a7abaf887b2be721d137e6;hb=c29dbb9562f275485c1266af523cd5d59311d583;hp=d7fa61249197270b08c8923e0a64eba131887551;hpb=cf1b7d96647d55e533f779e476e3d4371f40445a;p=oweals%2Fopenssl.git diff --git a/apps/dhparam.c b/apps/dhparam.c index d7fa612491..5f9b60148d 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -109,7 +109,7 @@ * */ -#ifndef OPENSSL_NO_DH +#ifndef NO_DH #include #include #include @@ -121,9 +121,8 @@ #include #include #include -#include -#ifndef OPENSSL_NO_DSA +#ifndef NO_DSA #include #endif @@ -149,16 +148,15 @@ int MAIN(int, char **); int MAIN(int argc, char **argv) { - ENGINE *e = NULL; DH *dh=NULL; int i,badops=0,text=0; -#ifndef OPENSSL_NO_DSA +#ifndef NO_DSA int dsaparam=0; #endif BIO *in=NULL,*out=NULL; int informat,outformat,check=0,noout=0,C=0,ret=1; char *infile,*outfile,*prog; - char *inrand=NULL,*engine=NULL; + char *inrand=NULL; int num = 0, g = 0; apps_startup(); @@ -197,16 +195,11 @@ 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) text=1; -#ifndef OPENSSL_NO_DSA +#ifndef NO_DSA else if (strcmp(*argv,"-dsaparam") == 0) dsaparam=1; #endif @@ -238,7 +231,7 @@ bad: BIO_printf(bio_err," -outform arg output format - one of DER PEM\n"); BIO_printf(bio_err," -in arg input file\n"); BIO_printf(bio_err," -out arg output file\n"); -#ifndef OPENSSL_NO_DSA +#ifndef NO_DSA BIO_printf(bio_err," -dsaparam read or generate DSA parameters, convert to DH\n"); #endif BIO_printf(bio_err," -check check the DH parameters\n"); @@ -247,7 +240,6 @@ bad: BIO_printf(bio_err," -2 generate parameters using 2 as the generator value\n"); BIO_printf(bio_err," -5 generate parameters using 5 as the generator value\n"); BIO_printf(bio_err," numbits number of bits in to generate (default 512)\n"); - BIO_printf(bio_err," -engine e use engine e, possibly a hardware device.\n"); 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"); @@ -257,28 +249,10 @@ bad: 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); - } - if (g && !num) num = DEFBITS; -#ifndef OPENSSL_NO_DSA +#ifndef NO_DSA if (dsaparam) { if (g) @@ -305,7 +279,7 @@ bad: BIO_printf(bio_err,"%ld semi-random bytes loaded\n", app_RAND_load_files(inrand)); -#ifndef OPENSSL_NO_DSA +#ifndef NO_DSA if (dsaparam) { DSA *dsa; @@ -366,7 +340,7 @@ bad: goto end; } -#ifndef OPENSSL_NO_DSA +#ifndef NO_DSA if (dsaparam) { DSA *dsa;