mod_admin_telnet: Display ALPN in show_tls() if supported and available
authorKim Alvefur <zash@zash.se>
Thu, 21 Nov 2019 00:16:20 +0100
changeset 10465 e293fb8112e2
parent 10464 5ce6cbb5ce6a
child 10466 9af6ab2623b0
mod_admin_telnet: Display ALPN in show_tls() if supported and available
plugins/mod_admin_telnet.lua
--- a/plugins/mod_admin_telnet.lua	Fri Nov 29 21:30:08 2019 +0100
+++ b/plugins/mod_admin_telnet.lua	Thu Nov 21 00:16:20 2019 +0100
@@ -590,6 +590,12 @@
 				line[#line+1] = ("(SNI:%q)"):format(name);
 			end
 		end
+		if sock.getalpn then
+			local proto = sock:getalpn();
+			if proto then
+				line[#line+1] = ("(ALPN:%q)"):format(proto);
+			end
+		end
 	else
 		line[#line+1] = "(insecure)";
 	end