aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-09 17:48:45 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-09 17:48:45 +0100
commited822f1ef026fa2c9ba4da9c505655f3ab57a48c (patch)
tree68393fff0e9538cffaef41a23ec9ed3f228d41c4
parent74eb36a4623ff2f3f8d84391f17932e532a36270 (diff)
downloadprosody-ed822f1ef026fa2c9ba4da9c505655f3ab57a48c.tar.gz
prosody-ed822f1ef026fa2c9ba4da9c505655f3ab57a48c.zip
mod_tls: Don't try to start TLS if we can't actually do it (thanks Florob)
-rw-r--r--plugins/mod_tls.lua2
1 files changed, 1 insertions, 1 deletions
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("<starttls xmlns='"..xmlns_starttls.."'/>");
return true;