Comparison

plugins/mod_tls.lua @ 5370:7838acadb0fa

mod_announce, mod_auth_anonymous, mod_c2s, mod_c2s, mod_component, mod_iq, mod_message, mod_presence, mod_tls: Access prosody.{hosts,bare_sessions,full_sessions} instead of the old globals
author Kim Alvefur <zash@zash.se>
date Sat, 23 Mar 2013 01:27:16 +0100
parent 4475:7341cc5c8da9
child 5378:ec3accda44d3
comparison
equal deleted inserted replaced
5368:ab31dbb3a415 5370:7838acadb0fa
23 if secure_auth_only then c2s_feature:tag("required"):up(); end 23 if secure_auth_only then c2s_feature:tag("required"):up(); end
24 if secure_s2s_only then s2s_feature:tag("required"):up(); end 24 if secure_s2s_only then s2s_feature:tag("required"):up(); end
25 25
26 local global_ssl_ctx = prosody.global_ssl_ctx; 26 local global_ssl_ctx = prosody.global_ssl_ctx;
27 27
28 local hosts = prosody.hosts;
28 local host = hosts[module.host]; 29 local host = hosts[module.host];
29 30
30 local function can_do_tls(session) 31 local function can_do_tls(session)
31 if session.type == "c2s_unauthed" then 32 if session.type == "c2s_unauthed" then
32 return session.conn.starttls and host.ssl_ctx_in; 33 return session.conn.starttls and host.ssl_ctx_in;