about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-06-24 17:58:12 -0400
committerJune McEnroe <june@causal.agency>2021-06-25 11:50:14 -0400
commit981ebc4f12b88fbf52ed0352428a0612dd2c2568 (patch)
treebe6e3d63cbc8035af1143352a09f0c41beed8ee0
parentMove setting CLOEXEC on socket to ircConnect (diff)
downloadcatgirl-981ebc4f12b88fbf52ed0352428a0612dd2c2568.tar.gz
catgirl-981ebc4f12b88fbf52ed0352428a0612dd2c2568.zip
Remove explicit tls_handshake(3) from ircConnect
The first call to ircFormat, which calls tls_write(3) in turn, will
perform the handshake anyway. This way the handshake happens after
the final pledge(2) call.
-rw-r--r--irc.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/irc.c b/irc.c
index 61d74bb..dc40201 100644
--- a/irc.c
+++ b/irc.c
@@ -162,11 +162,6 @@ int ircConnect(const char *bindHost, const char *host, const char *port) {
 	error = tls_connect_socket(client, sock, host);
 	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;
 }
 
a href='/pounce/commit/local.c?h=2.0&id=510e4e18d1ce46d8a1ae2ed5eff54304598c1529&follow=1'>Rename listen to localJune McEnroe 2019-11-09Remove extended-join and invite-notifyJune McEnroe 2019-11-09Maintain stateCaps and offer them to clientsJune McEnroe 2019-11-09Parse capabilitiesJune McEnroe 2019-11-09Avoid the reserved _A names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe 2019-11-08Only change AWAY status for registered clientsJune McEnroe 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe