Comparison

plugins/mod_tls.lua @ 1894:53f34ba6f6d6

Minor changes; outgoing TLS works.
author Paul Aurich <paul@darkrain42.org>
date Sat, 03 Oct 2009 19:20:20 -0700
parent 1875:334383faf77b
child 1896:e7ac9be5c90c
comparison
equal deleted inserted replaced
1893:2d202336c9b6 1894:53f34ba6f6d6
53 end 53 end
54 end 54 end
55 end); 55 end);
56 56
57 module:add_event_hook("s2s-stream-features", 57 module:add_event_hook("s2s-stream-features",
58 function (session, features) 58 function (session, features)
59 if session.conn.starttls then 59 -- This hook is possibly called once per host (at least if the
60 --features:tag("starttls", starttls_attr):up(); 60 -- remote server does not specify a to/from.
61 if session.conn.starttls and not features:child_with_ns(xmlns_starttls) then
62 features:tag("starttls", starttls_attr);
63 -- TODO: Make this optional :P
64 --features:tag("required"):up():up();
61 end 65 end
62 end); 66 end);
63 67
64 -- For s2sout connections, start TLS if we can 68 -- For s2sout connections, start TLS if we can
65 module:hook_stanza(xmlns_stream, "features", 69 module:hook_stanza(xmlns_stream, "features",