Mercurial > prosody-hg
comparison plugins/mod_tls.lua @ 7913:64daa21450f9
mod_tls: Suppress debug message if already using encryption
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 25 Feb 2017 01:16:31 +0100 |
| parents | d8029b2e0f43 |
| children | 3941d609ff85 |
comparison
equal
deleted
inserted
replaced
| 7912:2c204ba8e52e | 7913:64daa21450f9 |
|---|---|
| 61 if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err); end | 61 if not ssl_ctx_s2sin then module:log("error", "Error creating contexts for s2sin: %s", err); end |
| 62 end | 62 end |
| 63 | 63 |
| 64 local function can_do_tls(session) | 64 local function can_do_tls(session) |
| 65 if not session.conn.starttls then | 65 if not session.conn.starttls then |
| 66 session.log("debug", "Underlying connection does not support STARTTLS"); | 66 if not session.secure then |
| 67 session.log("debug", "Underlying connection does not support STARTTLS"); | |
| 68 end | |
| 67 return false; | 69 return false; |
| 68 elseif session.ssl_ctx ~= nil then | 70 elseif session.ssl_ctx ~= nil then |
| 69 return session.ssl_ctx; | 71 return session.ssl_ctx; |
| 70 end | 72 end |
| 71 if session.type == "c2s_unauthed" then | 73 if session.type == "c2s_unauthed" then |
