diff options
author | Kim Alvefur <zash@zash.se> | 2017-01-23 19:34:14 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-01-23 19:34:14 +0100 |
commit | db88e0f7b51eeaed68b9b50502b6ba82c53633a1 (patch) | |
tree | ea895b1073f2ff2de7a08fc01f12797ab58c7125 /plugins/mod_tls.lua | |
parent | 26f2953106794bbdd23db98f69fb6e90a4b8e460 (diff) | |
parent | ffde63fe687f5ffecf5fdec28358d1774a8a7169 (diff) | |
download | prosody-db88e0f7b51eeaed68b9b50502b6ba82c53633a1.tar.gz prosody-db88e0f7b51eeaed68b9b50502b6ba82c53633a1.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_tls.lua')
-rw-r--r-- | plugins/mod_tls.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 7eedb083..5869b2a5 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -124,9 +124,11 @@ 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 - module:log("debug", "Proceeding with TLS on s2sout..."); - session:reset_stream(); - session.conn:starttls(session.ssl_ctx); - session.secure = false; - return true; + 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); + session.secure = false; + return true; + end end); |