Software /
code /
prosody
Comparison
plugins/mod_dialback.lua @ 6306:c6d9e21cd5f2
mod_dialback: Respect dwd config option
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 09 Jul 2014 02:04:16 +0200 |
parent | 6303:d289582d3518 |
child | 6374:f1dd1716aa9d |
comparison
equal
deleted
inserted
replaced
6303:d289582d3518 | 6306:c6d9e21cd5f2 |
---|---|
80 -- he wants to be identified through dialback | 80 -- he wants to be identified through dialback |
81 -- We need to check the key with the Authoritative server | 81 -- We need to check the key with the Authoritative server |
82 local attr = stanza.attr; | 82 local attr = stanza.attr; |
83 local to, from = nameprep(attr.to), nameprep(attr.from); | 83 local to, from = nameprep(attr.to), nameprep(attr.from); |
84 | 84 |
85 if origin.secure then | 85 if dwd and origin.secure then |
86 if check_cert_status(origin, from) == false then | 86 if check_cert_status(origin, from) == false then |
87 return | 87 return |
88 elseif origin.cert_chain_status == "valid" and origin.cert_identity_status == "valid" then | 88 elseif origin.cert_chain_status == "valid" and origin.cert_identity_status == "valid" then |
89 origin.sends2s(st.stanza("db:result", { to = from, from = to, id = attr.id, type = "valid" })); | 89 origin.sends2s(st.stanza("db:result", { to = from, from = to, id = attr.id, type = "valid" })); |
90 module:fire_event("s2s-authenticated", { session = origin, host = from }); | 90 module:fire_event("s2s-authenticated", { session = origin, host = from }); |