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); |