# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1368276914 -3600
# Node ID 40fe8bd35eaa6a4bb788c247e823f726baf54390
# Parent  f592409f5fcd9fa3606c7af1ab45964544e42f06# Parent  ca9f99f7dcbccd3be8ee8140e282ce2634998f59
Merge 0.9->trunk

diff -r f592409f5fcd -r 40fe8bd35eaa plugins/mod_c2s.lua
--- a/plugins/mod_c2s.lua	Fri May 10 10:48:07 2013 +0100
+++ b/plugins/mod_c2s.lua	Sat May 11 13:55:14 2013 +0100
@@ -157,7 +157,7 @@
 		session.send("</stream:stream>");
 		function session.send() return false; end
 		
-		local reason = (reason and (reason.text or reason.condition)) or reason;
+		local reason = (reason and (reason.name or reason.text or reason.condition)) or reason;
 		session.log("info", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason or "session closed");
 
 		-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote
diff -r f592409f5fcd -r 40fe8bd35eaa prosody.cfg.lua.dist
--- a/prosody.cfg.lua.dist	Fri May 10 10:48:07 2013 +0100
+++ b/prosody.cfg.lua.dist	Sat May 11 13:55:14 2013 +0100
@@ -99,20 +99,21 @@
 -- Force certificate authentication for server-to-server connections?
 -- This provides ideal security, but requires servers you communicate
 -- with to support encryption AND present valid, trusted certificates.
+-- NOTE: Your version of LuaSec must support certificate verification!
 -- For more information see http://prosody.im/doc/s2s#security
 
-s2s_secure = true
+s2s_secure_auth = false
 
 -- Many servers don't support encryption or have invalid or self-signed
 -- certificates. You can list domains here that will not be required to
 -- authenticate using certificates. They will be authenticated using DNS.
 
--- s2s_insecure_domains = { "gmail.com" }
+--s2s_insecure_domains = { "gmail.com" }
 
--- Even if you leave s2s_secure disabled, you can still require it for
--- some domains by specifying a list here.
+-- Even if you leave s2s_secure_auth disabled, you can still require valid
+-- certificates for some domains by specifying a list here.
 
--- s2s_secure_domains = { "jabber.org" }
+--s2s_secure_domains = { "jabber.org" }
 
 -- Select the authentication backend to use. The 'internal' providers
 -- use Prosody's configured data storage to store the authentication data.