Revert "Remove explicit tls_handshake(3) from ircConnect"

This reverts commit 981ebc4f12.

This broke `-o' to print the server certificate;  without explicit
handshake there will be no tls_read(3) in this short code path.
master
Klemens Nanni 2021-06-29 12:24:14 +00:00 committed by C. McEnroe
parent 54d899196c
commit 40b3f52aaf
1 changed files with 5 additions and 0 deletions

5
irc.c
View File

@ -162,6 +162,11 @@ int ircConnect(const char *bindHost, const char *host, const char *port) {
error = tls_connect_socket(client, sock, host); error = tls_connect_socket(client, sock, host);
if (error) errx(EX_PROTOCOL, "tls_connect: %s", tls_error(client)); if (error) errx(EX_PROTOCOL, "tls_connect: %s", tls_error(client));
do {
error = tls_handshake(client);
} while (error == TLS_WANT_POLLIN || error == TLS_WANT_POLLOUT);
if (error) errx(EX_PROTOCOL, "tls_handshake: %s", tls_error(client));
return sock; return sock;
} }