# HG changeset patch # User Marco Cirillo # Date 1315006582 0 # Node ID 10ff12fa82e2686724bf4390852269ccb26ce20a # Parent e4d33cdfed219276b4fd7e4ab0f1ecddec0f0a29# Parent 3ba1a5b9d657da47b07a489bbde9be7b23db8675 merge. diff -r 3ba1a5b9d657 -r 10ff12fa82e2 mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua --- a/mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua Sat Sep 03 01:36:05 2011 +0200 +++ b/mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua Fri Sep 02 23:36:22 2011 +0000 @@ -2,8 +2,14 @@ local bad_servers = module:get_option_set("tls_s2s_blacklist"); -local function disable_tls_for_baddies(event) +local function disable_tls_for_baddies_in(event) if bad_servers:contains(event.origin.to_host) then event.origin.conn.starttls = nil; end end -module:hook("stanza/http://etherx.jabber.org/streams:features", disable_tls_for_baddies, 510) +local function disable_tls_for_baddies_out(event) + if bad_servers:contains(event.origin.from_host) then event.origin.conn.starttls = nil; end +end + +module:hook("s2s-stream-features", disable_tls_for_baddies_out, 10) +module:hook("stanza/http://etherx.jabber.org/streams:features", disable_tls_for_baddies_in, 510) +