aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-29 23:23:25 +0100
committerKim Alvefur <zash@zash.se>2021-01-29 23:23:25 +0100
commitdcc391f18751482569fbd047655c4edf2b36c90c (patch)
treea6535e3142abfe928f5f97cda25cf6f2a6bdcb1a
parent2b988f0786477ff5d7104a6ceedc4783453d8496 (diff)
downloadprosody-dcc391f18751482569fbd047655c4edf2b36c90c.tar.gz
prosody-dcc391f18751482569fbd047655c4edf2b36c90c.zip
mod_tls: Ignore lack of STARTTLS offer only when s2s_require_encryption set
-rw-r--r--plugins/mod_tls.lua5
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;