net.server_epoll: Log TLS version and cipher for all completed handshakes
authorKim Alvefur <zash@zash.se>
Sun, 06 Oct 2019 16:23:43 +0200
changeset 10311 6a997f0ceba8
parent 10310 c0a94419c28e
child 10312 48e392dbf6e7
net.server_epoll: Log TLS version and cipher for all completed handshakes The similar logging in mod_c2s and mod_s2s does not cover all connections, like HTTPS or other Direct TLS ports.
net/server_epoll.lua
--- a/net/server_epoll.lua	Sun Oct 06 16:07:26 2019 +0200
+++ b/net/server_epoll.lua	Sun Oct 06 16:23:43 2019 +0200
@@ -548,7 +548,12 @@
 	end
 	local ok, err = self.conn:dohandshake();
 	if ok then
-		self:debug("TLS handshake complete");
+		if self.conn.info then
+			local info = self.conn:info();
+			self:debug("TLS handshake complete (%s with %s)", info.protocol, info.cipher);
+		else
+			self:debug("TLS handshake complete");
+		end
 		self.onwritable = nil;
 		self.onreadable = nil;
 		self:on("status", "ssl-handshake-complete");