diff options
author | Kim Alvefur <zash@zash.se> | 2017-01-26 19:47:33 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-01-26 19:47:33 +0100 |
commit | 7e1a61f76b04981306d02759f4a8c07c8af9ea86 (patch) | |
tree | d70f10039b1ee0bdec5f010014db2fd1fe0b7b83 /plugins | |
parent | a845ca47015583bf7b41f20362fd210c037639f3 (diff) | |
parent | e18117b8f9bffb05582ff610f0bd011d54a94c33 (diff) | |
download | prosody-7e1a61f76b04981306d02759f4a8c07c8af9ea86.tar.gz prosody-7e1a61f76b04981306d02759f4a8c07c8af9ea86.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_c2s.lua | 6 | ||||
-rw-r--r-- | plugins/mod_http.lua | 6 | ||||
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 6 | ||||
-rw-r--r-- | plugins/mod_tls.lua | 10 |
4 files changed, 12 insertions, 16 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 7eebaf2d..d106ed37 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -39,8 +39,6 @@ local listener = {}; local runner_callbacks = {}; module:hook("stats-update", function () - -- Connection counter resets to 0 on load and reload - -- Bump it up to current value local count = 0; for _ in pairs(sessions) do count = count + 1; @@ -96,8 +94,8 @@ function stream_callbacks.streamopened(session, attr) if features.tags[1] or session.full_jid then send(features); else - (session.log or log)("warn", "No features to offer"); - session:close{ condition = "undefined-condition", text = "No features to proceed with" }; + (session.log or log)("warn", "No stream features to offer"); + session:close{ condition = "undefined-condition", text = "No stream features to proceed with" }; end end diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index 975663a5..ab7990f0 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -165,11 +165,7 @@ module:provides("net", { default_port = 5281; encryption = "ssl"; ssl_config = { - verify = { - peer = false, - client_once = false, - "none", - } + verify = "none"; }; multiplex = { pattern = "^[A-Z]"; diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 00e816f7..c2dd9900 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -47,8 +47,6 @@ local runner_callbacks = {}; local log = module._log; module:hook("stats-update", function () - -- Connection counter resets to 0 on load and reload - -- Bump it up to current value local count = 0; for _ in pairs(sessions) do count = count + 1; @@ -382,8 +380,8 @@ function stream_callbacks._streamopened(session, attr) log("debug", "Sending stream features: %s", tostring(features)); session.sends2s(features); else - (session.log or log)("warn", "No features to offer, giving up"); - session:close({ condition = "undefined-condition", text = "No features to offer" }); + (session.log or log)("warn", "No stream features to offer, giving up"); + session:close({ condition = "undefined-condition", text = "No stream features to offer" }); end end elseif session.direction == "outgoing" then diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 5869b2a5..c5903b61 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -62,10 +62,10 @@ do end local function can_do_tls(session) - if session.ssl_ctx == false or not session.conn.starttls then + if session.ssl_ctx ~= nil then + return session.ssl_ctx; + elseif not session.conn.starttls then return false; - elseif session.ssl_ctx then - return true; end if session.type == "c2s_unauthed" then session.ssl_ctx = ssl_ctx_c2s; @@ -79,6 +79,10 @@ local function can_do_tls(session) else return false; end + if not session.ssl_ctx then + session.log("debug", "Should be able to do TLS but no context available"); + return false; + end return session.ssl_ctx; end |