aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-23 10:46:42 +0100
committerKim Alvefur <zash@zash.se>2017-01-23 10:46:42 +0100
commita5d48058fb1245ee6bf46abfbbf7ff373b166122 (patch)
tree3f68942c4cdece65def9d985ef2521b4fde34591
parent31ac4804c2c3c6b12c53d64044a9cb7f6666314c (diff)
downloadprosody-a5d48058fb1245ee6bf46abfbbf7ff373b166122.tar.gz
prosody-a5d48058fb1245ee6bf46abfbbf7ff373b166122.zip
mod_tls: Verify that TLS is available before proceeding
-rw-r--r--plugins/mod_tls.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua
index d9593b4c..5869b2a5 100644
--- a/plugins/mod_tls.lua
+++ b/plugins/mod_tls.lua
@@ -124,7 +124,7 @@ module:hook_stanza("http://etherx.jabber.org/streams", "features", function (ses
end, 500);
module:hook_stanza(xmlns_starttls, "proceed", function (session, stanza) -- luacheck: ignore 212/stanza
- if session.type == "s2sout_unauthed" then
+ if session.type == "s2sout_unauthed" and can_do_tls(session) then
module:log("debug", "Proceeding with TLS on s2sout...");
session:reset_stream();
session.conn:starttls(session.ssl_ctx);