Mercurial > prosody-modules
annotate mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua @ 415:3ba1a5b9d657
mod_addressing: Add partial implementation of Extended Stanza Addressing, XEP-33.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Sep 2011 01:36:05 +0200 |
parents | 8963f4026f3a |
children | e4d33cdfed21 |
rev | line source |
---|---|
412
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
1 -- Filter out servers which gets choppy and buggy when it comes to starttls. |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
2 |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
3 local bad_servers = module:get_option_set("tls_s2s_blacklist"); |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
4 |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
5 local function disable_tls_for_baddies(event) |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
6 if bad_servers:contains(event.origin.to_host) then event.origin.conn.starttls = nil; end |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
7 end |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
8 |
8963f4026f3a
mod_s2s_never_encrypt_blacklist: first commit.
Marco Cirillo <maranda@lightwitch.org>
parents:
diff
changeset
|
9 module:hook("stanza/http://etherx.jabber.org/streams:features", disable_tls_for_baddies, 510) |