# HG changeset patch # User Paul Aurich <paul@darkrain42.org> # Date 1254622820 25200 # Node ID 53f34ba6f6d66b52e742297b5dcca2c36c63b758 # Parent 2d202336c9b6faa831f8473baadcf2302df2806b Minor changes; outgoing TLS works. diff -r 2d202336c9b6 -r 53f34ba6f6d6 core/s2smanager.lua --- a/core/s2smanager.lua Sun Oct 04 16:50:22 2009 +0100 +++ b/core/s2smanager.lua Sat Oct 03 19:20:20 2009 -0700 @@ -337,7 +337,7 @@ local send = session.sends2s; -- TODO: #29: SASL/TLS on s2s streams - session.version = 0; --tonumber(attr.version) or 0; + session.version = tonumber(attr.version) or 0; if session.version >= 1.0 and not (attr.to and attr.from) then log("warn", (session.to_host or "(unknown)").." failed to specify 'to' or 'from' hostname as per RFC"); @@ -387,6 +387,7 @@ -- If server is pre-1.0, don't wait for features, just do dialback if session.version < 1.0 then if not session.dialback_verifying then + log("debug", "Initiating dialback..."); initiate_dialback(session); else mark_connected(session); diff -r 2d202336c9b6 -r 53f34ba6f6d6 plugins/mod_tls.lua --- a/plugins/mod_tls.lua Sun Oct 04 16:50:22 2009 +0100 +++ b/plugins/mod_tls.lua Sat Oct 03 19:20:20 2009 -0700 @@ -55,9 +55,13 @@ end); module:add_event_hook("s2s-stream-features", - function (session, features) - if session.conn.starttls then - --features:tag("starttls", starttls_attr):up(); + function (session, features) + -- This hook is possibly called once per host (at least if the + -- remote server does not specify a to/from. + if session.conn.starttls and not features:child_with_ns(xmlns_starttls) then + features:tag("starttls", starttls_attr); + -- TODO: Make this optional :P + --features:tag("required"):up():up(); end end); diff -r 2d202336c9b6 -r 53f34ba6f6d6 prosody --- a/prosody Sun Oct 04 16:50:22 2009 +0100 +++ b/prosody Sat Oct 03 19:20:20 2009 -0700 @@ -231,7 +231,7 @@ end net_activate_ports("c2s", "xmppclient", {5222}, (global_ssl_ctx and "tls") or "tcp"); - net_activate_ports("s2s", "xmppserver", {5269}, "tcp"); + net_activate_ports("s2s", "xmppserver", {5269}, (global_ssl_ctx and "tls") or "tcp"); net_activate_ports("component", "xmppcomponent", {}, "tcp"); net_activate_ports("legacy_ssl", "xmppclient", {}, "ssl"); net_activate_ports("console", "console", {5582}, "tcp");