]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
libdnssec -->> libknot docs-libdnssec-dyy1ob/deployments/7819 libdnssec
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>
Fri, 24 Oct 2025 16:14:28 +0000 (18:14 +0200)
lib/dnssec.h
meson.build

index 8bafaa9ce310683da1965eda7b35dca057e59388..fc23a8a22da662b1bcbea56fb1ea3df744ef35a8 100644 (file)
@@ -9,8 +9,23 @@
 #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>
+#include <libknot/dnssec/digest.h>
+// Now some compatibility
+enum {
+       // These should be OK to replace everywhere.
+       DNSSEC_EOK = KNOT_EOK,
+       DNSSEC_NOT_FOUND = KNOT_ENOENT, // could be just -ENOENT anyway
+
+       // These might not be OK to simply replace everywhere.
+       DNSSEC_INVALID_KEY_ALGORITHM = KNOT_INVALID_KEY_ALGORITHM,
+       DNSSEC_INVALID_DIGEST_ALGORITHM = KNOT_EALGORITHM,
+};
+#endif
 
 /**
  * Initialise cryptographic back-end.
index 64ef6e9e82f77bc4478fa92bb6f85c53683e36c0..84166a7d04df002d21586994bb802bcff9730b4d 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)