Software /
code /
prosody
Diff
plugins/mod_tls.lua @ 7864:7ece186a44d3
mod_tls: Return session.ssl_ctx if not nil, like when doing the full session type check
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 25 Jan 2017 11:12:43 +0100 |
parent | 7863:a634fe3c21f2 |
child | 7869:eb5fba4c8074 |
line wrap: on
line diff
--- a/plugins/mod_tls.lua Wed Jan 25 11:06:30 2017 +0100 +++ b/plugins/mod_tls.lua Wed Jan 25 11:12:43 2017 +0100 @@ -62,10 +62,10 @@ 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;