mod_s2s: Handle connections having TLS from the start
authorKim Alvefur <zash@zash.se>
Tue, 10 Aug 2021 20:54:38 +0200
changeset 11777 c5f2b63cf6ff
parent 11776 e2155e2703dd
child 11778 4625093b0768
mod_s2s: Handle connections having TLS from the start This could be done with multiplexing, or a future additional port definition.
plugins/mod_s2s.lua
--- a/plugins/mod_s2s.lua	Tue Aug 10 20:51:31 2021 +0200
+++ b/plugins/mod_s2s.lua	Tue Aug 10 20:54:38 2021 +0200
@@ -730,6 +730,10 @@
 	local conn = session.conn;
 	local w = conn.write;
 
+	if conn:ssl() then
+		session_secure(session);
+	end
+
 	function session.sends2s(t)
 		log("debug", "Sending[%s]: %s", session.type, t.top_tag and t:top_tag() or t:match("^[^>]*>?"));
 		if t.name then