diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-02-12 02:39:50 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-02-12 02:39:50 +0500 |
commit | 2bfb7b55edd82a3cc13fcfbb682930ee9bfd92b5 (patch) | |
tree | d95858f37d4b7401e0fe0e2fd18ae60c234a1b4a /plugins | |
parent | eeca1d016a71fee2b7d6617da3b7a8b0c6c48a77 (diff) | |
download | prosody-2bfb7b55edd82a3cc13fcfbb682930ee9bfd92b5.tar.gz prosody-2bfb7b55edd82a3cc13fcfbb682930ee9bfd92b5.zip |
mod_tls: Respond with proper error when TLS cannot be negotiated.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_tls.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 15cdb3e3..9214dd12 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -27,8 +27,9 @@ module:hook("stanza/urn:ietf:params:xml:ns:xmpp-tls:starttls", function(event) origin.log("info", "TLS negotiation started for %s...", origin.type); origin.secure = false; else - -- FIXME: What reply? origin.log("warn", "Attempt to start TLS, but TLS is not available on this %s connection", origin.type); + (origin.sends2s or origin.send)(st.stanza("failure", { xmlns = xmlns_starttls })); + origin:close(); end return true; end); |