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 openssl#23013

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
  • Loading branch information
sebastianas committed Dec 14, 2023
1 parent 5056133 commit 1146f1a
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 1146f1a

Please sign in to comment.