plugins/mod_tls.lua

changeset 357
17bcecb06420
parent 316
13e2bd256a20
child 438
193f9dd64f17
equal deleted inserted replaced
356:8ff322b550a3 357:17bcecb06420
22 -- FIXME: What reply? 22 -- FIXME: What reply?
23 session.log("warn", "Attempt to start TLS, but TLS is not available on this connection"); 23 session.log("warn", "Attempt to start TLS, but TLS is not available on this connection");
24 end 24 end
25 end); 25 end);
26 26
27 local starttls_attr = { xmlns = xmlns_starttls };
27 add_event_hook("stream-features", 28 add_event_hook("stream-features",
28 function (session, features) 29 function (session, features)
29 if session.conn.starttls then 30 if session.conn.starttls then
30 t_insert(features, "<starttls xmlns='"..xmlns_starttls.."'/>"); 31 features:tag("starttls", starttls_attr):up();
31 end 32 end
32 end); 33 end);

mercurial