openssl: dhparam: Print warning if -in argument is ignored
Fixes: openssl#18146
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18206)
diff --git a/apps/dhparam.c b/apps/dhparam.c
index a0c0c06..b9ce418 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -190,6 +190,10 @@
if (num) {
const char *alg = dsaparam ? "DSA" : "DH";
+ if (infile != NULL) {
+ BIO_printf(bio_err, "Warning, input file %s ignored\n", infile);
+ }
+
ctx = EVP_PKEY_CTX_new_from_name(NULL, alg, NULL);
if (ctx == NULL) {
BIO_printf(bio_err,