aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-31 15:39:49 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-31 15:39:49 +0000
commit0c333f589c00699e7a3f84b5c21b3e8854bfb165 (patch)
tree1c05bb5056054684eebc87f36555301fcfa3ce16
parent0b4f0121a1f2692933e80155514721811daccee2 (diff)
downloadprosody-0c333f589c00699e7a3f84b5c21b3e8854bfb165.tar.gz
prosody-0c333f589c00699e7a3f84b5c21b3e8854bfb165.zip
mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted)
-rw-r--r--plugins/mod_tls.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua
index 8a450803..cceef308 100644
--- a/plugins/mod_tls.lua
+++ b/plugins/mod_tls.lua
@@ -90,6 +90,8 @@ module:hook_stanza(xmlns_starttls, "proceed",
function (session, stanza)
module:log("debug", "Proceeding with TLS on s2sout...");
local format, to_host, from_host = string.format, session.to_host, session.from_host;
+ local ssl_ctx = session.from_host and hosts[session.from_host].ssl_ctx or global_ssl_ctx;
+ session.conn.set_sslctx(ssl_ctx);
session:reset_stream();
session.conn.starttls(true);
session.secure = false;