Diff

plugins/mod_admin_telnet.lua @ 10424:e7d3fa49495f

mod_admin_telnet: Show SNI name in show_tls() if available
author Kim Alvefur <zash@zash.se>
date Wed, 20 Nov 2019 21:31:46 +0100
parent 10383:496248e48a1d
child 10461:e293fb8112e2
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Wed Nov 20 19:22:55 2019 +0100
+++ b/plugins/mod_admin_telnet.lua	Wed Nov 20 21:31:46 2019 +0100
@@ -584,6 +584,12 @@
 		else
 			line[#line+1] = "(cipher info unavailable)";
 		end
+		if sock.getsniname then
+			local name = sock:getsniname();
+			if name then
+				line[#line+1] = ("(SNI:%q)"):format(name);
+			end
+		end
 	else
 		line[#line+1] = "(insecure)";
 	end