]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
libdnssec -->> libknot
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 22 Oct 2025 07:50:51 +0000 (09:50 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 16 Dec 2025 08:16:54 +0000 (09:16 +0100)
NEWS
lib/dnssec.h
meson.build

diff --git a/NEWS b/NEWS
index ead8620a973b511e294d8649c52e76a95c45d21a..a78a7f51d10b21d0c92a4003613882bee130188f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,10 @@ Bugfixes
 - reload did not apply changes to /fallback (!1763)
 - fix config.cache.clear test on apple silicon (!1766)
 
+Improvements
+------------
+- support libdnssec merged into libknot, as planned for knot >= 3.6 (!1769)
+
 
 Knot Resolver 6.0.17 (2025-12-02)
 =================================
index 8bafaa9ce310683da1965eda7b35dca057e59388..06efa8846ceac2ece592878b826eb0f8957a0326 100644 (file)
@@ -9,8 +9,22 @@
 #include <libknot/packet/pkt.h>
 
 // This is the central place in Knot Resolver which includes the (former) libdnssec.
+#if KNOT_VERSION_HEX < 0x030600
 #include <libdnssec/dnssec.h>
 #include <libdnssec/digest.h>
+#else
+#include <libknot/libknot.h>
+// Now some compatibility
+enum {
+       // These should be OK to replace everywhere.
+       DNSSEC_EOK = KNOT_EOK,
+
+       // These might not be OK to simply replace everywhere.
+       DNSSEC_INVALID_KEY_ALGORITHM = KNOT_INVALID_KEY_ALGORITHM,
+       DNSSEC_INVALID_DIGEST_ALGORITHM = KNOT_EALGORITHM,
+       DNSSEC_NOT_FOUND = KNOT_ENOENT, // or -ENOENT now
+};
+#endif
 
 /**
  * Initialise cryptographic back-end.
index 1f5b1fd08f2e9efaef76ec76abfeaf10551cb9bf..9610589de74208213a14df34f48ec0d28f1c8a72 100644 (file)
@@ -20,7 +20,11 @@ endif
 message('--- required dependencies ---')
 knot_version = '>=3.3'
 libknot = dependency('libknot', version: knot_version)
-libdnssec = dependency('libdnssec', version: knot_version)
+if libknot.version() < '3.6'
+  libdnssec = dependency('libdnssec', version: knot_version)
+else
+  libdnssec = libknot # the libraries merged
+endif
 libzscanner = dependency('libzscanner', version: knot_version)
 libuv = dependency('libuv', version: '>=1.27')  # need uv_udp_connect()
 lmdb = dependency('lmdb', required: false)