Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 5420:706053e3f9f5
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 03 Apr 2013 13:53:21 +0100 |
parent | 5408:767ecb0091a6 |
child | 5423:4acc1598f391 |
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua Sun Mar 31 13:21:19 2013 +0100 +++ b/plugins/mod_s2s/mod_s2s.lua Wed Apr 03 13:53:21 2013 +0100 @@ -632,7 +632,11 @@ if must_secure and not session.cert_identity_status then module:log("warn", "Forbidding insecure connection to/from %s", host); - session:close(false); + if session.direction == "incoming" then + session:close({ condition = "not-authorized", text = "Your server's certificate is invalid, expired, or not trusted by"..session.to_host }); + else -- Close outgoing connections without warning + session:close(false); + end return false; end end