Comparison

plugins/mod_dialback.lua @ 6307:b6a47c7a496a

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 09 Jul 2014 02:06:37 +0200
parent 6306:c6d9e21cd5f2
child 6374:f1dd1716aa9d
comparison
equal deleted inserted replaced
6305:38d82f8ead25 6307:b6a47c7a496a
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 });