diff options
author | Kim Alvefur <zash@zash.se> | 2021-01-29 23:23:25 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-01-29 23:23:25 +0100 |
commit | da0482b2260fe4ebd195ec4217bdeb9bb0bebdd9 (patch) | |
tree | a6535e3142abfe928f5f97cda25cf6f2a6bdcb1a | |
parent | eb9e818e43d4b46f166006064746e5af62cb5b16 (diff) | |
download | prosody-da0482b2260fe4ebd195ec4217bdeb9bb0bebdd9.tar.gz prosody-da0482b2260fe4ebd195ec4217bdeb9bb0bebdd9.zip |
mod_tls: Ignore lack of STARTTLS offer only when s2s_require_encryption set
-rw-r--r-- | plugins/mod_tls.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 6b3045a3..d6198522 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -153,8 +153,11 @@ module:hook_tag("http://etherx.jabber.org/streams", "features", function (sessio if can_do_tls(session) then if stanza:get_child("starttls", xmlns_starttls) then module:log("debug", "%s is offering TLS, taking up the offer...", session.to_host); - else + elseif s2s_require_encryption then module:log("debug", "%s is *not* offering TLS, trying anyways!", session.to_host); + else + module:log("debug", "%s is not offering TLS", session.to_host); + return; end session.sends2s(starttls_initiate); return true; |