Software /
code /
prosody
Comparison
plugins/mod_tls.lua @ 1913:da49a59dff7c
mod_tls: require_s2s_encryption -> s2s_require_encryption
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 05 Oct 2009 15:00:05 +0100 |
parent | 1912:126401a7159f |
child | 1926:e1c5b537f240 |
comparison
equal
deleted
inserted
replaced
1912:126401a7159f | 1913:da49a59dff7c |
---|---|
10 | 10 |
11 local xmlns_stream = 'http://etherx.jabber.org/streams'; | 11 local xmlns_stream = 'http://etherx.jabber.org/streams'; |
12 local xmlns_starttls = 'urn:ietf:params:xml:ns:xmpp-tls'; | 12 local xmlns_starttls = 'urn:ietf:params:xml:ns:xmpp-tls'; |
13 | 13 |
14 local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption"); | 14 local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption"); |
15 local secure_s2s_only = module:get_option("require_s2s_encryption"); | 15 local secure_s2s_only = module:get_option("s2s_require_encryption"); |
16 | 16 |
17 module:add_handler("c2s_unauthed", "starttls", xmlns_starttls, | 17 module:add_handler("c2s_unauthed", "starttls", xmlns_starttls, |
18 function (session, stanza) | 18 function (session, stanza) |
19 if session.conn.starttls then | 19 if session.conn.starttls then |
20 session.send(st.stanza("proceed", { xmlns = xmlns_starttls })); | 20 session.send(st.stanza("proceed", { xmlns = xmlns_starttls })); |