req: Do not warn about using stdin when generating new request
authorTomas Mraz <tomas@openssl.org>
Thu, 7 Oct 2021 15:34:08 +0000 (17:34 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 11 Oct 2021 14:32:04 +0000 (16:32 +0200)
Fixes #16773

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16774)

apps/req.c

index f756c25b2a4be1d6aa72d8eaedd85272d3237047..aac972e29b580365f5480d782eabb4f68d5e8017 100644 (file)
@@ -492,7 +492,7 @@ int req_main(int argc, char **argv)
     if (infile == NULL) {
         if (gen_x509)
             newreq = 1;
-        else
+        else if (!newreq)
             BIO_printf(bio_err,
                        "Warning: Will read cert request from stdin since no -in option is given\n");
     }