Skip to content

Commit ce12c0b

Browse files
committed
libdnssec -->> libknot
1 parent 9c7423b commit ce12c0b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

lib/dnssec.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,23 @@
99
#include <libknot/packet/pkt.h>
1010

1111
// This is the central place in Knot Resolver which includes the (former) libdnssec.
12+
#if KNOT_VERSION_HEX < 0x030600
1213
#include <libdnssec/dnssec.h>
1314
#include <libdnssec/digest.h>
15+
#else
16+
#include <libknot/libknot.h>
17+
#include <libknot/dnssec/digest.h>
18+
// Now some compatibility
19+
enum {
20+
// These should be OK to replace everywhere.
21+
DNSSEC_EOK = KNOT_EOK,
22+
DNSSEC_NOT_FOUND = KNOT_ENOENT, // could be just -ENOENT anyway
23+
24+
// These might not be OK to simply replace everywhere.
25+
DNSSEC_INVALID_KEY_ALGORITHM = KNOT_INVALID_KEY_ALGORITHM,
26+
DNSSEC_INVALID_DIGEST_ALGORITHM = KNOT_EALGORITHM,
27+
};
28+
#endif
1429

1530
/**
1631
* Initialise cryptographic back-end.

meson.build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ endif
2020
message('--- required dependencies ---')
2121
knot_version = '>=3.3'
2222
libknot = dependency('libknot', version: knot_version)
23-
libdnssec = dependency('libdnssec', version: knot_version)
23+
if libknot.version() < '3.6'
24+
libdnssec = dependency('libdnssec', version: knot_version)
25+
else
26+
libdnssec = libknot # the libraries merged
27+
endif
2428
libzscanner = dependency('libzscanner', version: knot_version)
2529
libuv = dependency('libuv', version: '>=1.27') # need uv_udp_connect()
2630
lmdb = dependency('lmdb', required: false)

0 commit comments

Comments
 (0)