aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-05 14:50:27 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-05 14:50:27 +0100
commit1930de3de81d9d1f89d12dd854c075cf510dd2f5 (patch)
tree0b65384638858886418f7cef508e364e04e756b9 /core
parente1543fa5b0d0782e3f9dae0935b706e8fa9b76a2 (diff)
downloadprosody-1930de3de81d9d1f89d12dd854c075cf510dd2f5.tar.gz
prosody-1930de3de81d9d1f89d12dd854c075cf510dd2f5.zip
s2smanager: Mark session as secure if it was negotiating TLS and opens a new stream
Diffstat (limited to 'core')
-rw-r--r--core/s2smanager.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index e22a49df..cdfadba0 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -339,6 +339,10 @@ function streamopened(session, attr)
-- TODO: #29: SASL/TLS on s2s streams
session.version = tonumber(attr.version) or 0;
+ if session.secure == false then
+ session.secure = true;
+ end
+
if session.version >= 1.0 and not (attr.to and attr.from) then
log("warn", (session.to_host or "(unknown)").." failed to specify 'to' or 'from' hostname as per RFC");
end