X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fdhparam.c;h=79c0d64c519eeafe0c9153b33fa445485fc09f58;hp=04bd57c6e8aa22c16dadc9772ecc55484bcb6b2a;hb=74ecfab401fe65d23d9b297bf396efca3e419e47;hpb=3eeaab4bed46e3320947d0f609b82007b65b5a46 diff --git a/apps/dhparam.c b/apps/dhparam.c index 04bd57c6e8..79c0d64c51 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -149,9 +149,6 @@ 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; #ifndef OPENSSL_NO_DSA @@ -270,7 +267,7 @@ bad: ERR_load_crypto_strings(); #ifndef OPENSSL_NO_ENGINE - e = setup_engine(bio_err, engine, 0); + setup_engine(bio_err, engine, 0); #endif if (g && !num) @@ -516,7 +513,12 @@ bad: if (outformat == FORMAT_ASN1) i=i2d_DHparams_bio(out,dh); else if (outformat == FORMAT_PEM) - i=PEM_write_bio_DHparams(out,dh); + { + if (dh->q) + i=PEM_write_bio_DHxparams(out,dh); + else + i=PEM_write_bio_DHparams(out,dh); + } else { BIO_printf(bio_err,"bad output format specified for outfile\n"); goto end; @@ -554,4 +556,10 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb) return 1; } +#else /* !OPENSSL_NO_DH */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif + #endif