Mercurial > prosody-hg
comparison plugins/mod_tls.lua @ 357:17bcecb06420
Use a stanza for c2s stream features instead of an array of strings. Removes a FIXME.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 20 Nov 2008 01:33:25 +0000 |
| parents | 13e2bd256a20 |
| children | 193f9dd64f17 |
comparison
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); |
