import ldns 1.6.17
This commit is contained in:
parent
04f3ab9612
commit
65be028f32
58
Changelog
58
Changelog
@ -1,3 +1,61 @@
|
||||
1.6.17 2014-01-10
|
||||
* Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a
|
||||
zone to be an NSEC3 (or its RRSIG) covering an empty non terminal.
|
||||
* Add --disable-dane option to configure and check availability of the
|
||||
for dane needed X509_check_ca function in openssl.
|
||||
* bugfix #490: Get rid of type-punned pointer warnings.
|
||||
Thanks Adam Tkac.
|
||||
* Make sure executables are linked against libcrypto with the
|
||||
LIBSSL_LDFLAGS. Thanks Leo Baltus.
|
||||
* Miscellaneous prototype fixes. Thanks Dag-Erling Smørgrav.
|
||||
* README now shows preferred way to configure for examples and drill.
|
||||
* Bind to source address for resolvers. drill binds to source with -I.
|
||||
Thanks Bryan Duff.
|
||||
* -T option for ldns-dane that has specific exit status for PKIX
|
||||
validated connections without (secure) TLSA records.
|
||||
* Fix b{32,64}_{ntop,pton} detection and handling.
|
||||
* New RR type TKEY, but without operational practice.
|
||||
* New RR types HIP, NINFO, RKEY, CDS, EUI48, EUI64, URI, CAA and TA.
|
||||
* New output format flag (and accompanying functions) to print certain
|
||||
RR's as unknown type
|
||||
* -u and -U parameter for ldns-read-zone to mark/unmark a RR type
|
||||
for printing as unknown type
|
||||
* bugfix #504: GPOS RR has three rdata fields. Thanks Jelte Jansen.
|
||||
* bugfix #497: Properly test for EOF when reading key files with drill.
|
||||
* New functions: ldns_pkt_ixfr_request_new and
|
||||
ldns_pkt_ixfr_request_new_frm_str.
|
||||
* Use SNI with ldns-dane
|
||||
* bugfix #507: ldnsx Fix use of non-existent variables and not
|
||||
properly referring to instance variable. Patch from shussain.
|
||||
* bugfix #508: ldnsx Adding NSEC3PARAM to known/allowable RR type
|
||||
dictionary. Patch from shussain.
|
||||
* bugfix #517: ldns_resolver_new_frm_fp error when invoked using a NULL
|
||||
file pointer.
|
||||
* Fix memory leak in contrib/python: ldns_pkt.new_query.
|
||||
* Fix buffer overflow in fget_token and bget_token.
|
||||
* ldns-verify-zone NSEC3 checking from quadratic to linear performance.
|
||||
Thanks NIC MX (nicmexico.mx)
|
||||
* ldns-dane setup new ssl session for each new connect to prevent hangs
|
||||
* bugfix #521: drill trace continue on empty non-terminals with NSEC3
|
||||
* bugfix #525: Fix documentation of ldns_resolver_set_retry
|
||||
* Remove unused LDNS_RDF_TYPE_TSIG and associated functions.
|
||||
* Fix ldns_nsec_covers_name for zones with an apex only. Thanks Miek.
|
||||
* Configure option to build perl bindings: --with-p5-dns-ldns
|
||||
(DNS::LDNS is a contribution from Erik Ostlyngen)
|
||||
* bugfix #527: Move -lssl before -lcrypto when linking
|
||||
* Optimize TSIG digest function name comparison (Thanks Marc Buijsman)
|
||||
* Compare names case insensitive with ldns_pkt_rr_list_by_name and
|
||||
ldns_pkt_rr_list_by_name_and_type (thanks Johannes Naab)
|
||||
* A separate --enable for each draft RR type: --enable-rrtype-ninfo,
|
||||
--enable-rrtype-rkey, --enable-rrtype-cds, --enable-rrtype-uri and
|
||||
--enable-rrtype-ta
|
||||
* bugfix #530: Don't sign and verify duplicate RRs (Thanks Jelte Jansen)
|
||||
* bugfix #505: Manpage and usage output fixes (Thanks Tomas Hozza)
|
||||
* Adjust ldns_sha1() so that the input data is not modified (Thanks
|
||||
Marc Buijsman)
|
||||
* Messages to stderr are now off by default and can be reenabled with
|
||||
the --enable-stderr-msgs configure option.
|
||||
|
||||
1.6.16 2012-11-13
|
||||
* Fix Makefile to build pyldns with BSD make
|
||||
* Fix typo in exporting b32_* symbols to make pyldns load again
|
||||
|
268
Makefile.in
268
Makefile.in
@ -2,7 +2,7 @@
|
||||
# See the file LICENSE for the license
|
||||
SHELL = @SHELL@
|
||||
VERSION = @PACKAGE_VERSION@
|
||||
version_info = @LIBTOOL_VERSION_INFO@
|
||||
version_info = @VERSION_INFO@
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
@ -13,8 +13,10 @@ datadir = @datadir@
|
||||
libdir = @libdir@
|
||||
includedir = @includedir@
|
||||
doxygen = @doxygen@
|
||||
pywrapdir = ${srcdir}/contrib/python
|
||||
pyldnsxwrapdir = ${srcdir}/contrib/ldnsx
|
||||
pywrapdir = $(srcdir)/contrib/python
|
||||
pyldnsxwrapdir = $(srcdir)/contrib/ldnsx
|
||||
p5_dns_ldns_dir = $(srcdir)/contrib/DNS-LDNS
|
||||
PERL = @PERL@
|
||||
swig = @swig@
|
||||
swigpy_flags = -python @SWIGPY3@
|
||||
python_site = @PYTHON_SITE_PKG@
|
||||
@ -57,17 +59,19 @@ LINTFLAGS += "-Dsigset_t=long"
|
||||
LINTFLAGS += "-D__uint16_t=uint16_t" -D"__pure2=" -D"__wchar_t=wchar_t" -D"__packed=" -D"__aligned(x)="
|
||||
# Ubuntu oneiric"
|
||||
LINTFLAGS += -D"__BEGIN_DECLS=" -D"__ssize_t=ssize_t" -D"__intptr_t=intptr_t" -D"__nonnull(x)=" -D"__THROW=" -D"__wur=" -D"__off_t=unsigned" -D"__off64_t=unsigned" -D"__useconds_t=unsigned" -D"__uid_t=unsigned" -D"__gid_t=unsigned" -D"__attribute_deprecated__=" -D"__pid_t=unsigned" -D"__restrict=" -D"__END_DECLS=" -D"__BEGIN_NAMESPACE_STD=" -D"__END_NAMESPACE_STD=" -D"__BEGIN_NAMESPACE_C99=" -D"__END_NAMESPACE_C99=" -D"__socklen_t=unsigned" -D"sa_family_t=unsigned " -D"__mode_t=unsigned" -D"u_int16_t=uint16_t" -D"u_int32_t=uint32_t" -D"u_int8_t=uint8_t" -D"u_short=unsigned short" -D"__u16=uint16_t" -D"__u32=uint32_t" -D"__u64=uint64_t"
|
||||
# FreeBSD 9
|
||||
LINTFLAGS += -D"_RuneLocale=int"
|
||||
DEPFLAG = @DEPFLAG@
|
||||
|
||||
INSTALL = $(srcdir)/install-sh
|
||||
|
||||
LIBLOBJS = $(LIBOBJS:.o=.lo)
|
||||
LDNS_LOBJS = buffer.lo dane.lo dname.lo dnssec.lo dnssec_sign.lo dnssec_verify.lo dnssec_zone.lo duration.lo error.lo higher.lo host2str.lo host2wire.lo keys.lo net.lo packet.lo parse.lo rbtree.lo rdata.lo resolver.lo rr.lo rr_functions.lo sha1.lo sha2.lo str2host.lo tsig.lo update.lo util.lo wire2host.lo zone.lo
|
||||
LDNS_LOBJS = buffer.lo dane.lo dname.lo dnssec.lo dnssec_sign.lo dnssec_verify.lo dnssec_zone.lo duration.lo error.lo higher.lo host2str.lo host2wire.lo keys.lo net.lo packet.lo parse.lo radix.lo rbtree.lo rdata.lo resolver.lo rr.lo rr_functions.lo sha1.lo sha2.lo str2host.lo tsig.lo update.lo util.lo wire2host.lo zone.lo
|
||||
LDNS_LOBJS_EX = ^linktest\.c$$
|
||||
LDNS_ALL_LOBJS = $(LDNS_LOBJS) $(LIBLOBJS)
|
||||
LIB = libldns.la
|
||||
|
||||
LDNS_HEADERS = buffer.h dane.h dname.h dnssec.h dnssec_sign.h dnssec_verify.h dnssec_zone.h duration.h error.h higher.h host2str.h host2wire.h keys.h ldns.h packet.h parse.h rbtree.h rdata.h resolver.h rr_functions.h rr.h sha1.h sha2.h str2host.h tsig.h update.h wire2host.h zone.h
|
||||
LDNS_HEADERS = buffer.h dane.h dname.h dnssec.h dnssec_sign.h dnssec_verify.h dnssec_zone.h duration.h error.h higher.h host2str.h host2wire.h keys.h ldns.h packet.h parse.h radix.h rbtree.h rdata.h resolver.h rr_functions.h rr.h sha1.h sha2.h str2host.h tsig.h update.h wire2host.h zone.h
|
||||
LDNS_HEADERS_EX = ^config\.h|common\.h|util\.h|net\.h$$
|
||||
LDNS_HEADERS_GEN= common.h util.h net.h
|
||||
|
||||
@ -92,16 +96,14 @@ EX_SSL_LOBJS = examples/ldns-nsec3-hash.lo examples/ldns-revoke.lo examples/ldns
|
||||
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
|
||||
COMP_LIB = $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS)
|
||||
LINK_LIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
$(LIBS) -version-number $(version_info) -no-undefined
|
||||
LINK_EXE = $(LIBTOOL) --mode=link $(CC) $(CPPFLAGS) \
|
||||
$(LIBSSL_CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
||||
LINK_LIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -version-number $(version_info) -no-undefined
|
||||
LINK_EXE = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBSSL_LDFLAGS)
|
||||
|
||||
.PHONY: clean realclean docclean manpages doc lint all lib pyldns test
|
||||
.PHONY: install uninstall install-doc uninstall-doc uninstall-pyldns
|
||||
.PHONY: install-h uninstall-h install-lib uninstall-lib install-pyldns
|
||||
|
||||
all: setup-builddir lib linktest manpages @PYLDNS@ @DRILL@ @EXAMPLES@
|
||||
all: setup-builddir lib linktest manpages @P5_DNS_LDNS@ @PYLDNS@ @DRILL@ @EXAMPLES@
|
||||
|
||||
.SUFFIXES: .c .o .a .lo .h .i
|
||||
|
||||
@ -205,7 +207,8 @@ clean-examples:
|
||||
$(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS)
|
||||
|
||||
linktest: $(srcdir)/linktest.c libldns.la
|
||||
$(LIBTOOL) --mode=link $(CC) $(srcdir)/linktest.c $(CPPFLAGS) $(LIBSSL_CPPFLAGS) $(CFLAGS) -lldns $(LIBS) -o linktest
|
||||
$(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo
|
||||
$(LINK_EXE) linktest.lo $(LIBS) $(LIBSSL_LIBS) -lldns -o linktest
|
||||
|
||||
lib: libldns.la
|
||||
|
||||
@ -247,9 +250,29 @@ ldns_wrapper.lo: $(pywrapdir)/ldns_wrapper.c ldns/config.h
|
||||
_ldns.la: ldns_wrapper.lo libldns.la
|
||||
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-number $(version_info) -no-undefined -o $@ ldns_wrapper.lo -rpath $(python_site) -L. -L.libs -lldns $(LIBS)
|
||||
|
||||
install: install-h install-lib @INSTALL_CONFIG@ install-manpages $(pyldns_inst) $(pyldnsx_inst) @INSTALL_DRILL@ @INSTALL_EXAMPLES@
|
||||
$(p5_dns_ldns_dir)/Makefile: $(p5_dns_ldns_dir)/Makefile.PL
|
||||
BUILDDIR=`pwd`; cd $(p5_dns_ldns_dir); $(PERL) Makefile.PL PREFIX="$(prefix)" LIBS="-L$$BUILDDIR/.libs -lldns" INC="-I$$BUILDDIR"
|
||||
|
||||
uninstall: uninstall-manpages @UNINSTALL_CONFIG@ uninstall-h uninstall-lib $(pyldns_uninst) $(pyldnsx_uninst) @UNINSTALL_DRILL@ @UNINSTALL_EXAMPLES@
|
||||
$(p5_dns_ldns_dir)/blib/arch/auto/DNS/LDNS/LDNS.so: $(p5_dns_ldns_dir)/Makefile
|
||||
cd $(p5_dns_ldns_dir); $(MAKE)
|
||||
|
||||
p5-dns-ldns: $(p5_dns_ldns_dir)/blib/arch/auto/DNS/LDNS/LDNS.so
|
||||
|
||||
install-p5-dns-ldns: $(p5_dns_ldns_dir)/Makefile
|
||||
cd $(p5_dns_ldns_dir); $(MAKE) install
|
||||
|
||||
uninstall-p5-dns-ldns: $(p5_dns_ldns_dir)/Makefile
|
||||
cd $(p5_dns_ldns_dir); $(MAKE) uninstall
|
||||
|
||||
clean-p5-dns-ldns: $(p5_dns_ldns_dir)/Makefile
|
||||
cd $(p5_dns_ldns_dir); $(MAKE) clean
|
||||
|
||||
test-p5-dns-ldns: $(p5_dns_ldns_dir)/Makefile
|
||||
cd $(p5_dns_ldns_dir); $(MAKE) test
|
||||
|
||||
install: install-h install-lib @INSTALL_CONFIG@ install-manpages $(pyldns_inst) $(pyldnsx_inst) @INSTALL_P5_DNS_LDNS@ @INSTALL_DRILL@ @INSTALL_EXAMPLES@
|
||||
|
||||
uninstall: uninstall-manpages @UNINSTALL_CONFIG@ uninstall-h uninstall-lib $(pyldns_uninst) $(pyldnsx_uninst) @UNINSTALL_P5_DNS_LDNS@ @UNINSTALL_DRILL@ @UNINSTALL_EXAMPLES@
|
||||
|
||||
destclean: uninstall
|
||||
|
||||
@ -331,7 +354,7 @@ clean-lib:
|
||||
$(LIBTOOL) --mode clean rm -f $(pywrapdir)/ldns_wrapper.c
|
||||
$(LIBTOOL) --mode clean rm -f $(pywrapdir)/ldns.py
|
||||
|
||||
clean: @CLEAN_DRILL@ @CLEAN_EXAMPLES@ clean-manpages clean-lib putdown-builddir
|
||||
clean: @CLEAN_DRILL@ @CLEAN_EXAMPLES@ @CLEAN_P5_DNS_LDNS@ clean-manpages clean-lib putdown-builddir
|
||||
|
||||
realclean: clean docclean
|
||||
rm -f config.status
|
||||
@ -396,7 +419,7 @@ allclean: test-clean clean
|
||||
test-clean:
|
||||
tpkg -b test clean
|
||||
|
||||
test:
|
||||
test: @TEST_P5_DNS_LDNS@
|
||||
if test -x "`which bash`"; then bash test/test_all.sh; else sh test/test_all.sh; fi
|
||||
|
||||
|
||||
@ -481,56 +504,56 @@ buffer.lo buffer.o: $(srcdir)/buffer.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
dane.lo dane.o: $(srcdir)/dane.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
dname.lo dname.o: $(srcdir)/dname.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
dnssec.lo dnssec.o: $(srcdir)/dnssec.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
dnssec_sign.lo dnssec_sign.o: $(srcdir)/dnssec_sign.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
dnssec_verify.lo dnssec_verify.o: $(srcdir)/dnssec_verify.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
dnssec_zone.lo dnssec_zone.o: $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
duration.lo duration.o: $(srcdir)/duration.c ldns/config.h $(srcdir)/ldns/duration.h
|
||||
error.lo error.o: $(srcdir)/error.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
@ -538,72 +561,74 @@ error.lo error.o: $(srcdir)/error.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/uti
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
higher.lo higher.o: $(srcdir)/higher.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
host2str.lo host2str.o: $(srcdir)/host2str.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
host2wire.lo host2wire.o: $(srcdir)/host2wire.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
keys.lo keys.o: $(srcdir)/keys.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
linktest.lo linktest.o: $(srcdir)/linktest.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
net.lo net.o: $(srcdir)/net.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
packet.lo packet.o: $(srcdir)/packet.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
parse.lo parse.o: $(srcdir)/parse.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
radix.lo radix.o: $(srcdir)/radix.c ldns/config.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/error.h ldns/util.h \
|
||||
ldns/common.h
|
||||
rbtree.lo rbtree.o: $(srcdir)/rbtree.c ldns/config.h $(srcdir)/ldns/rbtree.h ldns/util.h ldns/common.h
|
||||
rdata.lo rdata.o: $(srcdir)/rdata.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
@ -611,40 +636,40 @@ rdata.lo rdata.o: $(srcdir)/rdata.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/uti
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
resolver.lo resolver.o: $(srcdir)/resolver.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
rr.lo rr.o: $(srcdir)/rr.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
rr_functions.lo rr_functions.o: $(srcdir)/rr_functions.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
sha1.lo sha1.o: $(srcdir)/sha1.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
sha2.lo sha2.o: $(srcdir)/sha2.c ldns/config.h $(srcdir)/ldns/sha2.h
|
||||
str2host.lo str2host.o: $(srcdir)/str2host.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
@ -652,24 +677,24 @@ str2host.lo str2host.o: $(srcdir)/str2host.c ldns/config.h $(srcdir)/ldns/ldns.h
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
tsig.lo tsig.o: $(srcdir)/tsig.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
update.lo update.o: $(srcdir)/update.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
util.lo util.o: $(srcdir)/util.c ldns/config.h $(srcdir)/ldns/rdata.h ldns/common.h $(srcdir)/ldns/error.h \
|
||||
ldns/util.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/buffer.h
|
||||
wire2host.lo wire2host.o: $(srcdir)/wire2host.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
@ -678,18 +703,16 @@ wire2host.lo wire2host.o: $(srcdir)/wire2host.c ldns/config.h $(srcdir)/ldns/ldn
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
zone.lo zone.o: $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
compat/b32_ntop.lo compat/b32_ntop.o: $(srcdir)/compat/b32_ntop.c ldns/config.h
|
||||
compat/b32_pton.lo compat/b32_pton.o: $(srcdir)/compat/b32_pton.c ldns/config.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
compat/b64_ntop.lo compat/b64_ntop.o: $(srcdir)/compat/b64_ntop.c ldns/config.h
|
||||
compat/b64_pton.lo compat/b64_pton.o: $(srcdir)/compat/b64_pton.c ldns/config.h
|
||||
compat/calloc.lo compat/calloc.o: $(srcdir)/compat/calloc.c ldns/config.h
|
||||
@ -715,8 +738,8 @@ examples/ldns-chaos.lo examples/ldns-chaos.o: $(srcdir)/examples/ldns-chaos.c ld
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-compare-zones.lo examples/ldns-compare-zones.o: $(srcdir)/examples/ldns-compare-zones.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -724,31 +747,31 @@ examples/ldns-compare-zones.lo examples/ldns-compare-zones.o: $(srcdir)/examples
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-dane.lo examples/ldns-dane.o: $(srcdir)/examples/ldns-dane.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldnsd.lo examples/ldnsd.o: $(srcdir)/examples/ldnsd.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \
|
||||
$(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \
|
||||
$(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \
|
||||
$(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-dpa.lo examples/ldns-dpa.o: $(srcdir)/examples/ldns-dpa.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-dpa.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-dpa.h
|
||||
examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -756,15 +779,15 @@ examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen-
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-key2ds.lo examples/ldns-key2ds.o: $(srcdir)/examples/ldns-key2ds.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o: $(srcdir)/examples/ldns-keyfetcher.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -772,31 +795,31 @@ examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o: $(srcdir)/examples/ldns-
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-keygen.lo examples/ldns-keygen.o: $(srcdir)/examples/ldns-keygen.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-mx.lo examples/ldns-mx.o: $(srcdir)/examples/ldns-mx.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-notify.lo examples/ldns-notify.o: $(srcdir)/examples/ldns-notify.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o: $(srcdir)/examples/ldns-nsec3-hash.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -804,7 +827,7 @@ examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o: $(srcdir)/examples/ldns-
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-read-zone.lo examples/ldns-read-zone.o: $(srcdir)/examples/ldns-read-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -812,7 +835,7 @@ examples/ldns-read-zone.lo examples/ldns-read-zone.o: $(srcdir)/examples/ldns-re
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-resolver.lo examples/ldns-resolver.o: $(srcdir)/examples/ldns-resolver.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -820,23 +843,23 @@ examples/ldns-resolver.lo examples/ldns-resolver.o: $(srcdir)/examples/ldns-reso
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-revoke.lo examples/ldns-revoke.o: $(srcdir)/examples/ldns-revoke.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-rrsig.lo examples/ldns-rrsig.o: $(srcdir)/examples/ldns-rrsig.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-signzone.lo examples/ldns-signzone.o: $(srcdir)/examples/ldns-signzone.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -844,7 +867,7 @@ examples/ldns-signzone.lo examples/ldns-signzone.o: $(srcdir)/examples/ldns-sign
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-test-edns.lo examples/ldns-test-edns.o: $(srcdir)/examples/ldns-test-edns.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -852,15 +875,15 @@ examples/ldns-test-edns.lo examples/ldns-test-edns.o: $(srcdir)/examples/ldns-te
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-testns.lo examples/ldns-testns.o: $(srcdir)/examples/ldns-testns.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-testpkts.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-testpkts.h
|
||||
examples/ldns-testpkts.lo examples/ldns-testpkts.o: $(srcdir)/examples/ldns-testpkts.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -868,15 +891,16 @@ examples/ldns-testpkts.lo examples/ldns-testpkts.o: $(srcdir)/examples/ldns-test
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-testpkts.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h \
|
||||
$(srcdir)/examples/ldns-testpkts.h
|
||||
examples/ldns-update.lo examples/ldns-update.o: $(srcdir)/examples/ldns-update.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-verify-zone.lo examples/ldns-verify-zone.o: $(srcdir)/examples/ldns-verify-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \
|
||||
ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \
|
||||
$(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \
|
||||
@ -884,39 +908,39 @@ examples/ldns-verify-zone.lo examples/ldns-verify-zone.o: $(srcdir)/examples/ldn
|
||||
$(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \
|
||||
$(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \
|
||||
$(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-version.lo examples/ldns-version.o: $(srcdir)/examples/ldns-version.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-walk.lo examples/ldns-walk.o: $(srcdir)/examples/ldns-walk.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-zcat.lo examples/ldns-zcat.o: $(srcdir)/examples/ldns-zcat.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-zsplit.lo examples/ldns-zsplit.o: $(srcdir)/examples/ldns-zsplit.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h \
|
||||
ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h \
|
||||
$(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/keys.h \
|
||||
$(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \
|
||||
$(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \
|
||||
$(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/chasetrace.lo drill/chasetrace.o: $(srcdir)/drill/chasetrace.c $(srcdir)/drill/drill.h ldns/config.h \
|
||||
$(srcdir)/drill/drill_util.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \
|
||||
$(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \
|
||||
@ -924,8 +948,8 @@ drill/chasetrace.lo drill/chasetrace.o: $(srcdir)/drill/chasetrace.c $(srcdir)/d
|
||||
$(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h \
|
||||
$(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h \
|
||||
$(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/dnssec.lo drill/dnssec.o: $(srcdir)/drill/dnssec.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \
|
||||
$(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \
|
||||
$(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \
|
||||
@ -933,7 +957,7 @@ drill/dnssec.lo drill/dnssec.o: $(srcdir)/drill/dnssec.c $(srcdir)/drill/drill.h
|
||||
$(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h \
|
||||
$(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \
|
||||
ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/drill.lo drill/drill.o: $(srcdir)/drill/drill.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \
|
||||
$(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \
|
||||
$(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \
|
||||
@ -941,7 +965,7 @@ drill/drill.lo drill/drill.o: $(srcdir)/drill/drill.c $(srcdir)/drill/drill.h ld
|
||||
$(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h \
|
||||
$(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \
|
||||
ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/drill_util.lo drill/drill_util.o: $(srcdir)/drill/drill_util.c $(srcdir)/drill/drill.h ldns/config.h \
|
||||
$(srcdir)/drill/drill_util.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \
|
||||
$(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \
|
||||
@ -949,8 +973,8 @@ drill/drill_util.lo drill/drill_util.o: $(srcdir)/drill/drill_util.c $(srcdir)/d
|
||||
$(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h \
|
||||
$(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h \
|
||||
$(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/error.lo drill/error.o: $(srcdir)/drill/error.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \
|
||||
$(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \
|
||||
$(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \
|
||||
@ -958,7 +982,7 @@ drill/error.lo drill/error.o: $(srcdir)/drill/error.c $(srcdir)/drill/drill.h ld
|
||||
$(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h \
|
||||
$(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \
|
||||
ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/root.lo drill/root.o: $(srcdir)/drill/root.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \
|
||||
$(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \
|
||||
$(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \
|
||||
@ -966,7 +990,7 @@ drill/root.lo drill/root.o: $(srcdir)/drill/root.c $(srcdir)/drill/drill.h ldns/
|
||||
$(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h \
|
||||
$(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \
|
||||
ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/securetrace.lo drill/securetrace.o: $(srcdir)/drill/securetrace.c $(srcdir)/drill/drill.h ldns/config.h \
|
||||
$(srcdir)/drill/drill_util.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \
|
||||
$(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \
|
||||
@ -974,8 +998,8 @@ drill/securetrace.lo drill/securetrace.o: $(srcdir)/drill/securetrace.c $(srcdir
|
||||
$(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h \
|
||||
$(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h \
|
||||
$(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h \
|
||||
$(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \
|
||||
$(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
drill/work.lo drill/work.o: $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/config.h $(srcdir)/drill/drill_util.h \
|
||||
$(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h \
|
||||
$(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h \
|
||||
@ -983,7 +1007,7 @@ drill/work.lo drill/work.o: $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/
|
||||
$(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h \
|
||||
$(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h \
|
||||
ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h \
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
$(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h
|
||||
examples/ldns-chaos: examples/ldns-chaos.lo examples/ldns-chaos.o $(LIB)
|
||||
examples/ldns-compare-zones: examples/ldns-compare-zones.lo examples/ldns-compare-zones.o $(LIB)
|
||||
examples/ldnsd: examples/ldnsd.lo examples/ldnsd.o $(LIB)
|
||||
|
4
README
4
README
@ -37,11 +37,11 @@ INSTALLATION
|
||||
5. make install
|
||||
|
||||
|
||||
* Building from subversion repository
|
||||
* Building from repository
|
||||
|
||||
If you are building from the repository you will need to have (gnu)
|
||||
autotools like libtool and autoreconf installed. A list of all the commands
|
||||
needed to build everything can be found in README.svn. Note that the actual
|
||||
needed to build everything can be found in README.git. Note that the actual
|
||||
commands may be a little bit different on your machine. Most notable, you'll need to run libtoolize (or glibtoolize), if you skip this step, you'll get an error about missing config.sub.
|
||||
|
||||
* Developers
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
# The ldns subversion repository can found at:
|
||||
# www.nlnetlabs.nl/ldns/svn/
|
||||
# The ldns git repository can found at:
|
||||
# git.nlnetlabs.nl/ldns/
|
||||
|
||||
# small list of commands to build all on a linux system
|
||||
# libtoolize is needed for most other targets
|
||||
@ -16,7 +15,7 @@
|
||||
# it is needed)
|
||||
libtoolize -c --install
|
||||
autoreconf --install
|
||||
./configure --with-examples --with-drill # --with-pyldns
|
||||
./configure --with-examples --with-drill # --with-pyldns --with-p5-dns-ldns
|
||||
make
|
||||
make doc # needs doxygen for the html pages
|
||||
(cd pcat && autoreconf && ./configure && make)
|
@ -2,7 +2,12 @@
|
||||
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
||||
# BSD licensed.
|
||||
#
|
||||
# Version 21
|
||||
# Version 26
|
||||
# 2013-09-19 FLTO help text improved.
|
||||
# 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes
|
||||
# 2013-06-25 FLTO has --disable-flto option.
|
||||
# 2013-05-03 Update W32_SLEEP for newer mingw that links but not defines it.
|
||||
# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
|
||||
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
|
||||
# 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
|
||||
# 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
|
||||
@ -17,7 +22,7 @@
|
||||
# 2010-07-02 Add check for ss_family (for minix).
|
||||
# 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS.
|
||||
# 2010-03-01 Fix RPATH using CONFIG_COMMANDS to run at the very end.
|
||||
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS seperate, -ldl
|
||||
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS separate, -ldl
|
||||
# 2010-02-01 added ACX_CHECK_MEMCMP_SIGNED, AHX_MEMCMP_BROKEN
|
||||
# 2010-01-20 added AHX_COONFIG_STRLCAT
|
||||
# 2009-07-14 U_CHAR detection improved for windows crosscompile.
|
||||
@ -101,7 +106,7 @@ dnl Calculate comma separated windows-resource numbers from package version.
|
||||
dnl Picks the first three(,0) or four numbers out of the name.
|
||||
dnl $1: variable for the result
|
||||
AC_DEFUN([ACX_RSRC_VERSION],
|
||||
[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*\([0-9]\)[^0-9]*$/\1,\2,\3,0/' `]
|
||||
[$1=[`echo $PACKAGE_VERSION | sed -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\).*$/\1,\2,\3,\4/' -e 's/^[^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)[^0-9]*$/\1,\2,\3,0/' `]
|
||||
])
|
||||
|
||||
dnl Routine to help check for compiler flags.
|
||||
@ -116,7 +121,7 @@ AC_MSG_CHECKING(whether $CC supports -$1)
|
||||
cache=`echo $1 | sed 'y%.=/+-%___p_%'`
|
||||
AC_CACHE_VAL(cv_prog_cc_flag_$cache,
|
||||
[
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -$1 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -405,19 +410,22 @@ int test() {
|
||||
dnl Check if CC supports -flto.
|
||||
dnl in a way that supports clang and suncc (that flag does something else,
|
||||
dnl but fails to link). It sets it in CFLAGS if it works.
|
||||
AC_DEFUN([ACX_CHECK_FLTO],
|
||||
[AC_MSG_CHECKING([if $CC supports -flto])
|
||||
BAKCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -flto"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
|
||||
CFLAGS="$BAKCFLAGS"
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
rm -f conftest conftest.c conftest.o
|
||||
], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
|
||||
AC_DEFUN([ACX_CHECK_FLTO], [
|
||||
AC_ARG_ENABLE([flto], AS_HELP_STRING([--disable-flto], [Disable link-time optimization (gcc specific option)]))
|
||||
AS_IF([test "x$enable_flto" != "xno"], [
|
||||
AC_MSG_CHECKING([if $CC supports -flto])
|
||||
BAKCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -flto"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
if $CC $CFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then
|
||||
CFLAGS="$BAKCFLAGS"
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
rm -f conftest conftest.c conftest.o
|
||||
], [CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)])
|
||||
])
|
||||
])
|
||||
|
||||
dnl Check the printf-format attribute (if any)
|
||||
@ -1208,7 +1216,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result);
|
||||
dnl provide w32 compat definition for sleep
|
||||
AC_DEFUN([AHX_CONFIG_W32_SLEEP],
|
||||
[
|
||||
#ifndef HAVE_SLEEP
|
||||
#if !defined(HAVE_SLEEP) || defined(HAVE_WINDOWS_H)
|
||||
#define sleep(x) Sleep((x)*1000) /* on win32 */
|
||||
#endif /* HAVE_SLEEP */
|
||||
])
|
||||
|
@ -34,11 +34,12 @@
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de>
|
||||
# Copyright (c) 2009 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
|
||||
# Copyright (c) 2009 Alan W. Irwin
|
||||
# Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net>
|
||||
# Copyright (c) 2009 Andrew Collier <colliera@ukzn.ac.za>
|
||||
# Copyright (c) 2009 Andrew Collier
|
||||
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
|
||||
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
|
||||
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
@ -66,7 +67,7 @@
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 8
|
||||
#serial 16
|
||||
|
||||
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
||||
AC_DEFUN([AX_PYTHON_DEVEL],[
|
||||
@ -153,8 +154,14 @@ $ac_distutils_result])
|
||||
if test -z "$PYTHON_CPPFLAGS"; then
|
||||
python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_inc ());"`
|
||||
plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
|
||||
if test -n "${python_path}"; then
|
||||
python_path="-I$python_path"
|
||||
if test "${plat_python_path}" != "${python_path}"; then
|
||||
python_path="-I$python_path -I$plat_python_path"
|
||||
else
|
||||
python_path="-I$python_path"
|
||||
fi
|
||||
fi
|
||||
PYTHON_CPPFLAGS=$python_path
|
||||
fi
|
||||
@ -173,13 +180,10 @@ $ac_distutils_result])
|
||||
# join all versioning strings, on some systems
|
||||
# major/minor numbers could be in different list elements
|
||||
from distutils.sysconfig import *
|
||||
ret = ''
|
||||
for e in get_config_vars ('VERSION'):
|
||||
if (e != None):
|
||||
ret += e
|
||||
print (ret)
|
||||
EOD
|
||||
`
|
||||
e = get_config_var('VERSION')
|
||||
if e is not None:
|
||||
print(e)
|
||||
EOD`
|
||||
|
||||
if test -z "$ac_python_version"; then
|
||||
if test -n "$PYTHON_VERSION"; then
|
||||
@ -199,34 +203,27 @@ EOD
|
||||
|
||||
# There should be only one
|
||||
import distutils.sysconfig
|
||||
for e in distutils.sysconfig.get_config_vars ('LIBDIR'):
|
||||
if e != None:
|
||||
print (e)
|
||||
break
|
||||
EOD
|
||||
`
|
||||
|
||||
# Before checking for libpythonX.Y, we need to know
|
||||
# the extension the OS we're on uses for libraries
|
||||
# (we take the first one, if there's more than one fix me!):
|
||||
ac_python_soext=`$PYTHON -c \
|
||||
"import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_config_vars('SO')[[0]])"`
|
||||
e = distutils.sysconfig.get_config_var('LIBDIR')
|
||||
if e is not None:
|
||||
print (e)
|
||||
EOD`
|
||||
|
||||
# Now, for the library:
|
||||
ac_python_soname=`$PYTHON -c \
|
||||
"import distutils.sysconfig; \
|
||||
print (distutils.sysconfig.get_config_vars('LDLIBRARY')[[0]])"`
|
||||
ac_python_library=`cat<<EOD | $PYTHON -
|
||||
|
||||
# Strip away extension from the end to canonicalize its name:
|
||||
ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"`
|
||||
import distutils.sysconfig
|
||||
c = distutils.sysconfig.get_config_vars()
|
||||
if 'LDVERSION' in c:
|
||||
print ('python'+c[['LDVERSION']])
|
||||
else:
|
||||
print ('python'+c[['VERSION']])
|
||||
EOD`
|
||||
|
||||
# This small piece shamelessly adapted from PostgreSQL python macro;
|
||||
# credits goes to momjian, I think. I'd like to put the right name
|
||||
# in the credits, if someone can point me in the right direction... ?
|
||||
#
|
||||
if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
|
||||
-a x"$ac_python_library" != x"$ac_python_soname"
|
||||
if test -n "$ac_python_libdir" -a -n "$ac_python_library"
|
||||
then
|
||||
# use the official shared library
|
||||
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
|
||||
@ -268,7 +265,7 @@ EOD
|
||||
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||
conf = distutils.sysconfig.get_config_var; \
|
||||
print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"`
|
||||
print (conf('LIBS'))"`
|
||||
fi
|
||||
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
|
||||
AC_SUBST(PYTHON_EXTRA_LIBS)
|
||||
|
@ -1,333 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 1998 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions Copyright (c) 1995 by International Business Machines, Inc.
|
||||
*
|
||||
* International Business Machines, Inc. (hereinafter called IBM) grants
|
||||
* permission under its copyrights to use, copy, modify, and distribute this
|
||||
* Software with or without fee, provided that the above copyright notice and
|
||||
* all paragraphs of this notice appear in all copies, and that the name of IBM
|
||||
* not be used in connection with the marketing of any product incorporating
|
||||
* the Software or modifications thereof, without specific, written prior
|
||||
* permission.
|
||||
*
|
||||
* To the extent it has a right to do so, IBM grants an immunity from suit
|
||||
* under its patents, if any, for the use, sale or manufacture of products to
|
||||
* the extent that such products are used for performing Domain Name System
|
||||
* dynamic updates in TCP/IP networks by means of the Software. No immunity is
|
||||
* granted for any product per se or for any other function of any product.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
|
||||
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
|
||||
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
#include <ldns/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
static const char Base32[] =
|
||||
"abcdefghijklmnopqrstuvwxyz234567";
|
||||
/* "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";*/
|
||||
/* 00000000001111111111222222222233
|
||||
01234567890123456789012345678901*/
|
||||
static const char Base32_extended_hex[] =
|
||||
/* "0123456789ABCDEFGHIJKLMNOPQRSTUV";*/
|
||||
"0123456789abcdefghijklmnopqrstuv";
|
||||
static const char Pad32 = '=';
|
||||
|
||||
/* (From RFC3548 and draft-josefsson-rfc3548bis-00.txt)
|
||||
5. Base 32 Encoding
|
||||
|
||||
The Base 32 encoding is designed to represent arbitrary sequences of
|
||||
octets in a form that needs to be case insensitive but need not be
|
||||
humanly readable.
|
||||
|
||||
A 33-character subset of US-ASCII is used, enabling 5 bits to be
|
||||
represented per printable character. (The extra 33rd character, "=",
|
||||
is used to signify a special processing function.)
|
||||
|
||||
The encoding process represents 40-bit groups of input bits as output
|
||||
strings of 8 encoded characters. Proceeding from left to right, a
|
||||
40-bit input group is formed by concatenating 5 8bit input groups.
|
||||
These 40 bits are then treated as 8 concatenated 5-bit groups, each
|
||||
of which is translated into a single digit in the base 32 alphabet.
|
||||
When encoding a bit stream via the base 32 encoding, the bit stream
|
||||
must be presumed to be ordered with the most-significant-bit first.
|
||||
That is, the first bit in the stream will be the high-order bit in
|
||||
the first 8bit byte, and the eighth bit will be the low-order bit in
|
||||
the first 8bit byte, and so on.
|
||||
|
||||
Each 5-bit group is used as an index into an array of 32 printable
|
||||
characters. The character referenced by the index is placed in the
|
||||
output string. These characters, identified in Table 3, below, are
|
||||
selected from US-ASCII digits and uppercase letters.
|
||||
|
||||
Table 3: The Base 32 Alphabet
|
||||
|
||||
Value Encoding Value Encoding Value Encoding Value Encoding
|
||||
0 A 9 J 18 S 27 3
|
||||
1 B 10 K 19 T 28 4
|
||||
2 C 11 L 20 U 29 5
|
||||
3 D 12 M 21 V 30 6
|
||||
4 E 13 N 22 W 31 7
|
||||
5 F 14 O 23 X
|
||||
6 G 15 P 24 Y (pad) =
|
||||
7 H 16 Q 25 Z
|
||||
8 I 17 R 26 2
|
||||
|
||||
|
||||
Special processing is performed if fewer than 40 bits are available
|
||||
at the end of the data being encoded. A full encoding quantum is
|
||||
always completed at the end of a body. When fewer than 40 input bits
|
||||
are available in an input group, zero bits are added (on the right)
|
||||
to form an integral number of 5-bit groups. Padding at the end of
|
||||
the data is performed using the "=" character. Since all base 32
|
||||
input is an integral number of octets, only the following cases can
|
||||
arise:
|
||||
|
||||
(1) the final quantum of encoding input is an integral multiple of 40
|
||||
bits; here, the final unit of encoded output will be an integral
|
||||
multiple of 8 characters with no "=" padding,
|
||||
|
||||
(2) the final quantum of encoding input is exactly 8 bits; here, the
|
||||
final unit of encoded output will be two characters followed by six
|
||||
"=" padding characters,
|
||||
|
||||
(3) the final quantum of encoding input is exactly 16 bits; here, the
|
||||
final unit of encoded output will be four characters followed by four
|
||||
"=" padding characters,
|
||||
|
||||
(4) the final quantum of encoding input is exactly 24 bits; here, the
|
||||
final unit of encoded output will be five characters followed by
|
||||
three "=" padding characters, or
|
||||
|
||||
(5) the final quantum of encoding input is exactly 32 bits; here, the
|
||||
final unit of encoded output will be seven characters followed by one
|
||||
"=" padding character.
|
||||
|
||||
|
||||
6. Base 32 Encoding with Extended Hex Alphabet
|
||||
|
||||
The following description of base 32 is due to [7]. This encoding
|
||||
should not be regarded as the same as the "base32" encoding, and
|
||||
should not be referred to as only "base32".
|
||||
|
||||
One property with this alphabet, that the base64 and base32 alphabet
|
||||
lack, is that encoded data maintain its sort order when the encoded
|
||||
data is compared bit-wise.
|
||||
|
||||
This encoding is identical to the previous one, except for the
|
||||
alphabet. The new alphabet is found in table 4.
|
||||
|
||||
Table 4: The "Extended Hex" Base 32 Alphabet
|
||||
|
||||
Value Encoding Value Encoding Value Encoding Value Encoding
|
||||
0 0 9 9 18 I 27 R
|
||||
1 1 10 A 19 J 28 S
|
||||
2 2 11 B 20 K 29 T
|
||||
3 3 12 C 21 L 30 U
|
||||
4 4 13 D 22 M 31 V
|
||||
5 5 14 E 23 N
|
||||
6 6 15 F 24 O (pad) =
|
||||
7 7 16 G 25 P
|
||||
8 8 17 H 26 Q
|
||||
|
||||
*/
|
||||
|
||||
|
||||
int
|
||||
ldns_b32_ntop_ar(uint8_t const *src, size_t srclength, char *target, size_t targsize, const char B32_ar[]) {
|
||||
size_t datalength = 0;
|
||||
uint8_t input[5];
|
||||
uint8_t output[8];
|
||||
size_t i;
|
||||
memset(output, 0, 8);
|
||||
|
||||
while (4 < srclength) {
|
||||
input[0] = *src++;
|
||||
input[1] = *src++;
|
||||
input[2] = *src++;
|
||||
input[3] = *src++;
|
||||
input[4] = *src++;
|
||||
srclength -= 5;
|
||||
|
||||
output[0] = (input[0] & 0xf8) >> 3;
|
||||
output[1] = ((input[0] & 0x07) << 2) + ((input[1] & 0xc0) >> 6);
|
||||
output[2] = (input[1] & 0x3e) >> 1;
|
||||
output[3] = ((input[1] & 0x01) << 4) + ((input[2] & 0xf0) >> 4);
|
||||
output[4] = ((input[2] & 0x0f) << 1) + ((input[3] & 0x80) >> 7);
|
||||
output[5] = (input[3] & 0x7c) >> 2;
|
||||
output[6] = ((input[3] & 0x03) << 3) + ((input[4] & 0xe0) >> 5);
|
||||
output[7] = (input[4] & 0x1f);
|
||||
|
||||
assert(output[0] < 32);
|
||||
assert(output[1] < 32);
|
||||
assert(output[2] < 32);
|
||||
assert(output[3] < 32);
|
||||
assert(output[4] < 32);
|
||||
assert(output[5] < 32);
|
||||
assert(output[6] < 32);
|
||||
assert(output[7] < 32);
|
||||
|
||||
if (datalength + 8 > targsize) {
|
||||
return (-1);
|
||||
}
|
||||
target[datalength++] = B32_ar[output[0]];
|
||||
target[datalength++] = B32_ar[output[1]];
|
||||
target[datalength++] = B32_ar[output[2]];
|
||||
target[datalength++] = B32_ar[output[3]];
|
||||
target[datalength++] = B32_ar[output[4]];
|
||||
target[datalength++] = B32_ar[output[5]];
|
||||
target[datalength++] = B32_ar[output[6]];
|
||||
target[datalength++] = B32_ar[output[7]];
|
||||
}
|
||||
|
||||
/* Now we worry about padding. */
|
||||
if (0 != srclength) {
|
||||
/* Get what's left. */
|
||||
input[0] = input[1] = input[2] = input[3] = input[4] = (uint8_t) '\0';
|
||||
for (i = 0; i < srclength; i++)
|
||||
input[i] = *src++;
|
||||
|
||||
output[0] = (input[0] & 0xf8) >> 3;
|
||||
assert(output[0] < 32);
|
||||
if (srclength >= 1) {
|
||||
output[1] = ((input[0] & 0x07) << 2) + ((input[1] & 0xc0) >> 6);
|
||||
assert(output[1] < 32);
|
||||
output[2] = (input[1] & 0x3e) >> 1;
|
||||
assert(output[2] < 32);
|
||||
}
|
||||
if (srclength >= 2) {
|
||||
output[3] = ((input[1] & 0x01) << 4) + ((input[2] & 0xf0) >> 4);
|
||||
assert(output[3] < 32);
|
||||
}
|
||||
if (srclength >= 3) {
|
||||
output[4] = ((input[2] & 0x0f) << 1) + ((input[3] & 0x80) >> 7);
|
||||
assert(output[4] < 32);
|
||||
output[5] = (input[3] & 0x7c) >> 2;
|
||||
assert(output[5] < 32);
|
||||
}
|
||||
if (srclength >= 4) {
|
||||
output[6] = ((input[3] & 0x03) << 3) + ((input[4] & 0xe0) >> 5);
|
||||
assert(output[6] < 32);
|
||||
}
|
||||
|
||||
|
||||
if (datalength + 1 > targsize) {
|
||||
return (-2);
|
||||
}
|
||||
target[datalength++] = B32_ar[output[0]];
|
||||
if (srclength >= 1) {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = B32_ar[output[1]];
|
||||
if (srclength == 1 && output[2] == 0) {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
} else {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = B32_ar[output[2]];
|
||||
}
|
||||
} else {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
}
|
||||
if (srclength >= 2) {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = B32_ar[output[3]];
|
||||
} else {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
}
|
||||
if (srclength >= 3) {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = B32_ar[output[4]];
|
||||
if (srclength == 3 && output[5] == 0) {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
} else {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = B32_ar[output[5]];
|
||||
}
|
||||
} else {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
}
|
||||
if (srclength >= 4) {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = B32_ar[output[6]];
|
||||
} else {
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
}
|
||||
if (datalength + 1 > targsize) { return (-2); }
|
||||
target[datalength++] = Pad32;
|
||||
}
|
||||
if (datalength+1 > targsize) {
|
||||
return (int) (datalength);
|
||||
}
|
||||
target[datalength] = '\0'; /* Returned value doesn't count \0. */
|
||||
return (int) (datalength);
|
||||
}
|
||||
|
||||
int
|
||||
ldns_b32_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
|
||||
return ldns_b32_ntop_ar(src, srclength, target, targsize, Base32);
|
||||
}
|
||||
|
||||
/* deprecated, here for backwards compatibility */
|
||||
int
|
||||
b32_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
|
||||
return ldns_b32_ntop_ar(src, srclength, target, targsize, Base32);
|
||||
}
|
||||
|
||||
int
|
||||
ldns_b32_ntop_extended_hex(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
|
||||
return ldns_b32_ntop_ar(src, srclength, target, targsize, Base32_extended_hex);
|
||||
}
|
||||
|
||||
/* deprecated, here for backwards compatibility */
|
||||
int
|
||||
b32_ntop_extended_hex(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
|
||||
return ldns_b32_ntop_ar(src, srclength, target, targsize, Base32_extended_hex);
|
||||
}
|
||||
|
@ -1,387 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 1998 by Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions Copyright (c) 1995 by International Business Machines, Inc.
|
||||
*
|
||||
* International Business Machines, Inc. (hereinafter called IBM) grants
|
||||
* permission under its copyrights to use, copy, modify, and distribute this
|
||||
* Software with or without fee, provided that the above copyright notice and
|
||||
* all paragraphs of this notice appear in all copies, and that the name of IBM
|
||||
* not be used in connection with the marketing of any product incorporating
|
||||
* the Software or modifications thereof, without specific, written prior
|
||||
* permission.
|
||||
*
|
||||
* To the extent it has a right to do so, IBM grants an immunity from suit
|
||||
* under its patents, if any, for the use, sale or manufacture of products to
|
||||
* the extent that such products are used for performing Domain Name System
|
||||
* dynamic updates in TCP/IP networks by means of the Software. No immunity is
|
||||
* granted for any product per se or for any other function of any product.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
|
||||
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
|
||||
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
#include <ldns/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";*/
|
||||
static const char Base32[] =
|
||||
"abcdefghijklmnopqrstuvwxyz234567";
|
||||
/* "0123456789ABCDEFGHIJKLMNOPQRSTUV";*/
|
||||
static const char Base32_extended_hex[] =
|
||||
"0123456789abcdefghijklmnopqrstuv";
|
||||
static const char Pad32 = '=';
|
||||
|
||||
/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
|
||||
5. Base 32 Encoding
|
||||
|
||||
The Base 32 encoding is designed to represent arbitrary sequences of
|
||||
octets in a form that needs to be case insensitive but need not be
|
||||
humanly readable.
|
||||
|
||||
A 33-character subset of US-ASCII is used, enabling 5 bits to be
|
||||
represented per printable character. (The extra 33rd character, "=",
|
||||
is used to signify a special processing function.)
|
||||
|
||||
The encoding process represents 40-bit groups of input bits as output
|
||||
strings of 8 encoded characters. Proceeding from left to right, a
|
||||
40-bit input group is formed by concatenating 5 8bit input groups.
|
||||
These 40 bits are then treated as 8 concatenated 5-bit groups, each
|
||||
of which is translated into a single digit in the base 32 alphabet.
|
||||
When encoding a bit stream via the base 32 encoding, the bit stream
|
||||
must be presumed to be ordered with the most-significant-bit first.
|
||||
That is, the first bit in the stream will be the high-order bit in
|
||||
the first 8bit byte, and the eighth bit will be the low-order bit in
|
||||
the first 8bit byte, and so on.
|
||||
|
||||
Each 5-bit group is used as an index into an array of 32 printable
|
||||
characters. The character referenced by the index is placed in the
|
||||
output string. These characters, identified in Table 3, below, are
|
||||
selected from US-ASCII digits and uppercase letters.
|
||||
|
||||
Table 3: The Base 32 Alphabet
|
||||
|
||||
Value Encoding Value Encoding Value Encoding Value Encoding
|
||||
0 A 9 J 18 S 27 3
|
||||
1 B 10 K 19 T 28 4
|
||||
2 C 11 L 20 U 29 5
|
||||
3 D 12 M 21 V 30 6
|
||||
4 E 13 N 22 W 31 7
|
||||
5 F 14 O 23 X
|
||||
6 G 15 P 24 Y (pad) =
|
||||
7 H 16 Q 25 Z
|
||||
8 I 17 R 26 2
|
||||
|
||||
|
||||
Special processing is performed if fewer than 40 bits are available
|
||||
at the end of the data being encoded. A full encoding quantum is
|
||||
always completed at the end of a body. When fewer than 40 input bits
|
||||
are available in an input group, zero bits are added (on the right)
|
||||
to form an integral number of 5-bit groups. Padding at the end of
|
||||
the data is performed using the "=" character. Since all base 32
|
||||
input is an integral number of octets, only the following cases can
|
||||
arise:
|
||||
|
||||
(1) the final quantum of encoding input is an integral multiple of 40
|
||||
bits; here, the final unit of encoded output will be an integral
|
||||
multiple of 8 characters with no "=" padding,
|
||||
|
||||
(2) the final quantum of encoding input is exactly 8 bits; here, the
|
||||
final unit of encoded output will be two characters followed by six
|
||||
"=" padding characters,
|
||||
|
||||
(3) the final quantum of encoding input is exactly 16 bits; here, the
|
||||
final unit of encoded output will be four characters followed by four
|
||||
"=" padding characters,
|
||||
|
||||
(4) the final quantum of encoding input is exactly 24 bits; here, the
|
||||
final unit of encoded output will be five characters followed by
|
||||
three "=" padding characters, or
|
||||
|
||||
(5) the final quantum of encoding input is exactly 32 bits; here, the
|
||||
final unit of encoded output will be seven characters followed by one
|
||||
"=" padding character.
|
||||
|
||||
|
||||
6. Base 32 Encoding with Extended Hex Alphabet
|
||||
|
||||
The following description of base 32 is due to [7]. This encoding
|
||||
should not be regarded as the same as the "base32" encoding, and
|
||||
should not be referred to as only "base32".
|
||||
|
||||
One property with this alphabet, that the base32 and base32 alphabet
|
||||
lack, is that encoded data maintain its sort order when the encoded
|
||||
data is compared bit-wise.
|
||||
|
||||
This encoding is identical to the previous one, except for the
|
||||
alphabet. The new alphabet is found in table 4.
|
||||
|
||||
Table 4: The "Extended Hex" Base 32 Alphabet
|
||||
|
||||
Value Encoding Value Encoding Value Encoding Value Encoding
|
||||
0 0 9 9 18 I 27 R
|
||||
1 1 10 A 19 J 28 S
|
||||
2 2 11 B 20 K 29 T
|
||||
3 3 12 C 21 L 30 U
|
||||
4 4 13 D 22 M 31 V
|
||||
5 5 14 E 23 N
|
||||
6 6 15 F 24 O (pad) =
|
||||
7 7 16 G 25 P
|
||||
8 8 17 H 26 Q
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
/* skips all whitespace anywhere.
|
||||
converts characters, four at a time, starting at (or after)
|
||||
src from base - 32 numbers into three 8 bit bytes in the target area.
|
||||
it returns the number of data bytes stored at the target, or -1 on error.
|
||||
*/
|
||||
|
||||
int
|
||||
ldns_b32_pton_ar(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize, const char B32_ar[])
|
||||
{
|
||||
int tarindex, state, ch;
|
||||
char *pos;
|
||||
int i = 0;
|
||||
|
||||
state = 0;
|
||||
tarindex = 0;
|
||||
|
||||
while ((ch = *src++) != '\0' && (i == 0 || i < (int) hashed_owner_str_len)) {
|
||||
i++;
|
||||
ch = tolower(ch);
|
||||
if (isspace((unsigned char)ch)) /* Skip whitespace anywhere. */
|
||||
continue;
|
||||
|
||||
if (ch == Pad32)
|
||||
break;
|
||||
|
||||
pos = strchr(B32_ar, ch);
|
||||
if (pos == 0) {
|
||||
/* A non-base32 character. */
|
||||
return (-ch);
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
case 0:
|
||||
if (target) {
|
||||
if ((size_t)tarindex >= targsize) {
|
||||
return (-2);
|
||||
}
|
||||
target[tarindex] = (pos - B32_ar) << 3;
|
||||
}
|
||||
state = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (target) {
|
||||
if ((size_t)tarindex + 1 >= targsize) {
|
||||
return (-3);
|
||||
}
|
||||
target[tarindex] |= (pos - B32_ar) >> 2;
|
||||
target[tarindex+1] = ((pos - B32_ar) & 0x03)
|
||||
<< 6 ;
|
||||
}
|
||||
tarindex++;
|
||||
state = 2;
|
||||
break;
|
||||
case 2:
|
||||
if (target) {
|
||||
if ((size_t)tarindex + 1 >= targsize) {
|
||||
return (-4);
|
||||
}
|
||||
target[tarindex] |= (pos - B32_ar) << 1;
|
||||
}
|
||||
/*tarindex++;*/
|
||||
state = 3;
|
||||
break;
|
||||
case 3:
|
||||
if (target) {
|
||||
if ((size_t)tarindex + 1 >= targsize) {
|
||||
return (-5);
|
||||
}
|
||||
target[tarindex] |= (pos - B32_ar) >> 4;
|
||||
target[tarindex+1] = ((pos - B32_ar) & 0x0f) << 4 ;
|
||||
}
|
||||
tarindex++;
|
||||
state = 4;
|
||||
break;
|
||||
case 4:
|
||||
if (target) {
|
||||
if ((size_t)tarindex + 1 >= targsize) {
|
||||
return (-6);
|
||||
}
|
||||
target[tarindex] |= (pos - B32_ar) >> 1;
|
||||
target[tarindex+1] = ((pos - B32_ar) & 0x01)
|
||||
<< 7 ;
|
||||
}
|
||||
tarindex++;
|
||||
state = 5;
|
||||
break;
|
||||
case 5:
|
||||
if (target) {
|
||||
if ((size_t)tarindex + 1 >= targsize) {
|
||||
return (-7);
|
||||
}
|
||||
target[tarindex] |= (pos - B32_ar) << 2;
|
||||
}
|
||||
state = 6;
|
||||
break;
|
||||
case 6:
|
||||
if (target) {
|
||||
if ((size_t)tarindex + 1 >= targsize) {
|
||||
return (-8);
|
||||
}
|
||||
target[tarindex] |= (pos - B32_ar) >> 3;
|
||||
target[tarindex+1] = ((pos - B32_ar) & 0x07)
|
||||
<< 5 ;
|
||||
}
|
||||
tarindex++;
|
||||
state = 7;
|
||||
break;
|
||||
case 7:
|
||||
if (target) {
|
||||
if ((size_t)tarindex + 1 >= targsize) {
|
||||
return (-9);
|
||||
}
|
||||
target[tarindex] |= (pos - B32_ar);
|
||||
}
|
||||
tarindex++;
|
||||
state = 0;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We are done decoding Base-32 chars. Let's see if we ended
|
||||
* on a byte boundary, and/or with erroneous trailing characters.
|
||||
*/
|
||||
|
||||
if (ch == Pad32) { /* We got a pad char. */
|
||||
ch = *src++; /* Skip it, get next. */
|
||||
switch (state) {
|
||||
case 0: /* Invalid = in first position */
|
||||
case 1: /* Invalid = in second position */
|
||||
return (-10);
|
||||
|
||||
case 2: /* Valid, means one byte of info */
|
||||
case 3:
|
||||
/* Skip any number of spaces. */
|
||||
for ((void)NULL; ch != '\0'; ch = *src++)
|
||||
if (!isspace((unsigned char)ch))
|
||||
break;
|
||||
/* Make sure there is another trailing = sign. */
|
||||
if (ch != Pad32) {
|
||||
return (-11);
|
||||
}
|
||||
ch = *src++; /* Skip the = */
|
||||
/* Fall through to "single trailing =" case. */
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 4: /* Valid, means two bytes of info */
|
||||
case 5:
|
||||
case 6:
|
||||
/*
|
||||
* We know this char is an =. Is there anything but
|
||||
* whitespace after it?
|
||||
*/
|
||||
for ((void)NULL; ch != '\0'; ch = *src++)
|
||||
if (!(isspace((unsigned char)ch) || ch == '=')) {
|
||||
return (-12);
|
||||
}
|
||||
|
||||
case 7: /* Valid, means three bytes of info */
|
||||
/*
|
||||
* We know this char is an =. Is there anything but
|
||||
* whitespace after it?
|
||||
*/
|
||||
for ((void)NULL; ch != '\0'; ch = *src++)
|
||||
if (!isspace((unsigned char)ch)) {
|
||||
return (-13);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now make sure for cases 2 and 3 that the "extra"
|
||||
* bits that slopped past the last full byte were
|
||||
* zeros. If we don't check them, they become a
|
||||
* subliminal channel.
|
||||
*/
|
||||
if (target && target[tarindex] != 0) {
|
||||
return (-14);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* We ended by seeing the end of the string. Make sure we
|
||||
* have no partial bytes lying around.
|
||||
*/
|
||||
if (state != 0)
|
||||
return (-15);
|
||||
}
|
||||
|
||||
return (tarindex);
|
||||
}
|
||||
|
||||
int
|
||||
ldns_b32_pton(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize)
|
||||
{
|
||||
return ldns_b32_pton_ar(src, hashed_owner_str_len, target, targsize, Base32);
|
||||
}
|
||||
|
||||
/* deprecated, here for backwards compatibility */
|
||||
int
|
||||
b32_pton(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize)
|
||||
{
|
||||
return ldns_b32_pton_ar(src, hashed_owner_str_len, target, targsize, Base32);
|
||||
}
|
||||
|
||||
int
|
||||
ldns_b32_pton_extended_hex(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize)
|
||||
{
|
||||
return ldns_b32_pton_ar(src, hashed_owner_str_len, target, targsize, Base32_extended_hex);
|
||||
}
|
||||
|
||||
/* deprecated, here for backwards compatibility */
|
||||
int
|
||||
b32_pton_extended_hex(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize)
|
||||
{
|
||||
return ldns_b32_pton_ar(src, hashed_owner_str_len, target, targsize, Base32_extended_hex);
|
||||
}
|
@ -40,27 +40,10 @@
|
||||
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
#include <ldns/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define Assert(Cond) if (!(Cond)) abort()
|
||||
|
||||
static const char Base64[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
static const char Pad64 = '=';
|
||||
@ -154,10 +137,10 @@ ldns_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsiz
|
||||
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
|
||||
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
|
||||
output[3] = input[2] & 0x3f;
|
||||
Assert(output[0] < 64);
|
||||
Assert(output[1] < 64);
|
||||
Assert(output[2] < 64);
|
||||
Assert(output[3] < 64);
|
||||
assert(output[0] < 64);
|
||||
assert(output[1] < 64);
|
||||
assert(output[2] < 64);
|
||||
assert(output[3] < 64);
|
||||
|
||||
if (datalength + 4 > targsize) {
|
||||
return (-1);
|
||||
@ -178,9 +161,9 @@ ldns_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsiz
|
||||
output[0] = input[0] >> 2;
|
||||
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
|
||||
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
|
||||
Assert(output[0] < 64);
|
||||
Assert(output[1] < 64);
|
||||
Assert(output[2] < 64);
|
||||
assert(output[0] < 64);
|
||||
assert(output[1] < 64);
|
||||
assert(output[2] < 64);
|
||||
|
||||
if (datalength + 4 > targsize) {
|
||||
return (-2);
|
||||
|
@ -40,27 +40,10 @@
|
||||
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
#include <ldns/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define Assert(Cond) if (!(Cond)) abort()
|
||||
|
||||
static const char Base64[] =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
static const char Pad64 = '=';
|
||||
|
1790
compat/snprintf.c
1790
compat/snprintf.c
File diff suppressed because it is too large
Load Diff
135
configure.ac
135
configure.ac
@ -6,20 +6,23 @@ sinclude(acx_nlnetlabs.m4)
|
||||
# must be numbers. ac_defun because of later processing.
|
||||
m4_define([VERSION_MAJOR],[1])
|
||||
m4_define([VERSION_MINOR],[6])
|
||||
m4_define([VERSION_MICRO],[16])
|
||||
m4_define([VERSION_MICRO],[17])
|
||||
AC_INIT(ldns, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), libdns@nlnetlabs.nl, libdns)
|
||||
AC_CONFIG_SRCDIR([packet.c])
|
||||
# needed to build correct soname
|
||||
AC_SUBST(LIBTOOL_VERSION_INFO, VERSION_MAJOR:VERSION_MINOR:VERSION_MICRO)
|
||||
AC_SUBST(LDNS_VERSION_MAJOR, [VERSION_MAJOR])
|
||||
AC_SUBST(LDNS_VERSION_MINOR, [VERSION_MINOR])
|
||||
AC_SUBST(LDNS_VERSION_MICRO, [VERSION_MICRO])
|
||||
AC_SUBST(VERSION_INFO, [VERSION_MAJOR:VERSION_MINOR:VERSION_MICRO])
|
||||
|
||||
AC_AIX
|
||||
LT_INIT
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
OURCPPFLAGS=''
|
||||
CPPFLAGS=${CPPFLAGS:-${OURCPPFLAGS}}
|
||||
CFLAGS="$CFLAGS"
|
||||
|
||||
AC_AIX
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
ACX_DEPFLAG
|
||||
@ -70,6 +73,7 @@ fi
|
||||
ACX_CHECK_COMPILER_FLAG(Wall, [CFLAGS="-Wall $CFLAGS"])
|
||||
ACX_CHECK_COMPILER_FLAG(W, [CFLAGS="-W $CFLAGS"])
|
||||
ACX_CHECK_COMPILER_FLAG(Wwrite-strings, [CFLAGS="-Wwrite-strings $CFLAGS"])
|
||||
ACX_CHECK_COMPILER_FLAG(Wstrict-prototypes, [CFLAGS="-Wstrict-prototypes $CFLAGS"])
|
||||
|
||||
|
||||
AC_CHECK_HEADERS([getopt.h time.h],,, [AC_INCLUDES_DEFAULT])
|
||||
@ -152,7 +156,7 @@ else
|
||||
fi
|
||||
|
||||
# add option to disable installation of ldns-config script
|
||||
AC_ARG_ENABLE(ldns-config, [ --disable-ldns-config disable installation of ldns-config (default=enabled)],
|
||||
AC_ARG_ENABLE(ldns-config, AC_HELP_STRING([--disable-ldns-config], [disable installation of ldns-config (default=enabled)]),
|
||||
enable_ldns_config=$enableval, enable_ldns_config=yes)
|
||||
if test "x$enable_ldns_config" = xyes; then
|
||||
AC_SUBST(INSTALL_CONFIG, [install-config])
|
||||
@ -166,6 +170,16 @@ else
|
||||
AC_SUBST(UNINSTALL_CONFIG_MANPAGE, [""])
|
||||
fi
|
||||
|
||||
# add option to disable library printing to stderr
|
||||
AC_ARG_ENABLE(stderr-msgs, AC_HELP_STRING([--enable-stderr-msgs], [Enable printing to stderr (default=disabled)]), enable_stderr_msgs=$enableval, enable_stderr_msgs=no)
|
||||
case "$enable_stderr_msgs" in
|
||||
no) dnl default
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE_UNQUOTED([STDERR_MSGS], [1], [Define this to enable messages to stderr.])
|
||||
;;
|
||||
esac
|
||||
|
||||
# check for python
|
||||
PYTHON_X_CFLAGS=""
|
||||
ldns_with_pyldns=no
|
||||
@ -255,6 +269,30 @@ else
|
||||
AC_SUBST(PYLDNSXUNINST, "")
|
||||
fi
|
||||
|
||||
# check for perl
|
||||
ldns_with_p5_dns_ldns=no
|
||||
AC_ARG_WITH(p5-dns-ldns, AC_HELP_STRING([--with-p5-dns-ldns],
|
||||
[generate DNS::LDNS perl bindings]),
|
||||
[],[ withval="no" ])
|
||||
ldns_have_perl=no
|
||||
if test x_$withval != x_no; then
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
if test -z "$PERL"; then
|
||||
AC_MSG_ERROR([Cannot find perl in your system path])
|
||||
fi
|
||||
AC_SUBST(P5_DNS_LDNS, "p5-dns-ldns")dnl
|
||||
AC_SUBST(TEST_P5_DNS_LDNS, "test-p5-dns-ldns")dnl
|
||||
AC_SUBST(INSTALL_P5_DNS_LDNS, "install-p5-dns-ldns")dnl
|
||||
AC_SUBST(UNINSTALL_P5_DNS_LDNS, "uninstall-p5-dns-ldns")dnl
|
||||
AC_SUBST(CLEAN_P5_DNS_LDNS, "clean-p5-dns-ldns")
|
||||
else
|
||||
AC_SUBST(P5_DNS_LDNS, "")dnl
|
||||
AC_SUBST(TEST_P5_DNS_LDNS, "")dnl
|
||||
AC_SUBST(INSTALL_P5_DNS_LDNS, "")dnl
|
||||
AC_SUBST(UNINSTALL_P5_DNS_LDNS, "")dnl
|
||||
AC_SUBST(CLEAN_P5_DNS_LDNS, "")
|
||||
fi
|
||||
|
||||
# Use libtool
|
||||
ACX_LIBTOOL_C_ONLY
|
||||
|
||||
@ -320,11 +358,67 @@ case "$enable_ecdsa" in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(dane, AC_HELP_STRING([--disable-dane], [Disable DANE support]))
|
||||
case "$enable_dane" in
|
||||
no)
|
||||
AC_SUBST(ldns_build_config_use_dane, 0)
|
||||
;;
|
||||
*) dnl default
|
||||
if test "x$HAVE_SSL" != "xyes"; then
|
||||
AC_MSG_ERROR([DANE enabled, but no SSL support])
|
||||
fi
|
||||
AC_CHECK_FUNC(X509_check_ca, [], [AC_MSG_ERROR([OpenSSL does not support DANE: please upgrade OpenSSL or rerun with --disable-dane])])
|
||||
AC_DEFINE_UNQUOTED([USE_DANE], [1], [Define this to enable DANE support.])
|
||||
AC_SUBST(ldns_build_config_use_dane, 1)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(rrtype-ninfo, AC_HELP_STRING([--enable-rrtype-ninfo], [Enable draft RR type ninfo.]))
|
||||
case "$enable_rrtype_ninfo" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([RRTYPE_NINFO], [], [Define this to enable RR type NINFO.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(rrtype-rkey, AC_HELP_STRING([--enable-rrtype-rkey], [Enable draft RR type rkey.]))
|
||||
case "$enable_rrtype_rkey" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([RRTYPE_RKEY], [], [Define this to enable RR type RKEY.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(rrtype-cds, AC_HELP_STRING([--enable-rrtype-cds], [Enable draft RR type cds.]))
|
||||
case "$enable_rrtype_cds" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([RRTYPE_CDS], [], [Define this to enable RR type CDS.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(rrtype-uri, AC_HELP_STRING([--enable-rrtype-uri], [Enable draft RR type uri.]))
|
||||
case "$enable_rrtype_uri" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([RRTYPE_URI], [], [Define this to enable RR type URI.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
AC_ARG_ENABLE(rrtype-ta, AC_HELP_STRING([--enable-rrtype-ta], [Enable draft RR type ta.]))
|
||||
case "$enable_rrtype_ta" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED([RRTYPE_TA], [], [Define this to enable RR type TA.])
|
||||
;;
|
||||
no|*)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(LIBSSL_CPPFLAGS)
|
||||
AC_SUBST(LIBSSL_LDFLAGS)
|
||||
AC_SUBST(LIBSSL_LIBS)
|
||||
if test "x$HAVE_SSL" = "xyes"; then
|
||||
AC_SUBST(LIBSSL_SSL_LIBS, ["$LIBSSL_LIBS -lssl"])
|
||||
AC_SUBST(LIBSSL_SSL_LIBS, ["-lssl $LIBSSL_LIBS"])
|
||||
fi
|
||||
CPPFLAGS=$tmp_CPPFLAGS
|
||||
LDFLAGS=$tmp_LDFLAGS
|
||||
@ -426,7 +520,7 @@ AC_INCLUDES_DEFAULT
|
||||
])
|
||||
|
||||
if test x_$with_examples != x_no; then
|
||||
AC_CHECK_HEADERS([pcap.h],, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_HEADERS([pcap.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_LIB(pcap, pcap_open_offline, [
|
||||
AC_DEFINE([HAVE_LIBPCAP], [1], [Define to 1 if you have the `pcap' library (-lpcap).])dnl`
|
||||
AC_SUBST([LIBPCAP_LIBS], [-lpcap])
|
||||
@ -458,8 +552,9 @@ else
|
||||
AC_SUBST(ldns_build_config_have_socklen_t, 0)
|
||||
fi
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SSIZE_T
|
||||
AC_TYPE_INTPTR_T
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
dnl AC_TYPE_INTPTR_T does not work on all platforms (autoconf)
|
||||
AC_CHECK_TYPE(intptr_t, size_t)
|
||||
AC_CHECK_TYPE(in_addr_t, [], [AC_DEFINE([in_addr_t], [uint32_t], [in_addr_t])], [
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
@ -481,8 +576,6 @@ AC_FUNC_REALLOC
|
||||
|
||||
AC_REPLACE_FUNCS(b64_pton)
|
||||
AC_REPLACE_FUNCS(b64_ntop)
|
||||
AC_REPLACE_FUNCS(b32_pton)
|
||||
AC_REPLACE_FUNCS(b32_ntop)
|
||||
AC_REPLACE_FUNCS(calloc)
|
||||
AC_REPLACE_FUNCS(timegm)
|
||||
AC_REPLACE_FUNCS(gmtime_r)
|
||||
@ -497,7 +590,17 @@ AC_REPLACE_FUNCS(snprintf)
|
||||
AC_REPLACE_FUNCS(strlcpy)
|
||||
AC_REPLACE_FUNCS(memmove)
|
||||
AC_FUNC_FORK
|
||||
AC_CHECK_FUNCS([endprotoent endservent sleep random fcntl strtoul bzero memset])
|
||||
AC_CHECK_FUNCS([endprotoent endservent sleep random fcntl strtoul bzero memset b32_ntop b32_pton])
|
||||
if test "x$HAVE_B32_NTOP" = "xyes"; then
|
||||
AC_SUBST(ldns_build_config_have_b32_ntop, 1)
|
||||
else
|
||||
AC_SUBST(ldns_build_config_have_b32_ntop, 0)
|
||||
fi
|
||||
if test "x$HAVE_B32_PTON" = "xyes"; then
|
||||
AC_SUBST(ldns_build_config_have_b32_pton, 1)
|
||||
else
|
||||
AC_SUBST(ldns_build_config_have_b32_pton, 0)
|
||||
fi
|
||||
|
||||
ACX_CHECK_GETADDRINFO_WITH_INCLUDES
|
||||
if test $ac_cv_func_getaddrinfo = no; then
|
||||
@ -618,7 +721,6 @@ AH_BOTTOM([
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef B64_PTON
|
||||
int ldns_b64_ntop(uint8_t const *src, size_t srclength,
|
||||
char *target, size_t targsize);
|
||||
/**
|
||||
@ -629,8 +731,6 @@ static inline size_t ldns_b64_ntop_calculate_size(size_t srcsize)
|
||||
{
|
||||
return ((((srcsize + 2) / 3) * 4) + 1);
|
||||
}
|
||||
#endif /* !B64_PTON */
|
||||
#ifndef B64_NTOP
|
||||
int ldns_b64_pton(char const *src, uint8_t *target, size_t targsize);
|
||||
/**
|
||||
* calculates the size needed to store the result of ldns_b64_pton
|
||||
@ -640,7 +740,12 @@ static inline size_t ldns_b64_pton_calculate_size(size_t srcsize)
|
||||
{
|
||||
return (((((srcsize + 3) / 4) * 3)) + 1);
|
||||
}
|
||||
#endif /* !B64_NTOP */
|
||||
|
||||
/**
|
||||
* Given in dnssec_zone.c, also used in dnssec_sign.c:w
|
||||
|
||||
*/
|
||||
int ldns_dname_compare_v(const void *a, const void *b);
|
||||
|
||||
#ifndef HAVE_SLEEP
|
||||
/* use windows sleep, in millisecs, instead */
|
||||
|
23
contrib/DNS-LDNS/Changes
Normal file
23
contrib/DNS-LDNS/Changes
Normal file
@ -0,0 +1,23 @@
|
||||
Revision history for Perl extension DNS::LDNS.
|
||||
|
||||
0.01 Thu Nov 22 12:48:29 2012
|
||||
- original version; created by h2xs 1.23 with options
|
||||
-A -n LDNS
|
||||
|
||||
0.02 Fri Jan 18 09:47:57 2013
|
||||
- Support for DNSSec and Resolver. Added some more constants from
|
||||
the header files; created by h2xs 1.23 with options
|
||||
-n LDNS /usr/include/ldns/ldns.h /usr/include/ldns/error.h /usr/include/ldns/rr.h /usr/include/ldns/keys.h /usr/include/ldns/packet.h /usr/include/ldns/resolver.h /usr/include/ldns/rdata.h /usr/include/ldns/dnssec.h
|
||||
|
||||
0.03 Fri Apr 19 13:40:57 2013
|
||||
- Renamed module to Net::LDNS
|
||||
|
||||
0.04 Fri Dec 13 14:15:26 2013
|
||||
- Renamed module to DNS::LDNS
|
||||
|
||||
0.05 Mon Dec 30 10:14:00 2013
|
||||
- Corrected versioning variable in all classes.
|
||||
- Cleaned up the base class documentation.
|
||||
|
||||
0.06 Tue Dec 31 12:17:00 2013
|
||||
- Corrected pod syntax
|
3363
contrib/DNS-LDNS/LDNS.xs
Normal file
3363
contrib/DNS-LDNS/LDNS.xs
Normal file
File diff suppressed because it is too large
Load Diff
41
contrib/DNS-LDNS/MANIFEST
Normal file
41
contrib/DNS-LDNS/MANIFEST
Normal file
@ -0,0 +1,41 @@
|
||||
Changes
|
||||
const-c.inc
|
||||
const-xs.inc
|
||||
fallback/const-c.inc
|
||||
fallback/const-xs.inc
|
||||
LDNS.xs
|
||||
lib/DNS/LDNS.pm
|
||||
lib/DNS/LDNS/DNSSecDataChain.pm
|
||||
lib/DNS/LDNS/DNSSecName.pm
|
||||
lib/DNS/LDNS/DNSSecRRs.pm
|
||||
lib/DNS/LDNS/DNSSecRRSets.pm
|
||||
lib/DNS/LDNS/DNSSecTrustTree.pm
|
||||
lib/DNS/LDNS/DNSSecZone.pm
|
||||
lib/DNS/LDNS/GC.pm
|
||||
lib/DNS/LDNS/Key.pm
|
||||
lib/DNS/LDNS/KeyList.pm
|
||||
lib/DNS/LDNS/Packet.pm
|
||||
lib/DNS/LDNS/RBNode.pm
|
||||
lib/DNS/LDNS/RBTree.pm
|
||||
lib/DNS/LDNS/RData.pm
|
||||
lib/DNS/LDNS/Resolver.pm
|
||||
lib/DNS/LDNS/RR.pm
|
||||
lib/DNS/LDNS/RRList.pm
|
||||
lib/DNS/LDNS/Zone.pm
|
||||
Makefile.PL
|
||||
MANIFEST
|
||||
ppport.h
|
||||
README
|
||||
t/dnssec_datachain.t
|
||||
t/dnssec_zone.t
|
||||
t/key.t
|
||||
t/DNS-LDNS.t
|
||||
t/rdata.t
|
||||
t/resolver.t
|
||||
t/rr.t
|
||||
t/rrlist.t
|
||||
t/testdata/key.private
|
||||
t/testdata/myzone.org
|
||||
t/testdata/resolv.conf
|
||||
t/zone.t
|
||||
typemap
|
306
contrib/DNS-LDNS/Makefile.PL
Executable file
306
contrib/DNS-LDNS/Makefile.PL
Executable file
@ -0,0 +1,306 @@
|
||||
use 5.014002;
|
||||
use ExtUtils::MakeMaker;
|
||||
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
|
||||
# the contents of the Makefile that is written.
|
||||
WriteMakefile(
|
||||
NAME => 'DNS::LDNS',
|
||||
VERSION_FROM => 'lib/DNS/LDNS.pm', # finds $VERSION
|
||||
PREREQ_PM => {}, # e.g., Module::Name => 1.1
|
||||
($] >= 5.005 ? ## Add these new keywords supported since 5.005
|
||||
(ABSTRACT_FROM => 'lib/DNS/LDNS.pm', # retrieve abstract from module
|
||||
AUTHOR => 'Erik Pihl Ostlyngen <erik.ostlyngen@uninett.no>') : ()),
|
||||
LIBS => ['-lldns'],
|
||||
DEFINE => '',
|
||||
INC => '-I.',
|
||||
# Un-comment this if you add C files to link with later:
|
||||
# OBJECT => '$(O_FILES)', # link all the C files too
|
||||
);
|
||||
if (eval {require ExtUtils::Constant; 1}) {
|
||||
# If you edit these definitions to change the constants used by this module,
|
||||
# you will need to use the generated const-c.inc and const-xs.inc
|
||||
# files to replace their "fallback" counterparts before distributing your
|
||||
# changes.
|
||||
my @names = (qw(LDNS_AA LDNS_AD LDNS_CD LDNS_DEFAULT_EXP_TIME
|
||||
LDNS_DEFAULT_TTL LDNS_DNSSEC_KEYPROTO LDNS_IP4ADDRLEN
|
||||
LDNS_IP6ADDRLEN LDNS_KEY_REVOKE_KEY LDNS_KEY_SEP_KEY
|
||||
LDNS_KEY_ZONE_KEY LDNS_MAX_DOMAINLEN LDNS_MAX_KEYLEN
|
||||
LDNS_MAX_LABELLEN LDNS_MAX_PACKETLEN LDNS_MAX_POINTERS
|
||||
LDNS_MAX_RDFLEN LDNS_NSEC3_MAX_ITERATIONS
|
||||
LDNS_NSEC3_VARS_OPTOUT_MASK LDNS_PORT LDNS_QR LDNS_RA LDNS_RD
|
||||
LDNS_RDATA_FIELD_DESCRIPTORS_COMMON LDNS_RDF_SIZE_16BYTES
|
||||
LDNS_RDF_SIZE_6BYTES LDNS_RDF_SIZE_BYTE
|
||||
LDNS_RDF_SIZE_DOUBLEWORD LDNS_RDF_SIZE_WORD LDNS_RESOLV_ANCHOR
|
||||
LDNS_RESOLV_DEFDOMAIN LDNS_RESOLV_INET LDNS_RESOLV_INET6
|
||||
LDNS_RESOLV_INETANY LDNS_RESOLV_KEYWORD LDNS_RESOLV_KEYWORDS
|
||||
LDNS_RESOLV_NAMESERVER LDNS_RESOLV_OPTIONS LDNS_RESOLV_RTT_INF
|
||||
LDNS_RESOLV_RTT_MIN LDNS_RESOLV_SEARCH LDNS_RESOLV_SORTLIST
|
||||
LDNS_RR_OVERHEAD LDNS_SIGNATURE_LEAVE_ADD_NEW
|
||||
LDNS_SIGNATURE_LEAVE_NO_ADD LDNS_SIGNATURE_REMOVE_ADD_NEW
|
||||
LDNS_SIGNATURE_REMOVE_NO_ADD LDNS_TC),
|
||||
{name=>"LDNS_CERT_ACPKIX", macro=>"1"},
|
||||
{name=>"LDNS_CERT_IACPKIX", macro=>"1"},
|
||||
{name=>"LDNS_CERT_IPGP", macro=>"1"},
|
||||
{name=>"LDNS_CERT_IPKIX", macro=>"1"},
|
||||
{name=>"LDNS_CERT_ISPKI", macro=>"1"},
|
||||
{name=>"LDNS_CERT_OID", macro=>"1"},
|
||||
{name=>"LDNS_CERT_PGP", macro=>"1"},
|
||||
{name=>"LDNS_CERT_PKIX", macro=>"1"},
|
||||
{name=>"LDNS_CERT_SPKI", macro=>"1"},
|
||||
{name=>"LDNS_CERT_URI", macro=>"1"},
|
||||
{name=>"LDNS_DH", macro=>"1"},
|
||||
{name=>"LDNS_DSA", macro=>"1"},
|
||||
{name=>"LDNS_DSA_NSEC3", macro=>"1"},
|
||||
{name=>"LDNS_ECC", macro=>"1"},
|
||||
{name=>"LDNS_ECC_GOST", macro=>"1"},
|
||||
{name=>"LDNS_HASH_GOST", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_ANSWER", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_IQUERY", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_NODATA", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_NOTIFY", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_NXDOMAIN", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_QUERY", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_QUESTION", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_REFERRAL", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_STATUS", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_UNKNOWN", macro=>"1"},
|
||||
{name=>"LDNS_PACKET_UPDATE", macro=>"1"},
|
||||
{name=>"LDNS_PRIVATEDNS", macro=>"1"},
|
||||
{name=>"LDNS_PRIVATEOID", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_FORMERR", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_NOERROR", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_NOTAUTH", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_NOTIMPL", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_NOTZONE", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_NXDOMAIN", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_NXRRSET", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_REFUSED", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_SERVFAIL", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_YXDOMAIN", macro=>"1"},
|
||||
{name=>"LDNS_RCODE_YXRRSET", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_A", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_AAAA", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_ALG", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_APL", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_ATMA", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_B32_EXT", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_B64", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_CERT_ALG", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_CLASS", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_DNAME", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_HEX", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_INT16", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_INT16_DATA", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_INT32", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_INT8", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_IPSECKEY", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_LOC", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_NONE", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_NSAP", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_NSEC", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_NSEC3_NEXT_OWNER", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_NSEC3_SALT", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_PERIOD", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_SERVICE", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_STR", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_TIME", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_HIP", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_TSIGTIME", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_TYPE", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_UNKNOWN", macro=>"1"},
|
||||
{name=>"LDNS_RDF_TYPE_WKS", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_ANY", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_CH", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_COUNT", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_FIRST", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_HS", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_IN", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_LAST", macro=>"1"},
|
||||
{name=>"LDNS_RR_CLASS_NONE", macro=>"1"},
|
||||
{name=>"LDNS_RR_COMPRESS", macro=>"1"},
|
||||
{name=>"LDNS_RR_NO_COMPRESS", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_A", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_A6", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_AAAA", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_AFSDB", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_ANY", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_APL", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_ATMA", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_AXFR", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_CERT", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_CNAME", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_COUNT", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_DHCID", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_DLV", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_DNAME", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_DNSKEY", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_DS", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_EID", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_FIRST", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_GID", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_GPOS", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_HINFO", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_IPSECKEY", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_ISDN", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_IXFR", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_KEY", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_KX", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_LAST", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_LOC", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MAILA", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MAILB", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MB", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MD", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MF", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MG", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MINFO", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MR", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_MX", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NAPTR", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NIMLOC", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NS", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NSAP", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NSAP_PTR", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NSEC", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NSEC3", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NSEC3PARAM", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NSEC3PARAMS", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NULL", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_NXT", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_OPT", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_PTR", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_PX", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_RP", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_RRSIG", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_RT", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_SIG", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_SINK", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_SOA", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_SPF", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_SRV", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_SSHFP", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_TALINK", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_TSIG", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_TXT", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_UID", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_UINFO", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_UNSPEC", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_WKS", macro=>"1"},
|
||||
{name=>"LDNS_RR_TYPE_X25", macro=>"1"},
|
||||
{name=>"LDNS_RSAMD5", macro=>"1"},
|
||||
{name=>"LDNS_RSASHA1", macro=>"1"},
|
||||
{name=>"LDNS_RSASHA1_NSEC3", macro=>"1"},
|
||||
{name=>"LDNS_RSASHA256", macro=>"1"},
|
||||
{name=>"LDNS_RSASHA512", macro=>"1"},
|
||||
{name=>"LDNS_SECTION_ADDITIONAL", macro=>"1"},
|
||||
{name=>"LDNS_SECTION_ANSWER", macro=>"1"},
|
||||
{name=>"LDNS_SECTION_ANY", macro=>"1"},
|
||||
{name=>"LDNS_SECTION_ANY_NOQUESTION", macro=>"1"},
|
||||
{name=>"LDNS_SECTION_AUTHORITY", macro=>"1"},
|
||||
{name=>"LDNS_SECTION_QUESTION", macro=>"1"},
|
||||
{name=>"LDNS_SHA1", macro=>"1"},
|
||||
{name=>"LDNS_SHA256", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_DSA", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_DSA_NSEC3", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_ECC_GOST", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_HMACSHA1", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_HMACSHA256", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_RSAMD5", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_RSASHA1", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_RSASHA1_NSEC3", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_RSASHA256", macro=>"1"},
|
||||
{name=>"LDNS_SIGN_RSASHA512", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_ADDRESS_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CERT_BAD_ALGORITHM", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_ALGO_NOT_IMPL", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_BOGUS", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_EXPIRATION_BEFORE_INCEPTION", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_NO_DNSKEY", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_NO_DS", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_NO_MATCHING_KEYTAG_DNSKEY", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_NO_RRSIG", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_NO_TRUSTED_DNSKEY", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_NO_TRUSTED_DS", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_SIG_EXPIRED", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_SIG_NOT_INCEPTED", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_TSIG_BOGUS", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_TSIG_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_TYPE_COVERED_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_UNKNOWN_ALGO", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_CRYPTO_VALIDATED", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_DDD_OVERFLOW", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_DNSSEC_EXISTENCE_DENIED", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_DNSSEC_NSEC_RR_NOT_COVERED", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_DNSSEC_NSEC_WILDCARD_NOT_COVERED", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_DOMAINNAME_OVERFLOW", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_DOMAINNAME_UNDERFLOW", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_EMPTY_LABEL", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_ENGINE_KEY_NOT_LOADED", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_FILE_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INTERNAL_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_B32_EXT", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_B64", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_HEX", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_INT", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_IP4", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_IP6", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_POINTER", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_STR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_INVALID_TIME", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_LABEL_OVERFLOW", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_MEM_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_MISSING_RDATA_FIELDS_KEY", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_MISSING_RDATA_FIELDS_RRSIG", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_NETWORK_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_NOT_IMPL", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_NO_DATA", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_NSEC3_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_NULL", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_OK", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_PACKET_OVERFLOW", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_RES_NO_NS", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_RES_QUERY", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SOCKET_ERROR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SSL_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_ALG_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_BAD_ESCAPE", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_CLASS_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_DNAME_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_EMPTY", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_INCLUDE", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_INCLUDE_ERR_NOTIMPL", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_INTEGER_OVERFLOW", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_ITERATIONS_OVERFLOW", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_KEYWORD_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_ORIGIN", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_RDATA_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_TTL", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_TTL_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_TYPE_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_SYNTAX_VERSION_ERR", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_UNKNOWN_INET", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_WIRE_INCOMPLETE_ADDITIONAL", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_WIRE_INCOMPLETE_ANSWER", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_WIRE_INCOMPLETE_AUTHORITY", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_WIRE_INCOMPLETE_HEADER", macro=>"1"},
|
||||
{name=>"LDNS_STATUS_WIRE_INCOMPLETE_QUESTION", macro=>"1"});
|
||||
ExtUtils::Constant::WriteConstants(
|
||||
NAME => 'LDNS',
|
||||
NAMES => \@names,
|
||||
DEFAULT_TYPE => 'IV',
|
||||
C_FILE => 'const-c.inc',
|
||||
XS_FILE => 'const-xs.inc',
|
||||
);
|
||||
|
||||
}
|
||||
else {
|
||||
use File::Copy;
|
||||
use File::Spec;
|
||||
foreach my $file ('const-c.inc', 'const-xs.inc') {
|
||||
my $fallback = File::Spec->catfile('fallback', $file);
|
||||
copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
|
||||
}
|
||||
}
|
36
contrib/DNS-LDNS/README
Normal file
36
contrib/DNS-LDNS/README
Normal file
@ -0,0 +1,36 @@
|
||||
DNS::LDNS version 0.06
|
||||
======================
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
DNS::LDNS is a perl OO-wrapper for the ldns library. For a detailed
|
||||
description on how this library works, you are advised to read the ldns
|
||||
documentation. For a functional description of the wrapper classes,
|
||||
please read the perldoc for DNS::LDNS and subclasses.
|
||||
|
||||
INSTALLATION
|
||||
|
||||
To install this module type the following:
|
||||
|
||||
perl Makefile.PL
|
||||
make
|
||||
make test
|
||||
make install
|
||||
|
||||
DEPENDENCIES
|
||||
|
||||
This module requires these other modules and libraries:
|
||||
|
||||
ldns
|
||||
|
||||
AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, erik.ostlyngen@uninett.no
|
||||
|
||||
COPYRIGHT AND LICENCE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.8.8 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
2852
contrib/DNS-LDNS/const-c.inc
Normal file
2852
contrib/DNS-LDNS/const-c.inc
Normal file
File diff suppressed because it is too large
Load Diff
90
contrib/DNS-LDNS/const-xs.inc
Normal file
90
contrib/DNS-LDNS/const-xs.inc
Normal file
@ -0,0 +1,90 @@
|
||||
void
|
||||
constant(sv)
|
||||
PREINIT:
|
||||
#ifdef dXSTARG
|
||||
dXSTARG; /* Faster if we have it. */
|
||||
#else
|
||||
dTARGET;
|
||||
#endif
|
||||
STRLEN len;
|
||||
int type;
|
||||
IV iv;
|
||||
/* NV nv; Uncomment this if you need to return NVs */
|
||||
/* const char *pv; Uncomment this if you need to return PVs */
|
||||
INPUT:
|
||||
SV * sv;
|
||||
const char * s = SvPV(sv, len);
|
||||
PPCODE:
|
||||
/* Change this to constant(aTHX_ s, len, &iv, &nv);
|
||||
if you need to return both NVs and IVs */
|
||||
type = constant(aTHX_ s, len, &iv);
|
||||
/* Return 1 or 2 items. First is error message, or undef if no error.
|
||||
Second, if present, is found value */
|
||||
switch (type) {
|
||||
case PERL_constant_NOTFOUND:
|
||||
sv =
|
||||
sv_2mortal(newSVpvf("%s is not a valid LDNS macro", s));
|
||||
PUSHs(sv);
|
||||
break;
|
||||
case PERL_constant_NOTDEF:
|
||||
sv = sv_2mortal(newSVpvf(
|
||||
"Your vendor has not defined LDNS macro %s, used",
|
||||
s));
|
||||
PUSHs(sv);
|
||||
break;
|
||||
case PERL_constant_ISIV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHi(iv);
|
||||
break;
|
||||
/* Uncomment this if you need to return NOs
|
||||
case PERL_constant_ISNO:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHs(&PL_sv_no);
|
||||
break; */
|
||||
/* Uncomment this if you need to return NVs
|
||||
case PERL_constant_ISNV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHn(nv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return PVs
|
||||
case PERL_constant_ISPV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHp(pv, strlen(pv));
|
||||
break; */
|
||||
/* Uncomment this if you need to return PVNs
|
||||
case PERL_constant_ISPVN:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHp(pv, iv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return SVs
|
||||
case PERL_constant_ISSV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHs(sv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return UNDEFs
|
||||
case PERL_constant_ISUNDEF:
|
||||
break; */
|
||||
/* Uncomment this if you need to return UVs
|
||||
case PERL_constant_ISUV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHu((UV)iv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return YESs
|
||||
case PERL_constant_ISYES:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHs(&PL_sv_yes);
|
||||
break; */
|
||||
default:
|
||||
sv = sv_2mortal(newSVpvf(
|
||||
"Unexpected return type %d while processing LDNS macro %s, used",
|
||||
type, s));
|
||||
PUSHs(sv);
|
||||
}
|
2798
contrib/DNS-LDNS/fallback/const-c.inc
Normal file
2798
contrib/DNS-LDNS/fallback/const-c.inc
Normal file
File diff suppressed because it is too large
Load Diff
90
contrib/DNS-LDNS/fallback/const-xs.inc
Normal file
90
contrib/DNS-LDNS/fallback/const-xs.inc
Normal file
@ -0,0 +1,90 @@
|
||||
void
|
||||
constant(sv)
|
||||
PREINIT:
|
||||
#ifdef dXSTARG
|
||||
dXSTARG; /* Faster if we have it. */
|
||||
#else
|
||||
dTARGET;
|
||||
#endif
|
||||
STRLEN len;
|
||||
int type;
|
||||
IV iv;
|
||||
/* NV nv; Uncomment this if you need to return NVs */
|
||||
/* const char *pv; Uncomment this if you need to return PVs */
|
||||
INPUT:
|
||||
SV * sv;
|
||||
const char * s = SvPV(sv, len);
|
||||
PPCODE:
|
||||
/* Change this to constant(aTHX_ s, len, &iv, &nv);
|
||||
if you need to return both NVs and IVs */
|
||||
type = constant(aTHX_ s, len, &iv);
|
||||
/* Return 1 or 2 items. First is error message, or undef if no error.
|
||||
Second, if present, is found value */
|
||||
switch (type) {
|
||||
case PERL_constant_NOTFOUND:
|
||||
sv =
|
||||
sv_2mortal(newSVpvf("%s is not a valid LDNS macro", s));
|
||||
PUSHs(sv);
|
||||
break;
|
||||
case PERL_constant_NOTDEF:
|
||||
sv = sv_2mortal(newSVpvf(
|
||||
"Your vendor has not defined LDNS macro %s, used",
|
||||
s));
|
||||
PUSHs(sv);
|
||||
break;
|
||||
case PERL_constant_ISIV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHi(iv);
|
||||
break;
|
||||
/* Uncomment this if you need to return NOs
|
||||
case PERL_constant_ISNO:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHs(&PL_sv_no);
|
||||
break; */
|
||||
/* Uncomment this if you need to return NVs
|
||||
case PERL_constant_ISNV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHn(nv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return PVs
|
||||
case PERL_constant_ISPV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHp(pv, strlen(pv));
|
||||
break; */
|
||||
/* Uncomment this if you need to return PVNs
|
||||
case PERL_constant_ISPVN:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHp(pv, iv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return SVs
|
||||
case PERL_constant_ISSV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHs(sv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return UNDEFs
|
||||
case PERL_constant_ISUNDEF:
|
||||
break; */
|
||||
/* Uncomment this if you need to return UVs
|
||||
case PERL_constant_ISUV:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHu((UV)iv);
|
||||
break; */
|
||||
/* Uncomment this if you need to return YESs
|
||||
case PERL_constant_ISYES:
|
||||
EXTEND(SP, 1);
|
||||
PUSHs(&PL_sv_undef);
|
||||
PUSHs(&PL_sv_yes);
|
||||
break; */
|
||||
default:
|
||||
sv = sv_2mortal(newSVpvf(
|
||||
"Unexpected return type %d while processing LDNS macro %s, used",
|
||||
type, s));
|
||||
PUSHs(sv);
|
||||
}
|
1310
contrib/DNS-LDNS/lib/DNS/LDNS.pm
Normal file
1310
contrib/DNS-LDNS/lib/DNS/LDNS.pm
Normal file
File diff suppressed because it is too large
Load Diff
87
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm
Normal file
87
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm
Normal file
@ -0,0 +1,87 @@
|
||||
package DNS::LDNS::DNSSecDataChain;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub rrset {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrset, $self);
|
||||
}
|
||||
|
||||
sub signatures {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_signatures, $self);
|
||||
}
|
||||
|
||||
sub parent {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_parent, $self);
|
||||
}
|
||||
|
||||
sub derive_trust_tree {
|
||||
my ($self, $rr) = @_;
|
||||
|
||||
if (!DNS::LDNS::GC::is_owned($rr) or DNS::LDNS::GC::owner($rr) ne $self) {
|
||||
die "The rr ($rr) must be in the data chain ($self)";
|
||||
}
|
||||
return DNS::LDNS::GC::own($self->_derive_trust_tree($rr), $self);
|
||||
}
|
||||
|
||||
sub derive_trust_tree_time {
|
||||
my ($self, $rr, $checktime) = @_;
|
||||
|
||||
if (!DNS::LDNS::GC::is_owned($rr) or DNS::LDNS::GC::owner($rr) ne $self) {
|
||||
die "The rr ($rr) must be in the data chain ($self)";
|
||||
}
|
||||
return DNS::LDNS::GC::own(
|
||||
$self->_derive_trust_tree_time($rr, $checktime), $self);
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::DNSSecDataChain - DNSSec data chain element
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
chain = new DNS::LDNS::DNSSecDataChain
|
||||
chain->print(fp)
|
||||
chain->derive_trust_tree(rr)
|
||||
chain->derive_trust_tree_time(rr, checktime)
|
||||
|
||||
# Node attributes
|
||||
rrset = chain->rrset
|
||||
rrset = chain->signatures
|
||||
rrtype = chain->parent_type
|
||||
pchain = chain->parent
|
||||
rcode = chain->packet_rcode
|
||||
rrtype = chain->packet_qtype
|
||||
bool = chain->packet_nodata
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
110
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm
Normal file
110
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm
Normal file
@ -0,0 +1,110 @@
|
||||
package DNS::LDNS::DNSSecName;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
return _new;
|
||||
}
|
||||
|
||||
sub name {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_name, $self);
|
||||
}
|
||||
|
||||
sub set_name {
|
||||
my ($self, $name) = @_;
|
||||
|
||||
DNS::LDNS::GC::disown(my $old = $self->name);
|
||||
_set_name($self, my $copy = $name->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub rrsets {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsets, $self);
|
||||
}
|
||||
|
||||
sub add_rr {
|
||||
my ($self, $rr) = @_;
|
||||
|
||||
my $s = _add_rr($self, my $copy = $rr->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub nsec {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_nsec, $self);
|
||||
}
|
||||
|
||||
sub set_nsec {
|
||||
my ($self, $nsec) = @_;
|
||||
|
||||
DNS::LDNS::GC::disown(my $old = $self->nsec);
|
||||
_set_nsec($self, my $copy = $nsec->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub hashed_name {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_hashed_name, $self);
|
||||
}
|
||||
|
||||
sub nsec_signatures {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_nsec_signatures, $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::DNSSecName - Dname with rrsets in a dnssec zone
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use LDNS ':all'
|
||||
|
||||
my name = new DNS::LDNS::DNSSecName
|
||||
|
||||
rdata = name->name
|
||||
name->set_name(rdata)
|
||||
bool = name->is_glue
|
||||
rrsets = name->rrsets
|
||||
name->add_rr(rr)
|
||||
|
||||
rr = name->nsec
|
||||
name->set_nsec(rr)
|
||||
hash = name->hashed_name
|
||||
rrs = name->nsec_signatures
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
85
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm
Normal file
85
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm
Normal file
@ -0,0 +1,85 @@
|
||||
package DNS::LDNS::DNSSecRRSets;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
# Note: Since this class does not have a constructor, we can let its child
|
||||
# objects be owned by the parent. This reduces the recursion depth on
|
||||
# DESTROY.
|
||||
|
||||
sub rrs {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrs, DNS::LDNS::GC::owner($self));
|
||||
}
|
||||
|
||||
sub signatures {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_signatures, DNS::LDNS::GC::owner($self));
|
||||
}
|
||||
|
||||
sub next {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_next, DNS::LDNS::GC::owner($self));
|
||||
}
|
||||
|
||||
sub set_type {
|
||||
my ($self, $type) = @_;
|
||||
my $s = _set_type($self, $type);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub add_rr {
|
||||
my ($self, $rr) = @_;
|
||||
|
||||
my $s = _add_rr($self, my $copy = $rr->clone);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::DNSSecRRSets - Linked list of rrsets in a dnssec zone
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
rrs = rrsets->rrs
|
||||
rrs = rrsets->signatures
|
||||
rrsets2 = rrsets->next
|
||||
rrsets->add_rr(rr)
|
||||
bool = rrsets->contains_type(rr_type)
|
||||
rr_type = rrsets->type
|
||||
rrsets->set_type(rr_type)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
82
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm
Normal file
82
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm
Normal file
@ -0,0 +1,82 @@
|
||||
package DNS::LDNS::DNSSecRRs;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
# Note: This class does not have a constructor. Thus, it can not be created
|
||||
# as an individual object. The data structure of the node is owned
|
||||
# and freed by the owner of the parent rather than the parent node. This
|
||||
# is to prevent deep recursion on DESTROY.
|
||||
|
||||
sub to_string {
|
||||
my $self = shift;
|
||||
my $ret = '';
|
||||
while ($self and $self->rr) {
|
||||
$ret .= $self->rr->to_string;
|
||||
$self = $self->next;
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
sub add_rr {
|
||||
my ($self, $rr) = @_;
|
||||
|
||||
my $s = _add_rr($self, my $copy = $rr->clone);
|
||||
DNS::LDNS::GC::own($self, $copy);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub rr {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rr, DNS::LDNS::GC::owner($self));
|
||||
}
|
||||
|
||||
sub next {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_next, DNS::LDNS::GC::owner($self));
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::DNSSecRRs - Linked list of rrs in a dnssec zone
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
rrs->to_string
|
||||
rrs->add_rr(rr)
|
||||
rr = rrs->rr
|
||||
rrs2 = rrs->next
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
99
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm
Normal file
99
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm
Normal file
@ -0,0 +1,99 @@
|
||||
package DNS::LDNS::DNSSecTrustTree;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub add_parent {
|
||||
my ($self, $parent, $sig, $parent_status) = @_;
|
||||
|
||||
if (DNS::LDNS::GC::is_owned($parent)) {
|
||||
die "Cannot add to multiple trees.";
|
||||
}
|
||||
my $s = _add_parent($self, $parent, $sig, $parent_status);
|
||||
DNS::LDNS::GC::own($parent, $self);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub contains_keys {
|
||||
my ($self, $trusted_keys) = @_;
|
||||
|
||||
my $s = _contains_keys($self, $trusted_keys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub rr {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rr, $self);
|
||||
}
|
||||
|
||||
sub rrset {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrset, $self);
|
||||
}
|
||||
|
||||
sub parent {
|
||||
my ($self, $i) = @_;
|
||||
return DNS::LDNS::GC::own($self->_parent($i), $self);
|
||||
}
|
||||
|
||||
sub parent_status {
|
||||
my ($self, $i) = @_;
|
||||
my $s = _parent_status($self, $i);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub parent_signature {
|
||||
my ($self, $i) = @_;
|
||||
return DNS::LDNS::GC::own($self->_parent_signature($i), $self);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::DNSSecTrustTree - Trust tree from signed RR to trust anchors
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
tree = new DNS::LDNS::DNSSecTrustTree
|
||||
tree->print(fp)
|
||||
d = tree->depth
|
||||
status = tree->add_parent(parent, sig, parent_status)
|
||||
status = tree->contains_keys(trusted_keys)
|
||||
|
||||
# Node attributes
|
||||
rr = tree->rr;
|
||||
rrset = tree->rrset
|
||||
ptree = tree->parent(i)
|
||||
pstatus = tree->parent_status(i)
|
||||
rr = tree->parent_signature(i)
|
||||
count = tree->parent_count
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
176
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm
Normal file
176
contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm
Normal file
@ -0,0 +1,176 @@
|
||||
package DNS::LDNS::DNSSecZone;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $line_nr;
|
||||
my $status = &LDNS_STATUS_OK;
|
||||
my $zone;
|
||||
my $file;
|
||||
|
||||
if ($args{filename}) {
|
||||
unless (open FILE, $args{filename}) {
|
||||
$DNS::LDNS::last_status = &LDNS_STATUS_FILE_ERR;
|
||||
$DNS::LDNS::line_nr = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
$file = \*FILE;
|
||||
}
|
||||
elsif ($args{file}) {
|
||||
$file = $args{file};
|
||||
}
|
||||
|
||||
if ($file) {
|
||||
$zone = _new_from_file($file,
|
||||
$args{origin} || $LDNS::DEFAULT_ORIGIN,
|
||||
$args{ttl} || $LDNS::DEFAULT_TTL,
|
||||
$args{class} || $LDNS::DEFAULT_CLASS,
|
||||
$status, $line_nr);
|
||||
}
|
||||
else {
|
||||
$zone = _new();
|
||||
}
|
||||
|
||||
if ($args{filename}) {
|
||||
close $file;
|
||||
}
|
||||
|
||||
$DNS::LDNS::last_status = $status;
|
||||
$DNS::LDNS::line_nr = $line_nr;
|
||||
if (!defined $zone) {
|
||||
return;
|
||||
}
|
||||
|
||||
return $zone;
|
||||
}
|
||||
|
||||
sub soa {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_soa, $self);
|
||||
}
|
||||
|
||||
sub names {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_names, $self);
|
||||
}
|
||||
|
||||
sub find_rrset {
|
||||
my ($self, $name, $type) = @_;
|
||||
return DNS::LDNS::GC::own($self->_find_rrset($name, $type), $self);
|
||||
}
|
||||
|
||||
sub add_rr {
|
||||
my ($self, $rr) = @_;
|
||||
|
||||
# Set a copy of the rr in case it is already owned
|
||||
my $s = _add_rr($self, my $copy = $rr->clone);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub add_empty_nonterminals {
|
||||
my $self = shift;
|
||||
my $s = _add_empty_nonterminals($self);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub mark_glue {
|
||||
my $self = shift;
|
||||
my $s = _mark_glue($self);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub sign {
|
||||
my ($self, $keylist, $policy, $flags) = @_;
|
||||
my $s = _sign($self, $keylist, $policy, $flags);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub sign_nsec3 {
|
||||
my ($self, $keylist, $policy, $algorithm, $flags, $iterations, $salt,
|
||||
$signflags) = @_;
|
||||
my $s = _sign_nsec3($self, $keylist, $policy, $algorithm, $flags,
|
||||
$iterations, $salt, $signflags);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub to_string {
|
||||
return "DNS::LDNS::DNSSecZone::to_string is not yet implemented";
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::DNSSecZone - Zone with dnssec data
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my z = new DNS::LDNS::DNSSecZone(
|
||||
filename => '/path/to/myzone',
|
||||
origin => new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'myzone'), #optional
|
||||
ttl => 3600, #optional
|
||||
class => LDNS_RR_CLASS_, #optional
|
||||
)
|
||||
my z = new DNS::LDNS::DNSSecZone(
|
||||
file => \*FILE,
|
||||
origin => ..., ttl => ..., class => ...
|
||||
)
|
||||
my z = new DNS::LDNS::DNSSecZone
|
||||
|
||||
rr = z->soa
|
||||
rbtree = z->names
|
||||
rrsets = z->find_rrset
|
||||
z->add_rr(rr)
|
||||
z->create_from_zone(zone)
|
||||
z->add_empty_nonterminals
|
||||
|
||||
z->sign(keylist, policy)
|
||||
z->sign_nsec3(keylist, policy, algorithm, flags, iterations, salt)
|
||||
|
||||
z->create_nsecs
|
||||
z->create_nsec3s(algorithm, flags, iterations, salt)
|
||||
z->create_rrsigs(key_list, policy, flags)
|
||||
|
||||
=head1 TODO
|
||||
|
||||
z->to_string
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
122
contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm
Normal file
122
contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm
Normal file
@ -0,0 +1,122 @@
|
||||
package DNS::LDNS::GC;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
my %ref_count;
|
||||
my %owned_by;
|
||||
|
||||
sub own {
|
||||
my ($obj, $owner) = @_;
|
||||
|
||||
# print STDERR "Owning $obj -> $owner\n";
|
||||
return unless (defined $obj);
|
||||
|
||||
if ($owned_by{$$owner}) {
|
||||
# If the owner is an owned object, let obj be owned by
|
||||
# the owners owner. We want to avoid recursive ownerships.
|
||||
$owner = $owned_by{$$owner};
|
||||
}
|
||||
|
||||
if (exists $owned_by{$$obj}) {
|
||||
$ref_count{$$obj}++;
|
||||
}
|
||||
else {
|
||||
$ref_count{$$obj} = 1;
|
||||
$owned_by{$$obj} = $owner;
|
||||
}
|
||||
return $obj;
|
||||
}
|
||||
|
||||
# Return true if the object is owned by someone
|
||||
sub is_owned {
|
||||
return (exists $owned_by{${$_[0]}});
|
||||
}
|
||||
|
||||
sub owner {
|
||||
return $owned_by{${$_[0]}};
|
||||
}
|
||||
|
||||
sub disown {
|
||||
return unless (defined $_[0]);
|
||||
delete $owned_by{${$_[0]}};
|
||||
}
|
||||
|
||||
my %free_method = (
|
||||
'DNS::LDNS::Zone' => '_zone_deep_free',
|
||||
'DNS::LDNS::RRList' => '_rrlist_deep_free',
|
||||
'DNS::LDNS::RR' => '_rr_free',
|
||||
'DNS::LDNS::RData' => '_rdata_deep_free',
|
||||
'DNS::LDNS::DNSSecZone' => '_dnssec_zone_deep_free',
|
||||
'DNS::LDNS::DNSSecName' => '_dnssec_name_deep_free',
|
||||
'DNS::LDNS::Resolver' => '_resolver_deep_free',
|
||||
'DNS::LDNS::Packet' => '_packet_free',
|
||||
'DNS::LDNS::Key' => '_key_deep_free',
|
||||
'DNS::LDNS::KeyList' => '_keylist_free',
|
||||
'DNS::LDNS::DNSSecDataChain' => '_dnssec_datachain',
|
||||
);
|
||||
|
||||
my %not_deleted_by_owner = (
|
||||
'DNS::LDNS::DNSSecTrustChain' => 1,
|
||||
);
|
||||
|
||||
sub free {
|
||||
my $obj = shift;
|
||||
|
||||
# print STDERR "Freeing $obj\n";
|
||||
|
||||
if (exists $ref_count{$$obj}) {
|
||||
# print STDERR "Derefing $obj\n";
|
||||
$ref_count{$$obj}--;
|
||||
return if ($ref_count{$$obj} > 0);
|
||||
}
|
||||
|
||||
# print STDERR "Deleting $obj\n";
|
||||
|
||||
delete $ref_count{$$obj};
|
||||
|
||||
if (exists $owned_by{$$obj}) {
|
||||
delete $owned_by{$$obj};
|
||||
return unless ($not_deleted_by_owner{ref $obj});
|
||||
}
|
||||
|
||||
my $class = ref $obj;
|
||||
my $free = $free_method{ref $obj};
|
||||
|
||||
die "Internal error: No freeing method for $obj (".ref $obj.")"
|
||||
unless ($free);
|
||||
|
||||
no strict;
|
||||
&$free($obj);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::GC - Garbage collector, used internally by the DNS::LDNS modules
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
Garbage collector class for DNS::LDNS objects.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
122
contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm
Normal file
122
contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm
Normal file
@ -0,0 +1,122 @@
|
||||
package DNS::LDNS::Key;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $key;
|
||||
|
||||
if ($args{filename} or $args{file}) {
|
||||
my $status = &LDNS_STATUS_OK;
|
||||
my $line_nr = 0;
|
||||
my $file = $args{file};
|
||||
if ($args{filename}) {
|
||||
unless (open FILE, $args{filename}) {
|
||||
$DNS::LDNS::last_status = &LDNS_STATUS_FILE_ERR;
|
||||
return;
|
||||
}
|
||||
$file = \*FILE;
|
||||
}
|
||||
|
||||
$key = _new_from_file($file, $line_nr, $status);
|
||||
if ($args{filename}) {
|
||||
close $file;
|
||||
}
|
||||
|
||||
$DNS::LDNS::last_status = $status;
|
||||
$DNS::LDNS::line_nr = $line_nr;
|
||||
if (!defined $key) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$key = _new();
|
||||
}
|
||||
|
||||
return $key;
|
||||
}
|
||||
|
||||
sub set_pubkey_owner {
|
||||
my ($self, $owner) = @_;
|
||||
my $oldowner = $self->pubkey_owner;
|
||||
DNS::LDNS::GC::disown(my $old = $self->pubkey_owner);
|
||||
$self->_set_pubkey_owner($owner);
|
||||
return DNS::LDNS::GC::own($owner, $self);
|
||||
}
|
||||
|
||||
sub pubkey_owner {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_pubkey_owner, $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::Key - DNSSec private key
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
key = new DNS::LDNS::Key
|
||||
key = new DNS::LDNS::Key(file => \*FILE)
|
||||
key = new DNS::LDNS::Key(filename => 'keyfile')
|
||||
|
||||
str = key->to_string
|
||||
key->print(\*OUTPUT)
|
||||
|
||||
key->set_algorithm(alg)
|
||||
alg = key->algorithm
|
||||
key->set_flags(flags)
|
||||
flags = key->flags
|
||||
key->set_hmac_key(hmac)
|
||||
hmac = key->hmac_key
|
||||
key->set_hmac_size(size)
|
||||
size = key->hmac_size
|
||||
key->set_origttl(ttl)
|
||||
ttl = key->origttl
|
||||
key->set_inception(epoch)
|
||||
epoch = key->inception
|
||||
key->set_expiration(epoch)
|
||||
epoch = key->expiration
|
||||
key->set_pubkey_owner(rdata)
|
||||
rdata = key->pubkey_owner
|
||||
key->set_keytag(tag)
|
||||
tag = key->keytag
|
||||
key->set_use(bool)
|
||||
bool = key->use
|
||||
|
||||
str = key->get_file_base_name
|
||||
|
||||
rr = key->to_rr
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
72
contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm
Normal file
72
contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm
Normal file
@ -0,0 +1,72 @@
|
||||
package DNS::LDNS::KeyList;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
|
||||
return _new();
|
||||
}
|
||||
|
||||
sub push {
|
||||
my ($self, @keys) = @_;
|
||||
|
||||
for my $k (@keys) {
|
||||
if (DNS::LDNS::GC::is_owned($k)) {
|
||||
die "Cannot push a key on multiple lists.";
|
||||
}
|
||||
$self->_push($k);
|
||||
DNS::LDNS::GC::own($k, $self);
|
||||
}
|
||||
}
|
||||
|
||||
sub key {
|
||||
my ($self, $index) = @_;
|
||||
return DNS::LDNS::GC::own($self->_key($index), $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::KeyList - Linked list of dnssec keys
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my l = new DNS::LDNS::KeyList
|
||||
l->set_use(bool)
|
||||
l->push(@keys)
|
||||
key = l->pop
|
||||
c = l->count
|
||||
key = l->key(index)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
259
contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm
Normal file
259
contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm
Normal file
@ -0,0 +1,259 @@
|
||||
package DNS::LDNS::Packet;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
if ($args{name}) {
|
||||
return _query_new(
|
||||
$args{name}, $args{type}, $args{class}, $args{flags});
|
||||
}
|
||||
else {
|
||||
return _new;
|
||||
}
|
||||
}
|
||||
|
||||
sub question {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_question, $self);
|
||||
}
|
||||
|
||||
sub set_question {
|
||||
my ($self, $l) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->question);
|
||||
$self->_set_question($l);
|
||||
return DNS::LDNS::GC::own($l, $self);
|
||||
}
|
||||
|
||||
sub answer {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_answer, $self);
|
||||
}
|
||||
|
||||
sub set_answer {
|
||||
my ($self, $l) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->answer);
|
||||
$self->_set_answer($l);
|
||||
return DNS::LDNS::GC::own($l, $self);
|
||||
}
|
||||
|
||||
sub authority {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_authority, $self);
|
||||
}
|
||||
|
||||
sub set_authority {
|
||||
my ($self, $l) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->authority);
|
||||
$self->_set_authority($l);
|
||||
return DNS::LDNS::GC::own($l, $self);
|
||||
}
|
||||
|
||||
sub additional {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_additional, $self);
|
||||
}
|
||||
|
||||
sub set_additional {
|
||||
my ($self, $l) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->additional);
|
||||
$self->_set_additional($l);
|
||||
return DNS::LDNS::GC::own($l, $self);
|
||||
}
|
||||
|
||||
sub answerfrom {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_answerfrom, $self);
|
||||
}
|
||||
|
||||
sub set_answerfrom {
|
||||
my ($self, $a) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->answerfrom);
|
||||
$self->_set_answerfrom($a);
|
||||
return DNS::LDNS::GC::own($a, $self);
|
||||
}
|
||||
|
||||
|
||||
sub timestamp {
|
||||
my $self = shift;
|
||||
my $t = _timestamp($self);
|
||||
return wantarray ? @$t : $t;
|
||||
}
|
||||
|
||||
sub edns_data {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_edns_data, $self);
|
||||
}
|
||||
|
||||
sub set_edns_data {
|
||||
my ($self, $data) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->edns_data);
|
||||
$self->_set_edns_data($data);
|
||||
return DNS::LDNS::GC::own($data, $self);
|
||||
}
|
||||
|
||||
sub push_rr {
|
||||
my ($self, $sec, $rr) = @_;
|
||||
|
||||
my $ret = $self->_push_rr($sec, my $copy = $_->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
sub safe_push_rr {
|
||||
my ($self, $sec, $rr) = @_;
|
||||
|
||||
my $ret = $self->_safe_push_rr($sec, my $copy = $_->clone);
|
||||
if ($ret) {
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
sub tsig {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_tsig, $self);
|
||||
}
|
||||
|
||||
sub set_tsig {
|
||||
my ($self, $rr) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->tsig);
|
||||
$self->_set_tsig($rr);
|
||||
return DNS::LDNS::GC::own($rr, $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::Packet - DNS packet
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my pkt = new DNS::LDNS::Packet(name => rdata, type => LDNS_RR_TYPE_...,
|
||||
class => LDNS_RR_CLASS_..., flags => ...)
|
||||
my pkt = new DNS::LDNS::Packet
|
||||
|
||||
pkt2 = pkt->clone
|
||||
|
||||
pkt->to_string
|
||||
|
||||
rrlist = pkt->question
|
||||
pkt->set_question(rrlist)
|
||||
'
|
||||
rrlist = pkt->answer
|
||||
pkt->set_answer(rrlist)
|
||||
|
||||
rrlist = pkt->authority
|
||||
pkt->set_authority(rrlist)
|
||||
|
||||
rrlist = pkt->additional
|
||||
pkt->set_additional(rrlist)
|
||||
|
||||
rrlist = pkt->all
|
||||
rrlist = pkt->all_noquestion
|
||||
|
||||
for (qw/qr aa tc rd cd ra ad/) {
|
||||
bool = pkt->$_
|
||||
pkt->set_$_(bool)
|
||||
}
|
||||
|
||||
id = pkt->id
|
||||
pkt->set_id(id)
|
||||
pkt->set_random_id
|
||||
|
||||
count = pkt->qdcount
|
||||
count = pkt->ancount
|
||||
count = pkt->nscount
|
||||
count = pkt->arcount
|
||||
|
||||
opcode = pkt->opcode
|
||||
pkt->set_opcode(opcode)
|
||||
|
||||
rcode = pkt->rcode # Response code
|
||||
pkt->set_rcode(rcode)
|
||||
|
||||
size = pkt->size
|
||||
|
||||
epoch = pkt->querytime
|
||||
pkt->set_querytime(epoch)
|
||||
|
||||
rdata = pkt->answerfrom
|
||||
pkt->set_answerfrom(rdata)
|
||||
|
||||
(sec, usec) = pkt->timestamp
|
||||
pkt->set_timestamp(sec, usec)
|
||||
|
||||
bool = pkt->edns
|
||||
|
||||
size = pkt->edns_udp_size
|
||||
pkt->set_edns_udp_size(size)
|
||||
|
||||
rcode = pkt->edns_extended_rcode
|
||||
pkt->set_edns_extended_rcode(rcode)
|
||||
|
||||
v = pkt->edns_version
|
||||
pkt->set_edns_version(v)
|
||||
|
||||
z = pkt->edns_z
|
||||
pkt->set_edns_z(z)
|
||||
|
||||
do = pkt->edns_do
|
||||
pkt->set_edns_do(do)
|
||||
|
||||
rdata = pkt->edns_data
|
||||
pkt->set_edns_data(rdata)
|
||||
|
||||
pkt->set_flags(flags)
|
||||
|
||||
rrlist = pkt->rr_list_by_name(rdata, section)
|
||||
rrlist = pkt->rr_list_by_type(type, section)
|
||||
rrlist = pkt->rr_list_by_name_and_type(rdata, type, section)
|
||||
|
||||
bool = pkt->rr(section, rr) # Check if rr exists
|
||||
|
||||
pkt->push_rr(section, rr)
|
||||
pkt->safe_push_rr(section, rr)
|
||||
|
||||
count = pkt->section_count(section)
|
||||
bool = pkt->empty
|
||||
|
||||
rr = pkt->tsig
|
||||
pkt->set_tsig(rr)
|
||||
|
||||
type = pkt->reply_type
|
||||
|
||||
rrlist = pkt->get_rrsigs_for_name_and_type(rdata, rrtype)
|
||||
rrlist = pkt->get_rrsigs_for_type(rrtype)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
71
contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm
Normal file
71
contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm
Normal file
@ -0,0 +1,71 @@
|
||||
package DNS::LDNS::RBNode;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
# Note: This class does not have a constructor. Thus, it can not be created
|
||||
# as an individual object. The data structure of the object will always be
|
||||
# owned and freed by its parent object.
|
||||
|
||||
sub next {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_next, $self);
|
||||
}
|
||||
|
||||
sub previous {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_previous, $self);
|
||||
}
|
||||
|
||||
sub next_nonglue {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_next_nonglue, $self);
|
||||
}
|
||||
|
||||
sub name {
|
||||
my ($self) = @_;
|
||||
return DNS::LDNS::GC::own($self->_name, $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::RBNode - Node in the RBTree
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
node2 = node->next
|
||||
node2 = node->next_nonglue
|
||||
bool = node->is_null
|
||||
dnssec_name = node->name
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
59
contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm
Normal file
59
contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm
Normal file
@ -0,0 +1,59 @@
|
||||
package DNS::LDNS::RBTree;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
# Note: Since this class does not have a constructor, we can let its child
|
||||
# objects be owned by the parent. This reduces the recursion depth on
|
||||
# DESTROY.
|
||||
|
||||
sub first {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_first, $self);
|
||||
}
|
||||
|
||||
sub last {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_last, $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::RBTree - Tree of DNSSecName nodes
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
rbnode = rbtree->first
|
||||
rbnode = rbtree->last
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
91
contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
Normal file
91
contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
Normal file
@ -0,0 +1,91 @@
|
||||
package DNS::LDNS::RData;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my ($class, $type, $str) = @_;
|
||||
return _new($type, $str);
|
||||
}
|
||||
|
||||
sub cat {
|
||||
my ($self, $other) = @_;
|
||||
|
||||
my $s = _cat($self, $other);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub nsec3_hash_name {
|
||||
my ($self, $algorithm, $iterations, $salt) = @_;
|
||||
return DNS::LDNS::GC::own(
|
||||
$self->_nsec3_hash_name($algorithm, $iterations, $salt), $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::RData - Rdata field or a dname in an rr
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my rd = new DNS::LDNS::RData(rdf_type, str)
|
||||
rd2 = rd->clone
|
||||
|
||||
rdf_type = rd->type
|
||||
rd->set_type(rdf_type)
|
||||
|
||||
rd->print(\*FILE)
|
||||
str = rd->to_string
|
||||
|
||||
count = rd->label_count
|
||||
rd2 = rd->label(pos)
|
||||
|
||||
bool = rd->is_wildcard
|
||||
bool = rd->matches_wildcard(wildcard)
|
||||
bool = rd->is_subdomain(parent)
|
||||
|
||||
rd2 = rd->left_chop
|
||||
|
||||
status = rd->cat(rd2)
|
||||
rd->compare(rd2)
|
||||
rd2 = rd->address_reverse
|
||||
rd2 = rd->dname_reverse
|
||||
|
||||
rd2 = rd->nsec3_hash_name(name, algorithm, iterations, salt)
|
||||
|
||||
epoch = rd->to_unix_time
|
||||
( epoch = rd->2native_time_t )
|
||||
|
||||
rr_type = rd->to_rr_type
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
481
contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm
Normal file
481
contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm
Normal file
@ -0,0 +1,481 @@
|
||||
package DNS::LDNS::RR;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
use Carp 'croak';
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
|
||||
my $rr;
|
||||
my $status = &LDNS_STATUS_OK;
|
||||
|
||||
if (scalar(@_) == 0) {
|
||||
$rr = _new;
|
||||
}
|
||||
elsif (scalar(@_) == 1) {
|
||||
$rr = _new_from_str($_[0], $DNS::LDNS::DEFAULT_TTL,
|
||||
$DNS::LDNS::DEFAULT_ORIGIN, $status);
|
||||
}
|
||||
else {
|
||||
my %args = @_;
|
||||
|
||||
if ($args{str}) {
|
||||
$rr = _new_from_str($args{str},
|
||||
$args{default_ttl} || $DNS::LDNS::DEFAULT_TTL,
|
||||
$args{origin} || $DNS::LDNS::DEFAULT_ORIGIN,
|
||||
$status);
|
||||
}
|
||||
elsif ($args{filename} or $args{file}) {
|
||||
my $line_nr = 0;
|
||||
my $file = $args{file};
|
||||
if ($args{filename}) {
|
||||
unless (open FILE, $args{filename}) {
|
||||
$DNS::LDNS::last_status = &LDNS_STATUS_FILE_ERR;
|
||||
$DNS::LDNS::line_nr = 0;
|
||||
return;
|
||||
}
|
||||
$file = \*FILE;
|
||||
}
|
||||
|
||||
$rr = _new_from_file($file,
|
||||
$args{default_ttl} || $DNS::LDNS::DEFAULT_TTL,
|
||||
$args{origin} || $DNS::LDNS::DEFAULT_ORIGIN,
|
||||
$status, $line_nr);
|
||||
if ($args{filename}) {
|
||||
close $file;
|
||||
}
|
||||
|
||||
$DNS::LDNS::line_nr = $line_nr;
|
||||
}
|
||||
elsif ($args{type}) {
|
||||
$rr = _new_from_type($args{type});
|
||||
if ($args{owner}) {
|
||||
$rr->set_owner(new DNS::LDNS::RData(
|
||||
&LDNS_RDF_TYPE_DNAME, $args{owner}));
|
||||
}
|
||||
$rr->set_ttl($args{ttl} || $DNS::LDNS::DEFAULT_TTL);
|
||||
$rr->set_class($args{class} || $DNS::LDNS::DEFAULT_CLASS);
|
||||
|
||||
if ($args{rdata}) {
|
||||
if (!$rr->set_rdata(@{$args{rdata}})) {
|
||||
$DNS::LDNS::last_status = &LDNS_STATUS_SYNTAX_RDATA_ERR;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined $rr) {
|
||||
$DNS::LDNS::last_status = $status;
|
||||
return;
|
||||
}
|
||||
return $rr;
|
||||
}
|
||||
|
||||
sub owner {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_owner, $self);
|
||||
}
|
||||
|
||||
sub set_owner {
|
||||
my ($self, $owner) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->owner);
|
||||
$self->_set_owner($owner);
|
||||
return DNS::LDNS::GC::own($owner, $self);
|
||||
}
|
||||
|
||||
sub dname {
|
||||
return $_[0]->owner->to_string;
|
||||
}
|
||||
|
||||
sub rdata {
|
||||
my ($self, $index) = @_;
|
||||
return DNS::LDNS::GC::own($self->_rdata($index), $self);
|
||||
}
|
||||
|
||||
# replace all existing rdata with new ones. Requires the
|
||||
# input array to be exactly same length as rd_count
|
||||
sub set_rdata {
|
||||
my ($self, @rdata) = @_;
|
||||
|
||||
if (scalar @rdata != $self->rd_count) {
|
||||
# Hopefully this is a proper error to return here...
|
||||
$DNS::LDNS::last_status = LDNS_STATUS_SYNTAX_RDATA_ERR;
|
||||
return;
|
||||
}
|
||||
my $i = 0;
|
||||
for (@rdata) {
|
||||
my $oldrd = _set_rdata($self, my $copy = $_->clone, $i);
|
||||
DNS::LDNS::GC::disown(my $old = $oldrd);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
$i++;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub push_rdata {
|
||||
my ($self, @rdata) = @_;
|
||||
|
||||
for (@rdata) {
|
||||
# Push a copy in case the input rdata are already owned
|
||||
$self->_push_rdata(my $copy = $_->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
}
|
||||
|
||||
sub rrsig_typecovered {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_typecovered, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_typecovered {
|
||||
my ($self, $type) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_typecovered);
|
||||
my $result = $self->_rrsig_set_typecovered(my $copy = $type->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_algorithm {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_algorithm, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_algorithm {
|
||||
my ($self, $algo) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_algorithm);
|
||||
my $result = $self->_rrsig_set_algorithm(my $copy = $algo->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_expiration {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_expiration, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_expiration {
|
||||
my ($self, $date) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_expiration);
|
||||
my $result = $self->_rrsig_set_expiration(my $copy = $date->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_inception {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_inception, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_inception {
|
||||
my ($self, $date) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_inception);
|
||||
my $result = $self->_rrsig_set_inception(my $copy = $date->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_keytag {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_keytag, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_keytag {
|
||||
my ($self, $tag) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_keytag);
|
||||
my $result = $self->_rrsig_set_keytag(my $copy = $tag->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_sig {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_sig, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_sig {
|
||||
my ($self, $sig) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_sig);
|
||||
my $result = $self->_rrsig_set_sig(my $copy = $sig->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_labels {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_labels, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_labels {
|
||||
my ($self, $lab) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_labels);
|
||||
my $result = $self->_rrsig_set_labels(my $copy = $lab->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_origttl {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_origttl, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_origttl {
|
||||
my ($self, $ttl) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_origttl);
|
||||
my $result = $self->_rrsig_set_origttl(my $copy = $ttl->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub rrsig_signame {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrsig_signame, $self);
|
||||
}
|
||||
|
||||
sub rrsig_set_signame {
|
||||
my ($self, $name) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrsig_signame);
|
||||
my $result = $self->_rrsig_set_signame(my $copy = $name->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub dnskey_algorithm {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_dnskey_algorithm, $self);
|
||||
}
|
||||
|
||||
sub dnskey_set_algorithm {
|
||||
my ($self, $algo) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->dnskey_algorithm);
|
||||
my $result = $self->_dnskey_set_algorithm(my $copy = $algo->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub dnskey_flags {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_dnskey_flags, $self);
|
||||
}
|
||||
|
||||
sub dnskey_set_flags {
|
||||
my ($self, $flags) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->flags);
|
||||
my $result = $self->_dnskey_set_flags(my $copy = $flags->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub dnskey_protocol {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_dnskey_protocol, $self);
|
||||
}
|
||||
|
||||
sub dnskey_set_protocol {
|
||||
my ($self, $proto) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->dnskey_protocol);
|
||||
my $result = $self->_dnskey_set_protocol(my $copy = $proto->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub dnskey_key {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_dnskey_key, $self);
|
||||
}
|
||||
|
||||
sub dnskey_set_key {
|
||||
my ($self, $key) = shift;
|
||||
DNS::LDNS::GC::disown(my $old = $self->dnskey_key);
|
||||
my $result = $self->_dnskey_set_key(my $copy = $key->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub nsec3_next_owner {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_nsec3_next_owner, $self);
|
||||
}
|
||||
|
||||
sub nsec3_bitmap {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_nsec3_bitmap, $self);
|
||||
}
|
||||
|
||||
sub nsec3_salt {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_nsec3_salt, $self);
|
||||
}
|
||||
|
||||
sub hash_name_from_nsec3 {
|
||||
my ($self, $name) = @_;
|
||||
my $hash = $self->_hash_name_from_nsec3($name);
|
||||
return DNS::LDNS::GC::own($self->_hash_name_from_nsec3($name), $self);
|
||||
}
|
||||
|
||||
sub verify_denial {
|
||||
my ($self, $nsecs, $rrsigs) = @_;
|
||||
my $s = _verify_denial($self, $nsecs, $rrsigs);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub verify_denial_nsec3 {
|
||||
my ($self, $nsecs, $rrsigs, $packet_rcode, $packet_qtype,
|
||||
$packet_nodata) = @_;
|
||||
my $s = _verify_denial_nsec3($self, $nsecs, $rrsigs, $packet_rcode,
|
||||
$packet_qtype, $packet_nodata);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub verify_denial_nsec3_match {
|
||||
my ($self, $nsecs, $rrsigs, $packet_rcode, $packet_qtype,
|
||||
$packet_nodata) = @_;
|
||||
|
||||
my $status;
|
||||
my $match = _verify_denial_nsec3_match($self, $nsecs, $rrsigs, $packet_rcode, $packet_qtype, $packet_nodata, $status);
|
||||
$DNS::LDNS::last_status = $status;
|
||||
if ($status != &LDNS_STATUS_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
# $match is an RR owned by the $nsecs list.
|
||||
return DNS::LDNS::GC::own($match, $nsecs);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::RR - Resource record
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my rr = new DNS::LDNS::RR('mylabel 3600 IN A 168.10.10.10')
|
||||
my rr = new DNS::LDNS::RR(
|
||||
str => 'mylabel 3600 IN A 168.10.10.10',
|
||||
default_ttl => 3600, # optional,
|
||||
origin => new DNS::LDNS::RData(LDNS_RDF_TYPE_NAME, 'myzone.'), " # optional
|
||||
)
|
||||
my rr = new DNS::LDNS::RR(
|
||||
filename => '/path/to/rr',
|
||||
origin => ...)
|
||||
my rr = new DNS::LDNS::RR(
|
||||
file => \*FILE,
|
||||
origin => ...)
|
||||
my rr = new DNS::LDNS::RR(
|
||||
type => LDNS_RR_TYPE_A,
|
||||
rdata => [new DNS::LDNS::RData(...), new DNS::LDNS::RData(...), ...],
|
||||
class => LDNS_RR_CLASS_IN, # optional
|
||||
ttl => 3600, # optional
|
||||
owner => new DNS::LDNS::RData(LDNS_RDF_TYPE_NAME, 'mylabel'), # optional)
|
||||
my rr = new DNS::LDNS::RR
|
||||
|
||||
rr2 = rr->clone
|
||||
|
||||
rr->print(\*FILE)
|
||||
rr->to_string
|
||||
|
||||
ttl = rr->ttl
|
||||
rr->set_ttl(ttl)
|
||||
|
||||
type = rr->type
|
||||
rr->set_type(type)
|
||||
|
||||
class = rr->class
|
||||
rr->set_class(class)
|
||||
|
||||
rdata = rr->owner
|
||||
rr->set_owner(rdata)
|
||||
str = rr->dname
|
||||
|
||||
count = rr->rd_count
|
||||
rdata = rr->rdata(index)
|
||||
rr->set_rdata(rd1, rd2, rd3, ...)
|
||||
rr->push_rdata(rd1, rd2, rd3, ...)
|
||||
rdata = rr->pop_rdata
|
||||
|
||||
rr->compare(rr2)
|
||||
rr->compare_dname(rr2)
|
||||
rr->compare_no_rdata(rr2)
|
||||
rr->compare_ds(rr2)
|
||||
|
||||
hash = rr->hash_name_from_nsec3(dname)
|
||||
|
||||
status = rr->verify_denial(nsecs, rrsigs)
|
||||
status = rr->verify_denial_nsec3(nsecs, rrsigs, packet_rcode, packet_qtype, packet_nodata)
|
||||
match = rr->verify_denial_nsec3_match(nsecs, rrsigs, packet_rcode, packet_qtype, packet_nodata)
|
||||
|
||||
rr->nsec3_add_param_rdfs(algorithm, flags, iterations, salt)
|
||||
a = rr->nsec3_algorithm
|
||||
f = rr->nsec3_flags
|
||||
o = rr->nsec3_optout
|
||||
i = rr->nsec3_iterations
|
||||
rdata = rr->nsec3_next_owner
|
||||
rdata = rr->nsec3_bitmap
|
||||
rdata = rr->nsec3_salt
|
||||
|
||||
rdata = rr->rrsig_keytag
|
||||
bool = rr->rrsig_set_keytag(rdata)
|
||||
rdata = rr->rrsig_signame
|
||||
bool = rr->rrsig_set_signame(rdata)
|
||||
rdata = rr->rrsig_sig
|
||||
bool = rr->rrsig_set_sig(rdata)
|
||||
rdata = rr->rrsig_algorithm
|
||||
bool = rr->rrsig_set_algorithm(rdata)
|
||||
rdata = rr->rrsig_inception
|
||||
bool = rr->rrsig_set_inception(rdata)
|
||||
rdata = rr->rrsig_expiration
|
||||
bool = rr->rrsig_set_expiration(rdata)
|
||||
rdata = rr->rrsig_labels
|
||||
bool = rr->rrsig_set_labels(rdata)
|
||||
rdata = rr->rrsig_origttl
|
||||
bool = rr->rrsig_set_origttl(rdata)
|
||||
key = rr->get_dnskey_for_rrsig(rrlist)
|
||||
|
||||
rdata = rr->dnskey_algorithm
|
||||
bool = rr->dnskey_set_algorithm(rdata)
|
||||
rdata = rr->dnskey_flags
|
||||
bool = rr->dnskey_set_flags(rdata)
|
||||
rdata = rr->dnskey_protocol
|
||||
bool = rr->dnskey_set_protocol(rdata)
|
||||
rdata = rr->dnskey_key
|
||||
bool = rr->dnskey_set_key(rdata)
|
||||
bits = rr->dnskey_key_size
|
||||
tag = rr->calc_keytag
|
||||
ds = rr->key_to_ds(hash)
|
||||
|
||||
rr->is_question
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
183
contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm
Normal file
183
contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm
Normal file
@ -0,0 +1,183 @@
|
||||
package DNS::LDNS::RRList;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS;
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
if ($args{hosts_filename} or $args{hosts_file}) {
|
||||
my $file = $args{hosts_file};
|
||||
if ($args{hosts_filename}) {
|
||||
unless (open FILE, $args{hosts_filename}) {
|
||||
$DNS::LDNS::last_status = &LDNS_STATUS_FILE_ERR;
|
||||
$DNS::LDNS::line_nr = 0;
|
||||
return;
|
||||
}
|
||||
$file = \*FILE;
|
||||
}
|
||||
my $list = _new_hosts_from_file($file, $DNS::LDNS::line_nr);
|
||||
if ($args{hosts_filename}) {
|
||||
close $file;
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
return _new();
|
||||
}
|
||||
|
||||
sub rr {
|
||||
my ($self, $index) = @_;
|
||||
return DNS::LDNS::GC::own($self->_rr($index), $self);
|
||||
}
|
||||
|
||||
sub push {
|
||||
my ($self, @rrs) = @_;
|
||||
|
||||
for my $rr (@rrs) {
|
||||
# Push a copy of the rr in case it is already owned
|
||||
$self->_push(my $copy = $rr->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
}
|
||||
|
||||
sub push_list {
|
||||
my ($self, $list) = @_;
|
||||
|
||||
$self->_push_list(my $copy = $list->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub verify {
|
||||
my ($self, $sig, $keys) = @_;
|
||||
my $goodkeys = new DNS::LDNS::RRList;
|
||||
my $s = _verify($self, $sig, $keys, $goodkeys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return wantarray ? ($s, $goodkeys) : $s;
|
||||
}
|
||||
|
||||
sub verify_time {
|
||||
my ($self, $sig, $keys, $checktime) = @_;
|
||||
my $goodkeys = new DNS::LDNS::RRList;
|
||||
my $s = _verify_time($self, $sig, $keys, $checktime, $goodkeys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return wantarray ? ($s, $goodkeys) : $s;
|
||||
}
|
||||
|
||||
sub verify_notime {
|
||||
my ($self, $sig, $keys) = @_;
|
||||
my $goodkeys = new DNS::LDNS::RRList;
|
||||
my $s = _verify_notime($self, $sig, $keys, $goodkeys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return wantarray ? ($s, $goodkeys) : $s;
|
||||
}
|
||||
|
||||
sub verify_rrsig_keylist {
|
||||
my ($self, $sig, $keys) = @_;
|
||||
my $goodkeys = new DNS::LDNS::RRList;
|
||||
my $s = _verify_rrsig_keylist($self, $sig, $keys, $goodkeys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return wantarray ? ($s, $goodkeys) : $s;
|
||||
}
|
||||
|
||||
sub verify_rrsig_keylist_notime {
|
||||
my ($self, $sig, $keys, $check_time) = @_;
|
||||
my $goodkeys = new DNS::LDNS::RRList;
|
||||
my $s = _verify_rrsig_keylist_notime($self, $sig, $keys, $goodkeys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return wantarray ? ($s, $goodkeys) : $s;
|
||||
}
|
||||
|
||||
sub get_dnskey_for_rrsig {
|
||||
my ($self, $rrsig) = @_;
|
||||
return DNS::LDNS::GC::own(_get_dnskey_for_rrsig($rrsig, $self), $self);
|
||||
}
|
||||
|
||||
sub get_rrsig_for_name_and_type {
|
||||
my ($self, $name, $type) = @_;
|
||||
return DNS::LDNS::GC::own(
|
||||
_get_dnskey_for_name_and_type($name, $type, $self), $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::RRList - List of rrs
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my l = new DNS::LDNS::RRList
|
||||
my l = new DNS::LDNS::RRList(hosts_file => \*FILE)
|
||||
my l = new DNS::LDNS::RRList(hosts_filename => fname)
|
||||
my l2 = l->clone
|
||||
|
||||
l->to_string
|
||||
|
||||
l->print(\*FILE)
|
||||
count = l->rr_count
|
||||
|
||||
rr = l->rr(index)
|
||||
l->push(@rr)
|
||||
rr = l->pop
|
||||
|
||||
l->push_list(l2)
|
||||
l2 = l->pop_list(count)
|
||||
l2 = l->pop_rrset
|
||||
|
||||
l->compare(l2)
|
||||
|
||||
l2 = l->subtype_by_rdata(rdata, pos)
|
||||
|
||||
bool = l->is_rrset
|
||||
|
||||
bool = l->contains_rr(rr)
|
||||
|
||||
(status, goodkeys) = l->verify(sig, keys)
|
||||
(status, goodkeys) = l->verify_time(sig, keys, checktime)
|
||||
(status, goodkeys) = l->verify_notime(sig, keys)
|
||||
(status, goodkeys) = l->verify_rrsig_keylist(sig, keys)
|
||||
(status, goodkeys) = l->verify_rrsig_keylist_time(sig, keys, checktime)
|
||||
(status, goodkeys) = l->verify_rrsig_keylist_notime(sig, keys)
|
||||
status = l->verify_rrsig(sig, keys)
|
||||
status = l->verify_rrsig_time(sig, keys, checktime)
|
||||
|
||||
rr = l->create_empty_rrsig(key)
|
||||
rrlist = l->sign_public(keylist)
|
||||
|
||||
rrlist->canonicalize
|
||||
rrlist->sort
|
||||
rrlist->sort_nsec3 # the list must contain only nsec3 rrs
|
||||
|
||||
rr = keylist->get_dnskey_for_rrsig(rrsig)
|
||||
rr = keylist->get_rrsig_for_name_and_type(name, type)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
355
contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm
Normal file
355
contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm
Normal file
@ -0,0 +1,355 @@
|
||||
package DNS::LDNS::Resolver;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $file;
|
||||
my $status = &LDNS_STATUS_OK;
|
||||
|
||||
if ($args{filename}) {
|
||||
unless (open FILE, $args{filename}) {
|
||||
$DNS::LDNS::last_status = &LDNS_STATUS_FILE_ERR;
|
||||
$DNS::LDNS::line_nr = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
$file = \*FILE;
|
||||
}
|
||||
elsif ($args{file}) {
|
||||
$file = $args{file};
|
||||
}
|
||||
|
||||
my $resolver;
|
||||
if ($file) {
|
||||
$resolver = _new_from_file($file, $status);
|
||||
}
|
||||
else {
|
||||
$resolver = _new();
|
||||
}
|
||||
|
||||
if ($args{filename}) {
|
||||
close $file;
|
||||
}
|
||||
|
||||
$DNS::LDNS::last_status = $status;
|
||||
if (!defined $resolver) {
|
||||
return;
|
||||
}
|
||||
|
||||
return $resolver;
|
||||
}
|
||||
|
||||
sub dnssec_anchors {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_dnssec_anchors, $self);
|
||||
}
|
||||
|
||||
sub push_dnssec_anchor {
|
||||
my ($self, $rr) = @_;
|
||||
|
||||
_push_dnssec_anchor($self, my $copy = $rr->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub set_dnssec_anchors {
|
||||
my ($self, $l) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->dnssec_anchors);
|
||||
$self->_set_dnssec_anchors($l);
|
||||
DNS::LDNS::GC::own($l, $self);
|
||||
return $l;
|
||||
}
|
||||
|
||||
sub domain {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_domain, $self);
|
||||
}
|
||||
|
||||
sub set_domain {
|
||||
my ($self, $dom) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->domain);
|
||||
_set_domain($self, my $copy = $dom->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub nameservers {
|
||||
my $self = shift;
|
||||
my $list = _nameservers($self);
|
||||
for my $r (@$list) {
|
||||
DNS::LDNS::GC::own($r, $self);
|
||||
}
|
||||
return wantarray ? @$list : $list;
|
||||
}
|
||||
|
||||
sub push_nameserver {
|
||||
my ($self, $n) = @_;
|
||||
|
||||
my $s = _push_nameserver($self, my $copy = $n->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub pop_nameserver {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_pop_nameserver);
|
||||
}
|
||||
|
||||
sub push_searchlist {
|
||||
my ($self, $rd) = @_;
|
||||
|
||||
_push_searchlist($self, my $copy = $rd->clone);
|
||||
DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub searchlist {
|
||||
my $self = shift;
|
||||
my $list = _searchlist($self);
|
||||
for my $r (@$list) {
|
||||
DNS::LDNS::GC::own($r, $self);
|
||||
}
|
||||
return wantarray ? @$list : $list;
|
||||
}
|
||||
|
||||
sub timeout {
|
||||
my $self = shift;
|
||||
my $t = _timeout($self);
|
||||
return wantarray ? @$t : $t;
|
||||
}
|
||||
|
||||
sub rtt {
|
||||
my $self = shift;
|
||||
my $list = _rtt($self);
|
||||
return wantarray ? @$list : $list;
|
||||
}
|
||||
|
||||
sub set_rtt {
|
||||
my ($self, @rtt) = @_;
|
||||
# FIXME: Validate @rtt, existence, size
|
||||
_set_rtt($self, \@rtt);
|
||||
}
|
||||
|
||||
sub fetch_valid_domain_keys {
|
||||
my ($self, $domain, $keys) = @_;
|
||||
|
||||
my $status;
|
||||
my $trusted = _fetch_valid_domain_keys($self, $domain, $keys, $status);
|
||||
$DNS::LDNS::last_status = $status;
|
||||
if (!$trusted) {
|
||||
return;
|
||||
}
|
||||
|
||||
return DNS::LDNS::GC::own($trusted, $self);
|
||||
}
|
||||
|
||||
sub fetch_valid_domain_keys_time {
|
||||
my ($self, $domain, $keys, $checktime) = @_;
|
||||
|
||||
my $status;
|
||||
my $trusted = _fetch_valid_domain_keys_time(
|
||||
$self, $domain, $keys, $checktime, $status);
|
||||
$DNS::LDNS::last_status = $status;
|
||||
if (!$trusted) {
|
||||
return;
|
||||
}
|
||||
|
||||
return DNS::LDNS::GC::own($trusted, $self);
|
||||
}
|
||||
|
||||
sub prepare_query_pkt {
|
||||
my ($self, $rdata, $type, $class, $flags) = @_;
|
||||
|
||||
my $s = &LDNS_STATUS_OK;
|
||||
my $qry = _prepare_query_pkt($self, $rdata, $type, $class, $flags, $s);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
if ($s != LDNS_STATUS_OK) {
|
||||
return;
|
||||
}
|
||||
return $qry;
|
||||
}
|
||||
|
||||
sub send {
|
||||
my ($self, $rdata, $type, $class, $flags) = @_;
|
||||
|
||||
my $s = &LDNS_STATUS_OK;
|
||||
my $ans = _send($self, $rdata, $type, $class, $flags, $s);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
if ($s != LDNS_STATUS_OK) {
|
||||
return;
|
||||
}
|
||||
return $ans;
|
||||
}
|
||||
|
||||
sub send_pkt {
|
||||
my ($self, $qry) = @_;
|
||||
|
||||
my $s = &LDNS_STATUS_OK;
|
||||
my $ans = _send_pkt($self, $qry, $s);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
if ($s != LDNS_STATUS_OK) {
|
||||
return;
|
||||
}
|
||||
return $ans;
|
||||
}
|
||||
|
||||
sub verify_trusted {
|
||||
my ($self, $rrset, $rrsigs, $validating_keys) = @_;
|
||||
my $s = _verify_trusted($self, $rrset, $rrsigs, $validating_keys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub verify_trusted_time {
|
||||
my ($self, $rrset, $rrsigs, $check_time, $validating_keys) = @_;
|
||||
my $s = _verify_trusted_time($self, $rrset, $rrsigs, $check_time,
|
||||
$validating_keys);
|
||||
$DNS::LDNS::last_status = $s;
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::Resolver - DNS resolver
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my r = new DNS::LDNS::Resolver(filename => '/my/resolv.conf')
|
||||
my r = new DNS::LDNS::Resolver(file => \*FILE)
|
||||
my r = new DNS::LDNS::Resolver
|
||||
|
||||
bool = r->dnssec
|
||||
r->set_dnssec(bool)
|
||||
|
||||
bool = r->dnssec_cd # Resolver sets the CD bit
|
||||
r->set_dnssec_cd(bool)
|
||||
|
||||
port = r->port
|
||||
r->set_port(port)
|
||||
|
||||
bool = r->recursive
|
||||
r->set_recursive(bool)
|
||||
|
||||
bool = r->debug
|
||||
r->set_debug(bool)
|
||||
|
||||
count = r->retry
|
||||
r->set_retry(count)
|
||||
|
||||
count = r->retrans
|
||||
r->set_retrans(count)
|
||||
|
||||
bool = r->fallback # Resolver truncation fallback mechanism
|
||||
r->set_fallback(bool)
|
||||
|
||||
bool = r->ip6
|
||||
r->set_ip6(bool)
|
||||
|
||||
size = r->edns_udp_size
|
||||
r->set_edns_udp_size(size)
|
||||
|
||||
bool = r->usevc # Use virtual circuit (TCP)
|
||||
r->set_usevc(bool)
|
||||
|
||||
r->fail
|
||||
r->set_fail
|
||||
|
||||
r->defnames
|
||||
r->set_defnames
|
||||
|
||||
r->dnsrch
|
||||
r->set_dnsrch
|
||||
|
||||
r->igntc
|
||||
r->set_igntc
|
||||
|
||||
bool = r->random # randomize nameserver before usage
|
||||
r->set_random(bool)
|
||||
|
||||
rrlist = r->dnssec_anchors # list of trusted DNSSEC anchors
|
||||
r->push_dnssec_anchor(rr)
|
||||
r->set_dnssec_anchors(rrlist)
|
||||
|
||||
rdata = r->domain # Domain to add to relative queries
|
||||
r->set_domain(rdata)
|
||||
|
||||
@rdata = r->nameservers
|
||||
count = r->nameserver_count
|
||||
r->push_nameserver(rdata)
|
||||
rdata = r->pop_nameserver
|
||||
r->nameservers_randomize
|
||||
|
||||
str = r->tsig_keyname
|
||||
r->set_tsig_keyname(str)
|
||||
|
||||
str = r->tsig_algorithm
|
||||
r->set_tsig_algorithm(str)
|
||||
|
||||
str = r->tsig_keydata
|
||||
r->set_tsig_keydata(str)
|
||||
|
||||
count = r->searchlist_count
|
||||
r->push_searchlist(rdata)
|
||||
@rdata = r->searchlist
|
||||
|
||||
@times = r->rtt # Round trip times
|
||||
r->set_rtt(@rtt)
|
||||
time = r->nameserver_rtt(pos)
|
||||
r->set_nameserver_rtt(pos, time)
|
||||
|
||||
(sec, usec) = r->timeout
|
||||
r->set_timeout(sec, usec)
|
||||
|
||||
# DNSSec validation
|
||||
rrlist = r->fetch_valid_domain_keys(domain, keys)
|
||||
rrlist = r->fetch_valid_domain_keys_time(domain, keys, checktime)
|
||||
rrlist = r->validate_domain_ds(domain, keys)
|
||||
rrlist = r->validate_domain_ds_time(domain, keys, checktime)
|
||||
rrlist = r->validate_domain_dnskey(domain, keys)
|
||||
rrlist = r->validate_domain_dnskey_time(domain, keys, checktime)
|
||||
status = r->verify_trusted(rrset, rrsigs, validation_keys)
|
||||
status = r->verify_trusted_time(rrset, rrsigs, checktime, validation_keys)
|
||||
bool = r->trusted_key(keys, trusted_keys)
|
||||
chain = r->build_data_chain(qflags, dataset, pkt, orig_rr)
|
||||
|
||||
# Query
|
||||
pkt = r->query(rdata, type, class, flags)
|
||||
pkt = r->search(rdata, type, class, flags)
|
||||
query = r->prepare_query_pkt(rdata, type, class, flags)
|
||||
answer = r->send(rdata, type, class, flags)
|
||||
answer = r->send_pkt(query)
|
||||
rrlist = r->get_rr_list_addr_by_name(name, class, flags)
|
||||
rrlist = r->get_rr_list_name_by_addr(addr, class, flags)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
137
contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm
Normal file
137
contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm
Normal file
@ -0,0 +1,137 @@
|
||||
package DNS::LDNS::Zone;
|
||||
|
||||
use 5.008008;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
our $VERSION = '0.06';
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
||||
my $line_nr = 0;
|
||||
my $status = &LDNS_STATUS_OK;
|
||||
my $zone;
|
||||
my $file;
|
||||
|
||||
if ($args{filename}) {
|
||||
unless (open FILE, $args{filename}) {
|
||||
$DNS::LDNS::last_status = &LDNS_STATUS_FILE_ERR;
|
||||
$DNS::LDNS::line_nr = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
$file = \*FILE;
|
||||
}
|
||||
|
||||
if ($file) {
|
||||
$zone = _new_from_file($file,
|
||||
$args{origin} || $DNS::LDNS::DEFAULT_ORIGIN,
|
||||
$args{default_ttl} || $DNS::LDNS::DEFAULT_TTL,
|
||||
$args{class} || $DNS::LDNS::DEFAULT_CLASS,
|
||||
$status, $line_nr);
|
||||
}
|
||||
else {
|
||||
$zone = _new();
|
||||
}
|
||||
|
||||
if ($args{filename}) {
|
||||
close $file;
|
||||
}
|
||||
|
||||
$DNS::LDNS::last_status = $status;
|
||||
$DNS::LDNS::line_nr = $line_nr;
|
||||
if (!defined $zone) {
|
||||
return;
|
||||
}
|
||||
|
||||
return $zone;
|
||||
}
|
||||
|
||||
sub to_string {
|
||||
my $self = shift;
|
||||
|
||||
return join('', map { $self->$_ ? $self->$_->to_string : '' } qw/soa rrs/);
|
||||
}
|
||||
|
||||
sub soa {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_soa, $self);
|
||||
}
|
||||
|
||||
sub set_soa {
|
||||
my ($self, $soa) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->soa);
|
||||
$self->_set_soa(my $copy = $soa->clone);
|
||||
return DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub rrs {
|
||||
my $self = shift;
|
||||
return DNS::LDNS::GC::own($self->_rrs, $self);
|
||||
}
|
||||
|
||||
sub set_rrs {
|
||||
my ($self, $list) = @_;
|
||||
DNS::LDNS::GC::disown(my $old = $self->rrs);
|
||||
$self->_set_rrs(my $copy = $list->clone);
|
||||
return DNS::LDNS::GC::own($copy, $self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
DNS::LDNS::GC::free($_[0]);
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
DNS::LDNS::Zone - Parsed zonefile
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use DNS::LDNS ':all'
|
||||
|
||||
my z = new DNS::LDNS::Zone(
|
||||
filename => '/path/to/myzone',
|
||||
origin => new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'myzone'), #optional
|
||||
default_ttl => 3600, #optional
|
||||
class => LDNS_RR_CLASS_IN, #optional
|
||||
)
|
||||
my z = new DNS::LDNS::Zone(
|
||||
file => \*FILE,
|
||||
origin => ..., default_ttl => ..., class => ...
|
||||
)
|
||||
my z = new DNS::LDNS::Zone
|
||||
|
||||
z->to_string
|
||||
z->print(\*FILE)
|
||||
z->canonicalize
|
||||
z->sort
|
||||
rr = z->soa
|
||||
z->set_soa(rr)
|
||||
rrlist = z->rrs
|
||||
z->set_rrs(rrlist)
|
||||
z->sign(keylist)
|
||||
z->sign_nsec3(keylist, algorithm, flags, iterations, salt)
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
http://www.nlnetlabs.nl/projects/ldns
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Erik Pihl Ostlyngen, E<lt>erik.ostlyngen@uninett.noE<gt>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2013 by UNINETT Norid AS
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself, either Perl version 5.14.2 or,
|
||||
at your option, any later version of Perl 5 you may have available.
|
||||
|
||||
=cut
|
7063
contrib/DNS-LDNS/ppport.h
Normal file
7063
contrib/DNS-LDNS/ppport.h
Normal file
File diff suppressed because it is too large
Load Diff
136
contrib/DNS-LDNS/t/DNS-LDNS.t
Normal file
136
contrib/DNS-LDNS/t/DNS-LDNS.t
Normal file
@ -0,0 +1,136 @@
|
||||
# Before `make install' is performed this script should be runnable with
|
||||
# `make test'. After `make install' it should work as `perl DNS-LDNS.t'
|
||||
|
||||
#########################
|
||||
|
||||
# change 'tests => 2' to 'tests => last_test_to_print';
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 2;
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
|
||||
my $fail = 0;
|
||||
foreach my $constname (qw(
|
||||
LDNS_AA LDNS_AD LDNS_CD LDNS_CERT_ACPKIX LDNS_CERT_IACPKIX
|
||||
LDNS_CERT_IPGP LDNS_CERT_IPKIX LDNS_CERT_ISPKI LDNS_CERT_OID
|
||||
LDNS_CERT_PGP LDNS_CERT_PKIX LDNS_CERT_SPKI LDNS_CERT_URI
|
||||
LDNS_DEFAULT_TTL LDNS_DH LDNS_DSA LDNS_DSA_NSEC3 LDNS_ECC LDNS_ECC_GOST
|
||||
LDNS_HASH_GOST LDNS_IP4ADDRLEN LDNS_IP6ADDRLEN
|
||||
LDNS_KEY_REVOKE_KEY LDNS_KEY_SEP_KEY LDNS_KEY_ZONE_KEY
|
||||
LDNS_MAX_DOMAINLEN LDNS_MAX_LABELLEN LDNS_MAX_PACKETLEN
|
||||
LDNS_MAX_POINTERS LDNS_MAX_RDFLEN LDNS_NSEC3_VARS_OPTOUT_MASK
|
||||
LDNS_PACKET_ANSWER LDNS_PACKET_IQUERY LDNS_PACKET_NODATA
|
||||
LDNS_PACKET_NOTIFY LDNS_PACKET_NXDOMAIN LDNS_PACKET_QUERY
|
||||
LDNS_PACKET_QUESTION LDNS_PACKET_REFERRAL LDNS_PACKET_STATUS
|
||||
LDNS_PACKET_UNKNOWN LDNS_PACKET_UPDATE LDNS_PORT LDNS_PRIVATEDNS
|
||||
LDNS_PRIVATEOID LDNS_QR LDNS_RA LDNS_RCODE_FORMERR LDNS_RCODE_NOERROR
|
||||
LDNS_RCODE_NOTAUTH LDNS_RCODE_NOTIMPL LDNS_RCODE_NOTZONE
|
||||
LDNS_RCODE_NXDOMAIN LDNS_RCODE_NXRRSET LDNS_RCODE_REFUSED
|
||||
LDNS_RCODE_SERVFAIL LDNS_RCODE_YXDOMAIN LDNS_RCODE_YXRRSET LDNS_RD
|
||||
LDNS_RDATA_FIELD_DESCRIPTORS_COMMON LDNS_RDF_SIZE_16BYTES
|
||||
LDNS_RDF_SIZE_6BYTES LDNS_RDF_SIZE_BYTE LDNS_RDF_SIZE_DOUBLEWORD
|
||||
LDNS_RDF_SIZE_WORD LDNS_RDF_TYPE_A LDNS_RDF_TYPE_AAAA LDNS_RDF_TYPE_ALG
|
||||
LDNS_RDF_TYPE_APL LDNS_RDF_TYPE_ATMA LDNS_RDF_TYPE_B32_EXT
|
||||
LDNS_RDF_TYPE_B64 LDNS_RDF_TYPE_CERT_ALG LDNS_RDF_TYPE_CLASS
|
||||
LDNS_RDF_TYPE_DNAME LDNS_RDF_TYPE_HEX LDNS_RDF_TYPE_INT16
|
||||
LDNS_RDF_TYPE_INT16_DATA LDNS_RDF_TYPE_INT32 LDNS_RDF_TYPE_INT8
|
||||
LDNS_RDF_TYPE_IPSECKEY LDNS_RDF_TYPE_LOC LDNS_RDF_TYPE_NONE
|
||||
LDNS_RDF_TYPE_NSAP LDNS_RDF_TYPE_NSEC LDNS_RDF_TYPE_NSEC3_NEXT_OWNER
|
||||
LDNS_RDF_TYPE_NSEC3_SALT LDNS_RDF_TYPE_PERIOD LDNS_RDF_TYPE_SERVICE
|
||||
LDNS_RDF_TYPE_STR LDNS_RDF_TYPE_TIME LDNS_RDF_TYPE_HIP
|
||||
LDNS_RDF_TYPE_TSIGTIME LDNS_RDF_TYPE_TYPE LDNS_RDF_TYPE_UNKNOWN
|
||||
LDNS_RDF_TYPE_WKS LDNS_RESOLV_ANCHOR LDNS_RESOLV_DEFDOMAIN
|
||||
LDNS_RESOLV_INET LDNS_RESOLV_INET6 LDNS_RESOLV_INETANY
|
||||
LDNS_RESOLV_KEYWORD LDNS_RESOLV_KEYWORDS LDNS_RESOLV_NAMESERVER
|
||||
LDNS_RESOLV_OPTIONS LDNS_RESOLV_RTT_INF LDNS_RESOLV_RTT_MIN
|
||||
LDNS_RESOLV_SEARCH LDNS_RESOLV_SORTLIST LDNS_RR_CLASS_ANY
|
||||
LDNS_RR_CLASS_CH LDNS_RR_CLASS_COUNT LDNS_RR_CLASS_FIRST
|
||||
LDNS_RR_CLASS_HS LDNS_RR_CLASS_IN LDNS_RR_CLASS_LAST LDNS_RR_CLASS_NONE
|
||||
LDNS_RR_COMPRESS LDNS_RR_NO_COMPRESS LDNS_RR_OVERHEAD LDNS_RR_TYPE_A
|
||||
LDNS_RR_TYPE_A6 LDNS_RR_TYPE_AAAA LDNS_RR_TYPE_AFSDB LDNS_RR_TYPE_ANY
|
||||
LDNS_RR_TYPE_APL LDNS_RR_TYPE_ATMA LDNS_RR_TYPE_AXFR LDNS_RR_TYPE_CERT
|
||||
LDNS_RR_TYPE_CNAME LDNS_RR_TYPE_COUNT LDNS_RR_TYPE_DHCID
|
||||
LDNS_RR_TYPE_DLV LDNS_RR_TYPE_DNAME LDNS_RR_TYPE_DNSKEY LDNS_RR_TYPE_DS
|
||||
LDNS_RR_TYPE_EID LDNS_RR_TYPE_FIRST LDNS_RR_TYPE_GID LDNS_RR_TYPE_GPOS
|
||||
LDNS_RR_TYPE_HINFO LDNS_RR_TYPE_IPSECKEY LDNS_RR_TYPE_ISDN
|
||||
LDNS_RR_TYPE_IXFR LDNS_RR_TYPE_KEY LDNS_RR_TYPE_KX LDNS_RR_TYPE_LAST
|
||||
LDNS_RR_TYPE_LOC LDNS_RR_TYPE_MAILA LDNS_RR_TYPE_MAILB LDNS_RR_TYPE_MB
|
||||
LDNS_RR_TYPE_MD LDNS_RR_TYPE_MF LDNS_RR_TYPE_MG LDNS_RR_TYPE_MINFO
|
||||
LDNS_RR_TYPE_MR LDNS_RR_TYPE_MX LDNS_RR_TYPE_NAPTR LDNS_RR_TYPE_NIMLOC
|
||||
LDNS_RR_TYPE_NS LDNS_RR_TYPE_NSAP LDNS_RR_TYPE_NSAP_PTR
|
||||
LDNS_RR_TYPE_NSEC LDNS_RR_TYPE_NSEC3 LDNS_RR_TYPE_NSEC3PARAM
|
||||
LDNS_RR_TYPE_NSEC3PARAMS LDNS_RR_TYPE_NULL LDNS_RR_TYPE_NXT
|
||||
LDNS_RR_TYPE_OPT LDNS_RR_TYPE_PTR LDNS_RR_TYPE_PX LDNS_RR_TYPE_RP
|
||||
LDNS_RR_TYPE_RRSIG LDNS_RR_TYPE_RT LDNS_RR_TYPE_SIG LDNS_RR_TYPE_SINK
|
||||
LDNS_RR_TYPE_SOA LDNS_RR_TYPE_SPF LDNS_RR_TYPE_SRV LDNS_RR_TYPE_SSHFP
|
||||
LDNS_RR_TYPE_TALINK LDNS_RR_TYPE_TSIG LDNS_RR_TYPE_TXT LDNS_RR_TYPE_UID
|
||||
LDNS_RR_TYPE_UINFO LDNS_RR_TYPE_UNSPEC LDNS_RR_TYPE_WKS
|
||||
LDNS_RR_TYPE_X25 LDNS_RSAMD5 LDNS_RSASHA1 LDNS_RSASHA1_NSEC3
|
||||
LDNS_RSASHA256 LDNS_RSASHA512 LDNS_SECTION_ADDITIONAL
|
||||
LDNS_SECTION_ANSWER LDNS_SECTION_ANY LDNS_SECTION_ANY_NOQUESTION
|
||||
LDNS_SECTION_AUTHORITY LDNS_SECTION_QUESTION LDNS_SHA1 LDNS_SHA256
|
||||
LDNS_SIGN_DSA LDNS_SIGN_DSA_NSEC3 LDNS_SIGN_ECC_GOST
|
||||
LDNS_SIGN_HMACSHA1 LDNS_SIGN_HMACSHA256
|
||||
LDNS_SIGN_RSAMD5 LDNS_SIGN_RSASHA1 LDNS_SIGN_RSASHA1_NSEC3
|
||||
LDNS_SIGN_RSASHA256 LDNS_SIGN_RSASHA512 LDNS_STATUS_ADDRESS_ERR
|
||||
LDNS_STATUS_CERT_BAD_ALGORITHM LDNS_STATUS_CRYPTO_ALGO_NOT_IMPL
|
||||
LDNS_STATUS_CRYPTO_BOGUS LDNS_STATUS_CRYPTO_EXPIRATION_BEFORE_INCEPTION
|
||||
LDNS_STATUS_CRYPTO_NO_DNSKEY LDNS_STATUS_CRYPTO_NO_DS
|
||||
LDNS_STATUS_CRYPTO_NO_MATCHING_KEYTAG_DNSKEY
|
||||
LDNS_STATUS_CRYPTO_NO_RRSIG LDNS_STATUS_CRYPTO_NO_TRUSTED_DNSKEY
|
||||
LDNS_STATUS_CRYPTO_NO_TRUSTED_DS LDNS_STATUS_CRYPTO_SIG_EXPIRED
|
||||
LDNS_STATUS_CRYPTO_SIG_NOT_INCEPTED LDNS_STATUS_CRYPTO_TSIG_BOGUS
|
||||
LDNS_STATUS_CRYPTO_TSIG_ERR LDNS_STATUS_CRYPTO_TYPE_COVERED_ERR
|
||||
LDNS_STATUS_CRYPTO_UNKNOWN_ALGO LDNS_STATUS_CRYPTO_VALIDATED
|
||||
LDNS_STATUS_DDD_OVERFLOW LDNS_STATUS_DNSSEC_EXISTENCE_DENIED
|
||||
LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND
|
||||
LDNS_STATUS_DNSSEC_NSEC_RR_NOT_COVERED
|
||||
LDNS_STATUS_DNSSEC_NSEC_WILDCARD_NOT_COVERED
|
||||
LDNS_STATUS_DOMAINNAME_OVERFLOW LDNS_STATUS_DOMAINNAME_UNDERFLOW
|
||||
LDNS_STATUS_EMPTY_LABEL LDNS_STATUS_ENGINE_KEY_NOT_LOADED
|
||||
LDNS_STATUS_ERR LDNS_STATUS_FILE_ERR LDNS_STATUS_INTERNAL_ERR
|
||||
LDNS_STATUS_INVALID_B32_EXT LDNS_STATUS_INVALID_B64
|
||||
LDNS_STATUS_INVALID_HEX LDNS_STATUS_INVALID_INT LDNS_STATUS_INVALID_IP4
|
||||
LDNS_STATUS_INVALID_IP6 LDNS_STATUS_INVALID_POINTER
|
||||
LDNS_STATUS_INVALID_STR LDNS_STATUS_INVALID_TIME
|
||||
LDNS_STATUS_LABEL_OVERFLOW LDNS_STATUS_MEM_ERR
|
||||
LDNS_STATUS_MISSING_RDATA_FIELDS_KEY
|
||||
LDNS_STATUS_MISSING_RDATA_FIELDS_RRSIG LDNS_STATUS_NETWORK_ERR
|
||||
LDNS_STATUS_NOT_IMPL LDNS_STATUS_NO_DATA LDNS_STATUS_NSEC3_ERR
|
||||
LDNS_STATUS_NULL LDNS_STATUS_OK LDNS_STATUS_PACKET_OVERFLOW
|
||||
LDNS_STATUS_RES_NO_NS LDNS_STATUS_RES_QUERY LDNS_STATUS_SOCKET_ERROR
|
||||
LDNS_STATUS_SSL_ERR LDNS_STATUS_SYNTAX_ALG_ERR
|
||||
LDNS_STATUS_SYNTAX_BAD_ESCAPE LDNS_STATUS_SYNTAX_CLASS_ERR
|
||||
LDNS_STATUS_SYNTAX_DNAME_ERR LDNS_STATUS_SYNTAX_EMPTY
|
||||
LDNS_STATUS_SYNTAX_ERR LDNS_STATUS_SYNTAX_INCLUDE
|
||||
LDNS_STATUS_SYNTAX_INCLUDE_ERR_NOTIMPL
|
||||
LDNS_STATUS_SYNTAX_INTEGER_OVERFLOW
|
||||
LDNS_STATUS_SYNTAX_ITERATIONS_OVERFLOW LDNS_STATUS_SYNTAX_KEYWORD_ERR
|
||||
LDNS_STATUS_SYNTAX_MISSING_VALUE_ERR LDNS_STATUS_SYNTAX_ORIGIN
|
||||
LDNS_STATUS_SYNTAX_RDATA_ERR LDNS_STATUS_SYNTAX_TTL
|
||||
LDNS_STATUS_SYNTAX_TTL_ERR LDNS_STATUS_SYNTAX_TYPE_ERR
|
||||
LDNS_STATUS_SYNTAX_VERSION_ERR LDNS_STATUS_UNKNOWN_INET
|
||||
LDNS_STATUS_WIRE_INCOMPLETE_ADDITIONAL
|
||||
LDNS_STATUS_WIRE_INCOMPLETE_ANSWER
|
||||
LDNS_STATUS_WIRE_INCOMPLETE_AUTHORITY
|
||||
LDNS_STATUS_WIRE_INCOMPLETE_HEADER LDNS_STATUS_WIRE_INCOMPLETE_QUESTION
|
||||
LDNS_TC)) {
|
||||
next if (eval "my \$a = $constname; 1");
|
||||
if ($@ =~ /^Your vendor has not defined LDNS macro $constname/) {
|
||||
print "# pass: $@";
|
||||
} else {
|
||||
print "# fail: $@";
|
||||
$fail = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ok( $fail == 0 , 'Constants' );
|
||||
#########################
|
||||
|
||||
# Insert your test code below, the Test::More module is use()ed here so read
|
||||
# its man page ( perldoc Test::More ) for help writing this test script.
|
||||
|
56
contrib/DNS-LDNS/t/dnssec_datachain.t
Normal file
56
contrib/DNS-LDNS/t/dnssec_datachain.t
Normal file
@ -0,0 +1,56 @@
|
||||
use Test::More tests => 10;
|
||||
use Test::Exception;
|
||||
|
||||
use FindBin qw/$Bin/;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
# Note: This test makes queries on real internet dns data, and assumes
|
||||
# that the iis.se domain is signed.
|
||||
|
||||
my $r = new DNS::LDNS::Resolver(filename => "/etc/resolv.conf");
|
||||
$r->set_dnssec(1);
|
||||
$r->set_random(0);
|
||||
|
||||
my $p = $r->query(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'iis.se.'),
|
||||
LDNS_RR_TYPE_SOA, LDNS_RR_CLASS_IN, LDNS_RD);
|
||||
|
||||
isa_ok($p, 'DNS::LDNS::Packet');
|
||||
|
||||
my $rrset = $p->rr_list_by_type(LDNS_RR_TYPE_SOA, LDNS_SECTION_ANSWER);
|
||||
|
||||
ok($rrset->rr_count > 0, 'Got an answer with some content');
|
||||
|
||||
my $chain = $r->build_data_chain(LDNS_RD, $rrset, $p, undef);
|
||||
|
||||
isa_ok($chain, 'DNS::LDNS::DNSSecDataChain');
|
||||
|
||||
isa_ok($chain->parent, 'DNS::LDNS::DNSSecDataChain');
|
||||
|
||||
dies_ok {
|
||||
my $new_rr = new DNS::LDNS::RR(str => 'test.test. 1234 IN A 10.0.0.1');
|
||||
my $t = $chain->derive_trust_tree($new_rr);
|
||||
} 'Making a trust tree with foreign rr fails.';
|
||||
|
||||
my $rr = $chain->rrset->rr(0);
|
||||
|
||||
my $tree = $chain->derive_trust_tree($rr);
|
||||
|
||||
isa_ok($tree, 'DNS::LDNS::DNSSecTrustTree');
|
||||
|
||||
# Get root keys.
|
||||
my $root_keys_pk = $r->query(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, '.'),
|
||||
LDNS_RR_TYPE_DNSKEY, LDNS_RR_CLASS_IN, LDNS_RD);
|
||||
my $root_keys = $root_keys_pk->rr_list_by_type(
|
||||
LDNS_RR_TYPE_DNSKEY, LDNS_SECTION_ANSWER);
|
||||
|
||||
is($tree->contains_keys($root_keys), LDNS_STATUS_OK,
|
||||
'Root key found in trust chain');
|
||||
|
||||
ok($tree->depth > 1, 'The trust tree is more than one node.');
|
||||
|
||||
isa_ok($tree->parent(0), 'DNS::LDNS::DNSSecTrustTree');
|
35
contrib/DNS-LDNS/t/dnssec_zone.t
Normal file
35
contrib/DNS-LDNS/t/dnssec_zone.t
Normal file
@ -0,0 +1,35 @@
|
||||
use Test::More tests => 7;
|
||||
|
||||
use FindBin qw/$Bin/;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
# Create a new dnssec zone
|
||||
my $z = new DNS::LDNS::DNSSecZone;
|
||||
isa_ok($z, 'DNS::LDNS::DNSSecZone', 'Create an empty zone');
|
||||
|
||||
# Read a zone from file and create a dnssec zone from it
|
||||
my $z2 = new DNS::LDNS::Zone(
|
||||
filename => "$Bin/testdata/myzone.org");
|
||||
|
||||
$z->create_from_zone($z2);
|
||||
|
||||
my $rrset = $z->find_rrset(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'ns1.myzone.org.'),
|
||||
LDNS_RR_TYPE_A);
|
||||
|
||||
is($rrset->rrs->rr->type, LDNS_RR_TYPE_A, 'Found an A record');
|
||||
is($rrset->rrs->rr->dname, 'ns1.myzone.org.', 'Dname is ns1.myzone.org.');
|
||||
|
||||
is($z->add_empty_nonterminals, LDNS_STATUS_OK, 'Add empty non-terminals');
|
||||
|
||||
my $klist = new DNS::LDNS::KeyList;
|
||||
$klist->push(new DNS::LDNS::Key(filename => "$Bin/testdata/key.private"));
|
||||
$klist->key(0)->set_pubkey_owner(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'myzone.org'));
|
||||
|
||||
is($z->sign($klist, LDNS_SIGNATURE_REMOVE_ADD_NEW, 0), LDNS_STATUS_OK, 'Sign');
|
||||
is($z->sign_nsec3($klist, LDNS_SIGNATURE_REMOVE_ADD_NEW, 1, 0, 10, 'ABBA', 0),
|
||||
LDNS_STATUS_OK, 'Sign nsec3');
|
25
contrib/DNS-LDNS/t/key.t
Normal file
25
contrib/DNS-LDNS/t/key.t
Normal file
@ -0,0 +1,25 @@
|
||||
use Test::More tests => 8;
|
||||
|
||||
use FindBin qw/$Bin/;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
my $key = new DNS::LDNS::Key(filename => "$Bin/testdata/key.private");
|
||||
ok($key, 'Created new key object from file');
|
||||
is($key->algorithm, 7, 'Algorithm is NSEC3RSASHA1');
|
||||
my $now = time;
|
||||
$key->set_inception($now);
|
||||
$key->set_expiration($now + 10000);
|
||||
is($key->inception, $now, 'Inception time');
|
||||
is($key->expiration, $now + 10000, 'Expiration time');
|
||||
like($key->to_rr->to_string, qr|3600\s+IN\s+DNSKEY\s+256\s+3\s+7\s+AwEAAfg/ghOkk|, 'Got rr representation of key');
|
||||
|
||||
my $klist = new DNS::LDNS::KeyList;
|
||||
$klist->push($key);
|
||||
is($klist->count, 1, 'Keylist has one key');
|
||||
is($$key, ${$klist->key(0)}, 'Key in keylist is the one we pushed');
|
||||
# FIXME: pop is buggy in ldns 1.6.12, uncomment when this starts working
|
||||
# is($klist->pop(), $$key, 'Pop key from list');
|
||||
# is($klist->count, 0, 'No keys left in list');
|
47
contrib/DNS-LDNS/t/rdata.t
Normal file
47
contrib/DNS-LDNS/t/rdata.t
Normal file
@ -0,0 +1,47 @@
|
||||
use Test::More tests => 18;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
# Integer data
|
||||
my $i = new DNS::LDNS::RData(LDNS_RDF_TYPE_INT32, '1237654');
|
||||
is($i->to_string, '1237654', 'Integer value rdata');
|
||||
|
||||
my $ii = new DNS::LDNS::RData(LDNS_RDF_TYPE_INT32, '1237654X');
|
||||
is($ii, undef, '1237654X is invalid');
|
||||
|
||||
# Period data
|
||||
my $p1 = new DNS::LDNS::RData(LDNS_RDF_TYPE_PERIOD, '3h3m3s');
|
||||
is($p1->to_string, sprintf("%d", 3600*3 + 60*3 + 3), 'Normalizing period');
|
||||
|
||||
my $pi = new DNS::LDNS::RData(LDNS_RDF_TYPE_PERIOD, '3h3X3s');
|
||||
is($pi, undef, 'Invalid period value 3h3X3s');
|
||||
|
||||
# DNames
|
||||
my $dn1 = new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'azone.org');
|
||||
my $dn2 = new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'other.org');
|
||||
my $dn3 = new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'sub.other.org');
|
||||
my $dn4 = new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'adder.org');
|
||||
|
||||
$dn1->cat($dn2);
|
||||
is($dn1->to_string, 'azone.org.other.org.', 'Concatenating two domain names');
|
||||
my $chopped = $dn1->left_chop;
|
||||
is($chopped->to_string, 'org.other.org.', 'Chop off left domain name label');
|
||||
ok($dn3->is_subdomain($dn2), 'sub.other.org is subdomain of other.org');
|
||||
ok(!$dn2->is_subdomain($dn3), 'other.org is not subdomain of sub.other.org');
|
||||
is($dn3->label_count, 3, 'sub.other.org has 3 labels');
|
||||
is($dn3->label(1)->to_string, 'other.', 'label 1 of sub.other.org is other.');
|
||||
|
||||
my $dni = new DNS::LDNS::RData(
|
||||
LDNS_RDF_TYPE_DNAME, 'not..valid.org');
|
||||
is($dni, undef, 'Invalid dname not_valid.org');
|
||||
|
||||
my $wc = new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, '*.other.org');
|
||||
ok($wc->is_wildcard, '*.other.org is a wildcard');
|
||||
ok(!$dn3->is_wildcard, 'sub.other.org is not a wildcard');
|
||||
ok($dn3->matches_wildcard($wc), 'sub.other.org matches *.other.org');
|
||||
ok(!$dn4->matches_wildcard($wc), 'adder.org does not match *.other.org');
|
||||
|
||||
is($dn3->compare($dn4), 1, 'sub.other.org > adder.org');
|
||||
is($dn4->compare($dn3), -1, 'adder.org < sub.other.org');
|
23
contrib/DNS-LDNS/t/resolver.t
Normal file
23
contrib/DNS-LDNS/t/resolver.t
Normal file
@ -0,0 +1,23 @@
|
||||
use Test::More tests => 3;
|
||||
|
||||
use FindBin qw/$Bin/;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
my $r = new DNS::LDNS::Resolver(filename => "/etc/resolv.conf");
|
||||
|
||||
$r->set_random(0);
|
||||
|
||||
my $p = $r->query(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'org'),
|
||||
LDNS_RR_TYPE_SOA, LDNS_RR_CLASS_IN, LDNS_RD);
|
||||
|
||||
isa_ok($p, 'DNS::LDNS::Packet', 'Make a simple query');
|
||||
|
||||
my $r2 = new DNS::LDNS::Resolver(filename => "$Bin/testdata/resolv.conf");
|
||||
|
||||
$r2->set_rtt(2, 3);
|
||||
my @rtt = $r2->rtt;
|
||||
is_deeply(\@rtt, [2, 3], "set_rtt and rtt");
|
47
contrib/DNS-LDNS/t/rr.t
Normal file
47
contrib/DNS-LDNS/t/rr.t
Normal file
@ -0,0 +1,47 @@
|
||||
use Test::More tests => 14;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
my $rr1 = new DNS::LDNS::RR;
|
||||
isa_ok($rr1, 'DNS::LDNS::RR', 'Create empty rr');
|
||||
|
||||
$rr1 = new DNS::LDNS::RR(
|
||||
type => LDNS_RR_TYPE_SOA,
|
||||
class => LDNS_RR_CLASS_CH,
|
||||
ttl => 1234,
|
||||
owner => 'myzone.org',
|
||||
rdata => [
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'hostmaster.myzone.org'),
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'master.myzone.org'),
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_INT32, '2012113030'),
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_PERIOD, '12345'),
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_PERIOD, '1827'),
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_PERIOD, '2345678'),
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_PERIOD, '87654')
|
||||
],
|
||||
);
|
||||
isa_ok($rr1, 'DNS::LDNS::RR', 'Create SOA rr with rdata');
|
||||
|
||||
like($rr1->to_string, qr/^myzone\.org\.\s+1234\s+CH\s+SOA\s+hostmaster\.myzone\.org\.\s+master\.myzone\.org\.\s+2012113030\s+12345\s+1827\s+2345678\s+87654$/,
|
||||
'Format SOA rr as string');
|
||||
|
||||
is($rr1->pop_rdata->to_string, '87654', 'pop rdata');
|
||||
$rr1->push_rdata(new DNS::LDNS::RData(LDNS_RDF_TYPE_PERIOD, '55667'));
|
||||
is($rr1->rdata(6)->to_string, '55667', 'push_rdata and access rdata by index');
|
||||
|
||||
my $rr2 = new DNS::LDNS::RR(str => 'myzone.org. 1234 IN SOA hostmaster.myzone.org. master.myzone.org. 2012 12345 1827 2345678 87654');
|
||||
isa_ok($rr2, 'DNS::LDNS::RR', 'Create SOA rr from string');
|
||||
like($rr2->to_string, qr/^myzone\.org\.\s+1234\s+IN\s+SOA\s+hostmaster\.myzone\.org\.\s+master\.myzone\.org\.\s+2012\s+12345\s+1827\s+2345678\s+87654$/,
|
||||
'Format it back to string');
|
||||
|
||||
ok($rr1->compare($rr2) > 0, 'Compare rr, greater than');
|
||||
ok($rr2->compare($rr1) < 0, 'Compare rr, less than');
|
||||
is($rr1->compare($rr1), 0, 'Compare rr, equal');
|
||||
|
||||
my $rr3 = new DNS::LDNS::RR(str => 'ozone.org. 1234 IN SOA hostmaster.ozone.org. master.ozone.org. 2012 12345 1827 2345678 87654');
|
||||
|
||||
ok($rr3->compare_dname($rr1) > 0, 'Compare dname, greater than');
|
||||
ok($rr1->compare_dname($rr3) < 0, 'Compare dname, less than');
|
||||
is($rr1->compare_dname($rr2), 0, 'Compare dname, equal');
|
84
contrib/DNS-LDNS/t/rrlist.t
Normal file
84
contrib/DNS-LDNS/t/rrlist.t
Normal file
@ -0,0 +1,84 @@
|
||||
use Test::More tests => 24;
|
||||
|
||||
use FindBin qw/$Bin/;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
# Create list
|
||||
my $list = new DNS::LDNS::RRList;
|
||||
isa_ok($list, 'DNS::LDNS::RRList', 'Create an empty rr list');
|
||||
|
||||
# Push/pop/count rr
|
||||
$list->push(new DNS::LDNS::RR(str => 'ns.myzone.org 3600 IN AAAA ::1'));
|
||||
is($list->rr_count, 1, 'Added one rr');
|
||||
like($list->rr(0)->to_string, qr/^ns\.myzone\.org\.\s+3600\s+IN\s+AAAA\s+::1$/, 'Added rr is at position 0');
|
||||
$list->push(new DNS::LDNS::RR(str => 'ns.myzone.org 7200 IN A 192.168.100.2'));
|
||||
is($list->rr_count, 2, 'Added another rr');
|
||||
like($list->rr(1)->to_string, qr/^ns\.myzone\.org\.\s+7200\s+IN\s+A\s+192\.168\.100\.2$/, 'Last added rr is at position 1');
|
||||
like($list->pop->to_string, qr/^ns\.myzone\.org\.\s+7200\s+IN\s+A\s+192\.168\.100\.2$/, 'pop the last element');
|
||||
is($list->rr_count, 1, '1 element left in the list');
|
||||
|
||||
# Push/pop list
|
||||
my $l2 = new DNS::LDNS::RRList;
|
||||
$l2->push(new DNS::LDNS::RR(str => 'ns2.myzone.org 3600 IN A 192.168.100.0'));
|
||||
$l2->push(new DNS::LDNS::RR(str => 'ns2.myzone.org 3600 IN A 192.168.100.1'));
|
||||
$list->push_list($l2);
|
||||
is($list->rr_count, 3, 'Pushed two elements. List count is now 3.');
|
||||
$list->push_list($l2);
|
||||
$list->push_list($l2);
|
||||
my $l3 = $list->pop_list(1);
|
||||
is($list->rr_count, 6, 'Pushed 4 elements, popped 1, count is now 6');
|
||||
is($l3->rr_count, 1, 'Popped list contains 1 elements');
|
||||
$l3 = $list->pop_list(3);
|
||||
is($list->rr_count, 3, 'Popped 3 elements, count is now 3');
|
||||
is($l3->rr_count, 3, 'Popped list contains 3 elements');
|
||||
|
||||
# RRSets
|
||||
ok($l2->is_rrset, 'List is rrset');
|
||||
ok(!$list->is_rrset, 'List is no longer an rrset');
|
||||
my $rrset = $list->pop_rrset;
|
||||
ok($rrset->is_rrset, 'Popped list is rrset');
|
||||
is($rrset->rr_count, 2, 'Popped rrset has two elements.');
|
||||
|
||||
# Compare, contains, subtype
|
||||
my $rr = new DNS::LDNS::RR(str => 'ns2.myzone.org 3600 IN A 192.168.100.0');
|
||||
ok($rrset->contains_rr($rr), 'RRSet contains rr '.$rr->to_string);
|
||||
is($list->compare($l2), -1, '$list < $l2');
|
||||
is($l2->compare($list), 1, '$l2 > $list');
|
||||
|
||||
$list->push(new DNS::LDNS::RR(str => 'ns3.myzone.org 3600 IN A 192.168.100.0'),
|
||||
new DNS::LDNS::RR(str => 'ns3.myzone.org 3600 IN A 192.168.100.1'),
|
||||
new DNS::LDNS::RR(str => 'ns4.myzone.org 3600 IN A 192.168.100.1'));
|
||||
my $subtype = $list->subtype_by_rdata(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_A, '192.168.100.1'), 0);
|
||||
is($subtype->to_string, "ns3.myzone.org.\t3600\tIN\tA\t192.168.100.1\nns4.myzone.org.\t3600\tIN\tA\t192.168.100.1\n", 'Filter rrs by rdata');
|
||||
|
||||
# DNSSec signature verification
|
||||
my $keylist = new DNS::LDNS::RRList;
|
||||
$keylist->push(
|
||||
new DNS::LDNS::RR(str => 'trondheim.no. 3600 IN DNSKEY 256 3 8 AwEAAZIDdRI8I+F/J6OT8xX7CbGQYRr8rWH9dvloUlRJXcEVE2pRAez6 pJC5Odg+i2WvDUeE4tUO1gwwjU83TIinZxxsDnqr7FzvqpHeJbVd2N3d S4zaJcbjSnwMqdebmTEXSrflp8DeIAH0GQGNQjhOPubbb/nADYP2RS1i CoOADa8P'),
|
||||
new DNS::LDNS::RR(str => 'trondheim.no. 3600 IN DNSKEY 257 3 8 AwEAAax9EgKyRsMpU2B0E2dZ+nkWnmZHjlBO3uXBI+2x33dG8bk+XSqr kyWTelhhsqLqIxsaYSwYgzLtn+/qzlFjKwcaU95p+Tp95MOVXYqUtRyC VyLGkzA7ZDbx7TFCi3PyLDM/Arx+DvOx6nNvA/erqIU5gYEo9Nm1KXEy rhfSn3xc96p1AOhmTuSo6EfYlPY4gxHDgJdHFv7Fi9zV6VFmJ29h0rsG 5g3pV1lvCcGcxfRLJ1u7JRw2BWMo9lgHzGuypEVV7iLnvbfDlXhF+jAS owR2JxlESC3dOgNiNWvc4pbyVXBXpP6h/5JpcxkzF7BNJMZiLN14qvam G1+LuZM8qfc=')
|
||||
);
|
||||
|
||||
my $soalist = new DNS::LDNS::RRList;
|
||||
$soalist->push(
|
||||
new DNS::LDNS::RR(str => 'trondheim.no. 3600 IN SOA charm.norid.no. hostmaster.norid.no. 2013021137 14400 1800 2419200 3600')
|
||||
);
|
||||
|
||||
my $siglist = new DNS::LDNS::RRList;
|
||||
$siglist->push(
|
||||
new DNS::LDNS::RR(str => 'trondheim.no. 3600 IN RRSIG SOA 8 2 3600 20130227105101 20130213090318 36381 trondheim.no. NbeN8E4pvQSDk3Dn0i8B4e2A3KAY8JrX+zcJazPTgHbT6wjzCncn3ANn 6rs+HdcCLtptyX1QbzlZD/lOY8kjJw5TEUoFX2Q/2sBYdt1aT6qgt/+H o71iUz3bk1V73zjSG/OpqG0oXmjCWSBZgzK6UI+zGlgG0Kvrc7H1pw5S ZBA=')
|
||||
);
|
||||
|
||||
my ($status, $goodkeys) = $soalist->verify_notime($siglist, $keylist);
|
||||
is ($status, LDNS_STATUS_OK, 'Verification returned status ok.');
|
||||
is ($goodkeys->rr_count, 1, 'One key matched the signature.');
|
||||
|
||||
my $klist = new DNS::LDNS::KeyList;
|
||||
$klist->push(new DNS::LDNS::Key(filename => "$Bin/testdata/key.private"));
|
||||
$klist->key(0)->set_pubkey_owner(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'myzone.org'));
|
||||
my $sigs = $l2->sign_public($klist);
|
||||
is($sigs->rr_count, 1, 'Sign public, got 1 rrsig');
|
13
contrib/DNS-LDNS/t/testdata/key.private
vendored
Normal file
13
contrib/DNS-LDNS/t/testdata/key.private
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
Private-key-format: v1.2
|
||||
Algorithm: 7 (NSEC3RSASHA1)
|
||||
Modulus: +D+CE6ST+vFtbnXLdNESSprWSpbpRqEyri20vOx/JIViYdflGQyT0SDWSAE0JqtRlq73qSTDNuR3KWG/57oQQQ5P/wdQaF4TXA/nGjQJPEnhwKVUPVl5WRvqJLpW3C5xSSkhUkwjCp8y6z4NkbX0x7kum9ZTyTai6hkAhjyXu56yXAHX80DWadGK7RmX4JNlJalp2O33hJmakw8BVpgM9yaN4TixVsmZyHLi4hLjMAsjkEEJnfV8WoMEyyjs4kdKDHQAIa854loRcOluT1FiBKgecVAjDu/mkxnqYedN68Yx/wi7D+eClGf/gZjsmuoKKxCxnvDkRCKxrdMJtrsduw==
|
||||
PublicExponent: AQAB
|
||||
PrivateExponent: A8m0SmhweZvFd7IEcLvf85N5QZob5SAAjffUki1poz0Fy0hoDoHKn55IpsCd8xkaHZp93O7aq7PAvbjoHLkSFmwJfHK4H1+QHA+CDzxMB8d40l+zcVw0Jc/vOrA9Mw7iW6NtBrxyrG7RcBV6T4bfPUzuESKsFJ3oznmjMGksR4iUrnYAoUgi1pCQlxhSkPM74YhNWbUxYr4gRlL2xGGcJ2qMM8KG06or/Ok+d4bxnxiDBo41THik8ptfu/DL3HrJLOJ1CrvZGy9Q3uFiCvfD9Sk+eOZz1XPkJrUDKGYGoUvZc8enStXSM+TKd3EQy5owjJt+j2h0JdYJM8pxF2EWwQ==
|
||||
Prime1: /5r4e+6kJS/+UJ0DMenJGm0vxfgFHvk5yLfz+1sKd6C9qQJN5da1m6kWuPdtBG7XGhZb8cJPOfK//g9hVS9GYEDyYmhYZsPTL+1vkiecDpeEQkrf4RCtU7NXLNT/AVNe01iEnIGuKbva6z19P1hjNO23d7LXHil1oULM1W8O1Z8=
|
||||
Prime2: +KGhJOe+dB5Ud9cFlspMIIpZKHvoDc8VUb2avnhicDX5YC8dVS3nBoyc1cBNgxi4nSvBSl8/fwNT1cHJsPj7Xp2FOAsIBITRnmQt2P5JDpTEuMkEjMT8h/gJ8WnJ0+/VQhLG6rfsSAXdXvVhP4VYttPdiQ0fAe8b5v2MH1VzamU=
|
||||
Exponent1: UWCEVeifR9ukywOCHeUBirFScWPKNZdBR18RhWfxyC5b07ARHuihvyIxQsg7ZBrpzrtpoGmtkZRwfbFl2poHfOOQh7YS1vzngq3ERLLpo1en2vc9mckWdbx2N6bEXSau3Pikl7NNwKm3RAe6lW1NgG9iZvCAPnESqzm6PwVxop8=
|
||||
Exponent2: FMsnt/dttTZoKBGilQbcMQiBBmK+eJEuHkT2MSHOUcYh0gp+sIYDQUf3QeUwVlt17ScgpkCrBctYcpMfdB6On04bOyGpDP+yrEWClBhIMeD9RtsA92juGc0Dv93yFDiFpF3/pte0+h0Lc4qgFHjpf3jemTywsC+4LKxd0K0L1wU=
|
||||
Coefficient: klnXksRr0Z8HPLASytPt4EeBK3Md7MM+Ihm6DIM5PA/KO9k0s8231hspcxBDj37HYwJ7eD77svUJFzdUOqIT8gChc6uq9VI9NFggs8rn4EndoEe+zU477NpL4U09LMfbAN+NATkhDWabVIQBeGqpIAR0fxFIqGhDtkiLyNqhq3c=
|
||||
Created: 20120614100023
|
||||
Publish: 20120614100023
|
||||
Activate: 20120614100023
|
17
contrib/DNS-LDNS/t/testdata/myzone.org
vendored
Normal file
17
contrib/DNS-LDNS/t/testdata/myzone.org
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
$TTL 4500
|
||||
$ORIGIN myzone.org.
|
||||
|
||||
myzone.org. 1000 IN SOA (
|
||||
ldns.myzone.org.
|
||||
ns.ldns.myzone.org.
|
||||
2012113030
|
||||
12345
|
||||
1827
|
||||
2345678
|
||||
87654 )
|
||||
|
||||
ns.ldns A 192.168.100.2
|
||||
ns2 5600 IN AAAA 2001:dead:dead::2
|
||||
ns2 6600 IN A 192.168.100.7
|
||||
ns1 3600 IN A 192.168.100.2
|
||||
ns1 4600 IN AAAA 2001:dead:dead::1
|
3
contrib/DNS-LDNS/t/testdata/resolv.conf
vendored
Normal file
3
contrib/DNS-LDNS/t/testdata/resolv.conf
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
nameserver 127.0.0.1
|
||||
nameserver 192.168.100.1
|
||||
search foo.bar.org
|
75
contrib/DNS-LDNS/t/zone.t
Normal file
75
contrib/DNS-LDNS/t/zone.t
Normal file
@ -0,0 +1,75 @@
|
||||
use Test::More tests => 16;
|
||||
|
||||
use FindBin qw/$Bin/;
|
||||
|
||||
use DNS::LDNS ':all';
|
||||
|
||||
BEGIN { use_ok('DNS::LDNS') };
|
||||
|
||||
# Create a new zone
|
||||
my $z = new DNS::LDNS::Zone;
|
||||
isa_ok($z, 'DNS::LDNS::Zone', 'Create an empty zone');
|
||||
|
||||
# Fill inn a soa and some rrs
|
||||
$z->set_soa(new DNS::LDNS::RR(str => join(' ', qw/myzone.org 1000 IN SOA
|
||||
hostmaster.myzone.org. master.myzone.org. 2012113030 12345 1827 2345678
|
||||
87654/)));
|
||||
|
||||
is($z->soa->dname, 'myzone.org.', 'Found soa record');
|
||||
|
||||
my $rrs = new DNS::LDNS::RRList;
|
||||
$rrs->push(new DNS::LDNS::RR(str => 'ns2.myzone.org 3600 IN A 192.168.100.2'),
|
||||
new DNS::LDNS::RR(str => 'ns2.myzone.org 3600 IN A 192.168.100.9'),
|
||||
new DNS::LDNS::RR(str => 'ns3.myzone.org 3600 IN A 192.168.100.2'),
|
||||
new DNS::LDNS::RR(str => 'ns1.myzone.org 3600 IN A 192.168.100.7'));
|
||||
|
||||
$z->set_rrs($rrs);
|
||||
is($z->rrs->rr(0)->to_string, "ns2.myzone.org.\t3600\tIN\tA\t192.168.100.2\n",
|
||||
'Check first rr');
|
||||
is($z->rrs->rr(3)->to_string, "ns1.myzone.org.\t3600\tIN\tA\t192.168.100.7\n",
|
||||
'Check last rr');
|
||||
|
||||
$z->sort;
|
||||
is($z->rrs->rr(0)->to_string, "ns1.myzone.org.\t3600\tIN\tA\t192.168.100.7\n",
|
||||
'Check first rr after sorting');
|
||||
is($z->rrs->rr(3)->to_string, "ns3.myzone.org.\t3600\tIN\tA\t192.168.100.2\n",
|
||||
'Check last rr after sorting');
|
||||
|
||||
# Read a zone from file
|
||||
my $z2 = new DNS::LDNS::Zone(
|
||||
filename => "$Bin/testdata/myzone.org", ttl => 100);
|
||||
|
||||
$z2->canonicalize;
|
||||
|
||||
like($z2->to_string, qr/\nns.ldns.myzone.org.\s+/, 'Canonicalize');
|
||||
|
||||
like($z2->to_string, qr/^myzone.org.\s+1000\s+IN\s+SOA\s+ldns.myzone.org.\s+ns.ldns.myzone.org.\s+2012113030\s+12345\s+1827\s+2345678\s+87654\s+/, 'Found soa rec');
|
||||
|
||||
like($z2->to_string, qr/ns.ldns.myzone.org.\s+4500\s+IN\s+A\s+192.168.100.2/, 'Found ns rec');
|
||||
|
||||
like($z2->to_string, qr/ns2.myzone.org.\s+5600\s+IN\s+AAAA\s+2001:dead:dead::2/, 'Found yet another ns rec');
|
||||
|
||||
is($z2->rrs->rr_count, 5, 'Zone has 5 rrs');
|
||||
|
||||
my $klist = new DNS::LDNS::KeyList;
|
||||
$klist->push(new DNS::LDNS::Key(filename => "$Bin/testdata/key.private"));
|
||||
$klist->key(0)->set_pubkey_owner(
|
||||
new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'myzone.org'));
|
||||
|
||||
my $z3 = $z2->sign($klist);
|
||||
|
||||
my $sigc = grep { $z3->rrs->rr($_)->type == LDNS_RR_TYPE_RRSIG }
|
||||
(0 .. $z3->rrs->rr_count - 1);
|
||||
is($sigc, 10, 'Signed zone has 10 signatures');
|
||||
my $nsecc = grep { $z3->rrs->rr($_)->type == LDNS_RR_TYPE_NSEC }
|
||||
(0 .. $z3->rrs->rr_count - 1);
|
||||
is($nsecc, 4, 'Signed zone has 3 nsec recs');
|
||||
|
||||
my $z4 = $z2->sign_nsec3($klist, 1, 0, 2, 'ABC');
|
||||
|
||||
my $sigc3 = grep { $z4->rrs->rr($_)->type == LDNS_RR_TYPE_RRSIG }
|
||||
(0 .. $z4->rrs->rr_count - 1);
|
||||
is($sigc3, 12, 'NSEC3-signed zone has 12 signatures');
|
||||
my $nsecc3 = grep { $z4->rrs->rr($_)->type == LDNS_RR_TYPE_NSEC3 }
|
||||
(0 .. $z4->rrs->rr_count - 1);
|
||||
is($nsecc3, 5, 'NSEC3-signed zone has 5 nsec recs');
|
67
contrib/DNS-LDNS/typemap
Normal file
67
contrib/DNS-LDNS/typemap
Normal file
@ -0,0 +1,67 @@
|
||||
TYPEMAP
|
||||
DNS__LDNS__Zone LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__RRList LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__RR LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__RData LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__DNSSecZone LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__DNSSecRRSets LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__DNSSecRRs LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__DNSSecName LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__RBTree LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__RBNode LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__Resolver LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__Packet LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__Key LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__KeyList LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__DNSSecDataChain LDNS_GENERIC_STRUCT
|
||||
DNS__LDNS__DNSSecTrustTree LDNS_GENERIC_STRUCT
|
||||
Mortal_PV Mortal_PV
|
||||
|
||||
DNS__LDNS__RR__Opt LDNS_GENERIC_STRUCT_OPT
|
||||
DNS__LDNS__RData__Opt LDNS_GENERIC_STRUCT_OPT
|
||||
|
||||
LDNS_Pkt_Opcode T_ENUM
|
||||
LDNS_Pkt_Rcode T_ENUM
|
||||
LDNS_Pkt_Section T_ENUM
|
||||
LDNS_Pkt_Type T_ENUM
|
||||
LDNS_RR_Type T_ENUM
|
||||
LDNS_RR_Class T_ENUM
|
||||
LDNS_RDF_Type T_ENUM
|
||||
LDNS_Hash T_ENUM
|
||||
LDNS_Status T_ENUM
|
||||
LDNS_Signing_Algorithm T_ENUM
|
||||
|
||||
uint32_t T_UV
|
||||
uint16_t T_UV
|
||||
uint8_t T_UV
|
||||
signed char T_UV
|
||||
|
||||
INPUT
|
||||
LDNS_GENERIC_STRUCT_OPT
|
||||
if (!SvOK($arg)) {
|
||||
$var = NULL;
|
||||
}
|
||||
else if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/__/::/g;$ntt=~s/::Opt$//;\$ntt}\")){
|
||||
IV tmp = SvIV((SV*)SvRV($arg));
|
||||
$var = INT2PTR($type, tmp);
|
||||
}
|
||||
else
|
||||
croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\")
|
||||
|
||||
INPUT
|
||||
LDNS_GENERIC_STRUCT
|
||||
if (sv_derived_from($arg, \"${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\")){
|
||||
IV tmp = SvIV((SV*)SvRV($arg));
|
||||
$var = INT2PTR($type, tmp);
|
||||
}
|
||||
else
|
||||
croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\")
|
||||
|
||||
OUTPUT
|
||||
LDNS_GENERIC_STRUCT
|
||||
sv_setref_pv($arg, \"${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\", (void*)$var);
|
||||
|
||||
OUTPUT
|
||||
Mortal_PV
|
||||
sv_setsv($arg, sv_2mortal(newSVpv($var, 0)));
|
||||
free((void *)$var);
|
@ -1,6 +1,6 @@
|
||||
#!/bin/ksh
|
||||
#
|
||||
# $Id: build-solaris.sh 2597 2008-04-15 08:39:58Z jelte $
|
||||
# $Id$
|
||||
|
||||
|
||||
PREFIX=/opt/ldns
|
||||
|
@ -132,9 +132,9 @@ def secure_query(name, rr_type, rr_class="IN", flags=["RD"], tries = 1, flex=Fal
|
||||
raise Exception("%s lookup failed (server error or dnssec validation failed)" % name)
|
||||
if pkt.rcode() == "NXDOMAIN":
|
||||
if "AD" in pkt.flags():
|
||||
raise Exception("%s lookup failed (non-existence proven by DNSSEC)" % hostname )
|
||||
raise Exception("%s lookup failed (non-existence proven by DNSSEC)" % name )
|
||||
else:
|
||||
raise Exception("%s lookup failed" % hostname )
|
||||
raise Exception("%s lookup failed" % name )
|
||||
if pkt.rcode() == "NOERROR":
|
||||
if "AD" not in pkt.flags():
|
||||
if not flex:
|
||||
@ -698,7 +698,7 @@ class resource_record:
|
||||
|
||||
def __len__(self):
|
||||
try:
|
||||
return len(_rdfs)
|
||||
return len(self._rdfs)
|
||||
except:
|
||||
return 0
|
||||
|
||||
@ -891,6 +891,7 @@ _rr_types={
|
||||
"NSAP_PTR" : ldns.LDNS_RR_TYPE_NSAP_PTR,
|
||||
"NSEC" : ldns.LDNS_RR_TYPE_NSEC,
|
||||
"NSEC3": ldns.LDNS_RR_TYPE_NSEC3,
|
||||
"NSEC3PARAM" : ldns.LDNS_RR_TYPE_NSEC3PARAM,
|
||||
"NSEC3PARAMS" : ldns.LDNS_RR_TYPE_NSEC3PARAMS,
|
||||
"NULL" : ldns.LDNS_RR_TYPE_NULL,
|
||||
"NXT" : ldns.LDNS_RR_TYPE_NXT,
|
||||
|
@ -1,3 +1,29 @@
|
||||
1.6.17 2014-01-10
|
||||
* Added ldns_rdf.data_as_bytearray(). The method returns a bytearray object
|
||||
containing rdf data.
|
||||
* Changed the behaviour of ldns_resolver.trusted_key() in order to prevent
|
||||
memory corrupotion and leaks.
|
||||
* Fixed memory leaks when destroying ldns_resolver.
|
||||
* Removed ldns_pkt.section_count(), ldns_resolver.set_searchlist_count()
|
||||
because it is marked static in the library.
|
||||
* Added ldns_pkt.new(), ldns_resolver.new().
|
||||
* Marked as returning new object ldns_pkt.get_section_clone(),
|
||||
ldns_resolver.get_addr_by_name(), ldns_resolver.get_name_by_addr(),
|
||||
ldns_resolver.search().
|
||||
* Added push cloning for ldns_pkt.safe_push_rr(),
|
||||
ldns_pkt.safe_push_rr_list(), ldns_pkt.set_additional(),
|
||||
ldns_pkt.set_answer(), ldns_pkt.set_answerfrom(),
|
||||
ldns_pkt.set_authority(), ldns_pkt.set_edns_data(),
|
||||
ldns_pkt.set_question(), ldns_pkt.set_tsig(),
|
||||
ldns_resolver.set_dnssec_anchors(), ldns_resolver.set_domain().
|
||||
* Added pull cloning for ldns_pkt.answerfrom(), ldns_pkt.edns_data(),
|
||||
ldns_pkt.tsig(), ldns_resolver.axfr_last_pkt(),
|
||||
ldns_resolver.dnssec_anchors(), ldns_resolver.domain(),
|
||||
ldns_resolver.tsig_algorithm(), ldns_resolver.tsig_keydata(),
|
||||
ldns_resolver.tsig_keyname().
|
||||
* Method ldns_rdf.reverse() now throws an exception when not applied
|
||||
on dname rdfs. This is to prevent assertion fails in ldns' C code.
|
||||
|
||||
1.6.16 2012-11-13
|
||||
* Fix typo in ldns_struct_pkt.opcode2str
|
||||
|
||||
|
@ -41,7 +41,7 @@ help:
|
||||
../../Makefile: ../../configure
|
||||
cd ../.. && ./configure --with-python
|
||||
|
||||
_ldns.so: ../../Makefile
|
||||
_ldns.so: ../../Makefile
|
||||
$(MAKE) -C ../..
|
||||
|
||||
../../.libs/libldns.so.1: ../../Makefile
|
||||
@ -59,13 +59,15 @@ testenv: ../../.libs/libldns.so.1 _ldns.so
|
||||
cd examples && LD_LIBRARY_PATH=ldns bash
|
||||
rm -rf examples/ldns
|
||||
|
||||
test: ../../.libs/libldns.so.1 _ldns.so examples/test_buffer.py examples/test_rdf.py examples/test_dname.py examples/test_rr.py
|
||||
test: ../../.libs/libldns.so.1 _ldns.so examples/test_buffer.py examples/test_rdf.py examples/test_dname.py examples/test_rr.py examples/test_pkt.py examples/test_resolver.py
|
||||
@rm -rf examples/ldns
|
||||
@cd examples && mkdir ldns && ln -s ../../ldns.py ldns/__init__.py && ln -s ../../../../.libs/_ldns.so ldns/_ldns.so && ln -s ../../../../.libs/libldns.so.1 ldns/libldns.so.1
|
||||
@cd examples && LD_LIBRARY_PATH=ldns ./test_buffer.py 2>/dev/null
|
||||
@cd examples && LD_LIBRARY_PATH=ldns ./test_rdf.py 2>/dev/null
|
||||
@cd examples && LD_LIBRARY_PATH=ldns ./test_dname.py 2>/dev/null
|
||||
@cd examples && LD_LIBRARY_PATH=ldns ./test_rr.py 2>/dev/null
|
||||
@cd examples && LD_LIBRARY_PATH=ldns ./test_pkt.py 2>/dev/null
|
||||
@cd examples && LD_LIBRARY_PATH=ldns ./test_resolver.py 2>/dev/null
|
||||
@rm -rf examples/ldns
|
||||
|
||||
doc: ../../.libs/libldns.so.1 _ldns.so
|
||||
|
@ -37,7 +37,7 @@ master_doc = 'index'
|
||||
|
||||
# General substitutions.
|
||||
project = 'pyLDNS'
|
||||
copyright = '2009, Karel Slany, Zdenek Vasicek'
|
||||
copyright = '2009-2013, Karel Slany, Zdenek Vasicek'
|
||||
|
||||
# The default replacements for |version| and |release|, also used in various
|
||||
# other places throughout the built documents.
|
||||
@ -45,7 +45,7 @@ copyright = '2009, Karel Slany, Zdenek Vasicek'
|
||||
# The short X.Y version.
|
||||
version = '1.6'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.6.16'
|
||||
release = '1.6.17'
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
|
@ -35,7 +35,7 @@ Predefined constants
|
||||
* LDNS_RDF_TYPE_TIME,
|
||||
* LDNS_RDF_TYPE_PERIOD,
|
||||
* LDNS_RDF_TYPE_TSIGTIME,
|
||||
* LDNS_RDF_TYPE_TSIG,
|
||||
* LDNS_RDF_TYPE_HIP,
|
||||
* LDNS_RDF_TYPE_INT16_DATA,
|
||||
* LDNS_RDF_TYPE_SERVICE,
|
||||
* LDNS_RDF_TYPE_LOC,
|
||||
|
@ -174,7 +174,7 @@ if True:
|
||||
ret = buf.capacity()
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
# Should be int.
|
||||
set_error()
|
||||
|
||||
@ -284,7 +284,7 @@ if True:
|
||||
ret = buf.position()
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
|
||||
|
||||
@ -328,7 +328,7 @@ if True:
|
||||
ret = buf.read_u16()
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != (ord("a") * 0x0101):
|
||||
set_error()
|
||||
@ -343,7 +343,7 @@ if True:
|
||||
ret = buf.read_u16_at(1)
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != (ord("b") * 0x0101):
|
||||
set_error()
|
||||
@ -418,7 +418,7 @@ if True:
|
||||
ret = buf.read_u8()
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != ord("a"):
|
||||
set_error()
|
||||
@ -433,7 +433,7 @@ if True:
|
||||
ret = buf.read_u8_at(1)
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != ord("b"):
|
||||
set_error()
|
||||
@ -462,7 +462,7 @@ if True:
|
||||
ret = buf.remaining()
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != (capacity - 6):
|
||||
set_error()
|
||||
@ -477,7 +477,7 @@ if True:
|
||||
ret = buf.remaining_at(1)
|
||||
except:
|
||||
set_error()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != (capacity - 1):
|
||||
set_error()
|
||||
|
@ -388,7 +388,7 @@ if True:
|
||||
dn = ldns.ldns_dname("www.nic.cz.")
|
||||
try:
|
||||
ret = dn.label_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 3:
|
||||
set_error()
|
||||
|
1937
contrib/python/examples/test_pkt.py
Executable file
1937
contrib/python/examples/test_pkt.py
Executable file
File diff suppressed because it is too large
Load Diff
@ -406,6 +406,20 @@ if True:
|
||||
set_error()
|
||||
|
||||
|
||||
#if not error_detected:
|
||||
if True:
|
||||
method_name = "ldns_rdf.data_as_bytearray()"
|
||||
rdf = ldns.ldns_rdf_new_frm_str(ldns.LDNS_RDF_TYPE_DNAME, "www.nic.cz.")
|
||||
try:
|
||||
ret = rdf.data_as_bytearray()
|
||||
if not isinstance(ret, bytearray):
|
||||
set_error()
|
||||
if len(ret) != 12:
|
||||
set_error()
|
||||
except:
|
||||
set_error()
|
||||
|
||||
|
||||
#if not error_detected:
|
||||
if True:
|
||||
method_name = "ldns_rdf.dname_compare()"
|
||||
@ -602,7 +616,7 @@ if True:
|
||||
rdf = ldns.ldns_rdf_new_frm_str(ldns.LDNS_RDF_TYPE_DNAME, "www.nic.cz.")
|
||||
try:
|
||||
ret = rdf.label_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 3:
|
||||
set_error()
|
||||
@ -611,7 +625,7 @@ if True:
|
||||
rdf = ldns.ldns_rdf_new_frm_str(ldns.LDNS_RDF_TYPE_A, "127.0.0.1")
|
||||
try:
|
||||
ret = rdf.label_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 0:
|
||||
set_error()
|
||||
@ -720,8 +734,9 @@ if True:
|
||||
rdf = ldns.ldns_rdf_new_frm_str(ldns.LDNS_RDF_TYPE_A, "127.0.0.1")
|
||||
try:
|
||||
ret = rdf.reverse()
|
||||
if not isinstance(ret, ldns.ldns_rdf):
|
||||
set_error()
|
||||
set_error()
|
||||
except Exception:
|
||||
pass
|
||||
except:
|
||||
set_error()
|
||||
|
||||
|
1751
contrib/python/examples/test_resolver.py
Executable file
1751
contrib/python/examples/test_resolver.py
Executable file
File diff suppressed because it is too large
Load Diff
@ -385,7 +385,7 @@ if True:
|
||||
pubkey = ldns.ldns_rr.new_frm_str("example1. 3600 IN DNSKEY 256 3 3 APw7tG8Nf7MYXjt2Y6DmyWUVxVy73bRKvKbKoGXhAXJx2vbcGGxfXsScT0i4FIC2wsJ/8zy/otB5vymm3JHBf2+7cQvRdp12UMLAnzlfrbgZUpvV36D+q6ch7kbmFzaBfwRjOKhnZkRLCcMYPAdX1SrgKVNXaOzAl9KytbzGQs5MKEHU+a0PAwKfIvEsS/+pW6gKgBnL0uy4Gr5cYJ5rk48iwFXOlZ/B30gUS5dD+rNRJuR0ZgEkxtVIPVxxhQPtEI53JhlJ2nEy0CqNW88nYLmX402b ;{id = 34898 (zsk), size = 512b}")
|
||||
try:
|
||||
ret = pubkey.dnskey_key_size()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 512:
|
||||
set_error()
|
||||
@ -394,7 +394,7 @@ if True:
|
||||
rr = ldns.ldns_rr.new_frm_str("test 600 IN A 0.0.0.0")
|
||||
try:
|
||||
ret = rr.dnskey_key_size()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 0:
|
||||
set_error()
|
||||
@ -638,7 +638,7 @@ if True:
|
||||
rr = ldns.ldns_rr.new_frm_str("test.dom. IN A 0.0.0.0", 600)
|
||||
try:
|
||||
ret = rr.label_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 2:
|
||||
set_error()
|
||||
@ -647,7 +647,7 @@ if True:
|
||||
rr = ldns.ldns_rr.new_frm_str(". IN A 0.0.0.0", 600)
|
||||
try:
|
||||
ret = rr.label_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error(string)
|
||||
if ret != 0:
|
||||
set_error()
|
||||
@ -951,7 +951,7 @@ if True:
|
||||
rr = ldns.ldns_rr.new_frm_str("test 600 IN A 0.0.0.0")
|
||||
try:
|
||||
ret = rr.rd_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 1:
|
||||
set_error()
|
||||
@ -1643,7 +1643,7 @@ if True:
|
||||
rr = ldns.ldns_rr.new_frm_str("test 600 IN A 0.0.0.0")
|
||||
try:
|
||||
ret = rr.uncompressed_size()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 20:
|
||||
set_error()
|
||||
@ -1723,7 +1723,7 @@ if True:
|
||||
desc_a = ldns.ldns_rr_descriptor.ldns_rr_descriptor(ldns.LDNS_RR_TYPE_A)
|
||||
try:
|
||||
ret = desc_a.maximum()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 1:
|
||||
set_error()
|
||||
@ -1737,7 +1737,7 @@ if True:
|
||||
desc_a = ldns.ldns_rr_descriptor.ldns_rr_descriptor(ldns.LDNS_RR_TYPE_A)
|
||||
try:
|
||||
ret = desc_a.minimum()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 1:
|
||||
set_error()
|
||||
@ -2203,7 +2203,7 @@ if True:
|
||||
rrl = ldns.ldns_rr_list.new()
|
||||
try:
|
||||
ret = rrl.rr_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 0:
|
||||
set_error()
|
||||
@ -2213,7 +2213,7 @@ if True:
|
||||
rrl.push_rr(rr)
|
||||
try:
|
||||
ret = rrl.rr_count()
|
||||
if not isinstance(ret, int):
|
||||
if (not isinstance(ret, int)) and (not isinstance(ret, long)):
|
||||
set_error()
|
||||
if ret != 1:
|
||||
set_error()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -205,7 +205,7 @@
|
||||
case LDNS_RDF_TYPE_TIME: return "TIME";
|
||||
case LDNS_RDF_TYPE_PERIOD: return "PERIOD";
|
||||
case LDNS_RDF_TYPE_TSIGTIME: return "TSIGTIME";
|
||||
case LDNS_RDF_TYPE_TSIG: return "TSIG";
|
||||
case LDNS_RDF_TYPE_HIP: return "HIP";
|
||||
case LDNS_RDF_TYPE_INT16_DATA: return "INT16_DATA";
|
||||
case LDNS_RDF_TYPE_SERVICE: return "SERVICE";
|
||||
case LDNS_RDF_TYPE_LOC: return "LOC";
|
||||
@ -216,6 +216,11 @@
|
||||
case LDNS_RDF_TYPE_NSEC3_SALT: return "NSEC3_SALT";
|
||||
case LDNS_RDF_TYPE_NSEC3_NEXT_OWNER:
|
||||
return "NSEC3_NEXT_OWNER";
|
||||
case LDNS_RDF_TYPE_ILNP64: return "ILNP64";
|
||||
case LDNS_RDF_TYPE_EUI48: return "EUI48";
|
||||
case LDNS_RDF_TYPE_EUI64: return "EUI64";
|
||||
case LDNS_RDF_TYPE_TAG: return "TAG";
|
||||
case LDNS_RDF_TYPE_LONG_STR: return "LONG_STR";
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@ -223,6 +228,26 @@
|
||||
%}
|
||||
|
||||
|
||||
%inline
|
||||
%{
|
||||
/*!
|
||||
* @brief Returns the rdf data organised into a list of bytes.
|
||||
*/
|
||||
PyObject * ldns_rdf_data_as_bytearray(const ldns_rdf *rdf)
|
||||
{
|
||||
Py_ssize_t len;
|
||||
uint8_t *data;
|
||||
|
||||
assert(rdf != NULL);
|
||||
|
||||
len = ldns_rdf_size(rdf);
|
||||
data = ldns_rdf_data(rdf);
|
||||
|
||||
return PyByteArray_FromStringAndSize((char *) data, len);
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
/* ========================================================================= */
|
||||
/* Encapsulating Python code. */
|
||||
/* ========================================================================= */
|
||||
@ -463,6 +488,16 @@ specified in the (16-bit) type field with a value from ldns_rdf_type."
|
||||
#parameters: const ldns_rdf *,
|
||||
#retvals: uint8_t *
|
||||
|
||||
def data_as_bytearray(self):
|
||||
"""
|
||||
Returns the data of the rdf as a bytearray.
|
||||
|
||||
:return: (bytearray) Bytearray containing the rdf data.
|
||||
"""
|
||||
return _ldns.ldns_rdf_data_as_bytearray(self)
|
||||
#parameters: const ldns_rdf *,
|
||||
#retvals: bytearray
|
||||
|
||||
def get_type(self):
|
||||
"""
|
||||
Returns the type of the rdf.
|
||||
@ -818,7 +853,8 @@ specified in the (16-bit) type field with a value from ldns_rdf_type."
|
||||
Returns a clone of the given dname with the labels reversed.
|
||||
|
||||
When reversing non-dnames a "." (root name) dname is returned.
|
||||
|
||||
|
||||
:throws Exception: When used on non-dname rdfs.
|
||||
:return: (:class:`ldns_rdf`) Clone of the dname with the labels
|
||||
reversed or ".".
|
||||
|
||||
@ -831,6 +867,8 @@ specified in the (16-bit) type field with a value from ldns_rdf_type."
|
||||
" to be deprecated in future releases." +
|
||||
" Convert the ldns_rdf to ldsn_dname and the use its" +
|
||||
" methods.", PendingDeprecationWarning, stacklevel=2)
|
||||
if self.get_type() != _ldns.LDNS_RDF_TYPE_DNAME:
|
||||
raise Exception("Operand must be a dname rdf.")
|
||||
return _ldns.ldns_dname_reverse(self)
|
||||
#parameters: const ldns_rdf *,
|
||||
#retvals: ldns_rdf *
|
||||
|
File diff suppressed because it is too large
Load Diff
14
dane.c
14
dane.c
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <ldns/config.h>
|
||||
#ifdef USE_DANE
|
||||
|
||||
#include <ldns/ldns.h>
|
||||
#include <ldns/dane.h>
|
||||
@ -15,8 +16,12 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
#include <openssl/ssl.h>
|
||||
@ -119,13 +124,13 @@ ldns_dane_cert2rdf(ldns_rdf** rdf, X509* cert,
|
||||
|
||||
case LDNS_TLSA_MATCHING_TYPE_SHA256:
|
||||
|
||||
digest = LDNS_XMALLOC(unsigned char, SHA256_DIGEST_LENGTH);
|
||||
digest = LDNS_XMALLOC(unsigned char, LDNS_SHA256_DIGEST_LENGTH);
|
||||
if (digest == NULL) {
|
||||
LDNS_FREE(buf);
|
||||
return LDNS_STATUS_MEM_ERR;
|
||||
}
|
||||
(void) ldns_sha256(buf, (unsigned int)len, digest);
|
||||
*rdf = ldns_rdf_new(LDNS_RDF_TYPE_HEX, SHA256_DIGEST_LENGTH,
|
||||
*rdf = ldns_rdf_new(LDNS_RDF_TYPE_HEX, LDNS_SHA256_DIGEST_LENGTH,
|
||||
digest);
|
||||
LDNS_FREE(buf);
|
||||
|
||||
@ -134,13 +139,13 @@ ldns_dane_cert2rdf(ldns_rdf** rdf, X509* cert,
|
||||
|
||||
case LDNS_TLSA_MATCHING_TYPE_SHA512:
|
||||
|
||||
digest = LDNS_XMALLOC(unsigned char, SHA512_DIGEST_LENGTH);
|
||||
digest = LDNS_XMALLOC(unsigned char, LDNS_SHA512_DIGEST_LENGTH);
|
||||
if (digest == NULL) {
|
||||
LDNS_FREE(buf);
|
||||
return LDNS_STATUS_MEM_ERR;
|
||||
}
|
||||
(void) ldns_sha512(buf, (unsigned int)len, digest);
|
||||
*rdf = ldns_rdf_new(LDNS_RDF_TYPE_HEX, SHA512_DIGEST_LENGTH,
|
||||
*rdf = ldns_rdf_new(LDNS_RDF_TYPE_HEX, LDNS_SHA512_DIGEST_LENGTH,
|
||||
digest);
|
||||
LDNS_FREE(buf);
|
||||
|
||||
@ -740,3 +745,4 @@ ldns_dane_verify(ldns_rr_list* tlsas,
|
||||
return s;
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
#endif /* USE_DANE */
|
||||
|
296
dnssec.c
296
dnssec.c
@ -654,103 +654,113 @@ ldns_key_rr2ds(const ldns_rr *key, ldns_hash h)
|
||||
return ds;
|
||||
}
|
||||
|
||||
/* From RFC3845:
|
||||
*
|
||||
* 2.1.2. The List of Type Bit Map(s) Field
|
||||
*
|
||||
* The RR type space is split into 256 window blocks, each representing
|
||||
* the low-order 8 bits of the 16-bit RR type space. Each block that
|
||||
* has at least one active RR type is encoded using a single octet
|
||||
* window number (from 0 to 255), a single octet bitmap length (from 1
|
||||
* to 32) indicating the number of octets used for the window block's
|
||||
* bitmap, and up to 32 octets (256 bits) of bitmap.
|
||||
*
|
||||
* Window blocks are present in the NSEC RR RDATA in increasing
|
||||
* numerical order.
|
||||
*
|
||||
* "|" denotes concatenation
|
||||
*
|
||||
* Type Bit Map(s) Field = ( Window Block # | Bitmap Length | Bitmap ) +
|
||||
*
|
||||
* <cut>
|
||||
*
|
||||
* Blocks with no types present MUST NOT be included. Trailing zero
|
||||
* octets in the bitmap MUST be omitted. The length of each block's
|
||||
* bitmap is determined by the type code with the largest numerical
|
||||
* value within that block, among the set of RR types present at the
|
||||
* NSEC RR's owner name. Trailing zero octets not specified MUST be
|
||||
* interpreted as zero octets.
|
||||
*/
|
||||
ldns_rdf *
|
||||
ldns_dnssec_create_nsec_bitmap(ldns_rr_type rr_type_list[],
|
||||
size_t size,
|
||||
ldns_rr_type nsec_type)
|
||||
{
|
||||
size_t i;
|
||||
uint8_t *bitmap;
|
||||
uint16_t bm_len = 0;
|
||||
uint16_t i_type;
|
||||
ldns_rdf *bitmap_rdf;
|
||||
uint8_t window; /* most significant octet of type */
|
||||
uint8_t subtype; /* least significant octet of type */
|
||||
uint16_t windows[256] /* Max subtype per window */
|
||||
#ifndef S_SPLINT_S
|
||||
= { 0 } /* Initialize ALL elements with 0 */
|
||||
#endif
|
||||
;
|
||||
ldns_rr_type* d; /* used to traverse rr_type_list*/
|
||||
size_t i; /* used to traverse windows array */
|
||||
|
||||
uint8_t *data = NULL;
|
||||
uint8_t cur_data[32];
|
||||
uint8_t cur_window = 0;
|
||||
uint8_t cur_window_max = 0;
|
||||
uint16_t cur_data_size = 0;
|
||||
size_t sz; /* size needed for type bitmap rdf */
|
||||
uint8_t* data = NULL; /* rdf data */
|
||||
uint8_t* dptr; /* used to itraverse rdf data */
|
||||
ldns_rdf* rdf; /* bitmap rdf to return */
|
||||
|
||||
if (nsec_type != LDNS_RR_TYPE_NSEC &&
|
||||
nsec_type != LDNS_RR_TYPE_NSEC3) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
i_type = 0;
|
||||
for (i = 0; i < size; i++) {
|
||||
if (i_type < rr_type_list[i])
|
||||
i_type = rr_type_list[i];
|
||||
}
|
||||
if (i_type < nsec_type) {
|
||||
i_type = nsec_type;
|
||||
/* Which other windows need to be in the bitmap rdf?
|
||||
*/
|
||||
for (d = rr_type_list; d < rr_type_list + size; d++) {
|
||||
window = *d >> 8;
|
||||
subtype = *d & 0xff;
|
||||
if (windows[window] < subtype) {
|
||||
windows[window] = subtype;
|
||||
}
|
||||
}
|
||||
|
||||
bm_len = i_type / 8 + 2;
|
||||
bitmap = LDNS_XMALLOC(uint8_t, bm_len);
|
||||
if(!bitmap) return NULL;
|
||||
for (i = 0; i < bm_len; i++) {
|
||||
bitmap[i] = 0;
|
||||
/* How much space do we need in the rdf for those windows?
|
||||
*/
|
||||
sz = 0;
|
||||
for (i = 0; i < 256; i++) {
|
||||
if (windows[i]) {
|
||||
sz += windows[i] / 8 + 3;
|
||||
}
|
||||
}
|
||||
if (sz > 0) {
|
||||
/* Format rdf data according RFC3845 Section 2.1.2 (see above)
|
||||
*/
|
||||
dptr = data = LDNS_CALLOC(uint8_t, sz);
|
||||
if (!data) {
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < 256; i++) {
|
||||
if (windows[i]) {
|
||||
*dptr++ = (uint8_t)i;
|
||||
*dptr++ = (uint8_t)(windows[i] / 8 + 1);
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
i_type = rr_type_list[i];
|
||||
ldns_set_bit(bitmap + (int) i_type / 8,
|
||||
(int) (7 - (i_type % 8)),
|
||||
true);
|
||||
}
|
||||
/* Now let windows[i] index the bitmap
|
||||
* within data
|
||||
*/
|
||||
windows[i] = (uint16_t)(dptr - data);
|
||||
|
||||
/* fold it into windows TODO: can this be done directly? */
|
||||
memset(cur_data, 0, 32);
|
||||
for (i = 0; i < bm_len; i++) {
|
||||
if (i / 32 > cur_window) {
|
||||
/* check, copy, new */
|
||||
if (cur_window_max > 0) {
|
||||
/* this window has stuff, add it */
|
||||
data = LDNS_XREALLOC(data,
|
||||
uint8_t,
|
||||
cur_data_size + cur_window_max + 3);
|
||||
if(!data) {
|
||||
LDNS_FREE(bitmap);
|
||||
return NULL;
|
||||
}
|
||||
data[cur_data_size] = cur_window;
|
||||
data[cur_data_size + 1] = cur_window_max + 1;
|
||||
memcpy(data + cur_data_size + 2,
|
||||
cur_data,
|
||||
cur_window_max+1);
|
||||
cur_data_size += cur_window_max + 3;
|
||||
dptr += dptr[-1];
|
||||
}
|
||||
cur_window++;
|
||||
cur_window_max = 0;
|
||||
memset(cur_data, 0, 32);
|
||||
}
|
||||
cur_data[i%32] = bitmap[i];
|
||||
if (bitmap[i] > 0) {
|
||||
cur_window_max = i%32;
|
||||
}
|
||||
}
|
||||
if (cur_window_max > 0 || cur_data[0] != 0) {
|
||||
/* this window has stuff, add it */
|
||||
data = LDNS_XREALLOC(data,
|
||||
uint8_t,
|
||||
cur_data_size + cur_window_max + 3);
|
||||
if(!data) {
|
||||
LDNS_FREE(bitmap);
|
||||
return NULL;
|
||||
}
|
||||
data[cur_data_size] = cur_window;
|
||||
data[cur_data_size + 1] = cur_window_max + 1;
|
||||
memcpy(data + cur_data_size + 2, cur_data, cur_window_max+1);
|
||||
cur_data_size += cur_window_max + 3;
|
||||
|
||||
/* Set the bits?
|
||||
*/
|
||||
for (d = rr_type_list; d < rr_type_list + size; d++) {
|
||||
subtype = *d & 0xff;
|
||||
data[windows[*d >> 8] + subtype/8] |= (0x80 >> (subtype % 8));
|
||||
}
|
||||
bitmap_rdf = ldns_rdf_new_frm_data(LDNS_RDF_TYPE_NSEC,
|
||||
cur_data_size,
|
||||
data);
|
||||
|
||||
LDNS_FREE(bitmap);
|
||||
LDNS_FREE(data);
|
||||
|
||||
return bitmap_rdf;
|
||||
/* Allocate and return rdf structure for the data
|
||||
*/
|
||||
rdf = ldns_rdf_new(LDNS_RDF_TYPE_BITMAP, sz, data);
|
||||
if (!rdf) {
|
||||
LDNS_FREE(data);
|
||||
return NULL;
|
||||
}
|
||||
return rdf;
|
||||
}
|
||||
|
||||
int
|
||||
@ -987,7 +997,9 @@ ldns_nsec3_hash_name(ldns_rdf *name,
|
||||
/* prepare the owner name according to the draft section bla */
|
||||
cann = ldns_rdf_clone(name);
|
||||
if(!cann) {
|
||||
#ifdef STDERR_MSGS
|
||||
fprintf(stderr, "Memory error\n");
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
ldns_dname2canonical(cann);
|
||||
@ -1032,11 +1044,13 @@ ldns_nsec3_hash_name(ldns_rdf *name,
|
||||
hashed_owner_b32,
|
||||
ldns_b32_ntop_calculate_size(hashed_owner_str_len)+1);
|
||||
if (hashed_owner_b32_len < 1) {
|
||||
#ifdef STDERR_MSGS
|
||||
fprintf(stderr, "Error in base32 extended hex encoding ");
|
||||
fprintf(stderr, "of hashed owner name (name: ");
|
||||
ldns_rdf_print(stderr, name);
|
||||
fprintf(stderr, ", return code: %u)\n",
|
||||
(unsigned int) hashed_owner_b32_len);
|
||||
#endif
|
||||
LDNS_FREE(hashed_owner_b32);
|
||||
return NULL;
|
||||
}
|
||||
@ -1044,7 +1058,9 @@ ldns_nsec3_hash_name(ldns_rdf *name,
|
||||
|
||||
status = ldns_str2rdf_dname(&hashed_owner, hashed_owner_b32);
|
||||
if (status != LDNS_STATUS_OK) {
|
||||
#ifdef STDERR_MSGS
|
||||
fprintf(stderr, "Error creating rdf from %s\n", hashed_owner_b32);
|
||||
#endif
|
||||
LDNS_FREE(hashed_owner_b32);
|
||||
return NULL;
|
||||
}
|
||||
@ -1338,38 +1354,120 @@ ldns_nsec3_hash_name_frm_nsec3(const ldns_rr *nsec, ldns_rdf *name)
|
||||
}
|
||||
|
||||
bool
|
||||
ldns_nsec_bitmap_covers_type(const ldns_rdf *nsec_bitmap, ldns_rr_type type)
|
||||
ldns_nsec_bitmap_covers_type(const ldns_rdf* bitmap, ldns_rr_type type)
|
||||
{
|
||||
uint8_t window_block_nr;
|
||||
uint8_t bitmap_length;
|
||||
uint16_t cur_type;
|
||||
uint16_t pos = 0;
|
||||
uint16_t bit_pos;
|
||||
uint8_t *data;
|
||||
uint8_t* dptr;
|
||||
uint8_t* dend;
|
||||
|
||||
if (nsec_bitmap == NULL) {
|
||||
/* From RFC3845 Section 2.1.2:
|
||||
*
|
||||
* "The RR type space is split into 256 window blocks, each re-
|
||||
* presenting the low-order 8 bits of the 16-bit RR type space."
|
||||
*/
|
||||
uint8_t window = type >> 8;
|
||||
uint8_t subtype = type & 0xff;
|
||||
|
||||
if (! bitmap) {
|
||||
return false;
|
||||
}
|
||||
data = ldns_rdf_data(nsec_bitmap);
|
||||
while(pos < ldns_rdf_size(nsec_bitmap)) {
|
||||
window_block_nr = data[pos];
|
||||
bitmap_length = data[pos + 1];
|
||||
pos += 2;
|
||||
assert(ldns_rdf_get_type(bitmap) == LDNS_RDF_TYPE_BITMAP);
|
||||
|
||||
for (bit_pos = 0; bit_pos < (bitmap_length) * 8; bit_pos++) {
|
||||
if (ldns_get_bit(&data[pos], bit_pos)) {
|
||||
cur_type = 256 * (uint16_t) window_block_nr + bit_pos;
|
||||
if (cur_type == type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
dptr = ldns_rdf_data(bitmap);
|
||||
dend = ldns_rdf_data(bitmap) + ldns_rdf_size(bitmap);
|
||||
|
||||
/* Type Bitmap = ( Window Block # | Bitmap Length | Bitmap ) +
|
||||
* dptr[0] dptr[1] dptr[2:]
|
||||
*/
|
||||
while (dptr < dend && dptr[0] <= window) {
|
||||
|
||||
if (dptr[0] == window && subtype / 8 < dptr[1] &&
|
||||
dptr + dptr[1] + 2 <= dend) {
|
||||
|
||||
return dptr[2 + subtype / 8] & (0x80 >> (subtype % 8));
|
||||
}
|
||||
|
||||
pos += (uint16_t) bitmap_length;
|
||||
dptr += dptr[1] + 2; /* next window */
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
ldns_status
|
||||
ldns_nsec_bitmap_set_type(ldns_rdf* bitmap, ldns_rr_type type)
|
||||
{
|
||||
uint8_t* dptr;
|
||||
uint8_t* dend;
|
||||
|
||||
/* From RFC3845 Section 2.1.2:
|
||||
*
|
||||
* "The RR type space is split into 256 window blocks, each re-
|
||||
* presenting the low-order 8 bits of the 16-bit RR type space."
|
||||
*/
|
||||
uint8_t window = type >> 8;
|
||||
uint8_t subtype = type & 0xff;
|
||||
|
||||
if (! bitmap) {
|
||||
return false;
|
||||
}
|
||||
assert(ldns_rdf_get_type(bitmap) == LDNS_RDF_TYPE_BITMAP);
|
||||
|
||||
dptr = ldns_rdf_data(bitmap);
|
||||
dend = ldns_rdf_data(bitmap) + ldns_rdf_size(bitmap);
|
||||
|
||||
/* Type Bitmap = ( Window Block # | Bitmap Length | Bitmap ) +
|
||||
* dptr[0] dptr[1] dptr[2:]
|
||||
*/
|
||||
while (dptr < dend && dptr[0] <= window) {
|
||||
|
||||
if (dptr[0] == window && subtype / 8 < dptr[1] &&
|
||||
dptr + dptr[1] + 2 <= dend) {
|
||||
|
||||
dptr[2 + subtype / 8] |= (0x80 >> (subtype % 8));
|
||||
return LDNS_STATUS_OK;
|
||||
}
|
||||
dptr += dptr[1] + 2; /* next window */
|
||||
}
|
||||
return LDNS_STATUS_TYPE_NOT_IN_BITMAP;
|
||||
}
|
||||
|
||||
ldns_status
|
||||
ldns_nsec_bitmap_clear_type(ldns_rdf* bitmap, ldns_rr_type type)
|
||||
{
|
||||
uint8_t* dptr;
|
||||
uint8_t* dend;
|
||||
|
||||
/* From RFC3845 Section 2.1.2:
|
||||
*
|
||||
* "The RR type space is split into 256 window blocks, each re-
|
||||
* presenting the low-order 8 bits of the 16-bit RR type space."
|
||||
*/
|
||||
uint8_t window = type >> 8;
|
||||
uint8_t subtype = type & 0xff;
|
||||
|
||||
if (! bitmap) {
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(ldns_rdf_get_type(bitmap) == LDNS_RDF_TYPE_BITMAP);
|
||||
|
||||
dptr = ldns_rdf_data(bitmap);
|
||||
dend = ldns_rdf_data(bitmap) + ldns_rdf_size(bitmap);
|
||||
|
||||
/* Type Bitmap = ( Window Block # | Bitmap Length | Bitmap ) +
|
||||
* dptr[0] dptr[1] dptr[2:]
|
||||
*/
|
||||
while (dptr < dend && dptr[0] <= window) {
|
||||
|
||||
if (dptr[0] == window && subtype / 8 < dptr[1] &&
|
||||
dptr + dptr[1] + 2 <= dend) {
|
||||
|
||||
dptr[2 + subtype / 8] &= ~(0x80 >> (subtype % 8));
|
||||
return LDNS_STATUS_OK;
|
||||
}
|
||||
dptr += dptr[1] + 2; /* next window */
|
||||
}
|
||||
return LDNS_STATUS_TYPE_NOT_IN_BITMAP;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ldns_nsec_covers_name(const ldns_rr *nsec, const ldns_rdf *name)
|
||||
{
|
||||
@ -1407,9 +1505,11 @@ ldns_nsec_covers_name(const ldns_rr *nsec, const ldns_rdf *name)
|
||||
if(ldns_dname_compare(nsec_owner, nsec_next) > 0) {
|
||||
result = (ldns_dname_compare(nsec_owner, name) <= 0 ||
|
||||
ldns_dname_compare(name, nsec_next) < 0);
|
||||
} else {
|
||||
} else if(ldns_dname_compare(nsec_owner, nsec_next) < 0) {
|
||||
result = (ldns_dname_compare(nsec_owner, name) <= 0 &&
|
||||
ldns_dname_compare(name, nsec_next) < 0);
|
||||
} else {
|
||||
result = true;
|
||||
}
|
||||
|
||||
ldns_rdf_deep_free(nsec_next);
|
||||
|
@ -566,7 +566,7 @@ ldns_dnssec_addresses_on_glue_list(
|
||||
* when walking the tree with the ldns_dnssec_name_node_next_nonglue()
|
||||
* function. But watch out! Names that are partially occluded (like glue with
|
||||
* the same name as the delegation) will not be marked and should specifically
|
||||
* be taken into account seperately.
|
||||
* be taken into account separately.
|
||||
*
|
||||
* When glue_list is given (not NULL), in the process of marking the names, all
|
||||
* glue resource records will be pushed to that list, even glue at delegation names.
|
||||
@ -659,7 +659,7 @@ ldns_dnssec_zone_mark_and_get_glue(ldns_dnssec_zone *zone,
|
||||
* when walking the tree with the ldns_dnssec_name_node_next_nonglue()
|
||||
* function. But watch out! Names that are partially occluded (like glue with
|
||||
* the same name as the delegation) will not be marked and should specifically
|
||||
* be taken into account seperately.
|
||||
* be taken into account separately.
|
||||
*
|
||||
* \param[in] zone the zone in which to mark the names
|
||||
* \return LDNS_STATUS_OK on success, an error code otherwise
|
||||
@ -771,8 +771,11 @@ ldns_dnssec_zone_create_nsecs(ldns_dnssec_zone *zone,
|
||||
}
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
/* in dnssec_zone.c */
|
||||
extern int ldns_dname_compare_v(const void *a, const void *b);
|
||||
static void
|
||||
ldns_hashed_names_node_free(ldns_rbnode_t *node, void *arg) {
|
||||
(void) arg;
|
||||
LDNS_FREE(node);
|
||||
}
|
||||
|
||||
static ldns_status
|
||||
ldns_dnssec_zone_create_nsec3s_mkmap(ldns_dnssec_zone *zone,
|
||||
@ -813,21 +816,24 @@ ldns_dnssec_zone_create_nsec3s_mkmap(ldns_dnssec_zone *zone,
|
||||
nsec_ttl = LDNS_DEFAULT_TTL;
|
||||
}
|
||||
|
||||
if (map) {
|
||||
if ((*map = ldns_rbtree_create(ldns_dname_compare_v))
|
||||
== NULL) {
|
||||
map = NULL;
|
||||
};
|
||||
if (zone->hashed_names) {
|
||||
ldns_traverse_postorder(zone->hashed_names,
|
||||
ldns_hashed_names_node_free, NULL);
|
||||
LDNS_FREE(zone->hashed_names);
|
||||
}
|
||||
zone->hashed_names = ldns_rbtree_create(ldns_dname_compare_v);
|
||||
if (zone->hashed_names && map) {
|
||||
*map = zone->hashed_names;
|
||||
}
|
||||
nsec3_list = ldns_rr_list_new();
|
||||
|
||||
first_name_node = ldns_dnssec_name_node_next_nonglue(
|
||||
ldns_rbtree_first(zone->names));
|
||||
|
||||
current_name_node = first_name_node;
|
||||
|
||||
while (current_name_node &&
|
||||
current_name_node != LDNS_RBTREE_NULL) {
|
||||
while (current_name_node && current_name_node != LDNS_RBTREE_NULL &&
|
||||
result == LDNS_STATUS_OK) {
|
||||
|
||||
current_name = (ldns_dnssec_name *) current_name_node->data;
|
||||
nsec_rr = ldns_dnssec_create_nsec3(current_name,
|
||||
NULL,
|
||||
@ -845,28 +851,49 @@ ldns_dnssec_zone_create_nsec3s_mkmap(ldns_dnssec_zone *zone,
|
||||
ldns_rr_set_ttl(nsec_rr, nsec_ttl);
|
||||
result = ldns_dnssec_name_add_rr(current_name, nsec_rr);
|
||||
ldns_rr_list_push_rr(new_rrs, nsec_rr);
|
||||
ldns_rr_list_push_rr(nsec3_list, nsec_rr);
|
||||
if (map) {
|
||||
if (ldns_rr_owner(nsec_rr)) {
|
||||
hashmap_node = LDNS_MALLOC(ldns_rbnode_t);
|
||||
if (hashmap_node && ldns_rr_owner(nsec_rr)) {
|
||||
hashmap_node->key = ldns_dname_label(
|
||||
ldns_rr_owner(nsec_rr), 0);
|
||||
if (hashmap_node->key) {
|
||||
hashmap_node->data = current_name->name;
|
||||
(void) ldns_rbtree_insert(
|
||||
*map, hashmap_node);
|
||||
}
|
||||
if (hashmap_node == NULL) {
|
||||
return LDNS_STATUS_MEM_ERR;
|
||||
}
|
||||
current_name->hashed_name =
|
||||
ldns_dname_label(ldns_rr_owner(nsec_rr), 0);
|
||||
|
||||
if (current_name->hashed_name == NULL) {
|
||||
LDNS_FREE(hashmap_node);
|
||||
return LDNS_STATUS_MEM_ERR;
|
||||
}
|
||||
hashmap_node->key = current_name->hashed_name;
|
||||
hashmap_node->data = current_name;
|
||||
|
||||
if (! ldns_rbtree_insert(zone->hashed_names
|
||||
, hashmap_node)) {
|
||||
LDNS_FREE(hashmap_node);
|
||||
}
|
||||
}
|
||||
current_name_node = ldns_dnssec_name_node_next_nonglue(
|
||||
ldns_rbtree_next(current_name_node));
|
||||
}
|
||||
if (result != LDNS_STATUS_OK) {
|
||||
ldns_rr_list_free(nsec3_list);
|
||||
return result;
|
||||
}
|
||||
|
||||
ldns_rr_list_sort_nsec3(nsec3_list);
|
||||
/* Make sorted list of nsec3s (via zone->hashed_names)
|
||||
*/
|
||||
nsec3_list = ldns_rr_list_new();
|
||||
if (nsec3_list == NULL) {
|
||||
return LDNS_STATUS_MEM_ERR;
|
||||
}
|
||||
for ( hashmap_node = ldns_rbtree_first(zone->hashed_names)
|
||||
; hashmap_node != LDNS_RBTREE_NULL
|
||||
; hashmap_node = ldns_rbtree_next(hashmap_node)
|
||||
) {
|
||||
current_name = (ldns_dnssec_name *) hashmap_node->data;
|
||||
nsec_rr = ((ldns_dnssec_name *) hashmap_node->data)->nsec;
|
||||
if (nsec_rr) {
|
||||
ldns_rr_list_push_rr(nsec3_list, nsec_rr);
|
||||
}
|
||||
}
|
||||
result = ldns_dnssec_chain_nsec3_list(nsec3_list);
|
||||
ldns_rr_list_free(nsec3_list);
|
||||
|
||||
@ -913,7 +940,9 @@ ldns_dnssec_remove_signatures( ldns_dnssec_rrs *signatures
|
||||
ldns_key_list_set_use(key_list, false);
|
||||
break;
|
||||
default:
|
||||
#ifdef STDERR_MSGS
|
||||
fprintf(stderr, "[XX] unknown return value from callback\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
@ -965,7 +994,9 @@ ldns_dnssec_remove_signatures( ldns_dnssec_rrs *signatures
|
||||
LDNS_FREE(cur_rr);
|
||||
break;
|
||||
default:
|
||||
#ifdef STDERR_MSGS
|
||||
fprintf(stderr, "[XX] unknown return value from callback\n");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
cur_rr = next_rr;
|
||||
|
165
dnssec_zone.c
165
dnssec_zone.c
@ -54,10 +54,8 @@ ldns_dnssec_rrs_add_rr(ldns_dnssec_rrs *rrs, ldns_rr *rr)
|
||||
|
||||
/* this could be done more efficiently; name and type should already
|
||||
be equal */
|
||||
cmp = ldns_rr_compare(rrs->rr,
|
||||
rr);
|
||||
/* should we error on equal? */
|
||||
if (cmp <= 0) {
|
||||
cmp = ldns_rr_compare(rrs->rr, rr);
|
||||
if (cmp < 0) {
|
||||
if (rrs->next) {
|
||||
return ldns_dnssec_rrs_add_rr(rrs->next, rr);
|
||||
} else {
|
||||
@ -74,6 +72,7 @@ ldns_dnssec_rrs_add_rr(ldns_dnssec_rrs *rrs, ldns_rr *rr)
|
||||
rrs->rr = rr;
|
||||
rrs->next = new_rrs;
|
||||
}
|
||||
/* Silently ignore equal rr's */
|
||||
return LDNS_STATUS_OK;
|
||||
}
|
||||
|
||||
@ -450,8 +449,6 @@ ldns_dnssec_name_add_rr(ldns_dnssec_name *name,
|
||||
ldns_rr *rr)
|
||||
{
|
||||
ldns_status result = LDNS_STATUS_OK;
|
||||
ldns_rdf *name_name;
|
||||
bool hashed_name = false;
|
||||
ldns_rr_type rr_type;
|
||||
ldns_rr_type typecovered = 0;
|
||||
|
||||
@ -467,19 +464,6 @@ ldns_dnssec_name_add_rr(ldns_dnssec_name *name,
|
||||
typecovered = ldns_rdf2rr_type(ldns_rr_rrsig_typecovered(rr));
|
||||
}
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
if (rr_type == LDNS_RR_TYPE_NSEC3 ||
|
||||
typecovered == LDNS_RR_TYPE_NSEC3) {
|
||||
name_name = ldns_nsec3_hash_name_frm_nsec3(rr,
|
||||
ldns_dnssec_name_name(name));
|
||||
hashed_name = true;
|
||||
} else {
|
||||
name_name = ldns_dnssec_name_name(name);
|
||||
}
|
||||
#else
|
||||
name_name = ldns_dnssec_name_name(name);
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
if (rr_type == LDNS_RR_TYPE_NSEC ||
|
||||
rr_type == LDNS_RR_TYPE_NSEC3) {
|
||||
/* XX check if is already set (and error?) */
|
||||
@ -501,11 +485,6 @@ ldns_dnssec_name_add_rr(ldns_dnssec_name *name,
|
||||
result = ldns_dnssec_rrsets_add_rr(name->rrsets, rr);
|
||||
}
|
||||
}
|
||||
|
||||
if (hashed_name) {
|
||||
ldns_rdf_deep_free(name_name);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -593,6 +572,8 @@ ldns_dnssec_zone_new(void)
|
||||
if(!zone) return NULL;
|
||||
zone->soa = NULL;
|
||||
zone->names = NULL;
|
||||
zone->hashed_names = NULL;
|
||||
zone->_nsec3params = NULL;
|
||||
|
||||
return zone;
|
||||
}
|
||||
@ -675,6 +656,8 @@ ldns_dnssec_zone_new_frm_fp_l(ldns_dnssec_zone** z, FILE* fp, ldns_rdf* origin,
|
||||
ldns_rr_list_push_rr(todo_nsec3s,
|
||||
cur_rr);
|
||||
}
|
||||
status = LDNS_STATUS_OK;
|
||||
|
||||
} else if (status != LDNS_STATUS_OK)
|
||||
goto error;
|
||||
|
||||
@ -698,18 +681,13 @@ ldns_dnssec_zone_new_frm_fp_l(ldns_dnssec_zone** z, FILE* fp, ldns_rdf* origin,
|
||||
|
||||
if (ldns_rr_list_rr_count(todo_nsec3s) > 0) {
|
||||
(void) ldns_dnssec_zone_add_empty_nonterminals(newzone);
|
||||
for (i = 0; status == LDNS_STATUS_OK &&
|
||||
for (i = 0; status == LDNS_STATUS_OK &&
|
||||
i < ldns_rr_list_rr_count(todo_nsec3s); i++) {
|
||||
cur_rr = ldns_rr_list_rr(todo_nsec3s, i);
|
||||
status = ldns_dnssec_zone_add_rr(newzone, cur_rr);
|
||||
}
|
||||
for (i = 0; status == LDNS_STATUS_OK &&
|
||||
i < ldns_rr_list_rr_count(todo_nsec3_rrsigs);
|
||||
i++){
|
||||
cur_rr = ldns_rr_list_rr(todo_nsec3_rrsigs, i);
|
||||
status = ldns_dnssec_zone_add_rr(newzone, cur_rr);
|
||||
}
|
||||
} else if (ldns_rr_list_rr_count(todo_nsec3_rrsigs) > 0) {
|
||||
}
|
||||
if (ldns_rr_list_rr_count(todo_nsec3_rrsigs) > 0) {
|
||||
for (i = 0; status == LDNS_STATUS_OK &&
|
||||
i < ldns_rr_list_rr_count(todo_nsec3_rrsigs);
|
||||
i++){
|
||||
@ -803,31 +781,99 @@ ldns_dname_compare_v(const void *a, const void *b) {
|
||||
return ldns_dname_compare((ldns_rdf *)a, (ldns_rdf *)b);
|
||||
}
|
||||
|
||||
static void
|
||||
ldns_dnssec_name_make_hashed_name(ldns_dnssec_zone *zone,
|
||||
ldns_dnssec_name* name, ldns_rr* nsec3rr);
|
||||
|
||||
static void
|
||||
ldns_hashed_names_node_free(ldns_rbnode_t *node, void *arg) {
|
||||
(void) arg;
|
||||
LDNS_FREE(node);
|
||||
}
|
||||
|
||||
static void
|
||||
ldns_dnssec_zone_hashed_names_from_nsec3(
|
||||
ldns_dnssec_zone* zone, ldns_rr* nsec3rr)
|
||||
{
|
||||
ldns_rbnode_t* current_node;
|
||||
ldns_dnssec_name* current_name;
|
||||
|
||||
assert(zone != NULL);
|
||||
assert(nsec3rr != NULL);
|
||||
|
||||
if (zone->hashed_names) {
|
||||
ldns_traverse_postorder(zone->hashed_names,
|
||||
ldns_hashed_names_node_free, NULL);
|
||||
LDNS_FREE(zone->hashed_names);
|
||||
}
|
||||
zone->_nsec3params = nsec3rr;
|
||||
|
||||
/* So this is a NSEC3 zone.
|
||||
* Calculate hashes for all names already in the zone
|
||||
*/
|
||||
zone->hashed_names = ldns_rbtree_create(ldns_dname_compare_v);
|
||||
if (zone->hashed_names == NULL) {
|
||||
return;
|
||||
}
|
||||
for ( current_node = ldns_rbtree_first(zone->names)
|
||||
; current_node != LDNS_RBTREE_NULL
|
||||
; current_node = ldns_rbtree_next(current_node)
|
||||
) {
|
||||
current_name = (ldns_dnssec_name *) current_node->data;
|
||||
ldns_dnssec_name_make_hashed_name(zone, current_name, nsec3rr);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ldns_dnssec_name_make_hashed_name(ldns_dnssec_zone *zone,
|
||||
ldns_dnssec_name* name, ldns_rr* nsec3rr)
|
||||
{
|
||||
ldns_rbnode_t* new_node;
|
||||
|
||||
assert(name != NULL);
|
||||
if (! zone->_nsec3params) {
|
||||
if (! nsec3rr) {
|
||||
return;
|
||||
}
|
||||
ldns_dnssec_zone_hashed_names_from_nsec3(zone, nsec3rr);
|
||||
|
||||
} else if (! nsec3rr) {
|
||||
nsec3rr = zone->_nsec3params;
|
||||
}
|
||||
name->hashed_name = ldns_nsec3_hash_name_frm_nsec3(nsec3rr, name->name);
|
||||
|
||||
/* Also store in zone->hashed_names */
|
||||
if ((new_node = LDNS_MALLOC(ldns_rbnode_t))) {
|
||||
|
||||
new_node->key = name->hashed_name;
|
||||
new_node->data = name;
|
||||
|
||||
if (ldns_rbtree_insert(zone->hashed_names, new_node) == NULL) {
|
||||
|
||||
LDNS_FREE(new_node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static ldns_rbnode_t *
|
||||
ldns_dnssec_zone_find_nsec3_original(ldns_dnssec_zone *zone,
|
||||
ldns_rr *rr) {
|
||||
ldns_rbnode_t *current_node = ldns_rbtree_first(zone->names);
|
||||
ldns_dnssec_name *current_name;
|
||||
ldns_dnssec_zone_find_nsec3_original(ldns_dnssec_zone *zone, ldns_rr *rr) {
|
||||
ldns_rdf *hashed_name;
|
||||
|
||||
hashed_name = ldns_dname_label(ldns_rr_owner(rr), 0);
|
||||
|
||||
while (current_node != LDNS_RBTREE_NULL) {
|
||||
current_name = (ldns_dnssec_name *) current_node->data;
|
||||
if (!current_name->hashed_name) {
|
||||
current_name->hashed_name =
|
||||
ldns_nsec3_hash_name_frm_nsec3(rr, current_name->name);
|
||||
}
|
||||
if (ldns_dname_compare(hashed_name,
|
||||
current_name->hashed_name)
|
||||
== 0) {
|
||||
ldns_rdf_deep_free(hashed_name);
|
||||
return current_node;
|
||||
}
|
||||
current_node = ldns_rbtree_next(current_node);
|
||||
if (hashed_name == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
ldns_rdf_deep_free(hashed_name);
|
||||
return NULL;
|
||||
if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 && ! zone->_nsec3params){
|
||||
|
||||
ldns_dnssec_zone_hashed_names_from_nsec3(zone, rr);
|
||||
}
|
||||
if (zone->hashed_names == NULL) {
|
||||
ldns_rdf_deep_free(hashed_name);
|
||||
return NULL;
|
||||
}
|
||||
return ldns_rbtree_search(zone->hashed_names, hashed_name);
|
||||
}
|
||||
|
||||
ldns_status
|
||||
@ -854,15 +900,13 @@ ldns_dnssec_zone_add_rr(ldns_dnssec_zone *zone, ldns_rr *rr)
|
||||
}
|
||||
if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NSEC3 ||
|
||||
type_covered == LDNS_RR_TYPE_NSEC3) {
|
||||
cur_node = ldns_dnssec_zone_find_nsec3_original(zone,
|
||||
rr);
|
||||
cur_node = ldns_dnssec_zone_find_nsec3_original(zone, rr);
|
||||
if (!cur_node) {
|
||||
return LDNS_STATUS_DNSSEC_NSEC3_ORIGINAL_NOT_FOUND;
|
||||
}
|
||||
} else {
|
||||
cur_node = ldns_rbtree_search(zone->names, ldns_rr_owner(rr));
|
||||
}
|
||||
|
||||
if (!cur_node) {
|
||||
/* add */
|
||||
cur_name = ldns_dnssec_name_new_frm_rr(rr);
|
||||
@ -875,21 +919,14 @@ ldns_dnssec_zone_add_rr(ldns_dnssec_zone *zone, ldns_rr *rr)
|
||||
cur_node->key = ldns_rr_owner(rr);
|
||||
cur_node->data = cur_name;
|
||||
(void)ldns_rbtree_insert(zone->names, cur_node);
|
||||
ldns_dnssec_name_make_hashed_name(zone, cur_name, NULL);
|
||||
} else {
|
||||
cur_name = (ldns_dnssec_name *) cur_node->data;
|
||||
result = ldns_dnssec_name_add_rr(cur_name, rr);
|
||||
}
|
||||
|
||||
if (result != LDNS_STATUS_OK) {
|
||||
fprintf(stderr, "error adding rr: ");
|
||||
ldns_rr_print(stderr, rr);
|
||||
}
|
||||
|
||||
/*TODO ldns_dnssec_name_print_names(stdout, zone->names, 0);*/
|
||||
if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_SOA) {
|
||||
zone->soa = cur_name;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1035,6 +1072,8 @@ ldns_dnssec_zone_add_empty_nonterminals(ldns_dnssec_zone *zone)
|
||||
new_node->key = new_name->name;
|
||||
new_node->data = new_name;
|
||||
(void)ldns_rbtree_insert(zone->names, new_node);
|
||||
ldns_dnssec_name_make_hashed_name(
|
||||
zone, new_name, NULL);
|
||||
}
|
||||
ldns_rdf_deep_free(l1);
|
||||
ldns_rdf_deep_free(l2);
|
||||
|
@ -196,7 +196,7 @@ TODO the 'set' functions of the 'get'
|
||||
<t>
|
||||
In the DNS the atomic data type is an RRset. This is a list
|
||||
of RRs with the same ownername, type and class. Net::DNS doesn't
|
||||
have rrsets as a seperate object.
|
||||
have rrsets as a separate object.
|
||||
</t>
|
||||
<t>
|
||||
In lDNS we have the ldns_rr_list, which just holds a bunch of RR's.
|
||||
|
@ -74,6 +74,8 @@ do_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
|
||||
ldns_resolver_usevc(local_res));
|
||||
ldns_resolver_set_random(res,
|
||||
ldns_resolver_random(local_res));
|
||||
ldns_resolver_set_source(res,
|
||||
ldns_resolver_source(local_res));
|
||||
ldns_resolver_set_recursive(res, false);
|
||||
|
||||
/* setup the root nameserver in the new resolver */
|
||||
|
37
drill/configure
vendored
37
drill/configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68 for ldns 1.6.16.
|
||||
# Generated by GNU Autoconf 2.68 for ldns 1.6.17.
|
||||
#
|
||||
# Report bugs to <libdns@nlnetlabs.nl>.
|
||||
#
|
||||
@ -560,8 +560,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='ldns'
|
||||
PACKAGE_TARNAME='libdns'
|
||||
PACKAGE_VERSION='1.6.16'
|
||||
PACKAGE_STRING='ldns 1.6.16'
|
||||
PACKAGE_VERSION='1.6.17'
|
||||
PACKAGE_STRING='ldns 1.6.17'
|
||||
PACKAGE_BUGREPORT='libdns@nlnetlabs.nl'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@ -1218,7 +1218,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures ldns 1.6.16 to adapt to many kinds of systems.
|
||||
\`configure' configures ldns 1.6.17 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1279,7 +1279,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of ldns 1.6.16:";;
|
||||
short | recursive ) echo "Configuration of ldns 1.6.17:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1378,7 +1378,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
ldns configure 1.6.16
|
||||
ldns configure 1.6.17
|
||||
generated by GNU Autoconf 2.68
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
@ -1801,7 +1801,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by ldns $as_me 1.6.16, which was
|
||||
It was created by ldns $as_me 1.6.17, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -2154,7 +2154,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
||||
# BSD licensed.
|
||||
#
|
||||
# Version 21
|
||||
# Version 26
|
||||
# 2013-09-19 FLTO help text improved.
|
||||
# 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes
|
||||
# 2013-06-25 FLTO has --disable-flto option.
|
||||
# 2013-05-03 Update W32_SLEEP for newer mingw that links but not defines it.
|
||||
# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
|
||||
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
|
||||
# 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
|
||||
# 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
|
||||
@ -2169,7 +2174,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
# 2010-07-02 Add check for ss_family (for minix).
|
||||
# 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS.
|
||||
# 2010-03-01 Fix RPATH using CONFIG_COMMANDS to run at the very end.
|
||||
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS seperate, -ldl
|
||||
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS separate, -ldl
|
||||
# 2010-02-01 added ACX_CHECK_MEMCMP_SIGNED, AHX_MEMCMP_BROKEN
|
||||
# 2010-01-20 added AHX_COONFIG_STRLCAT
|
||||
# 2009-07-14 U_CHAR detection improved for windows crosscompile.
|
||||
@ -4240,7 +4245,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4271,7 +4276,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4314,7 +4319,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4347,7 +4352,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4378,7 +4383,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -5945,7 +5950,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by ldns $as_me 1.6.16, which was
|
||||
This file was extended by ldns $as_me 1.6.17, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -6007,7 +6012,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
ldns config.status 1.6.16
|
||||
ldns config.status 1.6.17
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(ldns, 1.6.16, libdns@nlnetlabs.nl,libdns)
|
||||
AC_INIT(ldns, 1.6.17, libdns@nlnetlabs.nl,libdns)
|
||||
AC_CONFIG_SRCDIR([drill.c])
|
||||
sinclude(../acx_nlnetlabs.m4)
|
||||
|
||||
|
@ -82,6 +82,11 @@ the type arguments are not used.
|
||||
Chase the signature(s) of 'name' to a known key or as high up in
|
||||
the tree as possible.
|
||||
|
||||
.TP
|
||||
\fB\-I \fIIPv4 or IPv6 address\fR
|
||||
Source address to query from. The source address has to be present
|
||||
on an interface of the host running drill.
|
||||
|
||||
.TP
|
||||
\fB\-V \fIlevel\fR
|
||||
Be more verbose. Set level to 5 to see the actual query that is sent.
|
||||
@ -217,6 +222,12 @@ specify named base64 tsig key, and optional an algorithm (defaults to hmac-md5.s
|
||||
\fB\-z \fR
|
||||
don't randomize the nameserver list before sending queries.
|
||||
|
||||
.SH "EXIT STATUS"
|
||||
The exit status is 0 if the looked up answer is secure and trusted,
|
||||
or insecure.
|
||||
The exit status is not 0 if the looked up answer is untrusted or bogus,
|
||||
or an error occurred while performing the lookup.
|
||||
|
||||
.SH "FILES"
|
||||
.TP
|
||||
@LDNS_TRUST_ANCHOR_FILE@
|
||||
|
@ -33,6 +33,7 @@ usage(FILE *stream, const char *progname)
|
||||
fprintf(stream, "\t-T\t\ttrace from the root down to <name>\n");
|
||||
fprintf(stream, "\t-S\t\tchase signature(s) from <name> to a know key [*]\n");
|
||||
#endif /*HAVE_SSL*/
|
||||
fprintf(stream, "\t-I <address>\tsource address to query from\n");
|
||||
fprintf(stream, "\t-V <number>\tverbosity (0-5)\n");
|
||||
fprintf(stream, "\t-Q\t\tquiet mode (overrules -V)\n");
|
||||
fprintf(stream, "\n");
|
||||
@ -103,6 +104,7 @@ main(int argc, char *argv[])
|
||||
ldns_pkt *pkt;
|
||||
ldns_pkt *qpkt;
|
||||
char *serv;
|
||||
char *src = NULL;
|
||||
const char *name;
|
||||
char *name2;
|
||||
char *progname;
|
||||
@ -110,6 +112,7 @@ main(int argc, char *argv[])
|
||||
char *answer_file = NULL;
|
||||
ldns_buffer *query_buffer = NULL;
|
||||
ldns_rdf *serv_rdf;
|
||||
ldns_rdf *src_rdf = NULL;
|
||||
ldns_rr_type type;
|
||||
ldns_rr_class clas;
|
||||
#if 0
|
||||
@ -157,7 +160,7 @@ main(int argc, char *argv[])
|
||||
|
||||
int_type = -1; serv = NULL; type = 0;
|
||||
int_clas = -1; name = NULL; clas = 0;
|
||||
qname = NULL;
|
||||
qname = NULL; src = NULL;
|
||||
progname = strdup(argv[0]);
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
@ -195,7 +198,7 @@ main(int argc, char *argv[])
|
||||
/* global first, query opt next, option with parm's last
|
||||
* and sorted */ /* "46DITSVQf:i:w:q:achuvxzy:so:p:b:k:" */
|
||||
|
||||
while ((c = getopt(argc, argv, "46ab:c:d:Df:hi:Ik:o:p:q:Qr:sStTuvV:w:xy:z")) != -1) {
|
||||
while ((c = getopt(argc, argv, "46ab:c:d:Df:hi:I:k:o:p:q:Qr:sStTuvV:w:xy:z")) != -1) {
|
||||
switch(c) {
|
||||
/* global options */
|
||||
case '4':
|
||||
@ -208,7 +211,7 @@ main(int argc, char *argv[])
|
||||
qdnssec = true;
|
||||
break;
|
||||
case 'I':
|
||||
/* reserved for backward compatibility */
|
||||
src = optarg;
|
||||
break;
|
||||
case 'T':
|
||||
if (PURPOSE == DRILL_CHASE) {
|
||||
@ -482,6 +485,14 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (src) {
|
||||
src_rdf = ldns_rdf_new_addr_frm_str(src);
|
||||
if(!src_rdf) {
|
||||
fprintf(stderr, "-I must be (or resolve) to a valid IP[v6] address.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* set the nameserver to use */
|
||||
if (!serv) {
|
||||
/* no server given make a resolver from /etc/resolv.conf */
|
||||
@ -513,6 +524,7 @@ main(int argc, char *argv[])
|
||||
ldns_resolver_set_ip6(cmdline_res, qfamily);
|
||||
ldns_resolver_set_fallback(cmdline_res, qfallback);
|
||||
ldns_resolver_set_usevc(cmdline_res, qusevc);
|
||||
ldns_resolver_set_source(cmdline_res, src_rdf);
|
||||
|
||||
cmdline_dname = ldns_dname_new_frm_str(serv);
|
||||
|
||||
@ -543,6 +555,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
/* set the resolver options */
|
||||
ldns_resolver_set_port(res, qport);
|
||||
ldns_resolver_set_source(res, src_rdf);
|
||||
if (verbosity >= 5) {
|
||||
ldns_resolver_set_debug(res, true);
|
||||
} else {
|
||||
@ -613,10 +626,17 @@ main(int argc, char *argv[])
|
||||
ldns_resolver_set_dnssec_cd(res, true);
|
||||
/* set dnssec implies udp_size of 4096 */
|
||||
ldns_resolver_set_edns_udp_size(res, 4096);
|
||||
pkt = ldns_resolver_query(res, qname, type, clas, qflags);
|
||||
|
||||
pkt = NULL;
|
||||
status = ldns_resolver_query_status(
|
||||
&pkt, res, qname, type, clas, qflags);
|
||||
if (status != LDNS_STATUS_OK) {
|
||||
error("error sending query: %s",
|
||||
ldns_get_errorstr_by_id(status));
|
||||
}
|
||||
if (!pkt) {
|
||||
error("%s", "error pkt sending");
|
||||
if (status == LDNS_STATUS_OK) {
|
||||
error("%s", "error pkt sending");
|
||||
}
|
||||
result = EXIT_FAILURE;
|
||||
} else {
|
||||
if (verbosity >= 3) {
|
||||
@ -742,9 +762,17 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* create a packet and set the RD flag on it */
|
||||
pkt = ldns_resolver_query(res, qname, type, clas, qflags);
|
||||
pkt = NULL;
|
||||
status = ldns_resolver_query_status(
|
||||
&pkt, res, qname, type, clas, qflags);
|
||||
if (status != LDNS_STATUS_OK) {
|
||||
error("error sending query: %s",
|
||||
ldns_get_errorstr_by_id(status));
|
||||
}
|
||||
if (!pkt) {
|
||||
error("%s", "pkt sending");
|
||||
if (status == LDNS_STATUS_OK) {
|
||||
error("%s", "pkt sending");
|
||||
}
|
||||
result = EXIT_FAILURE;
|
||||
} else {
|
||||
if (verbosity != -1) {
|
||||
@ -815,7 +843,15 @@ main(int argc, char *argv[])
|
||||
goto exit;
|
||||
} else {
|
||||
/* create a packet and set the RD flag on it */
|
||||
pkt = ldns_resolver_query(res, qname, type, clas, qflags);
|
||||
pkt = NULL;
|
||||
status = ldns_resolver_query_status(
|
||||
&pkt, res, qname,
|
||||
type, clas, qflags);
|
||||
if (status != LDNS_STATUS_OK) {
|
||||
error("error sending query: %s"
|
||||
, ldns_get_errorstr_by_id(
|
||||
status));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -926,6 +962,7 @@ main(int argc, char *argv[])
|
||||
|
||||
exit:
|
||||
ldns_rdf_deep_free(qname);
|
||||
ldns_rdf_deep_free(src_rdf);
|
||||
ldns_resolver_deep_free(res);
|
||||
ldns_resolver_deep_free(cmdline_res);
|
||||
ldns_rr_list_deep_free(key_list);
|
||||
|
@ -17,10 +17,10 @@ static int
|
||||
read_line(FILE *input, char *line, size_t len)
|
||||
{
|
||||
int i;
|
||||
|
||||
char c;
|
||||
int c;
|
||||
|
||||
for (i = 0; i < (int)len-1; i++) {
|
||||
c = (char)getc(input);
|
||||
c = getc(input);
|
||||
if (c == EOF) {
|
||||
return -1;
|
||||
} else if (c != '\n') {
|
||||
|
@ -138,7 +138,7 @@ do_secure_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
|
||||
size_t j;
|
||||
size_t k;
|
||||
size_t l;
|
||||
uint8_t labels_count;
|
||||
uint8_t labels_count = 0;
|
||||
|
||||
/* dnssec */
|
||||
ldns_rr_list *key_list;
|
||||
@ -156,6 +156,9 @@ do_secure_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
|
||||
|
||||
/* empty non-terminal check */
|
||||
bool ent;
|
||||
ldns_rr *nsecrr; /* The nsec that proofs the non-terminal */
|
||||
ldns_rdf *hashed_name; /* The query hashed with nsec3 params */
|
||||
ldns_rdf *label0; /* The first label of an nsec3 owner name */
|
||||
|
||||
/* glue handling */
|
||||
ldns_rr_list *new_ns_addr;
|
||||
@ -220,6 +223,8 @@ do_secure_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
|
||||
ldns_resolver_usevc(local_res));
|
||||
ldns_resolver_set_random(res,
|
||||
ldns_resolver_random(local_res));
|
||||
ldns_resolver_set_source(res,
|
||||
ldns_resolver_source(local_res));
|
||||
ldns_resolver_set_recursive(local_res, true);
|
||||
|
||||
ldns_resolver_set_recursive(res, false);
|
||||
@ -380,8 +385,27 @@ do_secure_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
|
||||
/* there might be an empty non-terminal, in which case we need to continue */
|
||||
ent = false;
|
||||
for (j = 0; j < ldns_rr_list_rr_count(nsec_rrs); j++) {
|
||||
if (ldns_dname_is_subdomain(ldns_rr_rdf(ldns_rr_list_rr(nsec_rrs, j), 0), labels[i])) {
|
||||
nsecrr = ldns_rr_list_rr(nsec_rrs, j);
|
||||
/* For NSEC when the next name is a subdomain of the question */
|
||||
if (ldns_rr_get_type(nsecrr) == LDNS_RR_TYPE_NSEC &&
|
||||
ldns_dname_is_subdomain(ldns_rr_rdf(nsecrr, 0), labels[i])) {
|
||||
ent = true;
|
||||
|
||||
/* For NSEC3, the hash matches the name and the type bitmap is empty*/
|
||||
} else if (ldns_rr_get_type(nsecrr) == LDNS_RR_TYPE_NSEC3) {
|
||||
hashed_name = ldns_nsec3_hash_name_frm_nsec3(nsecrr, labels[i]);
|
||||
label0 = ldns_dname_label(ldns_rr_owner(nsecrr), 0);
|
||||
if (hashed_name && label0 &&
|
||||
ldns_dname_compare(hashed_name, label0) == 0 &&
|
||||
ldns_nsec3_bitmap(nsecrr) == NULL) {
|
||||
ent = true;
|
||||
}
|
||||
if (label0) {
|
||||
LDNS_FREE(label0);
|
||||
}
|
||||
if (hashed_name) {
|
||||
LDNS_FREE(hashed_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ent) {
|
||||
|
@ -235,6 +235,7 @@ dump_hex(const ldns_pkt *pkt, const char *filename)
|
||||
if (status != LDNS_STATUS_OK) {
|
||||
error("Unable to convert packet: error code %u", status);
|
||||
LDNS_FREE(wire);
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
|
19
error.c
19
error.c
@ -65,6 +65,7 @@ ldns_lookup_table ldns_error_str[] = {
|
||||
{ LDNS_STATUS_WIRE_INCOMPLETE_AUTHORITY, "authority section incomplete" },
|
||||
{ LDNS_STATUS_WIRE_INCOMPLETE_ADDITIONAL, "additional section incomplete" },
|
||||
{ LDNS_STATUS_NO_DATA, "No data" },
|
||||
{ LDNS_STATUS_EXISTS_ERR, "Element already exists" },
|
||||
{ LDNS_STATUS_CERT_BAD_ALGORITHM, "Bad algorithm type for CERT record" },
|
||||
{ LDNS_STATUS_SYNTAX_TYPE_ERR, "Syntax error, could not parse the RR's type" },
|
||||
{ LDNS_STATUS_SYNTAX_CLASS_ERR, "Syntax error, could not parse the RR's class" },
|
||||
@ -124,6 +125,24 @@ ldns_lookup_table ldns_error_str[] = {
|
||||
{ LDNS_STATUS_DANE_PKIX_NO_SELF_SIGNED_TRUST_ANCHOR,
|
||||
"The validation path "
|
||||
"did not end in a self-signed certificate" },
|
||||
{ LDNS_STATUS_INVALID_ILNP64,
|
||||
"Conversion error, 4 colon separated hex numbers expected" },
|
||||
{ LDNS_STATUS_INVALID_EUI48,
|
||||
"Conversion error, 6 two character hex numbers "
|
||||
"separated by dashes expected (i.e. xx-xx-xx-xx-xx-xx" },
|
||||
{ LDNS_STATUS_INVALID_EUI64,
|
||||
"Conversion error, 8 two character hex numbers "
|
||||
"separated by dashes expected (i.e. xx-xx-xx-xx-xx-xx-xx-xx" },
|
||||
{ LDNS_STATUS_WIRE_RDATA_ERR, "invalid rdata in wire format" },
|
||||
{ LDNS_STATUS_INVALID_TAG,
|
||||
"Conversion error, a non-zero sequence of US-ASCII letters "
|
||||
"and numbers in lower case expected" },
|
||||
{ LDNS_STATUS_TYPE_NOT_IN_BITMAP,
|
||||
"The RR type bitmap rdata field did not have "
|
||||
"a bit reserved for the specific RR type" },
|
||||
{ LDNS_STATUS_INVALID_RDF_TYPE,
|
||||
"The rdata field was not of the expected type" },
|
||||
{ LDNS_STATUS_RDATA_OVERFLOW, "Rdata size overflow" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,14 @@
|
||||
don't. */
|
||||
#undef HAVE_DECL_IN6ADDR_ANY
|
||||
|
||||
/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_NID_SECP384R1
|
||||
|
||||
/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
|
||||
if you don't. */
|
||||
#undef HAVE_DECL_NID_X9_62_PRIME256V1
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#undef HAVE_FORK
|
||||
|
||||
@ -187,6 +195,9 @@
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define this to enable DANE support. */
|
||||
#undef USE_DANE
|
||||
|
||||
/* Define this to enable ECDSA support. */
|
||||
#undef USE_ECDSA
|
||||
|
||||
|
134
examples/configure
vendored
134
examples/configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68 for ldns 1.6.16.
|
||||
# Generated by GNU Autoconf 2.68 for ldns 1.6.17.
|
||||
#
|
||||
# Report bugs to <libdns@nlnetlabs.nl>.
|
||||
#
|
||||
@ -560,8 +560,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='ldns'
|
||||
PACKAGE_TARNAME='libdns'
|
||||
PACKAGE_VERSION='1.6.16'
|
||||
PACKAGE_STRING='ldns 1.6.16'
|
||||
PACKAGE_VERSION='1.6.17'
|
||||
PACKAGE_STRING='ldns 1.6.17'
|
||||
PACKAGE_BUGREPORT='libdns@nlnetlabs.nl'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@ -673,6 +673,7 @@ with_ssl
|
||||
enable_sha2
|
||||
enable_gost
|
||||
enable_ecdsa
|
||||
enable_dane
|
||||
with_ldns
|
||||
with_trust_anchor
|
||||
with_ca_file
|
||||
@ -1229,7 +1230,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures ldns 1.6.16 to adapt to many kinds of systems.
|
||||
\`configure' configures ldns 1.6.17 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1290,7 +1291,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of ldns 1.6.16:";;
|
||||
short | recursive ) echo "Configuration of ldns 1.6.17:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1301,7 +1302,8 @@ Optional Features:
|
||||
--disable-rpath Disable hardcoded rpath (default=enabled)
|
||||
--disable-sha2 Disable SHA256 and SHA512 RRSIG support
|
||||
--disable-gost Disable GOST support
|
||||
--enable-ecdsa Enable ECDSA support, experimental
|
||||
--disable-ecdsa Disable ECDSA support
|
||||
--disable-dane Disable DANE support
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
@ -1395,7 +1397,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
ldns configure 1.6.16
|
||||
ldns configure 1.6.17
|
||||
generated by GNU Autoconf 2.68
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
@ -1864,7 +1866,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by ldns $as_me 1.6.16, which was
|
||||
It was created by ldns $as_me 1.6.17, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@ -2217,7 +2219,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
||||
# BSD licensed.
|
||||
#
|
||||
# Version 21
|
||||
# Version 26
|
||||
# 2013-09-19 FLTO help text improved.
|
||||
# 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes
|
||||
# 2013-06-25 FLTO has --disable-flto option.
|
||||
# 2013-05-03 Update W32_SLEEP for newer mingw that links but not defines it.
|
||||
# 2013-03-22 Fix ACX_RSRC_VERSION for long version numbers.
|
||||
# 2012-02-09 Fix AHX_MEMCMP_BROKEN with undef in compat/memcmp.h.
|
||||
# 2012-01-20 Fix COMPILER_FLAGS_UNBOUND for gcc 4.6.2 assigned-not-used-warns.
|
||||
# 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
|
||||
@ -2232,7 +2239,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
# 2010-07-02 Add check for ss_family (for minix).
|
||||
# 2010-04-26 Fix to use CPPFLAGS for CHECK_COMPILER_FLAGS.
|
||||
# 2010-03-01 Fix RPATH using CONFIG_COMMANDS to run at the very end.
|
||||
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS seperate, -ldl
|
||||
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS separate, -ldl
|
||||
# 2010-02-01 added ACX_CHECK_MEMCMP_SIGNED, AHX_MEMCMP_BROKEN
|
||||
# 2010-01-20 added AHX_COONFIG_STRLCAT
|
||||
# 2009-07-14 U_CHAR detection improved for windows crosscompile.
|
||||
@ -4289,7 +4296,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -std=c99 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4320,7 +4327,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -xc99 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4376,7 +4383,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -O2 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4409,7 +4416,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -Werror -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -4440,7 +4447,7 @@ if eval \${cv_prog_cc_flag_$cache+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
echo 'void f(){}' >conftest.c
|
||||
echo 'void f(void){}' >conftest.c
|
||||
if test -z "`$CC $CPPFLAGS $CFLAGS -Wall -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
@ -5272,7 +5279,7 @@ done
|
||||
|
||||
|
||||
if test "x$HAVE_SSL" = "xyes"; then
|
||||
LIBSSL_SSL_LIBS="$LIBSSL_LIBS -lssl"
|
||||
LIBSSL_SSL_LIBS="-lssl $LIBSSL_LIBS"
|
||||
|
||||
fi
|
||||
CPPFLAGS="$tmp_CPPFLAGS"
|
||||
@ -5354,31 +5361,94 @@ if test "${enable_ecdsa+set}" = set; then :
|
||||
fi
|
||||
|
||||
case "$enable_ecdsa" in
|
||||
yes)
|
||||
ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
|
||||
no)
|
||||
;;
|
||||
*) if test "x$HAVE_SSL" != "xyes"; then
|
||||
as_fn_error $? "ECDSA enabled, but no SSL support" "$LINENO" 5
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "ECDSA_sign" "ac_cv_func_ECDSA_sign"
|
||||
if test "x$ac_cv_func_ECDSA_sign" = xyes; then :
|
||||
|
||||
else
|
||||
as_fn_error $? "OpenSSL does not support ECDSA" "$LINENO" 5
|
||||
as_fn_error $? "OpenSSL does not support ECDSA: please upgrade OpenSSL or rerun with --disable-ecdsa" "$LINENO" 5
|
||||
fi
|
||||
|
||||
ac_fn_c_check_func "$LINENO" "SHA384_Init" "ac_cv_func_SHA384_Init"
|
||||
if test "x$ac_cv_func_SHA384_Init" = xyes; then :
|
||||
|
||||
else
|
||||
as_fn_error $? "OpenSSL does not support SHA384: please upgrade OpenSSL or rerun with --disable-ecdsa" "$LINENO" 5
|
||||
fi
|
||||
|
||||
ac_fn_c_check_decl "$LINENO" "NID_X9_62_prime256v1" "ac_cv_have_decl_NID_X9_62_prime256v1" "$ac_includes_default
|
||||
#include <openssl/evp.h>
|
||||
|
||||
"
|
||||
if test "x$ac_cv_have_decl_NID_X9_62_prime256v1" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_NID_X9_62_PRIME256V1 $ac_have_decl
|
||||
_ACEOF
|
||||
if test $ac_have_decl = 1; then :
|
||||
|
||||
else
|
||||
as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade OpenSSL or rerun with --disable-ecdsa" "$LINENO" 5
|
||||
fi
|
||||
ac_fn_c_check_decl "$LINENO" "NID_secp384r1" "ac_cv_have_decl_NID_secp384r1" "$ac_includes_default
|
||||
#include <openssl/evp.h>
|
||||
|
||||
"
|
||||
if test "x$ac_cv_have_decl_NID_secp384r1" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_NID_SECP384R1 $ac_have_decl
|
||||
_ACEOF
|
||||
if test $ac_have_decl = 1; then :
|
||||
|
||||
else
|
||||
as_fn_error $? "OpenSSL does not support the ECDSA curves: please upgrade OpenSSL or rerun with --disable-ecdsa" "$LINENO" 5
|
||||
fi
|
||||
|
||||
# we now know we have ECDSA and the required curves.
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define USE_ECDSA 1
|
||||
_ACEOF
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
|
||||
*****************************************************************
|
||||
*** YOU HAVE ENABLED ECDSA WHICH IS EXPERIMENTAL AT THIS TIME ***
|
||||
*** PLEASE DO NOT USE THIS ON THE PUBLIC INTERNET ***
|
||||
*****************************************************************" >&5
|
||||
$as_echo "$as_me: WARNING:
|
||||
*****************************************************************
|
||||
*** YOU HAVE ENABLED ECDSA WHICH IS EXPERIMENTAL AT THIS TIME ***
|
||||
*** PLEASE DO NOT USE THIS ON THE PUBLIC INTERNET ***
|
||||
*****************************************************************" >&2;}
|
||||
;;
|
||||
no|*)
|
||||
esac
|
||||
|
||||
# Check whether --enable-dane was given.
|
||||
if test "${enable_dane+set}" = set; then :
|
||||
enableval=$enable_dane;
|
||||
fi
|
||||
|
||||
case "$enable_dane" in
|
||||
no)
|
||||
;;
|
||||
*) if test "x$HAVE_SSL" != "xyes"; then
|
||||
as_fn_error $? "DANE enabled, but no SSL support" "$LINENO" 5
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "X509_check_ca" "ac_cv_func_X509_check_ca"
|
||||
if test "x$ac_cv_func_X509_check_ca" = xyes; then :
|
||||
|
||||
else
|
||||
as_fn_error $? "OpenSSL does not support DANE: please upgrade OpenSSL or rerun with --disable-dane" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define USE_DANE 1
|
||||
_ACEOF
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -6489,7 +6559,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by ldns $as_me 1.6.16, which was
|
||||
This file was extended by ldns $as_me 1.6.17, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -6551,7 +6621,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
ldns config.status 1.6.16
|
||||
ldns config.status 1.6.17
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(ldns, 1.6.16, libdns@nlnetlabs.nl,libdns)
|
||||
AC_INIT(ldns, 1.6.17, libdns@nlnetlabs.nl,libdns)
|
||||
AC_CONFIG_SRCDIR([ldns-read-zone.c])
|
||||
sinclude(../acx_nlnetlabs.m4)
|
||||
|
||||
@ -137,7 +137,7 @@ AC_SUBST(LIBSSL_CPPFLAGS)
|
||||
AC_SUBST(LIBSSL_LDFLAGS)
|
||||
AC_SUBST(LIBSSL_LIBS)
|
||||
if test "x$HAVE_SSL" = "xyes"; then
|
||||
AC_SUBST(LIBSSL_SSL_LIBS, ["$LIBSSL_LIBS -lssl"])
|
||||
AC_SUBST(LIBSSL_SSL_LIBS, ["-lssl $LIBSSL_LIBS"])
|
||||
fi
|
||||
CPPFLAGS="$tmp_CPPFLAGS"
|
||||
LDFLAGS="$tmp_LDFLAGS"
|
||||
@ -176,18 +176,34 @@ case "$enable_gost" in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(ecdsa, AC_HELP_STRING([--enable-ecdsa], [Enable ECDSA support, experimental]))
|
||||
AC_ARG_ENABLE(ecdsa, AC_HELP_STRING([--disable-ecdsa], [Disable ECDSA support]))
|
||||
case "$enable_ecdsa" in
|
||||
yes)
|
||||
AC_CHECK_FUNC(ECDSA_sign,,[AC_MSG_ERROR([OpenSSL does not support ECDSA])])
|
||||
AC_DEFINE_UNQUOTED([USE_ECDSA], [1], [Define this to enable ECDSA support.])
|
||||
AC_WARN([
|
||||
*****************************************************************
|
||||
*** YOU HAVE ENABLED ECDSA WHICH IS EXPERIMENTAL AT THIS TIME ***
|
||||
*** PLEASE DO NOT USE THIS ON THE PUBLIC INTERNET ***
|
||||
*****************************************************************])
|
||||
no)
|
||||
;;
|
||||
no|*)
|
||||
*) dnl default
|
||||
if test "x$HAVE_SSL" != "xyes"; then
|
||||
AC_MSG_ERROR([ECDSA enabled, but no SSL support])
|
||||
fi
|
||||
AC_CHECK_FUNC(ECDSA_sign, [], [AC_MSG_ERROR([OpenSSL does not support ECDSA: please upgrade OpenSSL or rerun with --disable-ecdsa])])
|
||||
AC_CHECK_FUNC(SHA384_Init, [], [AC_MSG_ERROR([OpenSSL does not support SHA384: please upgrade OpenSSL or rerun with --disable-ecdsa])])
|
||||
AC_CHECK_DECLS([NID_X9_62_prime256v1, NID_secp384r1], [], [AC_MSG_ERROR([OpenSSL does not support the ECDSA curves: please upgrade OpenSSL or rerun with --disable-ecdsa])], [AC_INCLUDES_DEFAULT
|
||||
#include <openssl/evp.h>
|
||||
])
|
||||
# we now know we have ECDSA and the required curves.
|
||||
AC_DEFINE_UNQUOTED([USE_ECDSA], [1], [Define this to enable ECDSA support.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE(dane, AC_HELP_STRING([--disable-dane], [Disable DANE support]))
|
||||
case "$enable_dane" in
|
||||
no)
|
||||
;;
|
||||
*) dnl default
|
||||
if test "x$HAVE_SSL" != "xyes"; then
|
||||
AC_MSG_ERROR([DANE enabled, but no SSL support])
|
||||
fi
|
||||
AC_CHECK_FUNC(X509_check_ca, [], [AC_MSG_ERROR([OpenSSL does not support DANE: please upgrade OpenSSL or rerun with --disable-dane])])
|
||||
AC_DEFINE_UNQUOTED([USE_DANE], [1], [Define this to enable DANE support.])
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -33,6 +33,8 @@ usage(char *prog)
|
||||
printf(" -a - print all differences (-i -d -c)\n");
|
||||
printf(" -s - do not exclude SOA record from comparison\n");
|
||||
printf(" -z - do not sort zones\n");
|
||||
printf(" -h - show usage and exit\n");
|
||||
printf(" -v - show the version and exit\n");
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -151,6 +151,9 @@ Read TLSA record(s) from \fItlsafile\fR. When \fIname\fR and \fIport\fR
|
||||
are also given, only TLSA records that match the \fIname\fR, \fIport\fR and
|
||||
\fItransport\fR are used. Otherwise the owner name of the TLSA record(s)
|
||||
will be used to determine \fIname\fR, \fIport\fR and \fItransport\fR.
|
||||
.IP -T
|
||||
Return exit status 2 for PKIX validated connections without (secure)
|
||||
TLSA records(s)
|
||||
.IP -u
|
||||
Use UDP transport instead of TCP.
|
||||
.IP -v
|
||||
|
@ -15,13 +15,27 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <ldns/ldns.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef USE_DANE
|
||||
#ifdef HAVE_SSL
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
@ -37,6 +51,11 @@
|
||||
exit(EXIT_FAILURE); } while (false)
|
||||
#define BUFSIZE 16384
|
||||
|
||||
/* Exit status on a PKIX validated connection but without TLSA records
|
||||
* when the -T option was given:
|
||||
*/
|
||||
#define NO_TLSAS_EXIT_STATUS 2
|
||||
|
||||
/* int verbosity = 3; */
|
||||
|
||||
void
|
||||
@ -106,9 +125,11 @@ print_usage(const char* progname)
|
||||
printf("\t-t <tlsafile>\tdo not use DNS, "
|
||||
"but read TLSA record(s) from <tlsafile>\n"
|
||||
);
|
||||
printf("\t-T\t\tReturn exit status 2 for PKIX validated connections\n"
|
||||
"\t\t\twithout (secure) TLSA records(s)\n");
|
||||
printf("\t-u\t\tuse UDP transport instead of TCP\n");
|
||||
printf("\t-v\t\tshow version and exit\n");
|
||||
/* printf("\t-V [0-5]\tset verbosity level (defaul 3)\n"); */
|
||||
/* printf("\t-V [0-5]\tset verbosity level (default 3)\n"); */
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@ -197,7 +218,8 @@ ldns_err(const char* s, ldns_status err)
|
||||
ldns_status
|
||||
ssl_connect_and_get_cert_chain(
|
||||
X509** cert, STACK_OF(X509)** extra_certs,
|
||||
SSL* ssl, ldns_rdf* address, uint16_t port,
|
||||
SSL* ssl, const char* name_str,
|
||||
ldns_rdf* address, uint16_t port,
|
||||
ldns_dane_transport transport)
|
||||
{
|
||||
struct sockaddr_storage *a = NULL;
|
||||
@ -246,6 +268,9 @@ ssl_connect_and_get_cert_chain(
|
||||
fprintf(stderr, "SSL_clear\n");
|
||||
return LDNS_STATUS_SSL_ERR;
|
||||
}
|
||||
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
|
||||
(void) SSL_set_tlsext_host_name(ssl, name_str);
|
||||
#endif
|
||||
SSL_set_connect_state(ssl);
|
||||
(void) SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY);
|
||||
if (! SSL_set_fd(ssl, sock)) {
|
||||
@ -359,12 +384,6 @@ ssl_interact(SSL* ssl)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ssl_shutdown(SSL* ssl)
|
||||
{
|
||||
while (SSL_shutdown(ssl) == 0);
|
||||
}
|
||||
|
||||
ldns_rr_list*
|
||||
rr_list_filter_rr_type(ldns_rr_list* l, ldns_rr_type t)
|
||||
{
|
||||
@ -715,7 +734,7 @@ dane_lookup_addresses(ldns_resolver* res, ldns_rdf* dname,
|
||||
|
||||
} else if (s == LDNS_STATUS_DANE_BOGUS ||
|
||||
LDNS_STATUS_CRYPTO_BOGUS == s) {
|
||||
fprintf(stderr, "Warning! Bogus IPv4 addresses. "
|
||||
fprintf(stderr, "Warning! Bogus IPv6 addresses. "
|
||||
"Discarding...\n");
|
||||
ldns_rr_list_deep_free(aaas);
|
||||
aaas = ldns_rr_list_new();
|
||||
@ -1041,7 +1060,8 @@ bool
|
||||
dane_verify(ldns_rr_list* tlsas, ldns_rdf* address,
|
||||
X509* cert, STACK_OF(X509)* extra_certs,
|
||||
X509_STORE* validate_store,
|
||||
bool verify_server_name, ldns_rdf* name)
|
||||
bool verify_server_name, ldns_rdf* name,
|
||||
bool assume_pkix_validity)
|
||||
{
|
||||
ldns_status s;
|
||||
char* address_str = NULL;
|
||||
@ -1066,6 +1086,11 @@ dane_verify(ldns_rr_list* tlsas, ldns_rdf* address,
|
||||
}
|
||||
fprintf(stdout, " dane-validated successfully\n");
|
||||
return true;
|
||||
} else if (assume_pkix_validity &&
|
||||
s == LDNS_STATUS_DANE_PKIX_DID_NOT_VALIDATE) {
|
||||
fprintf(stdout, " dane-validated successfully,"
|
||||
" because PKIX is assumed valid\n");
|
||||
return true;
|
||||
}
|
||||
fprintf(stdout, " did not dane-validate, because: %s\n",
|
||||
ldns_get_errorstr_by_id(s));
|
||||
@ -1145,12 +1170,15 @@ main(int argc, char* const* argv)
|
||||
SSL_CTX* ctx = NULL;
|
||||
SSL* ssl = NULL;
|
||||
|
||||
int no_tlsas_exit_status = EXIT_SUCCESS;
|
||||
int exit_success = EXIT_SUCCESS;
|
||||
|
||||
bool success = true;
|
||||
|
||||
if (! keys || ! addresses) {
|
||||
MEMERR("ldns_rr_list_new");
|
||||
}
|
||||
while((c = getopt(argc, argv, "46a:bc:df:hik:no:p:sSt:uvV:")) != -1) {
|
||||
while((c = getopt(argc, argv, "46a:bc:df:hik:no:p:sSt:TuvV:")) != -1){
|
||||
switch(c) {
|
||||
case 'h':
|
||||
print_usage("ldns-dane");
|
||||
@ -1242,6 +1270,9 @@ main(int argc, char* const* argv)
|
||||
case 't':
|
||||
tlsas_file = optarg;
|
||||
break;
|
||||
case 'T':
|
||||
no_tlsas_exit_status = NO_TLSAS_EXIT_STATUS;
|
||||
break;
|
||||
case 'u':
|
||||
transport = LDNS_DANE_TRANSPORT_UDP;
|
||||
break;
|
||||
@ -1323,7 +1354,7 @@ main(int argc, char* const* argv)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
s = dane_read_tlsas_from_file(&tlsas, tlsas_file, NULL);
|
||||
LDNS_ERR(s, "could not read tlas from file");
|
||||
LDNS_ERR(s, "could not read tlsas from file");
|
||||
|
||||
/* extract port, transport and hostname from TLSA owner name */
|
||||
|
||||
@ -1465,7 +1496,9 @@ main(int argc, char* const* argv)
|
||||
"PKIX validation without DANE will be "
|
||||
"performed. If you wish to perform DANE\n"
|
||||
"even though the RR's are insecure, "
|
||||
"se the -d option.\n", tlsa_owner_str);
|
||||
"use the -d option.\n", tlsa_owner_str);
|
||||
|
||||
exit_success = no_tlsas_exit_status;
|
||||
|
||||
} else if (s != LDNS_STATUS_OK) {
|
||||
|
||||
@ -1478,6 +1511,8 @@ main(int argc, char* const* argv)
|
||||
"PKIX validation without DANE will be "
|
||||
"performed.\n", ldns_rdf2str(tlsa_owner));
|
||||
|
||||
exit_success = no_tlsas_exit_status;
|
||||
|
||||
} else if (assume_pkix_validity) { /* number of tlsa's > 0 */
|
||||
|
||||
/* transform type "CA constraint" to "Trust anchor
|
||||
@ -1590,13 +1625,13 @@ main(int argc, char* const* argv)
|
||||
SSL_CTX_use_certificate_chain_file(ctx, cert_file) != 1) {
|
||||
ssl_err("error loading certificate");
|
||||
}
|
||||
ssl = SSL_new(ctx);
|
||||
if (! ssl) {
|
||||
ssl_err("could not SSL_new");
|
||||
}
|
||||
|
||||
if (cert_file) { /* ssl load certificate */
|
||||
|
||||
ssl = SSL_new(ctx);
|
||||
if (! ssl) {
|
||||
ssl_err("could not SSL_new");
|
||||
}
|
||||
cert = SSL_get_certificate(ssl);
|
||||
if (! cert) {
|
||||
ssl_err("could not SSL_get_certificate");
|
||||
@ -1613,12 +1648,14 @@ main(int argc, char* const* argv)
|
||||
break;
|
||||
case VERIFY: if (! dane_verify(tlsas, NULL,
|
||||
cert, extra_certs, store,
|
||||
verify_server_name, name)) {
|
||||
verify_server_name, name,
|
||||
assume_pkix_validity)) {
|
||||
success = false;
|
||||
}
|
||||
break;
|
||||
default: break; /* suppress warning */
|
||||
}
|
||||
SSL_free(ssl);
|
||||
|
||||
} else {/* No certificate file given, creation/validation via TLS. */
|
||||
|
||||
@ -1639,12 +1676,16 @@ main(int argc, char* const* argv)
|
||||
/* for all addresses, setup SSL and retrieve certificates */
|
||||
for (i = 0; i < ldns_rr_list_rr_count(addresses); i++) {
|
||||
|
||||
ssl = SSL_new(ctx);
|
||||
if (! ssl) {
|
||||
ssl_err("could not SSL_new");
|
||||
}
|
||||
address = ldns_rr_a_address(
|
||||
ldns_rr_list_rr(addresses, i));
|
||||
assert(address != NULL);
|
||||
|
||||
s = ssl_connect_and_get_cert_chain(&cert, &extra_certs,
|
||||
ssl, address, port, transport);
|
||||
ssl, name_str, address,port, transport);
|
||||
if (s == LDNS_STATUS_NETWORK_ERR) {
|
||||
fprintf(stderr, "Could not connect to ");
|
||||
ldns_rdf_print(stderr, address);
|
||||
@ -1666,7 +1707,8 @@ main(int argc, char* const* argv)
|
||||
|
||||
case VERIFY: if (! dane_verify(tlsas, address,
|
||||
cert, extra_certs, store,
|
||||
verify_server_name, name)) {
|
||||
verify_server_name, name,
|
||||
assume_pkix_validity)) {
|
||||
success = false;
|
||||
|
||||
} else if (interact) {
|
||||
@ -1675,7 +1717,8 @@ main(int argc, char* const* argv)
|
||||
break;
|
||||
default: break; /* suppress warning */
|
||||
}
|
||||
ssl_shutdown(ssl);
|
||||
while (SSL_shutdown(ssl) == 0);
|
||||
SSL_free(ssl);
|
||||
} /* end for all addresses */
|
||||
} /* end No certification file */
|
||||
|
||||
@ -1689,7 +1732,6 @@ main(int argc, char* const* argv)
|
||||
ldns_rr_list_deep_free(tlsas);
|
||||
|
||||
/* cleanup */
|
||||
SSL_free(ssl);
|
||||
SSL_CTX_free(ctx);
|
||||
|
||||
if (store) {
|
||||
@ -1705,12 +1747,12 @@ main(int argc, char* const* argv)
|
||||
ldns_rr_list_deep_free(addresses);
|
||||
}
|
||||
if (success) {
|
||||
exit(EXIT_SUCCESS);
|
||||
exit(exit_success);
|
||||
} else {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else /* HAVE_SSL */
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@ -1720,3 +1762,15 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
#else /* USE_DANE */
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stderr, "dane support was disabled with this build of ldns, "
|
||||
"and has not been compiled in\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* USE_DANE */
|
||||
|
@ -2823,13 +2823,13 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
#else
|
||||
int main() {
|
||||
int main(void) {
|
||||
fprintf(stderr, "ldns-dpa was not built because there is no pcap library on this system, or there was no pcap header file at compilation time. Please install pcap and rebuild.\n");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
int main() {
|
||||
int main(void) {
|
||||
fprintf(stderr, "ldns-dpa was not built because there is no pcap library on this system, or there was no pcap header file at compilation time. Please install pcap and rebuild.\n");
|
||||
return 1;
|
||||
}
|
||||
|
@ -16,6 +16,10 @@ By default it takes a pick of algorithm similar to the key algorithm,
|
||||
SHA1 for RSASHA1, and so on.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB-f\fR
|
||||
Ignore SEP flag (i.e. make DS records for any key)
|
||||
|
||||
.TP
|
||||
\fB-n\fR
|
||||
Write the result DS Resource Record to stdout instead of a file
|
||||
|
@ -63,8 +63,7 @@ suitable_hash(ldns_signing_algorithm algorithm)
|
||||
case LDNS_SIGN_ECDSAP384SHA384:
|
||||
return LDNS_SHA384;
|
||||
#endif
|
||||
default:
|
||||
return LDNS_SHA1;
|
||||
default: break;
|
||||
}
|
||||
return LDNS_SHA1;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ retrieve_dnskeys(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
|
||||
* try to resolve the names we do got
|
||||
*/
|
||||
if (verbosity >= 3) {
|
||||
printf("Did not get address record for nameserver, doing seperate query.\n");
|
||||
printf("Did not get address record for nameserver, doing separate query.\n");
|
||||
}
|
||||
ns_addr = ldns_rr_list_new();
|
||||
for(i = 0; (size_t) i < ldns_rr_list_rr_count(new_nss); i++) {
|
||||
|
@ -71,7 +71,7 @@ main(int argc, char *argv[])
|
||||
random = NULL;
|
||||
ksk = false; /* don't create a ksk per default */
|
||||
|
||||
while ((c = getopt(argc, argv, "a:kb:r:v25")) != -1) {
|
||||
while ((c = getopt(argc, argv, "a:kb:r:v")) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
if (algorithm != 0) {
|
||||
@ -182,7 +182,7 @@ main(int argc, char *argv[])
|
||||
/* generate a new key */
|
||||
key = ldns_key_new_frm_algorithm(algorithm, bits);
|
||||
|
||||
/* set the owner name in the key - this is a /seperate/ step */
|
||||
/* set the owner name in the key - this is a /separate/ step */
|
||||
ldns_key_set_pubkey_owner(key, domain);
|
||||
|
||||
/* ksk flag */
|
||||
|
@ -21,6 +21,10 @@ Only print DNSSEC data from the zone. This option skips every record
|
||||
that is not of type NSEC, NSEC3, RRSIG or DNSKEY. DS records are not
|
||||
printed.
|
||||
|
||||
.TP
|
||||
\fB-b\fR
|
||||
Include Bubble Babble encoding of DS's.
|
||||
|
||||
.TP
|
||||
\fB-0\fR
|
||||
Print a (null) for the RRSIG inception, expiry and key data. This option
|
||||
@ -58,6 +62,23 @@ increased by one.
|
||||
When updating a serial number, records of type NSEC, NSEC3, RRSIG and DNSKEY
|
||||
will be skipped when printing the zone.
|
||||
|
||||
.TP
|
||||
\fB-u\fR \fIRR type\fR
|
||||
Mark \fIRR type\fR for printing in unknown type format.
|
||||
|
||||
\fB-u\fR is not meant to be used together with \fB-U\fR.
|
||||
|
||||
.TP
|
||||
\fB-U\fR \fIRR type\fR
|
||||
Mark \fIRR type\fR for \fBnot\fR printing in unknown type format.
|
||||
|
||||
The first occurrence of the \fB-U\fR option marks all RR types for printing
|
||||
in unknown type format except for the given \fIRR type\fR.
|
||||
Subsequent \fB-U\fR options will clear the mark for those \fIRR type\fRs too,
|
||||
so that only the given \fIRR type\fRs will be printed in the presentation
|
||||
format specific for those \fIRR type\fRs.
|
||||
|
||||
\fB-U\fR is not meant to be used together with \fB-u\fR.
|
||||
|
||||
.TP
|
||||
\fB-v\fR
|
||||
|
@ -15,6 +15,52 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
void print_usage(const char* progname)
|
||||
{
|
||||
printf("Usage: %s [OPTIONS] <zonefile>\n", progname);
|
||||
printf("\tReads the zonefile and prints it.\n");
|
||||
printf("\tThe RR count of the zone is printed to stderr.\n");
|
||||
printf("\t-b include Bubble Babble encoding of DS's.\n");
|
||||
printf("\t-0 zeroize timestamps and signature in RRSIG records.\n");
|
||||
printf("\t-c canonicalize all rrs in the zone.\n");
|
||||
printf("\t-d only show DNSSEC data from the zone\n");
|
||||
printf("\t-h show this text\n");
|
||||
printf("\t-n do not print the SOA record\n");
|
||||
printf("\t-p prepend SOA serial with spaces so"
|
||||
" it takes exactly ten characters.\n");
|
||||
printf("\t-s strip DNSSEC data from the zone\n");
|
||||
printf("\t-S [[+|-]<number> | YYYYMMDDxx | "
|
||||
" unixtime ]\n"
|
||||
"\t\tSet serial number to <number> or,"
|
||||
" when preceded by a sign,\n"
|
||||
"\t\toffset the existing number with "
|
||||
"<number>. With YYYYMMDDxx\n"
|
||||
"\t\tthe serial is formatted as a datecounter"
|
||||
", and with unixtime as\n"
|
||||
"\t\tthe number of seconds since 1-1-1970."
|
||||
" However, on serial\n"
|
||||
"\t\tnumber decrease, +1 is used in stead"
|
||||
". (implies -s)\n");
|
||||
printf("\t-u <rr type>\n");
|
||||
printf("\t\tMark <rr type> for printing in unknown type format.\n");
|
||||
printf("\t\tThis option may be given multiple times.\n");
|
||||
printf("\t\t-u is not meant to be used together with -U.\n");
|
||||
printf("\t-U <rr type>\n");
|
||||
printf("\t\tMark <rr type> for not printing in unknown type format.\n");
|
||||
printf("\t\tThis option may be given multiple times.\n");
|
||||
printf(
|
||||
"\t\tThe first occurrence of the -U option marks all RR types for"
|
||||
"\n\t\tprinting in unknown type format except for the given <rr type>."
|
||||
"\n\t\tSubsequent -U options will clear the mark for those <rr type>s"
|
||||
"\n\t\ttoo, so that only the given <rr type>s will be printed in the"
|
||||
"\n\t\tpresentation format specific for those <rr type>s.\n");
|
||||
printf("\t\t-U is not meant to be used together with -u.\n");
|
||||
printf("\t-v shows the version and exits\n");
|
||||
printf("\t-z sort the zone (implies -c).\n");
|
||||
printf("\nif no file is given standard input is read\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@ -33,22 +79,21 @@ main(int argc, char **argv)
|
||||
ldns_rr_list *stripped_list;
|
||||
ldns_rr *cur_rr;
|
||||
ldns_rr_type cur_rr_type;
|
||||
ldns_output_format fmt = {
|
||||
ldns_output_format_default->flags,
|
||||
ldns_output_format_default->data
|
||||
};
|
||||
ldns_output_format_storage fmt_storage;
|
||||
ldns_output_format* fmt = ldns_output_format_init(&fmt_storage);
|
||||
|
||||
ldns_soa_serial_increment_func_t soa_serial_increment_func = NULL;
|
||||
int soa_serial_increment_func_data = 0;
|
||||
|
||||
while ((c = getopt(argc, argv, "0bcdhnpsvzS:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "0bcdhnpsu:U:vzS:")) != -1) {
|
||||
switch(c) {
|
||||
case 'b':
|
||||
fmt.flags |=
|
||||
fmt->flags |=
|
||||
( LDNS_COMMENT_BUBBLEBABBLE |
|
||||
LDNS_COMMENT_FLAGS );
|
||||
break;
|
||||
case '0':
|
||||
fmt.flags |= LDNS_FMT_ZEROIZE_RRSIGS;
|
||||
fmt->flags |= LDNS_FMT_ZEROIZE_RRSIGS;
|
||||
break;
|
||||
case 'c':
|
||||
canonicalize = true;
|
||||
@ -60,40 +105,13 @@ main(int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
printf("Usage: %s [OPTIONS] <zonefile>\n", argv[0]);
|
||||
printf("\tReads the zonefile and prints it.\n");
|
||||
printf("\tThe RR count of the zone is printed to stderr.\n");
|
||||
printf("\t-b include bubblebabble of DS's.\n");
|
||||
printf("\t-0 zeroize timestamps and signature in RRSIG records.\n");
|
||||
printf("\t-c canonicalize all rrs in the zone.\n");
|
||||
printf("\t-d only show DNSSEC data from the zone\n");
|
||||
printf("\t-h show this text\n");
|
||||
printf("\t-n do not print the SOA record\n");
|
||||
printf("\t-p prepend SOA serial with spaces so"
|
||||
" it takes exactly ten characters.\n");
|
||||
printf("\t-s strip DNSSEC data from the zone\n");
|
||||
printf("\t-S [[+|-]<number> | YYYYMMDDxx | "
|
||||
" unixtime ]\n"
|
||||
"\t\tSet serial number to <number> or,"
|
||||
" when preceded by a sign,\n"
|
||||
"\t\toffset the existing number with "
|
||||
"<number>. With YYYYMMDDxx\n"
|
||||
"\t\tthe serial is formatted as a datecounter"
|
||||
", and with unixtime as the\n"
|
||||
"\t\tnumber of seconds since 1-1-1970."
|
||||
" However, on serial number"
|
||||
"\n\t\tdecrease, +1 is used in stead"
|
||||
". (implies -s)\n");
|
||||
printf("\t-v shows the version and exits\n");
|
||||
printf("\t-z sort the zone (implies -c).\n");
|
||||
printf("\nif no file is given standard input is read\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
print_usage("ldns-read-zone");
|
||||
break;
|
||||
case 'n':
|
||||
print_soa = false;
|
||||
break;
|
||||
case 'p':
|
||||
fmt.flags |= LDNS_FMT_PAD_SOA_SERIAL;
|
||||
fmt->flags |= LDNS_FMT_PAD_SOA_SERIAL;
|
||||
break;
|
||||
case 's':
|
||||
strip = true;
|
||||
@ -101,6 +119,38 @@ main(int argc, char **argv)
|
||||
fprintf(stderr, "Warning: stripping both DNSSEC and non-DNSSEC records. Output will be sparse.\n");
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
s = ldns_output_format_set_type(fmt,
|
||||
ldns_get_rr_type_by_name(optarg));
|
||||
if (s != LDNS_STATUS_OK) {
|
||||
fprintf( stderr
|
||||
, "Cannot set rr type %s "
|
||||
"in output format to "
|
||||
"print as unknown type: %s\n"
|
||||
, ldns_rr_descript(
|
||||
ldns_get_rr_type_by_name(optarg)
|
||||
)->_name
|
||||
, ldns_get_errorstr_by_id(s)
|
||||
);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'U':
|
||||
s = ldns_output_format_clear_type(fmt,
|
||||
ldns_get_rr_type_by_name(optarg));
|
||||
if (s != LDNS_STATUS_OK) {
|
||||
fprintf( stderr
|
||||
, "Cannot set rr type %s "
|
||||
"in output format to not "
|
||||
"print as unknown type: %s\n"
|
||||
, ldns_rr_descript(
|
||||
ldns_get_rr_type_by_name(optarg)
|
||||
)->_name
|
||||
, ldns_get_errorstr_by_id(s)
|
||||
);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
printf("read zone version %s (ldns version %s)\n", LDNS_VERSION, ldns_version());
|
||||
exit(EXIT_SUCCESS);
|
||||
@ -218,9 +268,9 @@ main(int argc, char **argv)
|
||||
, soa_serial_increment_func_data
|
||||
);
|
||||
}
|
||||
ldns_rr_print_fmt(stdout, &fmt, ldns_zone_soa(z));
|
||||
ldns_rr_print_fmt(stdout, fmt, ldns_zone_soa(z));
|
||||
}
|
||||
ldns_rr_list_print_fmt(stdout, &fmt, ldns_zone_rrs(z));
|
||||
ldns_rr_list_print_fmt(stdout, fmt, ldns_zone_rrs(z));
|
||||
|
||||
ldns_zone_deep_free(z);
|
||||
|
||||
|
@ -223,7 +223,7 @@ find_or_create_pubkey(const char *keyfile_name_base, ldns_key *key, ldns_zone *o
|
||||
}
|
||||
|
||||
/* find the public key in the zone, or in a
|
||||
* seperate file
|
||||
* separate file
|
||||
* we 'generate' one anyway,
|
||||
* then match that to any present in the zone,
|
||||
* if it matches, we drop our own. If not,
|
||||
@ -368,9 +368,8 @@ main(int argc, char *argv[])
|
||||
char *prog = strdup(argv[0]);
|
||||
ldns_status result;
|
||||
|
||||
ldns_output_format fmt = { ldns_output_format_default->flags, NULL };
|
||||
void **hashmap = NULL;
|
||||
|
||||
ldns_output_format_storage fmt_st;
|
||||
ldns_output_format* fmt = ldns_output_format_init(&fmt_st);
|
||||
|
||||
inception = 0;
|
||||
expiration = 0;
|
||||
@ -379,7 +378,7 @@ main(int argc, char *argv[])
|
||||
|
||||
OPENSSL_config(NULL);
|
||||
|
||||
while ((c = getopt(argc, argv, "a:bde:f:i:k:lno:ps:t:vAE:K:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "a:bde:f:i:k:no:ps:t:vAE:K:")) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
nsec3_algorithm = (uint8_t) atoi(optarg);
|
||||
@ -389,11 +388,10 @@ main(int argc, char *argv[])
|
||||
}
|
||||
break;
|
||||
case 'b':
|
||||
fmt.flags |= LDNS_COMMENT_BUBBLEBABBLE;
|
||||
fmt.flags |= LDNS_COMMENT_FLAGS;
|
||||
fmt.flags |= LDNS_COMMENT_NSEC3_CHAIN;
|
||||
fmt.flags |= LDNS_COMMENT_LAYOUT;
|
||||
hashmap = &fmt.data;
|
||||
ldns_output_format_set(fmt, LDNS_COMMENT_FLAGS
|
||||
| LDNS_COMMENT_LAYOUT
|
||||
| LDNS_COMMENT_NSEC3_CHAIN
|
||||
| LDNS_COMMENT_BUBBLEBABBLE);
|
||||
break;
|
||||
case 'd':
|
||||
add_keys = false;
|
||||
@ -767,7 +765,7 @@ main(int argc, char *argv[])
|
||||
nsec3_salt_length,
|
||||
nsec3_salt,
|
||||
signflags,
|
||||
(ldns_rbtree_t**) hashmap);
|
||||
&fmt_st.hashmap);
|
||||
} else {
|
||||
result = ldns_dnssec_zone_sign_flg(signed_zone,
|
||||
added_rrs,
|
||||
@ -796,7 +794,7 @@ main(int argc, char *argv[])
|
||||
outputfile_name, strerror(errno));
|
||||
} else {
|
||||
ldns_dnssec_zone_print_fmt(
|
||||
outputfile, &fmt, signed_zone);
|
||||
outputfile, fmt, signed_zone);
|
||||
fclose(outputfile);
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ static const char* prog_name = "ldns-testns";
|
||||
static FILE* logfile = 0;
|
||||
static int do_verbose = 0;
|
||||
|
||||
static void usage()
|
||||
static void usage(void)
|
||||
{
|
||||
printf("Usage: %s [options] <datafile>\n", prog_name);
|
||||
printf(" -r listens on random port. Port number is printed.\n");
|
||||
|
@ -118,6 +118,8 @@ static void matchline(char* line, struct entry* e)
|
||||
e->match_do = true;
|
||||
} else if(str_keyword(&parse, "noedns")) {
|
||||
e->match_noedns = true;
|
||||
} else if(str_keyword(&parse, "ednsdata")) {
|
||||
e->match_ednsdata_raw = true;
|
||||
} else if(str_keyword(&parse, "UDP")) {
|
||||
e->match_transport = transport_udp;
|
||||
} else if(str_keyword(&parse, "TCP")) {
|
||||
@ -228,7 +230,7 @@ static void adjustline(char* line, struct entry* e,
|
||||
}
|
||||
|
||||
/** create new entry */
|
||||
static struct entry* new_entry()
|
||||
static struct entry* new_entry(void)
|
||||
{
|
||||
struct entry* e = LDNS_MALLOC(struct entry);
|
||||
memset(e, 0, sizeof(*e));
|
||||
@ -434,7 +436,9 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl,
|
||||
ldns_pkt_section add_section = LDNS_SECTION_QUESTION;
|
||||
struct reply_packet *cur_reply = NULL;
|
||||
bool reading_hex = false;
|
||||
bool reading_hex_ednsdata = false;
|
||||
ldns_buffer* hex_data_buffer = NULL;
|
||||
ldns_buffer* hex_ednsdata_buffer = NULL;
|
||||
|
||||
while(fgets(line, (int)sizeof(line), in) != NULL) {
|
||||
line[MAX_LINE-1] = 0;
|
||||
@ -497,12 +501,26 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl,
|
||||
cur_reply->reply_from_hex = data_buffer2wire(hex_data_buffer);
|
||||
ldns_buffer_free(hex_data_buffer);
|
||||
hex_data_buffer = NULL;
|
||||
} else if(reading_hex) {
|
||||
ldns_buffer_printf(hex_data_buffer, line);
|
||||
} else if(str_keyword(&parse, "HEX_EDNSDATA_BEGIN")) {
|
||||
hex_ednsdata_buffer = ldns_buffer_new(LDNS_MAX_PACKETLEN);
|
||||
reading_hex_ednsdata = true;
|
||||
} else if(str_keyword(&parse, "HEX_EDNSDATA_END")) {
|
||||
if (!reading_hex_ednsdata) {
|
||||
error("%s line %d: HEX_EDNSDATA_END read but no"
|
||||
"HEX_EDNSDATA_BEGIN keyword seen", name, *lineno);
|
||||
}
|
||||
reading_hex_ednsdata = false;
|
||||
cur_reply->raw_ednsdata = data_buffer2wire(hex_ednsdata_buffer);
|
||||
ldns_buffer_free(hex_ednsdata_buffer);
|
||||
hex_ednsdata_buffer = NULL;
|
||||
} else if(reading_hex_ednsdata) {
|
||||
ldns_buffer_printf(hex_ednsdata_buffer, line);
|
||||
} else if(str_keyword(&parse, "ENTRY_END")) {
|
||||
if (hex_data_buffer)
|
||||
ldns_buffer_free(hex_data_buffer);
|
||||
return current;
|
||||
} else if(reading_hex) {
|
||||
ldns_buffer_printf(hex_data_buffer, line);
|
||||
} else {
|
||||
/* it must be a RR, parse and add to packet. */
|
||||
ldns_rr* n = NULL;
|
||||
@ -674,6 +692,38 @@ match_all(ldns_pkt* q, ldns_pkt* p, bool mttl)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/** Convert to hexstring and call verbose(), prepend with header */
|
||||
static void
|
||||
verbose_hex(int lvl, uint8_t *data, size_t datalen, const char *header)
|
||||
{
|
||||
verbose(lvl, "%s", header);
|
||||
while (datalen-- > 0) {
|
||||
verbose(lvl, " %02x", (unsigned int)*data++);
|
||||
}
|
||||
verbose(lvl, "\n");
|
||||
}
|
||||
|
||||
/** Match q edns data to p raw edns data */
|
||||
static int
|
||||
match_ednsdata(ldns_pkt* q, struct reply_packet* p)
|
||||
{
|
||||
size_t qdlen, pdlen;
|
||||
uint8_t *qd, *pd;
|
||||
if(!ldns_pkt_edns(q) || !ldns_pkt_edns_data(q)) {
|
||||
verbose(3, "No EDNS data\n");
|
||||
return 0;
|
||||
}
|
||||
qdlen = ldns_rdf_size(ldns_pkt_edns_data(q));
|
||||
pdlen = ldns_buffer_limit(p->raw_ednsdata);
|
||||
qd = ldns_rdf_data(ldns_pkt_edns_data(q));
|
||||
pd = ldns_buffer_begin(p->raw_ednsdata);
|
||||
if( qdlen == pdlen && 0 == memcmp(qd, pd, qdlen) ) return 1;
|
||||
verbose(3, "EDNS data does not match.\n");
|
||||
verbose_hex(3, qd, qdlen, "q:");
|
||||
verbose_hex(3, pd, pdlen, "p:");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* finds entry in list, or returns NULL */
|
||||
struct entry*
|
||||
find_match(struct entry* entries, ldns_pkt* query_pkt,
|
||||
@ -724,6 +774,11 @@ find_match(struct entry* entries, ldns_pkt* query_pkt,
|
||||
verbose(3, "bad; EDNS OPT present\n");
|
||||
continue;
|
||||
}
|
||||
if(p->match_ednsdata_raw &&
|
||||
!match_ednsdata(query_pkt, p->reply_list)) {
|
||||
verbose(3, "bad EDNS data match.\n");
|
||||
continue;
|
||||
}
|
||||
if(p->match_transport != transport_any && p->match_transport != transport) {
|
||||
verbose(3, "bad transport\n");
|
||||
continue;
|
||||
|
@ -48,6 +48,7 @@
|
||||
; 'ttl' used with all, rrs in packet must also have matching TTLs.
|
||||
; 'DO' will match only queries with DO bit set.
|
||||
; 'noedns' matches queries without EDNS OPT records.
|
||||
; 'ednsdata' matches queries to HEX_EDNS section.
|
||||
MATCH [opcode] [qtype] [qname] [serial=<value>] [all] [ttl]
|
||||
MATCH [UDP|TCP] DO
|
||||
MATCH ...
|
||||
@ -82,6 +83,11 @@
|
||||
; be parsed, ADJUST rules for the answer packet
|
||||
; are ignored. Only copy_id is done.
|
||||
HEX_ANSWER_END
|
||||
HEX_EDNS_BEGIN ; follow with hex data.
|
||||
; Raw EDNS data to match against. It must be an
|
||||
; exact match (all options are matched) and will be
|
||||
; evaluated only when 'MATCH ednsdata' given.
|
||||
HEX_EDNS_END
|
||||
ENTRY_END
|
||||
|
||||
|
||||
@ -142,6 +148,8 @@ struct reply_packet {
|
||||
struct reply_packet* next;
|
||||
/** the reply pkt */
|
||||
ldns_pkt* reply;
|
||||
/** Additional EDNS data for matching queries. */
|
||||
ldns_buffer* raw_ednsdata;
|
||||
/** or reply pkt in hex if not parsable */
|
||||
ldns_buffer* reply_from_hex;
|
||||
/** seconds to sleep before giving packet */
|
||||
@ -171,6 +179,8 @@ struct entry {
|
||||
bool match_do;
|
||||
/** match absence of EDNS OPT record in query */
|
||||
bool match_noedns;
|
||||
/** match edns data field given in hex */
|
||||
bool match_ednsdata_raw;
|
||||
/** match query serial with this value. */
|
||||
uint32_t ixfr_soa_serial;
|
||||
/** match on UDP/TCP */
|
||||
@ -197,7 +207,8 @@ struct entry {
|
||||
/**
|
||||
* reads the canned reply file and returns a list of structs
|
||||
* does an exit on error.
|
||||
* @param skip_withespace: skip leftside whitespace.
|
||||
* @param name: name of the file to read.
|
||||
* @param skip_whitespace: skip leftside whitespace.
|
||||
*/
|
||||
struct entry* read_datafile(const char* name, int skip_whitespace);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user