Fixes #22893
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23526)
#ifndef OPENSSL_NO_DSA
# include <openssl/dsa.h>
#endif
#ifndef OPENSSL_NO_DSA
# include <openssl/dsa.h>
#endif
+#include "internal/e_os.h" /* For isatty() */
#undef POSTFIX
#define POSTFIX ".srl"
#undef POSTFIX
#define POSTFIX ".srl"
+ if (infile == NULL && isatty(fileno_stdin()))
BIO_printf(bio_err,
"Warning: Reading cert request from stdin since no -in option is given\n");
req = load_csr_autofmt(infile, informat, vfyopts,
BIO_printf(bio_err,
"Warning: Reading cert request from stdin since no -in option is given\n");
req = load_csr_autofmt(infile, informat, vfyopts,
+ if (infile == NULL && isatty(fileno_stdin()))
BIO_printf(bio_err,
"Warning: Reading certificate from stdin since no -in or -new option is given\n");
x = load_cert_pass(infile, informat, 1, passin, "certificate");
BIO_printf(bio_err,
"Warning: Reading certificate from stdin since no -in or -new option is given\n");
x = load_cert_pass(infile, informat, 1, passin, "certificate");
# endif
# define unlink _unlink
# define fileno _fileno
# endif
# define unlink _unlink
# define fileno _fileno
# endif
# else
# include <strings.h>
# endif
# else
# include <strings.h>