Mercurial > prosody-hg
comparison plugins/mod_tls.lua @ 403:da92afa267cf
Merging with main branch.
| author | Tobias Markmann <tm@ayena.de> |
|---|---|
| date | Sun, 23 Nov 2008 20:44:48 +0100 |
| parents | 17bcecb06420 |
| children | 193f9dd64f17 |
comparison
equal
deleted
inserted
replaced
| 402:50f1c09541cd | 403:da92afa267cf |
|---|---|
| 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); |
