Changeset

2802:ded1c649484a

mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted)
author Matthew Wild <mwild1@gmail.com>
date Sun, 31 Jan 2010 15:39:49 +0000
parents 2801:0323bdb1fcfa
children 2803:ee1a4f79c510
files plugins/mod_tls.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_tls.lua	Sat Jan 30 18:45:46 2010 +0000
+++ b/plugins/mod_tls.lua	Sun Jan 31 15:39:49 2010 +0000
@@ -90,6 +90,8 @@
 		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;