diff options
author | Kim Alvefur <zash@zash.se> | 2017-01-25 11:12:43 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-01-25 11:12:43 +0100 |
commit | c7da30f634743e62b07d9be185d6f098f3e38f13 (patch) | |
tree | e757e235e6014085ab77b87917056d399a58b99a /plugins | |
parent | 3258500edbe277d20f085985986ef806f5746e6f (diff) | |
download | prosody-c7da30f634743e62b07d9be185d6f098f3e38f13.tar.gz prosody-c7da30f634743e62b07d9be185d6f098f3e38f13.zip |
mod_tls: Return session.ssl_ctx if not nil, like when doing the full session type check
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_tls.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 678b4039..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; |