--- a/plugins/mod_dialback.lua Sun Jun 23 16:16:26 2019 +0200
+++ b/plugins/mod_dialback.lua Wed May 12 17:22:02 2021 +0200
@@ -22,19 +22,6 @@
local dialback_requests = setmetatable({}, { __mode = 'v' });
local dialback_secret = sha256_hash(module:get_option_string("dialback_secret", uuid_gen()), true);
-local dwd = module:get_option_boolean("dialback_without_dialback", false);
-
---- Helper to check that a session peer's certificate is valid
-function check_cert_status(session, host)
- local conn = session.conn:socket()
- local cert
- if conn.getpeercertificate then
- cert = conn:getpeercertificate()
- end
-
- return module:fire_event("s2s-check-certificate", { host = host, session = session, cert = cert });
-end
-
function module.save()
return { dialback_secret = dialback_secret };
@@ -104,15 +91,6 @@
origin:close("improper-addressing");
end
- if dwd and origin.secure then
- if check_cert_status(origin, from) == false then
- return
- elseif origin.cert_chain_status == "valid" and origin.cert_identity_status == "valid" then
- origin.sends2s(st.stanza("db:result", { to = from, from = to, id = attr.id, type = "valid" }));
- module:fire_event("s2s-authenticated", { session = origin, host = from });
- return true;
- end
- end
origin.hosts[from] = { dialback_key = stanza[1] };