#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.
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)