Mercurial > prosody-hg
comparison plugins/mod_tls.lua @ 2635:e79057cf2538
mod_tls: Fixed traceback during S2S TLS (nil global access).
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sun, 14 Feb 2010 09:59:57 +0500 |
| parents | 03287c06d986 |
| children | d2805ad5b736 |
comparison
equal
deleted
inserted
replaced
| 2634:e486aca8c5d1 | 2635:e79057cf2538 |
|---|---|
| 26 | 26 |
| 27 local function can_do_tls(session) | 27 local function can_do_tls(session) |
| 28 if session.type == "c2s_unauthed" then | 28 if session.type == "c2s_unauthed" then |
| 29 return session.username and session.conn.starttls and host.ssl_ctx_in; | 29 return session.username and session.conn.starttls and host.ssl_ctx_in; |
| 30 elseif session.type == "s2sin_unauthed" then | 30 elseif session.type == "s2sin_unauthed" then |
| 31 return origin.to_host and origin.conn.starttls and host.ssl_ctx_in; | 31 return session.to_host and session.conn.starttls and host.ssl_ctx_in; |
| 32 end | 32 end |
| 33 return false; | 33 return false; |
| 34 end | 34 end |
| 35 | 35 |
| 36 -- Hook <starttls/> | 36 -- Hook <starttls/> |
