projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cea62e
)
mod_tls: Respond with proper error when TLS cannot be negotiated.
author
Waqas Hussain
<waqas20@gmail.com>
Thu, 11 Feb 2010 21:39:50 +0000
(
02:39
+0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Thu, 11 Feb 2010 21:39:50 +0000
(
02:39
+0500)
plugins/mod_tls.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_tls.lua
b/plugins/mod_tls.lua
index 15cdb3e3806bb39b9405295ffaa9e3e9e6805d08..9214dd1206fd3e38a78e824cd6ce8bc93af30215 100644
(file)
--- 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);