Software / code / prosody
Comparison
plugins/mod_admin_telnet.lua @ 10461:e293fb8112e2
mod_admin_telnet: Display ALPN in show_tls() if supported and available
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 21 Nov 2019 00:16:20 +0100 |
| parent | 10424:e7d3fa49495f |
| child | 10470:5267f12b038d |
comparison
equal
deleted
inserted
replaced
| 10460:5ce6cbb5ce6a | 10461:e293fb8112e2 |
|---|---|
| 588 local name = sock:getsniname(); | 588 local name = sock:getsniname(); |
| 589 if name then | 589 if name then |
| 590 line[#line+1] = ("(SNI:%q)"):format(name); | 590 line[#line+1] = ("(SNI:%q)"):format(name); |
| 591 end | 591 end |
| 592 end | 592 end |
| 593 if sock.getalpn then | |
| 594 local proto = sock:getalpn(); | |
| 595 if proto then | |
| 596 line[#line+1] = ("(ALPN:%q)"):format(proto); | |
| 597 end | |
| 598 end | |
| 593 else | 599 else |
| 594 line[#line+1] = "(insecure)"; | 600 line[#line+1] = "(insecure)"; |
| 595 end | 601 end |
| 596 return table.concat(line, " "); | 602 return table.concat(line, " "); |
| 597 end | 603 end |