comparison plugins/mod_tls.lua @ 4797:e239668aa6d2

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Sun, 29 Apr 2012 02:10:55 +0100
parents 7341cc5c8da9
children 7838acadb0fa
comparison
equal deleted inserted replaced
4796:04a34287dc12 4797:e239668aa6d2
73 73
74 -- For s2sout connections, start TLS if we can 74 -- For s2sout connections, start TLS if we can
75 module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) 75 module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza)
76 module:log("debug", "Received features element"); 76 module:log("debug", "Received features element");
77 if can_do_tls(session) and stanza:child_with_ns(xmlns_starttls) then 77 if can_do_tls(session) and stanza:child_with_ns(xmlns_starttls) then
78 module:log("%s is offering TLS, taking up the offer...", session.to_host); 78 module:log("debug", "%s is offering TLS, taking up the offer...", session.to_host);
79 session.sends2s("<starttls xmlns='"..xmlns_starttls.."'/>"); 79 session.sends2s("<starttls xmlns='"..xmlns_starttls.."'/>");
80 return true; 80 return true;
81 end 81 end
82 end, 500); 82 end, 500);
83 83