diff options
author | Bhaskar Metiya <bhaskarmetiya@gmail.com> | 2024-08-14 09:27:14 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2024-08-15 17:59:28 +0200 |
commit | 1d2cbd9b5a126189d5e9bc78a3bdb9709427d02b (patch) | |
tree | 5efbf5417ceabb224d980d6690ef8b0d6de30be7 /apps/req.c | |
parent | Return SSL_AD_DECRYPT_ERROR alert on PSK binder validation failure (RFC 8446) (diff) | |
download | openssl-1d2cbd9b5a126189d5e9bc78a3bdb9709427d02b.tar.xz openssl-1d2cbd9b5a126189d5e9bc78a3bdb9709427d02b.zip |
apps/req.c: No warning reading from stdin if redirected
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25179)
Diffstat (limited to '')
-rw-r--r-- | apps/req.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/req.c b/apps/req.c index 2d23861cf6..73dd94a567 100644 --- a/apps/req.c +++ b/apps/req.c @@ -30,6 +30,7 @@ #ifndef OPENSSL_NO_DSA # include <openssl/dsa.h> #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 && isatty(fileno_stdin())) BIO_printf(bio_err, "Warning: Will read cert request from stdin since no -in option is given\n"); } |