Diff

plugins/mod_s2s.lua @ 13298:b7c08f32112c

mod_s2s: Automagically enable DANE for s2sin if 'use_dane' is enabled Simplifies configuration, only one already existing boolean to flip.
author Kim Alvefur <zash@zash.se>
date Thu, 02 Nov 2023 09:39:03 +0100
parent 13253:68d540df46b8
child 13382:f70311588c77
line wrap: on
line diff
--- a/plugins/mod_s2s.lua	Wed Nov 01 22:49:56 2023 +0100
+++ b/plugins/mod_s2s.lua	Thu Nov 02 09:39:03 2023 +0100
@@ -95,6 +95,12 @@
 };
 local s2s_service_options_mt = { __index = s2s_service_options }
 
+if module:get_option_boolean("use_dane", false) then
+	-- DANE is supported in net.connect but only for outgoing connections,
+	-- to authenticate incoming connections with DANE we need
+	module:depends("s2s_auth_dane_in");
+end
+
 module:hook("stats-update", function ()
 	measure_connections_inbound:clear()
 	measure_connections_outbound:clear()