From 8c97fe076ca5d7b7b3c7b509f0db98632ed36a45 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 9 Oct 2009 17:48:45 +0100 Subject: [PATCH] mod_tls: Don't try to start TLS if we can't actually do it (thanks Florob) --- plugins/mod_tls.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 09470083..79a74deb 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -73,7 +73,7 @@ module:hook("s2s-stream-features", module:hook_stanza(xmlns_stream, "features", function (session, stanza) module:log("debug", "Received features element"); - if stanza:child_with_ns(xmlns_starttls) then + if session.conn.starttls and stanza:child_with_ns(xmlns_starttls) then module:log("%s is offering TLS, taking up the offer...", session.to_host); session.sends2s(""); return true; -- 2.30.2