Mercurial > prosody-modules
changeset 1336:ae0558230e3d
mod_s2s_auth_dane: Do DANE lookups on outgoing stream features
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Mar 2014 13:44:29 +0100 |
parents | faf4bd226cad |
children | c38f163f18b9 |
files | mod_s2s_auth_dane/mod_s2s_auth_dane.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua Sun Mar 09 13:43:27 2014 +0100 +++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua Sun Mar 09 13:44:29 2014 +0100 @@ -128,9 +128,9 @@ -- DANE for s2sin -- Looks for TLSA at the same QNAME as the SRV record - module:hook("stanza/urn:ietf:params:xml:ns:xmpp-tls:starttls", function(event) + module:hook("s2s-stream-features", function(event) local origin = event.origin; - if not origin.from_host then return end + if not origin.from_host or origin.dane == nil then return end origin.dane = dns_lookup(function(answer) if answer and ( #answer > 0 or answer.bogus ) then