Changeset

11708:5ef729c355f3

Revert 926d53af9a7a: Restore DANE support Previous commit adds a workaround, so this doesn't mutate global state anymore, only per-connection 'extra' state as originally intended.
author Kim Alvefur <zash@zash.se>
date Sun, 18 Jul 2021 21:57:24 +0200
parents 11707:61759372be26
children 11709:5810166f35d5
files CHANGES net/resolvers/basic.lua
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Sun Jul 18 21:53:26 2021 +0200
+++ b/CHANGES	Sun Jul 18 21:57:24 2021 +0200
@@ -17,6 +17,7 @@
 -   `daemonize` option deprecated
 -   SASL DIGEST-MD5 removed
 -   Switch to libunbound for DNS queries
+-   DANE Support (low-level network layer)
 -   mod_external_services (generic XEP-0215)
 -   mod_turn_external for easy STUN+TURN XEP-0215 setup
 -   util.error for encapsulating errors
--- a/net/resolvers/basic.lua	Sun Jul 18 21:53:26 2021 +0200
+++ b/net/resolvers/basic.lua	Sun Jul 18 21:57:24 2021 +0200
@@ -36,14 +36,15 @@
 		n = n - 1;
 		if n > 0 then return; end
 		self.targets = targets;
-		--[[
-		-- TODO stash tlsa somewhere per connection
-		-- FIXME 'extra' here is not per connection
 		if self.extra and self.extra.use_dane then
 			if secure and tlsa[1] then
+				self.extra.tlsa = tlsa;
+				self.extra.dane_hostname = self.hostname;
+			else
+				self.extra.tlsa = nil;
+				self.extra.dane_hostname = nil;
 			end
 		end
-		--]]
 		self:next(cb);
 	end