Software /
code /
prosody
Diff
plugins/mod_s2s.lua @ 12602:9184fe3d489a
mod_tls: Record STARTTLS state so it can be shown in Shell
This field can be viewed using s2s:show(nil, "... starttls") even
without any special support in mod_admin_shell, which can be added later
to make it nicer. One can then assume that a TLS connection with an
empty / nil starttls field means Direct TLS.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 02 Aug 2022 19:26:26 +0200 |
parent | 12494:65316782862f |
child | 12680:ca4abc6ab208 |
line wrap: on
line diff
--- a/plugins/mod_s2s.lua Tue Aug 02 16:08:43 2022 +0200 +++ b/plugins/mod_s2s.lua Tue Aug 02 19:26:26 2022 +0200 @@ -429,7 +429,8 @@ session.had_stream = true; -- Had a stream opened at least once -- TODO: Rename session.secure to session.encrypted - if session.secure == false then + if session.secure == false then -- Set by mod_tls during STARTTLS handshake + session.starttls = "completed"; session_secure(session); end @@ -750,6 +751,7 @@ local w = conn.write; if conn:ssl() then + -- Direct TLS was used session_secure(session); end