aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commitb1d048f1177a4f6b2971510dd83184c6db8bbb38 (patch)
tree2cf8b3cc8208082d4ce7771ddc2cecfb1f241969 /plugins
parent2e216150e8938ad5df6e5df751db3a48bfb96ced (diff)
downloadprosody-b1d048f1177a4f6b2971510dd83184c6db8bbb38.tar.gz
prosody-b1d048f1177a4f6b2971510dd83184c6db8bbb38.zip
mod_admin_telnet: Show SNI name in show_tls() if available
Diffstat (limited to 'plugins')
-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