aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_tls.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua
index 931701f5..39207f6f 100644
--- a/plugins/mod_tls.lua
+++ b/plugins/mod_tls.lua
@@ -174,3 +174,9 @@ module:hook_tag(xmlns_starttls, "proceed", function (session, stanza) -- luachec
return true;
end
end);
+
+module:hook_tag(xmlns_starttls, "failure", function (session, stanza) -- luacheck: ignore 212/stanza
+ module:log("warn", "TLS negotiation with %s failed.", session.to_host);
+ session:close(nil, "TLS negotiation failed");
+ return false;
+end);