Skip to content

Commit

Permalink
apps: Don't print hostname on bio_out during connect.
Browse files Browse the repository at this point in the history
Printing the hostname on bio_out clutters the output and breaks
pipe like forwarding via openssl.

Print the hostname via bio_err.

Fixes #23013

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #23056)

(cherry picked from commit 8a1694f)
  • Loading branch information
sebastianas authored and t8m committed Dec 29, 2023
1 parent b5fb1fe commit 40346e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/lib/s_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ int init_client(int *sock, const char *host, const char *port,

hostname = BIO_ADDR_hostname_string(BIO_ADDRINFO_address(ai), 1);
if (hostname != NULL) {
BIO_printf(bio_out, "Connecting to %s\n", hostname);
BIO_printf(bio_err, "Connecting to %s\n", hostname);
OPENSSL_free(hostname);
}
/* Remove any stale errors from previous connection attempts */
Expand Down

0 comments on commit 40346e8

Please sign in to comment.