aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_tls.lua
diff options
context:
space:
mode:
authorPaul Aurich <paul@darkrain42.org>2009-10-03 19:20:20 -0700
committerPaul Aurich <paul@darkrain42.org>2009-10-03 19:20:20 -0700
commit02d5993f79dc0c4c98da669b660172ea4c610a75 (patch)
tree7910f57c0290fd62123b2687e7fccbbb08c6bdfa /plugins/mod_tls.lua
parent24d115f8cd9dd5decf3335334dda416d28e8a4c4 (diff)
downloadprosody-02d5993f79dc0c4c98da669b660172ea4c610a75.tar.gz
prosody-02d5993f79dc0c4c98da669b660172ea4c610a75.zip
Minor changes; outgoing TLS works.
Diffstat (limited to 'plugins/mod_tls.lua')
-rw-r--r--plugins/mod_tls.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua
index 4b1bc63b..2b95ec1e 100644
--- a/plugins/mod_tls.lua
+++ b/plugins/mod_tls.lua
@@ -55,9 +55,13 @@ module:add_event_hook("stream-features",
end);
module:add_event_hook("s2s-stream-features",
- function (session, features)
- if session.conn.starttls then
- --features:tag("starttls", starttls_attr):up();
+ function (session, features)
+ -- This hook is possibly called once per host (at least if the
+ -- remote server does not specify a to/from.
+ if session.conn.starttls and not features:child_with_ns(xmlns_starttls) then
+ features:tag("starttls", starttls_attr);
+ -- TODO: Make this optional :P
+ --features:tag("required"):up():up();
end
end);