apps/mac: avoid need for two ^D when using stdin from a terminal

Fixes #13246

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15189)
This commit is contained in:
Pauli 2021-05-07 14:19:06 +10:00
parent 68f3fb0514
commit 29f5727b83
1 changed files with 2 additions and 1 deletions

View File

@ -150,10 +150,11 @@ opthelp:
goto err;
}
for (;;) {
while (BIO_pending(in) || !BIO_eof(in)) {
i = BIO_read(in, (char *)buf, BUFSIZE);
if (i < 0) {
BIO_printf(bio_err, "Read Error in '%s'\n", infile);
ERR_print_errors(bio_err);
goto err;
}
if (i == 0)