Software /
code /
prosody
Changeset
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 |
parents | 10423:317bcc4f25f5 |
children | 10425:42cf93ff4618 |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
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