<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">https://bugs.gentoo.org/946621

commit 1d2cbd9b5a126189d5e9bc78a3bdb9709427d02b
Author: Bhaskar Metiya &lt;bhaskarmetiya@gmail.com&gt;
Date:   Wed Aug 14 12:57:14 2024 +0530

    apps/req.c: No warning reading from stdin if redirected
    
    CLA: trivial
    
    Reviewed-by: Matt Caswell &lt;matt@openssl.org&gt;
    Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
    Reviewed-by: Richard Levitte &lt;levitte@openssl.org&gt;
    (Merged from https://github.com/openssl/openssl/pull/25179)

--- a/apps/req.c
+++ b/apps/req.c
@@ -30,6 +30,7 @@
 #ifndef OPENSSL_NO_DSA
 # include &lt;openssl/dsa.h&gt;
 #endif
+#include "internal/e_os.h"    /* For isatty() */
 
 #define BITS               "default_bits"
 #define KEYFILE            "default_keyfile"
@@ -516,7 +517,7 @@ int req_main(int argc, char **argv)
     if (infile == NULL) {
         if (gen_x509)
             newreq = 1;
-        else if (!newreq)
+        else if (!newreq &amp;&amp; isatty(fileno_stdin()))
             BIO_printf(bio_err,
                        "Warning: Will read cert request from stdin since no -in option is given\n");
     }
</pre></body></html>