openssl: dhparam: Print warning if -in argument is ignored
authorDaniel Fiala <daniel@openssl.org>
Fri, 29 Apr 2022 07:33:49 +0000 (09:33 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 4 May 2022 07:29:54 +0000 (09:29 +0200)
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)

(cherry picked from commit 6d952291762246f6533e19ca413277390db4aae2)

apps/dhparam.c

index 0e90698cd69408c8bd84456999c6e72136b90565..94b3e04b90471e5a35a85f5bb97c93b061e0ad4e 100644 (file)
@@ -181,6 +181,10 @@ int dhparam_main(int argc, char **argv)
     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,