aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-20 21:31:46 +0100
committerKim Alvefur <zash@zash.se>2019-11-20 21:31:46 +0100
commite130b377970996b9eb3d36c74db121835ed0a57e (patch)
tree2cf8b3cc8208082d4ce7771ddc2cecfb1f241969
parentc890928e76f664800358903303dacc2a59a17d54 (diff)
downloadprosody-e130b377970996b9eb3d36c74db121835ed0a57e.tar.gz
prosody-e130b377970996b9eb3d36c74db121835ed0a57e.zip
mod_admin_telnet: Show SNI name in show_tls() if available
-rw-r--r--plugins/mod_admin_telnet.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 2bbd367b..cef79d25 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -584,6 +584,12 @@ local function tls_info(session, line)
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