# HG changeset patch # User Matthew Wild # Date 1264952389 0 # Node ID da16a5c0df856a850a3415dbe154a9784abbab9c # Parent 0a78847b38e223a5cb4a5aa6052e0a46c8004fc5 mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted) diff -r 0a78847b38e2 -r da16a5c0df85 plugins/mod_tls.lua --- a/plugins/mod_tls.lua Sun Jan 31 15:39:04 2010 +0000 +++ b/plugins/mod_tls.lua Sun Jan 31 15:39:49 2010 +0000 @@ -89,7 +89,8 @@ module:log("debug", "Proceeding with TLS on s2sout..."); local format, to_host, from_host = string.format, session.to_host, session.from_host; session:reset_stream(); - session.conn:starttls(true); + local ssl_ctx = session.from_host and hosts[session.from_host].ssl_ctx or global_ssl_ctx; + session.conn:starttls(ssl_ctx, true); session.secure = false; return true; end);