diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:15:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:15:43 +0000 |
commit | f5f56e1a1c4d9e9496fcb9d81131066a964ccd23 (patch) | |
tree | 49e44c6f87febed37efb953ab5485aa49f6481a7 /src/lib/dns/tests/testdata | |
parent | Initial commit. (diff) | |
download | isc-kea-upstream.tar.xz isc-kea-upstream.zip |
Adding upstream version 2.4.1.upstream/2.4.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib/dns/tests/testdata')
395 files changed, 6147 insertions, 0 deletions
diff --git a/src/lib/dns/tests/testdata/Makefile.am b/src/lib/dns/tests/testdata/Makefile.am new file mode 100644 index 0000000..e5c8081 --- /dev/null +++ b/src/lib/dns/tests/testdata/Makefile.am @@ -0,0 +1,219 @@ +CLEANFILES = + +# NOTE: keep this in sync with real file listing +# so is included in tarball +EXTRA_DIST = edns_toWire1.spec edns_toWire2.spec +EXTRA_DIST += edns_toWire3.spec edns_toWire4.spec +EXTRA_DIST += masterload.txt +EXTRA_DIST += message_fromWire1 message_fromWire2 +EXTRA_DIST += message_fromWire3 message_fromWire4 +EXTRA_DIST += message_fromWire5 message_fromWire6 +EXTRA_DIST += message_fromWire7 message_fromWire8 +EXTRA_DIST += message_fromWire9 message_fromWire10.spec +EXTRA_DIST += message_fromWire11.spec message_fromWire12.spec +EXTRA_DIST += message_fromWire13.spec message_fromWire14.spec +EXTRA_DIST += message_fromWire15.spec message_fromWire16.spec +EXTRA_DIST += message_fromWire17.spec message_fromWire18.spec +EXTRA_DIST += message_fromWire19.spec message_fromWire20.spec +EXTRA_DIST += message_fromWire21.spec message_fromWire22.spec +EXTRA_DIST += message_toWire1 message_toWire2.spec message_toWire3.spec +EXTRA_DIST += message_toWire4.spec message_toWire5.spec +EXTRA_DIST += message_toWire6 message_toWire7 +EXTRA_DIST += message_toText1.txt message_toText1.spec +EXTRA_DIST += message_toText2.txt message_toText2.spec +EXTRA_DIST += message_toText3.txt message_toText3.spec +EXTRA_DIST += name_fromWire1 name_fromWire2 name_fromWire3_1 name_fromWire3_2 +EXTRA_DIST += name_fromWire4 name_fromWire6 name_fromWire7 name_fromWire8 +EXTRA_DIST += name_fromWire9 name_fromWire10 name_fromWire11 name_fromWire12 +EXTRA_DIST += name_fromWire13 name_fromWire14 +EXTRA_DIST += name_toWire1 name_toWire2 name_toWire3 name_toWire4 +EXTRA_DIST += name_toWire5.spec name_toWire6.spec +EXTRA_DIST += name_toWire7 name_toWire8 name_toWire9 +EXTRA_DIST += question_fromWire question_toWire1 question_toWire2 +EXTRA_DIST += rdatafields1.spec rdatafields2.spec rdatafields3.spec +EXTRA_DIST += rdatafields4.spec rdatafields5.spec rdatafields6.spec +EXTRA_DIST += rdata_cname_fromWire rdata_dname_fromWire +EXTRA_DIST += rdata_dnskey_fromWire.spec rdata_dnskey_empty_keydata_fromWire.spec +EXTRA_DIST += rdata_dhcid_fromWire rdata_dhcid_toWire +EXTRA_DIST += rdata_ds_fromWire rdata_in_a_fromWire rdata_in_aaaa_fromWire +EXTRA_DIST += rdata_mx_fromWire rdata_mx_toWire1 rdata_mx_toWire2 +EXTRA_DIST += rdata_ns_fromWire +EXTRA_DIST += rdata_nsec_fromWire1 rdata_nsec_fromWire2 rdata_nsec_fromWire3 +EXTRA_DIST += rdata_nsec_fromWire4.spec rdata_nsec_fromWire5.spec +EXTRA_DIST += rdata_nsec_fromWire6.spec rdata_nsec_fromWire7.spec +EXTRA_DIST += rdata_nsec_fromWire8.spec rdata_nsec_fromWire9.spec +EXTRA_DIST += rdata_nsec_fromWire10.spec +EXTRA_DIST += rdata_nsec_fromWire16.spec +EXTRA_DIST += rdata_nsec3param_fromWire1 +EXTRA_DIST += rdata_nsec3param_fromWire2.spec +EXTRA_DIST += rdata_nsec3param_fromWire11.spec +EXTRA_DIST += rdata_nsec3param_fromWire13.spec +EXTRA_DIST += rdata_nsec3_fromWire1 rdata_nsec3_fromWire1.spec +EXTRA_DIST += rdata_nsec3_fromWire2.spec rdata_nsec3_fromWire3 +EXTRA_DIST += rdata_nsec3_fromWire4.spec rdata_nsec3_fromWire5.spec +EXTRA_DIST += rdata_nsec3_fromWire6.spec rdata_nsec3_fromWire7.spec +EXTRA_DIST += rdata_nsec3_fromWire8.spec rdata_nsec3_fromWire9.spec +EXTRA_DIST += rdata_nsec3_fromWire10.spec rdata_nsec3_fromWire11.spec +EXTRA_DIST += rdata_nsec3_fromWire12.spec rdata_nsec3_fromWire13.spec +EXTRA_DIST += rdata_nsec3_fromWire14.spec rdata_nsec3_fromWire15.spec +EXTRA_DIST += rdata_nsec3_fromWire16.spec rdata_nsec3_fromWire17.spec +EXTRA_DIST += rdata_opt_fromWire1 rdata_opt_fromWire2 +EXTRA_DIST += rdata_opt_fromWire3 rdata_opt_fromWire4 +EXTRA_DIST += rdata_rrsig_fromWire1 +EXTRA_DIST += rdata_rrsig_fromWire2.spec +EXTRA_DIST += rdata_rp_fromWire1.spec rdata_rp_fromWire2.spec +EXTRA_DIST += rdata_rp_fromWire3.spec rdata_rp_fromWire4.spec +EXTRA_DIST += rdata_rp_fromWire5.spec rdata_rp_fromWire6.spec +EXTRA_DIST += rdata_rp_toWire1.spec rdata_rp_toWire2.spec +EXTRA_DIST += rdata_sshfp_fromWire rdata_sshfp_fromWire2 +EXTRA_DIST += rdata_sshfp_fromWire1.spec rdata_sshfp_fromWire2.spec +EXTRA_DIST += rdata_sshfp_fromWire3.spec rdata_sshfp_fromWire4.spec +EXTRA_DIST += rdata_sshfp_fromWire5.spec rdata_sshfp_fromWire6.spec +EXTRA_DIST += rdata_sshfp_fromWire7.spec rdata_sshfp_fromWire8.spec +EXTRA_DIST += rdata_sshfp_fromWire9 rdata_sshfp_fromWire10 +EXTRA_DIST += rdata_sshfp_fromWire11 rdata_sshfp_fromWire12 +EXTRA_DIST += rdata_afsdb_fromWire1.spec rdata_afsdb_fromWire2.spec +EXTRA_DIST += rdata_afsdb_fromWire3.spec rdata_afsdb_fromWire4.spec +EXTRA_DIST += rdata_afsdb_fromWire5.spec +EXTRA_DIST += rdata_afsdb_toWire1.spec rdata_afsdb_toWire2.spec +EXTRA_DIST += rdata_soa_fromWire rdata_soa_toWireUncompressed.spec +EXTRA_DIST += rdata_srv_fromWire +EXTRA_DIST += rdata_minfo_fromWire1.spec rdata_minfo_fromWire2.spec +EXTRA_DIST += rdata_minfo_fromWire3.spec rdata_minfo_fromWire4.spec +EXTRA_DIST += rdata_minfo_fromWire5.spec rdata_minfo_fromWire6.spec +EXTRA_DIST += rdata_minfo_toWire1.spec rdata_minfo_toWire2.spec +EXTRA_DIST += rdata_minfo_toWireUncompressed1.spec +EXTRA_DIST += rdata_minfo_toWireUncompressed2.spec +EXTRA_DIST += rdata_txt_fromWire1 rdata_txt_fromWire2.spec +EXTRA_DIST += rdata_txt_fromWire3.spec rdata_txt_fromWire4.spec +EXTRA_DIST += rdata_txt_fromWire5.spec rdata_unknown_fromWire +EXTRA_DIST += rrcode16_fromWire1 rrcode16_fromWire2 +EXTRA_DIST += rrcode32_fromWire1 rrcode32_fromWire2 +EXTRA_DIST += rrset_toWire1 rrset_toWire2 +EXTRA_DIST += rrset_toWire3 rrset_toWire4 +EXTRA_DIST += rdata_tkey_fromWire1.spec rdata_tkey_fromWire2.spec +EXTRA_DIST += rdata_tkey_fromWire3.spec rdata_tkey_fromWire4.spec +EXTRA_DIST += rdata_tkey_fromWire5.spec rdata_tkey_fromWire6.spec +EXTRA_DIST += rdata_tkey_fromWire7.spec rdata_tkey_fromWire8.spec +EXTRA_DIST += rdata_tkey_fromWire9.spec +EXTRA_DIST += rdata_tkey_toWire1.spec rdata_tkey_toWire2.spec +EXTRA_DIST += rdata_tkey_toWire3.spec rdata_tkey_toWire4.spec +EXTRA_DIST += rdata_tkey_toWire5.spec +EXTRA_DIST += rdata_tlsa_fromWire rdata_tlsa_fromWire2 +EXTRA_DIST += rdata_tlsa_fromWire3.spec rdata_tlsa_fromWire4.spec +EXTRA_DIST += rdata_tlsa_fromWire5.spec rdata_tlsa_fromWire6.spec +EXTRA_DIST += rdata_tlsa_fromWire7.spec rdata_tlsa_fromWire8.spec +EXTRA_DIST += rdata_tlsa_fromWire9 rdata_tlsa_fromWire10 +EXTRA_DIST += rdata_tlsa_fromWire11 rdata_tlsa_fromWire12 +EXTRA_DIST += rdata_tsig_fromWire1.spec rdata_tsig_fromWire2.spec +EXTRA_DIST += rdata_tsig_fromWire3.spec rdata_tsig_fromWire4.spec +EXTRA_DIST += rdata_tsig_fromWire5.spec rdata_tsig_fromWire6.spec +EXTRA_DIST += rdata_tsig_fromWire7.spec rdata_tsig_fromWire8.spec +EXTRA_DIST += rdata_tsig_fromWire9.spec +EXTRA_DIST += rdata_tsig_toWire1.spec rdata_tsig_toWire2.spec +EXTRA_DIST += rdata_tsig_toWire3.spec rdata_tsig_toWire4.spec +EXTRA_DIST += rdata_tsig_toWire5.spec +EXTRA_DIST += rdata_caa_fromWire1.spec rdata_caa_fromWire2.spec +EXTRA_DIST += rdata_caa_fromWire3.spec rdata_caa_fromWire4.spec +EXTRA_DIST += rdata_caa_fromWire5 rdata_caa_fromWire6 +EXTRA_DIST += tsigrecord_toWire1.spec tsigrecord_toWire2.spec +EXTRA_DIST += tsig_verify1.spec tsig_verify2.spec tsig_verify3.spec +EXTRA_DIST += tsig_verify4.spec tsig_verify5.spec tsig_verify6.spec +EXTRA_DIST += tsig_verify7.spec tsig_verify8.spec tsig_verify9.spec +EXTRA_DIST += tsig_verify10.spec tsig_verify11.spec +EXTRA_DIST += example.org +EXTRA_DIST += broken.zone +EXTRA_DIST += origincheck.txt +EXTRA_DIST += omitcheck.txt + +# Generated .wire files +EXTRA_DIST += edns_toWire1.wire edns_toWire2.wire +EXTRA_DIST += edns_toWire3.wire edns_toWire4.wire +EXTRA_DIST += message_fromWire10.wire +EXTRA_DIST += message_fromWire11.wire message_fromWire12.wire +EXTRA_DIST += message_fromWire13.wire message_fromWire14.wire +EXTRA_DIST += message_fromWire15.wire message_fromWire16.wire +EXTRA_DIST += message_fromWire17.wire message_fromWire18.wire +EXTRA_DIST += message_fromWire19.wire message_fromWire20.wire +EXTRA_DIST += message_fromWire21.wire message_fromWire22.wire +EXTRA_DIST += message_toWire1 message_toWire2.wire message_toWire3.wire +EXTRA_DIST += message_toWire4.wire message_toWire5.wire +EXTRA_DIST += message_toText1.txt message_toText1.wire +EXTRA_DIST += message_toText2.txt message_toText2.wire +EXTRA_DIST += message_toText3.txt message_toText3.wire +EXTRA_DIST += name_toWire5.wire name_toWire6.wire +EXTRA_DIST += rdatafields1.wire rdatafields2.wire rdatafields3.wire +EXTRA_DIST += rdatafields4.wire rdatafields5.wire rdatafields6.wire +EXTRA_DIST += rdata_dnskey_fromWire.wire rdata_dnskey_empty_keydata_fromWire.wire +EXTRA_DIST += rdata_nsec_fromWire4.wire rdata_nsec_fromWire5.wire +EXTRA_DIST += rdata_nsec_fromWire6.wire rdata_nsec_fromWire7.wire +EXTRA_DIST += rdata_nsec_fromWire8.wire rdata_nsec_fromWire9.wire +EXTRA_DIST += rdata_nsec_fromWire10.wire +EXTRA_DIST += rdata_nsec_fromWire16.wire +EXTRA_DIST += rdata_nsec3param_fromWire2.wire +EXTRA_DIST += rdata_nsec3param_fromWire11.wire +EXTRA_DIST += rdata_nsec3param_fromWire13.wire +EXTRA_DIST += rdata_nsec3_fromWire2.wire rdata_nsec3_fromWire3 +EXTRA_DIST += rdata_nsec3_fromWire4.wire rdata_nsec3_fromWire5.wire +EXTRA_DIST += rdata_nsec3_fromWire6.wire rdata_nsec3_fromWire7.wire +EXTRA_DIST += rdata_nsec3_fromWire8.wire rdata_nsec3_fromWire9.wire +EXTRA_DIST += rdata_nsec3_fromWire10.wire rdata_nsec3_fromWire11.wire +EXTRA_DIST += rdata_nsec3_fromWire12.wire rdata_nsec3_fromWire13.wire +EXTRA_DIST += rdata_nsec3_fromWire14.wire rdata_nsec3_fromWire15.wire +EXTRA_DIST += rdata_nsec3_fromWire16.wire rdata_nsec3_fromWire17.wire +EXTRA_DIST += rdata_rrsig_fromWire2.wire +EXTRA_DIST += rdata_rp_fromWire1.wire rdata_rp_fromWire2.wire +EXTRA_DIST += rdata_rp_fromWire3.wire rdata_rp_fromWire4.wire +EXTRA_DIST += rdata_rp_fromWire5.wire rdata_rp_fromWire6.wire +EXTRA_DIST += rdata_rp_toWire1.wire rdata_rp_toWire2.wire +EXTRA_DIST += rdata_sshfp_fromWire1.wire rdata_sshfp_fromWire2.wire +EXTRA_DIST += rdata_sshfp_fromWire3.wire rdata_sshfp_fromWire4.wire +EXTRA_DIST += rdata_sshfp_fromWire5.wire rdata_sshfp_fromWire6.wire +EXTRA_DIST += rdata_sshfp_fromWire7.wire rdata_sshfp_fromWire8.wire +EXTRA_DIST += rdata_afsdb_fromWire1.wire rdata_afsdb_fromWire2.wire +EXTRA_DIST += rdata_afsdb_fromWire3.wire rdata_afsdb_fromWire4.wire +EXTRA_DIST += rdata_afsdb_fromWire5.wire +EXTRA_DIST += rdata_afsdb_toWire1.wire rdata_afsdb_toWire2.wire +EXTRA_DIST += rdata_soa_fromWire rdata_soa_toWireUncompressed.wire +EXTRA_DIST += rdata_minfo_fromWire1.wire rdata_minfo_fromWire2.wire +EXTRA_DIST += rdata_minfo_fromWire3.wire rdata_minfo_fromWire4.wire +EXTRA_DIST += rdata_minfo_fromWire5.wire rdata_minfo_fromWire6.wire +EXTRA_DIST += rdata_minfo_toWire1.wire rdata_minfo_toWire2.wire +EXTRA_DIST += rdata_minfo_toWireUncompressed1.wire +EXTRA_DIST += rdata_minfo_toWireUncompressed2.wire +EXTRA_DIST += rdata_txt_fromWire1 rdata_txt_fromWire2.wire +EXTRA_DIST += rdata_txt_fromWire3.wire rdata_txt_fromWire4.wire +EXTRA_DIST += rdata_txt_fromWire5.wire rdata_unknown_fromWire +EXTRA_DIST += rdata_tlsa_fromWire3.wire rdata_tlsa_fromWire4.wire +EXTRA_DIST += rdata_tlsa_fromWire5.wire rdata_tlsa_fromWire6.wire +EXTRA_DIST += rdata_tlsa_fromWire7.wire rdata_tlsa_fromWire8.wire +EXTRA_DIST += rdata_tsig_fromWire1.wire rdata_tsig_fromWire2.wire +EXTRA_DIST += rdata_tsig_fromWire3.wire rdata_tsig_fromWire4.wire +EXTRA_DIST += rdata_tsig_fromWire5.wire rdata_tsig_fromWire6.wire +EXTRA_DIST += rdata_tsig_fromWire7.wire rdata_tsig_fromWire8.wire +EXTRA_DIST += rdata_tsig_fromWire9.wire +EXTRA_DIST += rdata_tsig_toWire1.wire rdata_tsig_toWire2.wire +EXTRA_DIST += rdata_tsig_toWire3.wire rdata_tsig_toWire4.wire +EXTRA_DIST += rdata_tsig_toWire5.wire +EXTRA_DIST += rdata_caa_fromWire1.wire rdata_caa_fromWire2.wire +EXTRA_DIST += rdata_caa_fromWire3.wire rdata_caa_fromWire4.wire +EXTRA_DIST += rdata_tkey_fromWire1.wire rdata_tkey_fromWire2.wire +EXTRA_DIST += rdata_tkey_fromWire3.wire rdata_tkey_fromWire4.wire +EXTRA_DIST += rdata_tkey_fromWire5.wire rdata_tkey_fromWire6.wire +EXTRA_DIST += rdata_tkey_fromWire7.wire rdata_tkey_fromWire8.wire +EXTRA_DIST += rdata_tkey_fromWire9.wire +EXTRA_DIST += rdata_tkey_toWire1.wire rdata_tkey_toWire2.wire +EXTRA_DIST += rdata_tkey_toWire3.wire rdata_tkey_toWire4.wire +EXTRA_DIST += rdata_tkey_toWire5.wire +EXTRA_DIST += tsigrecord_toWire1.wire tsigrecord_toWire2.wire +EXTRA_DIST += tsig_verify1.wire tsig_verify2.wire tsig_verify3.wire +EXTRA_DIST += tsig_verify4.wire tsig_verify5.wire tsig_verify6.wire +EXTRA_DIST += tsig_verify7.wire tsig_verify8.wire tsig_verify9.wire +EXTRA_DIST += tsig_verify10.wire tsig_verify11.wire + +# We no longer use gen_wiredata.py during build process, so the +# dependency is no longer needed. However, we'll keep this dependency +# commented till the gen_wiredata.py script is removed. + +#.spec.wire: +# $(PYTHON) $(top_builddir)/src/lib/util/python/gen_wiredata.py -o $@ $< diff --git a/src/lib/dns/tests/testdata/Makefile.in b/src/lib/dns/tests/testdata/Makefile.in new file mode 100644 index 0000000..0a311f3 --- /dev/null +++ b/src/lib/dns/tests/testdata/Makefile.in @@ -0,0 +1,740 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/dns/tests/testdata +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4macros/ax_boost_for_kea.m4 \ + $(top_srcdir)/m4macros/ax_cpp11.m4 \ + $(top_srcdir)/m4macros/ax_cpp20.m4 \ + $(top_srcdir)/m4macros/ax_crypto.m4 \ + $(top_srcdir)/m4macros/ax_find_library.m4 \ + $(top_srcdir)/m4macros/ax_gssapi.m4 \ + $(top_srcdir)/m4macros/ax_gtest.m4 \ + $(top_srcdir)/m4macros/ax_isc_rpath.m4 \ + $(top_srcdir)/m4macros/ax_netconf.m4 \ + $(top_srcdir)/m4macros/libtool.m4 \ + $(top_srcdir)/m4macros/ltoptions.m4 \ + $(top_srcdir)/m4macros/ltsugar.m4 \ + $(top_srcdir)/m4macros/ltversion.m4 \ + $(top_srcdir)/m4macros/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_INCLUDES = @BOOST_INCLUDES@ +BOOST_LIBS = @BOOST_LIBS@ +BOTAN_TOOL = @BOTAN_TOOL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONTRIB_DIR = @CONTRIB_DIR@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CRYPTO_CFLAGS = @CRYPTO_CFLAGS@ +CRYPTO_INCLUDES = @CRYPTO_INCLUDES@ +CRYPTO_LDFLAGS = @CRYPTO_LDFLAGS@ +CRYPTO_LIBS = @CRYPTO_LIBS@ +CRYPTO_PACKAGE = @CRYPTO_PACKAGE@ +CRYPTO_RPATH = @CRYPTO_RPATH@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_BOOST_CONFIGURE_FLAG = @DISTCHECK_BOOST_CONFIGURE_FLAG@ +DISTCHECK_CONTRIB_CONFIGURE_FLAG = @DISTCHECK_CONTRIB_CONFIGURE_FLAG@ +DISTCHECK_CRYPTO_CONFIGURE_FLAG = @DISTCHECK_CRYPTO_CONFIGURE_FLAG@ +DISTCHECK_GSSAPI_CONFIGURE_FLAG = @DISTCHECK_GSSAPI_CONFIGURE_FLAG@ +DISTCHECK_GTEST_CONFIGURE_FLAG = @DISTCHECK_GTEST_CONFIGURE_FLAG@ +DISTCHECK_KEA_SHELL_CONFIGURE_FLAG = @DISTCHECK_KEA_SHELL_CONFIGURE_FLAG@ +DISTCHECK_LIBYANGCPP_CONFIGURE_FLAG = @DISTCHECK_LIBYANGCPP_CONFIGURE_FLAG@ +DISTCHECK_LIBYANG_CONFIGURE_FLAG = @DISTCHECK_LIBYANG_CONFIGURE_FLAG@ +DISTCHECK_LOG4CPLUS_CONFIGURE_FLAG = @DISTCHECK_LOG4CPLUS_CONFIGURE_FLAG@ +DISTCHECK_MYSQL_CONFIGURE_FLAG = @DISTCHECK_MYSQL_CONFIGURE_FLAG@ +DISTCHECK_PERFDHCP_CONFIGURE_FLAG = @DISTCHECK_PERFDHCP_CONFIGURE_FLAG@ +DISTCHECK_PGSQL_CONFIGURE_FLAG = @DISTCHECK_PGSQL_CONFIGURE_FLAG@ +DISTCHECK_PREMIUM_CONFIGURE_FLAG = @DISTCHECK_PREMIUM_CONFIGURE_FLAG@ +DISTCHECK_SYSREPOCPP_CONFIGURE_FLAG = @DISTCHECK_SYSREPOCPP_CONFIGURE_FLAG@ +DISTCHECK_SYSREPO_CONFIGURE_FLAG = @DISTCHECK_SYSREPO_CONFIGURE_FLAG@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENHTML = @GENHTML@ +GREP = @GREP@ +GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ +GSSAPI_LIBS = @GSSAPI_LIBS@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_INCLUDES = @GTEST_INCLUDES@ +GTEST_LDADD = @GTEST_LDADD@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +GTEST_SOURCE = @GTEST_SOURCE@ +HAVE_NETCONF = @HAVE_NETCONF@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEA_CXXFLAGS = @KEA_CXXFLAGS@ +KEA_SRCID = @KEA_SRCID@ +KRB5_CONFIG = @KRB5_CONFIG@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBYANGCPP_CPPFLAGS = @LIBYANGCPP_CPPFLAGS@ +LIBYANGCPP_INCLUDEDIR = @LIBYANGCPP_INCLUDEDIR@ +LIBYANGCPP_LIBS = @LIBYANGCPP_LIBS@ +LIBYANGCPP_PREFIX = @LIBYANGCPP_PREFIX@ +LIBYANGCPP_VERSION = @LIBYANGCPP_VERSION@ +LIBYANG_CPPFLAGS = @LIBYANG_CPPFLAGS@ +LIBYANG_INCLUDEDIR = @LIBYANG_INCLUDEDIR@ +LIBYANG_LIBS = @LIBYANG_LIBS@ +LIBYANG_PREFIX = @LIBYANG_PREFIX@ +LIBYANG_VERSION = @LIBYANG_VERSION@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOG4CPLUS_INCLUDES = @LOG4CPLUS_INCLUDES@ +LOG4CPLUS_LIBS = @LOG4CPLUS_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MYSQL_CPPFLAGS = @MYSQL_CPPFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_TYPE = @PACKAGE_VERSION_TYPE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PDFLATEX = @PDFLATEX@ +PERL = @PERL@ +PGSQL_CPPFLAGS = @PGSQL_CPPFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKGPYTHONDIR = @PKGPYTHONDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PLANTUML = @PLANTUML@ +PREMIUM_DIR = @PREMIUM_DIR@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SEP = @SEP@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPHINXBUILD = @SPHINXBUILD@ +SRPD_PLUGINS_PATH = @SRPD_PLUGINS_PATH@ +SR_PLUGINS_PATH = @SR_PLUGINS_PATH@ +SR_REPO_PATH = @SR_REPO_PATH@ +STRIP = @STRIP@ +SYSREPOCPP_CPPFLAGS = @SYSREPOCPP_CPPFLAGS@ +SYSREPOCPP_INCLUDEDIR = @SYSREPOCPP_INCLUDEDIR@ +SYSREPOCPP_LIBS = @SYSREPOCPP_LIBS@ +SYSREPOCPP_PREFIX = @SYSREPOCPP_PREFIX@ +SYSREPOCPP_VERSION = @SYSREPOCPP_VERSION@ +SYSREPO_CPPFLAGS = @SYSREPO_CPPFLAGS@ +SYSREPO_INCLUDEDIR = @SYSREPO_INCLUDEDIR@ +SYSREPO_LIBS = @SYSREPO_LIBS@ +SYSREPO_PREFIX = @SYSREPO_PREFIX@ +SYSREPO_VERSION = @SYSREPO_VERSION@ +USE_LCOV = @USE_LCOV@ +VALGRIND = @VALGRIND@ +VERSION = @VERSION@ +WARNING_GCC_44_STRICT_ALIASING_CFLAG = @WARNING_GCC_44_STRICT_ALIASING_CFLAG@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +CLEANFILES = + +# NOTE: keep this in sync with real file listing +# so is included in tarball + +# Generated .wire files +EXTRA_DIST = edns_toWire1.spec edns_toWire2.spec edns_toWire3.spec \ + edns_toWire4.spec masterload.txt message_fromWire1 \ + message_fromWire2 message_fromWire3 message_fromWire4 \ + message_fromWire5 message_fromWire6 message_fromWire7 \ + message_fromWire8 message_fromWire9 message_fromWire10.spec \ + message_fromWire11.spec message_fromWire12.spec \ + message_fromWire13.spec message_fromWire14.spec \ + message_fromWire15.spec message_fromWire16.spec \ + message_fromWire17.spec message_fromWire18.spec \ + message_fromWire19.spec message_fromWire20.spec \ + message_fromWire21.spec message_fromWire22.spec \ + message_toWire1 message_toWire2.spec message_toWire3.spec \ + message_toWire4.spec message_toWire5.spec message_toWire6 \ + message_toWire7 message_toText1.txt message_toText1.spec \ + message_toText2.txt message_toText2.spec message_toText3.txt \ + message_toText3.spec name_fromWire1 name_fromWire2 \ + name_fromWire3_1 name_fromWire3_2 name_fromWire4 \ + name_fromWire6 name_fromWire7 name_fromWire8 name_fromWire9 \ + name_fromWire10 name_fromWire11 name_fromWire12 \ + name_fromWire13 name_fromWire14 name_toWire1 name_toWire2 \ + name_toWire3 name_toWire4 name_toWire5.spec name_toWire6.spec \ + name_toWire7 name_toWire8 name_toWire9 question_fromWire \ + question_toWire1 question_toWire2 rdatafields1.spec \ + rdatafields2.spec rdatafields3.spec rdatafields4.spec \ + rdatafields5.spec rdatafields6.spec rdata_cname_fromWire \ + rdata_dname_fromWire rdata_dnskey_fromWire.spec \ + rdata_dnskey_empty_keydata_fromWire.spec rdata_dhcid_fromWire \ + rdata_dhcid_toWire rdata_ds_fromWire rdata_in_a_fromWire \ + rdata_in_aaaa_fromWire rdata_mx_fromWire rdata_mx_toWire1 \ + rdata_mx_toWire2 rdata_ns_fromWire rdata_nsec_fromWire1 \ + rdata_nsec_fromWire2 rdata_nsec_fromWire3 \ + rdata_nsec_fromWire4.spec rdata_nsec_fromWire5.spec \ + rdata_nsec_fromWire6.spec rdata_nsec_fromWire7.spec \ + rdata_nsec_fromWire8.spec rdata_nsec_fromWire9.spec \ + rdata_nsec_fromWire10.spec rdata_nsec_fromWire16.spec \ + rdata_nsec3param_fromWire1 rdata_nsec3param_fromWire2.spec \ + rdata_nsec3param_fromWire11.spec \ + rdata_nsec3param_fromWire13.spec rdata_nsec3_fromWire1 \ + rdata_nsec3_fromWire1.spec rdata_nsec3_fromWire2.spec \ + rdata_nsec3_fromWire3 rdata_nsec3_fromWire4.spec \ + rdata_nsec3_fromWire5.spec rdata_nsec3_fromWire6.spec \ + rdata_nsec3_fromWire7.spec rdata_nsec3_fromWire8.spec \ + rdata_nsec3_fromWire9.spec rdata_nsec3_fromWire10.spec \ + rdata_nsec3_fromWire11.spec rdata_nsec3_fromWire12.spec \ + rdata_nsec3_fromWire13.spec rdata_nsec3_fromWire14.spec \ + rdata_nsec3_fromWire15.spec rdata_nsec3_fromWire16.spec \ + rdata_nsec3_fromWire17.spec rdata_opt_fromWire1 \ + rdata_opt_fromWire2 rdata_opt_fromWire3 rdata_opt_fromWire4 \ + rdata_rrsig_fromWire1 rdata_rrsig_fromWire2.spec \ + rdata_rp_fromWire1.spec rdata_rp_fromWire2.spec \ + rdata_rp_fromWire3.spec rdata_rp_fromWire4.spec \ + rdata_rp_fromWire5.spec rdata_rp_fromWire6.spec \ + rdata_rp_toWire1.spec rdata_rp_toWire2.spec \ + rdata_sshfp_fromWire rdata_sshfp_fromWire2 \ + rdata_sshfp_fromWire1.spec rdata_sshfp_fromWire2.spec \ + rdata_sshfp_fromWire3.spec rdata_sshfp_fromWire4.spec \ + rdata_sshfp_fromWire5.spec rdata_sshfp_fromWire6.spec \ + rdata_sshfp_fromWire7.spec rdata_sshfp_fromWire8.spec \ + rdata_sshfp_fromWire9 rdata_sshfp_fromWire10 \ + rdata_sshfp_fromWire11 rdata_sshfp_fromWire12 \ + rdata_afsdb_fromWire1.spec rdata_afsdb_fromWire2.spec \ + rdata_afsdb_fromWire3.spec rdata_afsdb_fromWire4.spec \ + rdata_afsdb_fromWire5.spec rdata_afsdb_toWire1.spec \ + rdata_afsdb_toWire2.spec rdata_soa_fromWire \ + rdata_soa_toWireUncompressed.spec rdata_srv_fromWire \ + rdata_minfo_fromWire1.spec rdata_minfo_fromWire2.spec \ + rdata_minfo_fromWire3.spec rdata_minfo_fromWire4.spec \ + rdata_minfo_fromWire5.spec rdata_minfo_fromWire6.spec \ + rdata_minfo_toWire1.spec rdata_minfo_toWire2.spec \ + rdata_minfo_toWireUncompressed1.spec \ + rdata_minfo_toWireUncompressed2.spec rdata_txt_fromWire1 \ + rdata_txt_fromWire2.spec rdata_txt_fromWire3.spec \ + rdata_txt_fromWire4.spec rdata_txt_fromWire5.spec \ + rdata_unknown_fromWire rrcode16_fromWire1 rrcode16_fromWire2 \ + rrcode32_fromWire1 rrcode32_fromWire2 rrset_toWire1 \ + rrset_toWire2 rrset_toWire3 rrset_toWire4 \ + rdata_tkey_fromWire1.spec rdata_tkey_fromWire2.spec \ + rdata_tkey_fromWire3.spec rdata_tkey_fromWire4.spec \ + rdata_tkey_fromWire5.spec rdata_tkey_fromWire6.spec \ + rdata_tkey_fromWire7.spec rdata_tkey_fromWire8.spec \ + rdata_tkey_fromWire9.spec rdata_tkey_toWire1.spec \ + rdata_tkey_toWire2.spec rdata_tkey_toWire3.spec \ + rdata_tkey_toWire4.spec rdata_tkey_toWire5.spec \ + rdata_tlsa_fromWire rdata_tlsa_fromWire2 \ + rdata_tlsa_fromWire3.spec rdata_tlsa_fromWire4.spec \ + rdata_tlsa_fromWire5.spec rdata_tlsa_fromWire6.spec \ + rdata_tlsa_fromWire7.spec rdata_tlsa_fromWire8.spec \ + rdata_tlsa_fromWire9 rdata_tlsa_fromWire10 \ + rdata_tlsa_fromWire11 rdata_tlsa_fromWire12 \ + rdata_tsig_fromWire1.spec rdata_tsig_fromWire2.spec \ + rdata_tsig_fromWire3.spec rdata_tsig_fromWire4.spec \ + rdata_tsig_fromWire5.spec rdata_tsig_fromWire6.spec \ + rdata_tsig_fromWire7.spec rdata_tsig_fromWire8.spec \ + rdata_tsig_fromWire9.spec rdata_tsig_toWire1.spec \ + rdata_tsig_toWire2.spec rdata_tsig_toWire3.spec \ + rdata_tsig_toWire4.spec rdata_tsig_toWire5.spec \ + rdata_caa_fromWire1.spec rdata_caa_fromWire2.spec \ + rdata_caa_fromWire3.spec rdata_caa_fromWire4.spec \ + rdata_caa_fromWire5 rdata_caa_fromWire6 \ + tsigrecord_toWire1.spec tsigrecord_toWire2.spec \ + tsig_verify1.spec tsig_verify2.spec tsig_verify3.spec \ + tsig_verify4.spec tsig_verify5.spec tsig_verify6.spec \ + tsig_verify7.spec tsig_verify8.spec tsig_verify9.spec \ + tsig_verify10.spec tsig_verify11.spec example.org broken.zone \ + origincheck.txt omitcheck.txt edns_toWire1.wire \ + edns_toWire2.wire edns_toWire3.wire edns_toWire4.wire \ + message_fromWire10.wire message_fromWire11.wire \ + message_fromWire12.wire message_fromWire13.wire \ + message_fromWire14.wire message_fromWire15.wire \ + message_fromWire16.wire message_fromWire17.wire \ + message_fromWire18.wire message_fromWire19.wire \ + message_fromWire20.wire message_fromWire21.wire \ + message_fromWire22.wire message_toWire1 message_toWire2.wire \ + message_toWire3.wire message_toWire4.wire message_toWire5.wire \ + message_toText1.txt message_toText1.wire message_toText2.txt \ + message_toText2.wire message_toText3.txt message_toText3.wire \ + name_toWire5.wire name_toWire6.wire rdatafields1.wire \ + rdatafields2.wire rdatafields3.wire rdatafields4.wire \ + rdatafields5.wire rdatafields6.wire rdata_dnskey_fromWire.wire \ + rdata_dnskey_empty_keydata_fromWire.wire \ + rdata_nsec_fromWire4.wire rdata_nsec_fromWire5.wire \ + rdata_nsec_fromWire6.wire rdata_nsec_fromWire7.wire \ + rdata_nsec_fromWire8.wire rdata_nsec_fromWire9.wire \ + rdata_nsec_fromWire10.wire rdata_nsec_fromWire16.wire \ + rdata_nsec3param_fromWire2.wire \ + rdata_nsec3param_fromWire11.wire \ + rdata_nsec3param_fromWire13.wire rdata_nsec3_fromWire2.wire \ + rdata_nsec3_fromWire3 rdata_nsec3_fromWire4.wire \ + rdata_nsec3_fromWire5.wire rdata_nsec3_fromWire6.wire \ + rdata_nsec3_fromWire7.wire rdata_nsec3_fromWire8.wire \ + rdata_nsec3_fromWire9.wire rdata_nsec3_fromWire10.wire \ + rdata_nsec3_fromWire11.wire rdata_nsec3_fromWire12.wire \ + rdata_nsec3_fromWire13.wire rdata_nsec3_fromWire14.wire \ + rdata_nsec3_fromWire15.wire rdata_nsec3_fromWire16.wire \ + rdata_nsec3_fromWire17.wire rdata_rrsig_fromWire2.wire \ + rdata_rp_fromWire1.wire rdata_rp_fromWire2.wire \ + rdata_rp_fromWire3.wire rdata_rp_fromWire4.wire \ + rdata_rp_fromWire5.wire rdata_rp_fromWire6.wire \ + rdata_rp_toWire1.wire rdata_rp_toWire2.wire \ + rdata_sshfp_fromWire1.wire rdata_sshfp_fromWire2.wire \ + rdata_sshfp_fromWire3.wire rdata_sshfp_fromWire4.wire \ + rdata_sshfp_fromWire5.wire rdata_sshfp_fromWire6.wire \ + rdata_sshfp_fromWire7.wire rdata_sshfp_fromWire8.wire \ + rdata_afsdb_fromWire1.wire rdata_afsdb_fromWire2.wire \ + rdata_afsdb_fromWire3.wire rdata_afsdb_fromWire4.wire \ + rdata_afsdb_fromWire5.wire rdata_afsdb_toWire1.wire \ + rdata_afsdb_toWire2.wire rdata_soa_fromWire \ + rdata_soa_toWireUncompressed.wire rdata_minfo_fromWire1.wire \ + rdata_minfo_fromWire2.wire rdata_minfo_fromWire3.wire \ + rdata_minfo_fromWire4.wire rdata_minfo_fromWire5.wire \ + rdata_minfo_fromWire6.wire rdata_minfo_toWire1.wire \ + rdata_minfo_toWire2.wire rdata_minfo_toWireUncompressed1.wire \ + rdata_minfo_toWireUncompressed2.wire rdata_txt_fromWire1 \ + rdata_txt_fromWire2.wire rdata_txt_fromWire3.wire \ + rdata_txt_fromWire4.wire rdata_txt_fromWire5.wire \ + rdata_unknown_fromWire rdata_tlsa_fromWire3.wire \ + rdata_tlsa_fromWire4.wire rdata_tlsa_fromWire5.wire \ + rdata_tlsa_fromWire6.wire rdata_tlsa_fromWire7.wire \ + rdata_tlsa_fromWire8.wire rdata_tsig_fromWire1.wire \ + rdata_tsig_fromWire2.wire rdata_tsig_fromWire3.wire \ + rdata_tsig_fromWire4.wire rdata_tsig_fromWire5.wire \ + rdata_tsig_fromWire6.wire rdata_tsig_fromWire7.wire \ + rdata_tsig_fromWire8.wire rdata_tsig_fromWire9.wire \ + rdata_tsig_toWire1.wire rdata_tsig_toWire2.wire \ + rdata_tsig_toWire3.wire rdata_tsig_toWire4.wire \ + rdata_tsig_toWire5.wire rdata_caa_fromWire1.wire \ + rdata_caa_fromWire2.wire rdata_caa_fromWire3.wire \ + rdata_caa_fromWire4.wire rdata_tkey_fromWire1.wire \ + rdata_tkey_fromWire2.wire rdata_tkey_fromWire3.wire \ + rdata_tkey_fromWire4.wire rdata_tkey_fromWire5.wire \ + rdata_tkey_fromWire6.wire rdata_tkey_fromWire7.wire \ + rdata_tkey_fromWire8.wire rdata_tkey_fromWire9.wire \ + rdata_tkey_toWire1.wire rdata_tkey_toWire2.wire \ + rdata_tkey_toWire3.wire rdata_tkey_toWire4.wire \ + rdata_tkey_toWire5.wire tsigrecord_toWire1.wire \ + tsigrecord_toWire2.wire tsig_verify1.wire tsig_verify2.wire \ + tsig_verify3.wire tsig_verify4.wire tsig_verify5.wire \ + tsig_verify6.wire tsig_verify7.wire tsig_verify8.wire \ + tsig_verify9.wire tsig_verify10.wire tsig_verify11.wire +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lib/dns/tests/testdata/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/lib/dns/tests/testdata/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# We no longer use gen_wiredata.py during build process, so the +# dependency is no longer needed. However, we'll keep this dependency +# commented till the gen_wiredata.py script is removed. + +#.spec.wire: +# $(PYTHON) $(top_builddir)/src/lib/util/python/gen_wiredata.py -o $@ $< + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/lib/dns/tests/testdata/broken.zone b/src/lib/dns/tests/testdata/broken.zone new file mode 100644 index 0000000..70f4540 --- /dev/null +++ b/src/lib/dns/tests/testdata/broken.zone @@ -0,0 +1,3 @@ +; This should fail due to broken TTL +; The file should _NOT_ end with EOLN +broken. 3600X IN A 192.0.2.2 More data
\ No newline at end of file diff --git a/src/lib/dns/tests/testdata/edns_toWire1.spec b/src/lib/dns/tests/testdata/edns_toWire1.spec new file mode 100644 index 0000000..483aefa --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire1.spec @@ -0,0 +1,5 @@ +# +# A simplest form of EDNS: all default parameters +# +[edns] + diff --git a/src/lib/dns/tests/testdata/edns_toWire1.wire b/src/lib/dns/tests/testdata/edns_toWire1.wire new file mode 100644 index 0000000..2884e29 --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire1.wire @@ -0,0 +1,9 @@ +### +### This data file was auto-generated from edns_toWire1.spec +### + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=0 Version=0 DO=0 +00 0029 1000 0000 0000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/edns_toWire2.spec b/src/lib/dns/tests/testdata/edns_toWire2.spec new file mode 100644 index 0000000..7fe1ffd --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire2.spec @@ -0,0 +1,5 @@ +# +# Same as edns_toWire1 but setting the DO bit +# +[edns] +do: 1 diff --git a/src/lib/dns/tests/testdata/edns_toWire2.wire b/src/lib/dns/tests/testdata/edns_toWire2.wire new file mode 100644 index 0000000..cb09000 --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire2.wire @@ -0,0 +1,9 @@ +### +### This data file was auto-generated from edns_toWire2.spec +### + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=0 Version=0 DO=1 +00 0029 1000 0000 8000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/edns_toWire3.spec b/src/lib/dns/tests/testdata/edns_toWire3.spec new file mode 100644 index 0000000..0332097 --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire3.spec @@ -0,0 +1,7 @@ +# +# Same as edns_toWire1 but setting the DO bit, and extended Rcode being non 0 +# (for BADVER) +# +[edns] +do: 1 +extrcode: 0x1 diff --git a/src/lib/dns/tests/testdata/edns_toWire3.wire b/src/lib/dns/tests/testdata/edns_toWire3.wire new file mode 100644 index 0000000..b8d0775 --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire3.wire @@ -0,0 +1,9 @@ +### +### This data file was auto-generated from edns_toWire3.spec +### + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=1 Version=0 DO=1 +00 0029 1000 0100 8000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/edns_toWire4.spec b/src/lib/dns/tests/testdata/edns_toWire4.spec new file mode 100644 index 0000000..ea1f5e3 --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire4.spec @@ -0,0 +1,7 @@ +# +# Same as edns_toWire1 but setting the DO bit, and using an unusual +# UDP payload size +# +[edns] +do: 1 +udpsize = 511 diff --git a/src/lib/dns/tests/testdata/edns_toWire4.wire b/src/lib/dns/tests/testdata/edns_toWire4.wire new file mode 100644 index 0000000..73bf757 --- /dev/null +++ b/src/lib/dns/tests/testdata/edns_toWire4.wire @@ -0,0 +1,9 @@ +### +### This data file was auto-generated from edns_toWire4.spec +### + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=511 ExtRcode=0 Version=0 DO=1 +00 0029 01ff 0000 8000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/example.org b/src/lib/dns/tests/testdata/example.org new file mode 100644 index 0000000..2708ef4 --- /dev/null +++ b/src/lib/dns/tests/testdata/example.org @@ -0,0 +1,17 @@ +example.org. 3600 IN SOA ( ; The SOA, split across lines for testing + ns1.example.org. + admin.example.org. + 1234 + 3600 + 1800 + 2419200 + 7200 + ) +; Check it accepts quoted name too +"\101xample.org." 3600 IN NS ns1.example.org. + + +; Some empty lines here. They are to make sure the loader can skip them. +www 3600 IN A 192.0.2.1 ; Test a relative name as well. + 3600 IN AAAA 2001:db8::1 ; And initial whitespace handling + ; Here be just some space, no RRs diff --git a/src/lib/dns/tests/testdata/masterload.txt b/src/lib/dns/tests/testdata/masterload.txt new file mode 100644 index 0000000..0d2f942 --- /dev/null +++ b/src/lib/dns/tests/testdata/masterload.txt @@ -0,0 +1,5 @@ +;; a simple (incomplete) zone file + +example.com. 3600 IN TXT "test data" +www.example.com. 60 IN A 192.0.2.1 +www.example.com. 60 IN A 192.0.2.2 diff --git a/src/lib/dns/tests/testdata/message_fromWire1 b/src/lib/dns/tests/testdata/message_fromWire1 new file mode 100644 index 0000000..5b76e3f --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire1 @@ -0,0 +1,22 @@ +# +# A simple DNS response message +# ID = 0x1035 +# QR=1 (response), Opcode=0, AA=1, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=2, other COUNTS=0 +# Question: test.example.com. IN A +# Answer: +# test.example.com. 3600 IN A 192.0.2.1 +# test.example.com. 7200 IN A 192.0.2.2 +# +1035 8500 +0001 0002 0000 0000 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# same name, fully compressed +c0 0c +# TTL=3600, A, IN, RDLENGTH=4, RDATA +0001 0001 00000e10 0004 c0 00 02 01 +# mostly same, with the slight difference in RDATA and TTL +c0 0c +0001 0001 00001c20 0004 c0 00 02 02 diff --git a/src/lib/dns/tests/testdata/message_fromWire10.spec b/src/lib/dns/tests/testdata/message_fromWire10.spec new file mode 100644 index 0000000..d3fb014 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire10.spec @@ -0,0 +1,13 @@ +# +# A simple DNS response message with an EDNS0 indicating a BADVERS error +# + +[header] +qr: response +rd: 1 +arcount: 1 +[question] +# use default +[edns] +do: 1 +extrcode: 1 diff --git a/src/lib/dns/tests/testdata/message_fromWire10.wire b/src/lib/dns/tests/testdata/message_fromWire10.wire new file mode 100644 index 0000000..fa76b92 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire10.wire @@ -0,0 +1,19 @@ +### +### This data file was auto-generated from message_fromWire10.spec +### + +# Header Section +# ID=4149 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) RD +1035 8100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=example.com. QTYPE=A(1) QCLASS=IN(1) +076578616d706c6503636f6d00 0001 0001 + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=1 Version=0 DO=1 +00 0029 1000 0100 8000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire11.spec b/src/lib/dns/tests/testdata/message_fromWire11.spec new file mode 100644 index 0000000..5f31746 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire11.spec @@ -0,0 +1,15 @@ +# +# A simple DNS response message with an EDNS0 indicating the maximum error code +# (0xfff) +# + +[header] +qr: response +rd: 1 +rcode: 0xf +arcount: 1 +[question] +# use default +[edns] +do: 1 +extrcode: 0xff diff --git a/src/lib/dns/tests/testdata/message_fromWire11.wire b/src/lib/dns/tests/testdata/message_fromWire11.wire new file mode 100644 index 0000000..f20132c --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire11.wire @@ -0,0 +1,19 @@ +### +### This data file was auto-generated from message_fromWire11.spec +### + +# Header Section +# ID=4149 QR=Response Opcode=QUERY(0) Rcode=15 RD +1035 810f +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=example.com. QTYPE=A(1) QCLASS=IN(1) +076578616d706c6503636f6d00 0001 0001 + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=255 Version=0 DO=1 +00 0029 1000 ff00 8000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire12.spec b/src/lib/dns/tests/testdata/message_fromWire12.spec new file mode 100644 index 0000000..4eadeed --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire12.spec @@ -0,0 +1,21 @@ +# +# A simple DNS response message with TSIG signed, but the owner name of TSIG +# is compressed +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +rr_name: ptr=12 +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/message_fromWire12.wire b/src/lib/dns/tests/testdata/message_fromWire12.wire new file mode 100644 index 0000000..9ceb356 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire12.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from message_fromWire12.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=ptr=12 Class=ANY(255) TTL=0, RDLEN=58) +c00c 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire13.spec b/src/lib/dns/tests/testdata/message_fromWire13.spec new file mode 100644 index 0000000..e81ec4c --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire13.spec @@ -0,0 +1,20 @@ +# +# Invalid TSIG: containing 2 TSIG RRs. +# + +[custom] +sections: header:question:tsig:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 2 +[question] +name: www.example.com +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/message_fromWire13.wire b/src/lib/dns/tests/testdata/message_fromWire13.wire new file mode 100644 index 0000000..05b064a --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire13.wire @@ -0,0 +1,35 @@ +### +### This data file was auto-generated from message_fromWire13.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=2 +0001 0000 0000 0002 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire14.spec b/src/lib/dns/tests/testdata/message_fromWire14.spec new file mode 100644 index 0000000..bf68a93 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire14.spec @@ -0,0 +1,21 @@ +# +# Invalid TSIG: not in the additional section. +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +# TSIG goes to the answer section +ancount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/message_fromWire14.wire b/src/lib/dns/tests/testdata/message_fromWire14.wire new file mode 100644 index 0000000..17d0e21 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire14.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from message_fromWire14.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=1, NSCNT=0, ARCNT=0 +0001 0001 0000 0000 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire15.spec b/src/lib/dns/tests/testdata/message_fromWire15.spec new file mode 100644 index 0000000..25d810f --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire15.spec @@ -0,0 +1,22 @@ +# +# Invalid TSIG: not at the end of the message +# + +[custom] +sections: header:question:tsig:edns +[header] +id: 0x2d65 +rd: 1 +arcount: 2 +[question] +name: www.example.com +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 +[edns] +# (all default) diff --git a/src/lib/dns/tests/testdata/message_fromWire15.wire b/src/lib/dns/tests/testdata/message_fromWire15.wire new file mode 100644 index 0000000..e3f36d0 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire15.wire @@ -0,0 +1,30 @@ +### +### This data file was auto-generated from message_fromWire15.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=2 +0001 0000 0000 0002 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=0 Version=0 DO=0 +00 0029 1000 0000 0000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire16.spec b/src/lib/dns/tests/testdata/message_fromWire16.spec new file mode 100644 index 0000000..be0abc3 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire16.spec @@ -0,0 +1,21 @@ +# +# Invalid TSIG: not in the additional section. +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +rr_class: IN +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/message_fromWire16.wire b/src/lib/dns/tests/testdata/message_fromWire16.wire new file mode 100644 index 0000000..04a791a --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire16.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from message_fromWire16.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=IN(1) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 0001 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire17.spec b/src/lib/dns/tests/testdata/message_fromWire17.spec new file mode 100644 index 0000000..366cf05 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire17.spec @@ -0,0 +1,22 @@ +# +# A simple DNS query message with TSIG signed +# + +[custom] +sections: header:question:tsig +[header] +id: 0x22c2 +rd: 1 +arcount: 1 +[question] +name: www.example.com +rrtype: TXT +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4e179212 +mac_size: 16 +mac: 0x8214b04634e32323d651ac60b08e6388 +original_id: 0x22c2 diff --git a/src/lib/dns/tests/testdata/message_fromWire17.wire b/src/lib/dns/tests/testdata/message_fromWire17.wire new file mode 100644 index 0000000..e607c52 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire17.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from message_fromWire17.spec +### + +# Header Section +# ID=8898 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +22c2 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=TXT(16) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0010 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1310167570 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004e179212 012c +# MAC Size=16 MAC=(see hex) +0010 8214b04634e32323d651ac60b08e6388 +# Original-ID=8898 Error=0 +22c2 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire18.spec b/src/lib/dns/tests/testdata/message_fromWire18.spec new file mode 100644 index 0000000..0b2592a --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire18.spec @@ -0,0 +1,23 @@ +# +# Another simple DNS query message with TSIG signed. Only ID and time signed +# (and MAC as a result) are different. +# + +[custom] +sections: header:question:tsig +[header] +id: 0xd6e2 +rd: 1 +arcount: 1 +[question] +name: www.example.com +rrtype: TXT +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4e17b38d +mac_size: 16 +mac: 0x903b5b194a799b03a37718820c2404f2 +original_id: 0xd6e2 diff --git a/src/lib/dns/tests/testdata/message_fromWire18.wire b/src/lib/dns/tests/testdata/message_fromWire18.wire new file mode 100644 index 0000000..82bdf6b --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire18.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from message_fromWire18.spec +### + +# Header Section +# ID=55010 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +d6e2 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=TXT(16) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0010 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1310176141 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004e17b38d 012c +# MAC Size=16 MAC=(see hex) +0010 903b5b194a799b03a37718820c2404f2 +# Original-ID=55010 Error=0 +d6e2 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire19.spec b/src/lib/dns/tests/testdata/message_fromWire19.spec new file mode 100644 index 0000000..8212dbf --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire19.spec @@ -0,0 +1,20 @@ +# +# A non realistic DNS response message containing mixed types of RRs in the +# answer section in a mixed order. +# + +[custom] +sections: header:question:a/1:aaaa:a/2 +[header] +qr: 1 +ancount: 3 +[question] +name: www.example.com +rrtype: A +[a/1] +as_rr: True +[aaaa] +as_rr: True +[a/2] +as_rr: True +address: 192.0.2.2 diff --git a/src/lib/dns/tests/testdata/message_fromWire19.wire b/src/lib/dns/tests/testdata/message_fromWire19.wire new file mode 100644 index 0000000..d154244 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire19.wire @@ -0,0 +1,28 @@ +### +### This data file was auto-generated from message_fromWire19.spec +### + +# Header Section +# ID=4149 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) +1035 8000 +# QDCNT=1, ANCNT=3, NSCNT=0, ARCNT=0 +0001 0003 0000 0000 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# A RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=4) +076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.1 +c0000201 + +# AAAA RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=16) +076578616d706c6503636f6d00 001c 0001 00015180 0010 +# Address=2001:db8::1 +20010db8000000000000000000000001 + +# A RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=4) +076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.2 +c0000202 diff --git a/src/lib/dns/tests/testdata/message_fromWire2 b/src/lib/dns/tests/testdata/message_fromWire2 new file mode 100644 index 0000000..194cbf2 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire2 @@ -0,0 +1,22 @@ +# +# A simple DNS query message with a valid EDNS0 OPT RR +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=0, NSCOUNT=0, ARCOUNT=1 +# Question: test.example.com. IN A +1035 0100 +0001 0000 0000 0001 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR +# owner name: "." +00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=DO +0000 8000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire20.spec b/src/lib/dns/tests/testdata/message_fromWire20.spec new file mode 100644 index 0000000..91986e4 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire20.spec @@ -0,0 +1,20 @@ +# +# A non realistic DNS response message containing mixed types of RRs in the +# authority section in a mixed order. +# + +[custom] +sections: header:question:a/1:aaaa:a/2 +[header] +qr: 1 +nscount: 3 +[question] +name: www.example.com +rrtype: A +[a/1] +as_rr: True +[aaaa] +as_rr: True +[a/2] +as_rr: True +address: 192.0.2.2 diff --git a/src/lib/dns/tests/testdata/message_fromWire20.wire b/src/lib/dns/tests/testdata/message_fromWire20.wire new file mode 100644 index 0000000..887dd1e --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire20.wire @@ -0,0 +1,28 @@ +### +### This data file was auto-generated from message_fromWire20.spec +### + +# Header Section +# ID=4149 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) +1035 8000 +# QDCNT=1, ANCNT=0, NSCNT=3, ARCNT=0 +0001 0000 0003 0000 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# A RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=4) +076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.1 +c0000201 + +# AAAA RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=16) +076578616d706c6503636f6d00 001c 0001 00015180 0010 +# Address=2001:db8::1 +20010db8000000000000000000000001 + +# A RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=4) +076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.2 +c0000202 diff --git a/src/lib/dns/tests/testdata/message_fromWire21.spec b/src/lib/dns/tests/testdata/message_fromWire21.spec new file mode 100644 index 0000000..cd6aac9 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire21.spec @@ -0,0 +1,20 @@ +# +# A non realistic DNS response message containing mixed types of RRs in the +# additional section in a mixed order. +# + +[custom] +sections: header:question:a/1:aaaa:a/2 +[header] +qr: 1 +arcount: 3 +[question] +name: www.example.com +rrtype: A +[a/1] +as_rr: True +[aaaa] +as_rr: True +[a/2] +as_rr: True +address: 192.0.2.2 diff --git a/src/lib/dns/tests/testdata/message_fromWire21.wire b/src/lib/dns/tests/testdata/message_fromWire21.wire new file mode 100644 index 0000000..14cfcc0 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire21.wire @@ -0,0 +1,28 @@ +### +### This data file was auto-generated from message_fromWire21.spec +### + +# Header Section +# ID=4149 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) +1035 8000 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=3 +0001 0000 0000 0003 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# A RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=4) +076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.1 +c0000201 + +# AAAA RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=16) +076578616d706c6503636f6d00 001c 0001 00015180 0010 +# Address=2001:db8::1 +20010db8000000000000000000000001 + +# A RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=4) +076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.2 +c0000202 diff --git a/src/lib/dns/tests/testdata/message_fromWire22.spec b/src/lib/dns/tests/testdata/message_fromWire22.spec new file mode 100644 index 0000000..a52523b --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire22.spec @@ -0,0 +1,14 @@ +# +# A simple DNS message containing one SOA RR in the answer section. This is +# intended to be trimmed to emulate a bogus message. +# + +[custom] +sections: header:question:soa +[header] +qr: 1 +ancount: 1 +[question] +rrtype: SOA +[soa] +as_rr: True diff --git a/src/lib/dns/tests/testdata/message_fromWire22.wire b/src/lib/dns/tests/testdata/message_fromWire22.wire new file mode 100644 index 0000000..69c3254 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire22.wire @@ -0,0 +1,20 @@ +### +### This data file was auto-generated from message_fromWire22.spec +### + +# Header Section +# ID=4149 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) +1035 8000 +# QDCNT=1, ANCNT=1, NSCNT=0, ARCNT=0 +0001 0001 0000 0000 + +# Question Section +# QNAME=example.com. QTYPE=SOA(6) QCLASS=IN(1) +076578616d706c6503636f6d00 0006 0001 + +# SOA RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=54) +076578616d706c6503636f6d00 0006 0001 00015180 0036 +# NNAME=ns.example.com RNAME=root.example.com +026e73076578616d706c6503636f6d00 04726f6f74076578616d706c6503636f6d00 +# SERIAL(2010012601) REFRESH(3600) RETRY(300) EXPIRE(3600000) MINIMUM(1200) +77ce5bb9 00000e10 0000012c 0036ee80 000004b0 diff --git a/src/lib/dns/tests/testdata/message_fromWire3 b/src/lib/dns/tests/testdata/message_fromWire3 new file mode 100644 index 0000000..9bd536a --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire3 @@ -0,0 +1,22 @@ +# +# A simple DNS query message with a valid EDNS0 OPT RR, DO bit off +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=0, NSCOUNT=0, ARCOUNT=1 +# Question: test.example.com. IN A +1035 0100 +0001 0000 0000 0001 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR +# owner name: "." +00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=0 +0000 0000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire4 b/src/lib/dns/tests/testdata/message_fromWire4 new file mode 100644 index 0000000..23eb7cf --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire4 @@ -0,0 +1,23 @@ +# +# A simple DNS query message with a bogus EDNS0 OPT RR (included in the +# answer section) +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=1, NSCOUNT=0, ARCOUNT=0 +# Question: test.example.com. IN A +1035 0100 +0001 0001 0000 0000 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR +# owner name: "." +00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=DO +0000 8000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire5 b/src/lib/dns/tests/testdata/message_fromWire5 new file mode 100644 index 0000000..6f08d22 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire5 @@ -0,0 +1,33 @@ +# +# A simple DNS query message with multiple EDNS0 OPT RRs (bogus) +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=0, NSCOUNT=0, ARCOUNT=2 +# Question: test.example.com. IN A +1035 0100 +0001 0000 0000 0002 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR (1st) +# owner name: "." +00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=DO +0000 8000 +# RDLEN = 0 +0000 +# EDNS0 OPT RR (2nd) +# owner name: "." +00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=DO +0000 8000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire6 b/src/lib/dns/tests/testdata/message_fromWire6 new file mode 100644 index 0000000..2783fd0 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire6 @@ -0,0 +1,23 @@ +# +# A simple DNS query message with EDNS0 OPT RRs of non root name (bogus) +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=0, NSCOUNT=0, ARCOUNT=1 +1035 0100 +0001 0000 0000 0001 +# Question: test.example.com. IN A +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR +# owner name: "example.com" +#(7) e x a m p l e (3) c o m . + 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=DO +0000 8000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire7 b/src/lib/dns/tests/testdata/message_fromWire7 new file mode 100644 index 0000000..4d85314 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire7 @@ -0,0 +1,27 @@ +# +# A simple DNS query message with EDNS0 OPT RRs of compressed owner name +# pointing to root (is this bogus?) +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=0, NSCOUNT=0, ARCOUNT=1 +#0 1 2 3 +1035 0100 +#4 5 6 7 8 9 10 1 +0001 0000 0000 0001 +# Question: test.example.com. IN A +# 2 3 4 5 6 7 8 9 20 1 2 3 4 5 6 7 8 9 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR +# owner name: "example.com" +# pointer = 29 (end of question section) + c0 1d +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=DO +0000 8000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire8 b/src/lib/dns/tests/testdata/message_fromWire8 new file mode 100644 index 0000000..c950b5e --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire8 @@ -0,0 +1,22 @@ +# +# A simple DNS query message with a valid EDNS0 OPT RR (but unusual UDP size) +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=0, NSCOUNT=0, ARCOUNT=1 +# Question: test.example.com. IN A +1035 0100 +0001 0000 0000 0001 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR +# owner name: "." +00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 500 +01f4 +# TTL (extended RCODE and flags): RCODE=0, version=0, flags=DO +0000 8000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_fromWire9 b/src/lib/dns/tests/testdata/message_fromWire9 new file mode 100644 index 0000000..f9ff950 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_fromWire9 @@ -0,0 +1,22 @@ +# +# A simple DNS query message with an unsupported version of EDNS0 +# ID = 0x1035 +# QR=0 (query), Opcode=0, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=0, NSCOUNT=0, ARCOUNT=1 +# Question: test.example.com. IN A +1035 0100 +0001 0000 0000 0001 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# EDNS0 OPT RR +# owner name: "." +00 +# TYPE: OPT (41 = 0x29) +00 29 +# CLASS (= UDP size): 4096 +1000 +# TTL (extended RCODE and flags): RCODE=0, version=1, flags=DO +0001 8000 +# RDLEN = 0 +0000 diff --git a/src/lib/dns/tests/testdata/message_toText1.spec b/src/lib/dns/tests/testdata/message_toText1.spec new file mode 100644 index 0000000..b31310e --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText1.spec @@ -0,0 +1,24 @@ +# +# A standard DNS message (taken from an invocation of dig) +# + +[custom] +sections: header:question:a/1:ns:a/2 +[header] +id: 29174 +qr: 1 +aa: 1 +ancount: 1 +nscount: 1 +arcount: 1 +[question] +name: www.example.com +[a/1] +as_rr: True +rr_name: www.example.com +address: 192.0.2.80 +[ns] +as_rr: True +[a/2] +as_rr: True +rr_name: ns.example.com diff --git a/src/lib/dns/tests/testdata/message_toText1.txt b/src/lib/dns/tests/testdata/message_toText1.txt new file mode 100644 index 0000000..58c7239 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText1.txt @@ -0,0 +1,14 @@ +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29174 +;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 + +;; QUESTION SECTION: +;www.example.com. IN A + +;; ANSWER SECTION: +www.example.com. 86400 IN A 192.0.2.80 + +;; AUTHORITY SECTION: +example.com. 86400 IN NS ns.example.com. + +;; ADDITIONAL SECTION: +ns.example.com. 86400 IN A 192.0.2.1 diff --git a/src/lib/dns/tests/testdata/message_toText1.wire b/src/lib/dns/tests/testdata/message_toText1.wire new file mode 100644 index 0000000..2a959bd --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText1.wire @@ -0,0 +1,28 @@ +### +### This data file was auto-generated from message_toText1.spec +### + +# Header Section +# ID=29174 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA +71f6 8400 +# QDCNT=1, ANCNT=1, NSCNT=1, ARCNT=1 +0001 0001 0001 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# A RR (QNAME=www.example.com Class=IN(1) TTL=86400, RDLEN=4) +03777777076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.80 +c0000250 + +# NS RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=16) +076578616d706c6503636f6d00 0002 0001 00015180 0010 +# NS name=ns.example.com +026e73076578616d706c6503636f6d00 + +# A RR (QNAME=ns.example.com Class=IN(1) TTL=86400, RDLEN=4) +026e73076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.1 +c0000201 diff --git a/src/lib/dns/tests/testdata/message_toText2.spec b/src/lib/dns/tests/testdata/message_toText2.spec new file mode 100644 index 0000000..978aab3 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText2.spec @@ -0,0 +1,14 @@ +# +# A standard DNS message with EDNS (taken from an invocation of dig) +# + +[custom] +sections: header:question:edns +[header] +id: 45981 +qr: 1 +rcode: refused +arcount: 1 +[question] +[edns] +do: 1 diff --git a/src/lib/dns/tests/testdata/message_toText2.txt b/src/lib/dns/tests/testdata/message_toText2.txt new file mode 100644 index 0000000..42cc2c1 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText2.txt @@ -0,0 +1,8 @@ +;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 45981 +;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags: do; udp: 4096 + +;; QUESTION SECTION: +;example.com. IN A diff --git a/src/lib/dns/tests/testdata/message_toText2.wire b/src/lib/dns/tests/testdata/message_toText2.wire new file mode 100644 index 0000000..1047b63 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText2.wire @@ -0,0 +1,19 @@ +### +### This data file was auto-generated from message_toText2.spec +### + +# Header Section +# ID=45981 QR=Response Opcode=QUERY(0) Rcode=REFUSED(5) +b39d 8005 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=example.com. QTYPE=A(1) QCLASS=IN(1) +076578616d706c6503636f6d00 0001 0001 + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=0 Version=0 DO=1 +00 0029 1000 0000 8000 +# RDLEN=0 +0000 diff --git a/src/lib/dns/tests/testdata/message_toText3.spec b/src/lib/dns/tests/testdata/message_toText3.spec new file mode 100644 index 0000000..a74ea1b --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText3.spec @@ -0,0 +1,31 @@ +# +# A standard DNS message with TSIG (taken from an invocation of dig) +# + +[custom] +sections: header:question:a/1:ns:a/2:tsig +[header] +id: 10140 +qr: 1 +aa: 1 +ancount: 1 +nscount: 1 +arcount: 2 +[question] +name: www.example.com +[a/1] +as_rr: True +rr_name: www.example.com +address: 192.0.2.80 +[ns] +as_rr: True +[a/2] +as_rr: True +rr_name: ns.example.com +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 1304384318 +original_id: 10140 +mac: 0x5257c80396f2fa95b20c77ae9a652fb2 diff --git a/src/lib/dns/tests/testdata/message_toText3.txt b/src/lib/dns/tests/testdata/message_toText3.txt new file mode 100644 index 0000000..359b9c5 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText3.txt @@ -0,0 +1,17 @@ +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10140 +;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 + +;; QUESTION SECTION: +;www.example.com. IN A + +;; ANSWER SECTION: +www.example.com. 86400 IN A 192.0.2.80 + +;; AUTHORITY SECTION: +example.com. 86400 IN NS ns.example.com. + +;; ADDITIONAL SECTION: +ns.example.com. 86400 IN A 192.0.2.1 + +;; TSIG PSEUDOSECTION: +www.example.com. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1304384318 300 16 UlfIA5by+pWyDHeummUvsg== 10140 NOERROR 0 diff --git a/src/lib/dns/tests/testdata/message_toText3.wire b/src/lib/dns/tests/testdata/message_toText3.wire new file mode 100644 index 0000000..eb3632b --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toText3.wire @@ -0,0 +1,39 @@ +### +### This data file was auto-generated from message_toText3.spec +### + +# Header Section +# ID=10140 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA +279c 8400 +# QDCNT=1, ANCNT=1, NSCNT=1, ARCNT=2 +0001 0001 0001 0002 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# A RR (QNAME=www.example.com Class=IN(1) TTL=86400, RDLEN=4) +03777777076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.80 +c0000250 + +# NS RR (QNAME=example.com Class=IN(1) TTL=86400, RDLEN=16) +076578616d706c6503636f6d00 0002 0001 00015180 0010 +# NS name=ns.example.com +026e73076578616d706c6503636f6d00 + +# A RR (QNAME=ns.example.com Class=IN(1) TTL=86400, RDLEN=4) +026e73076578616d706c6503636f6d00 0001 0001 00015180 0004 +# Address=192.0.2.1 +c0000201 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1304384318 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004dbf533e 012c +# MAC Size=16 MAC=(see hex) +0010 5257c80396f2fa95b20c77ae9a652fb2 +# Original-ID=10140 Error=0 +279c 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_toWire1 b/src/lib/dns/tests/testdata/message_toWire1 new file mode 100644 index 0000000..daeb85a --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire1 @@ -0,0 +1,22 @@ +# +# A simple DNS query message +# ID = 0x1035 +# QR=1 (response), Opcode=0, AA=1, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=2, other COUNTS=0 +# Question: test.example.com. IN A +# Answer: +# test.example.com. 3600 IN A 192.0.2.1 +# test.example.com. 7200 IN A 192.0.2.2 +# +1035 8500 +0001 0002 0000 0000 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# same name, fully compressed +c0 0c +# TTL=3600, A, IN, RDLENGTH=4, RDATA +0001 0001 00000e10 0004 c0 00 02 01 +# mostly same, with the slight difference in RDATA +c0 0c +0001 0001 00000e10 0004 c0 00 02 02 diff --git a/src/lib/dns/tests/testdata/message_toWire2.spec b/src/lib/dns/tests/testdata/message_toWire2.spec new file mode 100644 index 0000000..d256052 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire2.spec @@ -0,0 +1,21 @@ +# +# A simple DNS query message with TSIG signed +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/message_toWire2.wire b/src/lib/dns/tests/testdata/message_toWire2.wire new file mode 100644 index 0000000..a495253 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire2.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from message_toWire2.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_toWire3.spec b/src/lib/dns/tests/testdata/message_toWire3.spec new file mode 100644 index 0000000..c8e9453 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire3.spec @@ -0,0 +1,22 @@ +# +# A simple DNS query message with EDNS and TSIG +# + +[custom] +sections: header:question:edns:tsig +[header] +id: 0x06cd +rd: 1 +arcount: 2 +[question] +name: www.example.com +[edns] +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4db60d1f +mac_size: 16 +mac: 0x93444053881c83d7eb120e86f25b369e +original_id: 0x06cd diff --git a/src/lib/dns/tests/testdata/message_toWire3.wire b/src/lib/dns/tests/testdata/message_toWire3.wire new file mode 100644 index 0000000..46808b9 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire3.wire @@ -0,0 +1,30 @@ +### +### This data file was auto-generated from message_toWire3.spec +### + +# Header Section +# ID=1741 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +06cd 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=2 +0001 0000 0000 0002 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# EDNS OPT RR +# NAME=. TYPE=OPT(41) UDPSize=4096 ExtRcode=0 Version=0 DO=0 +00 0029 1000 0000 0000 +# RDLEN=0 +0000 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1303776543 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004db60d1f 012c +# MAC Size=16 MAC=(see hex) +0010 93444053881c83d7eb120e86f25b369e +# Original-ID=1741 Error=0 +06cd 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_toWire4.spec b/src/lib/dns/tests/testdata/message_toWire4.spec new file mode 100644 index 0000000..aab7e10 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire4.spec @@ -0,0 +1,27 @@ +# +# Truncated DNS response with TSIG signed +# This is expected to be a response to "fromWire17" +# + +[custom] +sections: header:question:tsig +[header] +id: 0x22c2 +rd: 1 +qr: 1 +aa: 1 +# It's "truncated": +tc: 1 +arcount: 1 +[question] +name: www.example.com +rrtype: TXT +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4e179212 +mac_size: 16 +mac: 0x88adc3811d1d6bec7c684438906fc694 +original_id: 0x22c2 diff --git a/src/lib/dns/tests/testdata/message_toWire4.wire b/src/lib/dns/tests/testdata/message_toWire4.wire new file mode 100644 index 0000000..d2cda30 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire4.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from message_toWire4.spec +### + +# Header Section +# ID=8898 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA TC RD +22c2 8700 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=TXT(16) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0010 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1310167570 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004e179212 012c +# MAC Size=16 MAC=(see hex) +0010 88adc3811d1d6bec7c684438906fc694 +# Original-ID=8898 Error=0 +22c2 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_toWire5.spec b/src/lib/dns/tests/testdata/message_toWire5.spec new file mode 100644 index 0000000..e316833 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire5.spec @@ -0,0 +1,36 @@ +# +# A longest possible (without EDNS) DNS response with TSIG, i.e. total +# length should be 512 bytes. +# + +[custom] +sections: header:question:txt/1:txt/2:tsig +[header] +id: 0xd6e2 +rd: 1 +qr: 1 +aa: 1 +ancount: 2 +arcount: 1 +[question] +name: www.example.com +rrtype: TXT +[txt/1] +as_rr: True +# QNAME is fully compressed +rr_name: ptr=12 +string: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde +[txt/2] +as_rr: True +# QNAME is fully compressed +rr_name: ptr=12 +string: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0 +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4e17b38d +mac_size: 16 +mac: 0xbe2ba477373d2496891e2fda240ee4ec +original_id: 0xd6e2 diff --git a/src/lib/dns/tests/testdata/message_toWire5.wire b/src/lib/dns/tests/testdata/message_toWire5.wire new file mode 100644 index 0000000..ef7ee6e --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire5.wire @@ -0,0 +1,34 @@ +### +### This data file was auto-generated from message_toWire5.spec +### + +# Header Section +# ID=55010 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA RD +d6e2 8500 +# QDCNT=1, ANCNT=2, NSCNT=0, ARCNT=1 +0001 0002 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=TXT(16) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0010 0001 + +# TXT RR (QNAME=ptr=12 Class=IN(1) TTL=86400, RDLEN=256) +c00c 0010 0001 00015180 0100 +# String Len=255, String="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde" +ff 303132333435363738396162636465663031323334353637383961626364656630313233343536373839616263646566303132333435363738396162636465663031323334353637383961626364656630313233343536373839616263646566303132333435363738396162636465663031323334353637383961626364656630313233343536373839616263646566303132333435363738396162636465663031323334353637383961626364656630313233343536373839616263646566303132333435363738396162636465663031323334353637383961626364656630313233343536373839616263646566303132333435363738396162636465 + +# TXT RR (QNAME=ptr=12 Class=IN(1) TTL=86400, RDLEN=114) +c00c 0010 0001 00015180 0072 +# String Len=113, String="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0" +71 3031323334353637383961626364656630313233343536373839616263646566303132333435363738396162636465663031323334353637383961626364656630313233343536373839616263646566303132333435363738396162636465663031323334353637383961626364656630 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1310176141 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004e17b38d 012c +# MAC Size=16 MAC=(see hex) +0010 be2ba477373d2496891e2fda240ee4ec +# Original-ID=55010 Error=0 +d6e2 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/message_toWire6 b/src/lib/dns/tests/testdata/message_toWire6 new file mode 100644 index 0000000..996c99c --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire6 @@ -0,0 +1,48 @@ +# +# A simple DNS query message (with a signed response) +# ID = 0x75c1 +# QR=1 (response), Opcode=0, AA=1, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=4, other COUNTS=0 +# Question: test.example.com. IN A +# Answer: +# test.example.com. 3600 IN A 192.0.2.1 +# test.example.com. 7200 IN A 192.0.2.2 +# +75c1 8500 +0001 0004 0000 0000 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0001 0001 +# same name, fully compressed +c0 0c +# TTL=3600, A, IN, RDLENGTH=4, RDATA +0001 0001 00000e10 0004 c0 00 02 01 +# mostly same, with the slight difference in RDATA +c0 0c +0001 0001 00000e10 0004 c0 00 02 02 + +# signature 1 + +# same name +c0 0c +# RRSIG, IN, TTL=3600, RDLENGTH=0x28 TYPE_COV=A ALGO=5 (RSA/SHA-1) LABELS=3 ORIG_TTL=3600 +002e 0001 00000e10 0028 0001 05 03 00000e10 +# SIG_EXPIRY=20000101000000 SIG_INCEP=20000201000000 KEY_ID=12345 +386d4380 38962200 3039 +#(7) e x a m p l e (3) c o m . + 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# FAKEFAKEFAKE +14 02 84 14 02 84 14 02 84 + +# signature 2 + +# same name +c0 0c +# RRSIG, IN, TTL=3600, RDLENGTH=0x28 TYPE_COV=A ALGO=3 (DSA/SHA-1) LABELS=3 ORIG_TTL=3600 +002e 0001 00000e10 0028 0001 03 03 00000e10 +# SIG_EXPIRY=20000101000000 SIG_INCEP=20000201000000 KEY_ID=12345 +386d4380 38962200 3039 +#(7) e x a m p l e (3) c o m . + 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# FAKEFAKEFAKE +14 02 84 14 02 84 14 02 84 diff --git a/src/lib/dns/tests/testdata/message_toWire7 b/src/lib/dns/tests/testdata/message_toWire7 new file mode 100644 index 0000000..ba22634 --- /dev/null +++ b/src/lib/dns/tests/testdata/message_toWire7 @@ -0,0 +1,35 @@ +# +# A simple DNS query message (with a signed response) +# ID = 0x75c1 +# QR=1 (response), Opcode=0, AA=1, RD=1 (other fields are 0) +# QDCOUNT=1, ANCOUNT=1, ADCOUNT=0 +# Question: test.example.com. IN TXT +# Answer: +# test.example.com. 3600 IN TXT aaaaa... +# +75c1 8700 +0001 0001 0000 0000 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +0010 0001 +# same name, fully compressed +c0 0c +# TTL=3600, TXT, IN, RDLENGTH=256, RDATA +0010 0001 00000e10 0100 ff +# 'a' repeated 255 times +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 diff --git a/src/lib/dns/tests/testdata/name_fromWire1 b/src/lib/dns/tests/testdata/name_fromWire1 new file mode 100644 index 0000000..42fc61d --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire1 @@ -0,0 +1,14 @@ +# +# a global14 compression pointer +# +000a85800001000300000003 +# V i x c o m +0356697803636f6d0000020001c00c00 +02000100000e10000b05697372763102 +7061c00cc00c0002000100000e100009 +066e732d657874c00cc00c0002000100 +000e10000e036e733104676e61630363 +6f6d00c0250001000100000e100004cc +98b886c03c0001000100000e100004cc +98b840c051000100010002a14a0004c6 +97f8f6 diff --git a/src/lib/dns/tests/testdata/name_fromWire10 b/src/lib/dns/tests/testdata/name_fromWire10 new file mode 100644 index 0000000..65be775 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire10 @@ -0,0 +1,12 @@ +# +# Too large name; should trigger an exception. +# +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 040102030400 diff --git a/src/lib/dns/tests/testdata/name_fromWire11 b/src/lib/dns/tests/testdata/name_fromWire11 new file mode 100644 index 0000000..32184f6 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire11 @@ -0,0 +1,12 @@ +# +# A name with possible maximum number of labels; should be accepted safely. +# +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 01000100010001000100 01000100010001000100 +01000100010001000100 0100010000 diff --git a/src/lib/dns/tests/testdata/name_fromWire12 b/src/lib/dns/tests/testdata/name_fromWire12 new file mode 100644 index 0000000..073adda --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire12 @@ -0,0 +1,13 @@ +# +# Wire format including an invalid label length +# +#(1) a (7) e x a m p l e + 01 61 07 65 78 61 6d 70 6c 65 +# invalid label length: 64 +40 +# a "label" of 64 characters: shouldn't be parsed +00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f +10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f +20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f +30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f +00 diff --git a/src/lib/dns/tests/testdata/name_fromWire13 b/src/lib/dns/tests/testdata/name_fromWire13 new file mode 100644 index 0000000..447f54b --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire13 @@ -0,0 +1,5 @@ +# +# A name including all "printable" characters +# + +3f2122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f1f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e00 diff --git a/src/lib/dns/tests/testdata/name_fromWire14 b/src/lib/dns/tests/testdata/name_fromWire14 new file mode 100644 index 0000000..3123aec --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire14 @@ -0,0 +1,7 @@ +# +# A name including all "non-printable" characters +# + +3f000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f207f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c +3f9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadb +24dcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff00 diff --git a/src/lib/dns/tests/testdata/name_fromWire2 b/src/lib/dns/tests/testdata/name_fromWire2 new file mode 100644 index 0000000..0758a68 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire2 @@ -0,0 +1,15 @@ +# +# bogus label character (looks like a local compression pointer) +# +000a85800001000300000003 +#this is the bogus label character: +83 +76697803636f6d0000020001c00c00 +02000100000e10000b05697372763102 +7061c00cc00c0002000100000e100009 +066e732d657874c00cc00c0002000100 +000e10000e036e733104676e61630363 +6f6d00c0250001000100000e100004cc +98b886c03c0001000100000e100004cc +98b840c051000100010002a14a0004c6 +97f8f6 diff --git a/src/lib/dns/tests/testdata/name_fromWire3_1 b/src/lib/dns/tests/testdata/name_fromWire3_1 new file mode 100644 index 0000000..e38efcc --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire3_1 @@ -0,0 +1,11 @@ +# +# a bad compression pointer starting with the bits 1111 (too big pointer) +# +000a85800001000300000003 +03766978 03636f6d 00 0002 0001 +f00c 0002 0001 0000 0e10 000b 056973727631 027061 c00c +c00c 0002 0001 0000 0e10 0009 066e732d657874 c00c +c00c 0002 0001 0000 0e10 000e 036e7331 04676e6163 03636f6d 00 +c025 0001 0001 0000 0e10 0004 cc98b886 +c03c 0001 0001 0000 0e10 0004 cc98b840 +c051 0001 0001 0002 a14a 0004 c697f8f6 diff --git a/src/lib/dns/tests/testdata/name_fromWire3_2 b/src/lib/dns/tests/testdata/name_fromWire3_2 new file mode 100644 index 0000000..c377bb1 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire3_2 @@ -0,0 +1,13 @@ +# +# a bad compression pointer due to forward reference of 0x30 to +# another compression pointer with a valid backreference +# +000a85800001000300000003 +03766978 03636f6d 00 0002 0001 +#'30' is the forward reference, 'c00c' at the end is the valid pointer: +c030 0002 0001 0000 0e10 000b 056973727631 027061 c00c +c00c 0002 0001 0000 0e10 0009 066e732d657874 c00c +c00c 0002 0001 0000 0e10 000e 036e7331 04676e6163 03636f6d 00 +c025 0001 0001 0000 0e10 0004 cc98b886 +c03c 0001 0001 0000 0e10 0004 cc98b840 +c051 0001 0001 0002 a14a 0004 c697f8f6 diff --git a/src/lib/dns/tests/testdata/name_fromWire4 b/src/lib/dns/tests/testdata/name_fromWire4 new file mode 100644 index 0000000..dba6035 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire4 @@ -0,0 +1,45 @@ +# +# invalid name length, pointer at offset 0x0226 points to +# long name at offset 0x25 +# +000a 8580 0001 0003 0000 0001 +03 766978 03 636f6d 00 0002 0001 +c00c 0002 0001 00000e10 +0101 +# long name starts here +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a +03616263 0358595a 03616263 0358595a +03414243 0378797a 03414243 0378797a 00 +# compression pointer start here and refers back to long name +c023 0002 0001 00000e10 0009 066e732d657874 c00c +c00c 0002 0001 00000e10 000e 036e733104676e616303636f6d00 +c025 0001 0001 00000e10 0004 cc98b886 diff --git a/src/lib/dns/tests/testdata/name_fromWire6 b/src/lib/dns/tests/testdata/name_fromWire6 new file mode 100644 index 0000000..fa1abe6 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire6 @@ -0,0 +1,14 @@ +# +# a bad pointer +# +000a85800001000300000003 +# the bad pointer is f00c (offset = 300c) which is too large +0376697803636f6d0000020001 f00c 00 +02000100000e10000b05697372763102 +7061c00cc00c0002000100000e100009 +066e732d657874c00cc00c0002000100 +000e10000e036e733104676e61630363 +6f6d00c0250001000100000e100004cc +98b886c03c0001000100000e100004cc +98b840c051000100010002a14a0004c6 +97f8f6 diff --git a/src/lib/dns/tests/testdata/name_fromWire7 b/src/lib/dns/tests/testdata/name_fromWire7 new file mode 100644 index 0000000..2dedd4a --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire7 @@ -0,0 +1,6 @@ +# +# input ends unexpectedly +# +000a85800001000300000003 +# parser will start at the ending 'c0', which is an incomplete sequence. +0376697803636f6d0000020001 c0 diff --git a/src/lib/dns/tests/testdata/name_fromWire8 b/src/lib/dns/tests/testdata/name_fromWire8 new file mode 100644 index 0000000..575563d --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire8 @@ -0,0 +1,27 @@ +# +# many hops of compression. absolutely many, but should be decompressed. +# +000a85800001000300000013 +03 766978 03 636f6d 00 0002 0001 +c00c 0002 0001 00000e10 000b 056973727631027061 c00c +c019 0002 0001 00000e10 0009 066e732d657874 c00c +c030 0002 0001 00000e10 000e 036e7331 04676e6163 03636f6d 00 +c045 0001 0001 00000e10 0004 cc98b886 +c05f 0001 0001 00000e10 0004 cc98b840 +c06f 0001 0001 0002a14a 0004 c697f8f6 +c07f 0001 0001 0002a14a 0004 c697f8f6 +c08f 0001 0001 0002a14a 0004 c697f8f6 +c09f 0001 0001 0002a14a 0004 c697f8f6 +c0af 0001 0001 0002a14a 0004 c697f8f6 +c0bf 0001 0001 0002a14a 0004 c697f8f6 +c0cf 0001 0001 0002a14a 0004 c697f8f6 +c0df 0001 0001 0002a14a 0004 c697f8f6 +c0ef 0001 0001 0002a14a 0004 c697f8f6 +c0ff 0001 0001 0002a14a 0004 c697f8f6 +c10f 0001 0001 0002a14a 0004 c697f8f6 +c11f 0001 0001 0002a14a 0004 c697f8f6 +c12f 0001 0001 0002a14a 0004 c697f8f6 +c13f 0001 0001 0002a14a 0004 c697f8f6 +c14f 0001 0001 0002a14a 0004 c697f8f6 +c15f 0001 0001 0002a14a 0004 c697f8f6 +c16f 0001 0001 0002a14a 0004 c697f8f6 diff --git a/src/lib/dns/tests/testdata/name_fromWire9 b/src/lib/dns/tests/testdata/name_fromWire9 new file mode 100644 index 0000000..79b2978 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_fromWire9 @@ -0,0 +1,12 @@ +# +# A possible longest name; should be accepted safely. +# +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 09010203040506070809 09010203040506070809 +09010203040506070809 0301020300 diff --git a/src/lib/dns/tests/testdata/name_toWire1 b/src/lib/dns/tests/testdata/name_toWire1 new file mode 100644 index 0000000..c06ec4b --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire1 @@ -0,0 +1,12 @@ +# +# Rendering 3 names with compression. [x] means a compression pointer pointing +# to offset 'x'. +# +#bytes: +# 0 1 2 3 4 5 6 7 8 9 a b c d e +#(1)a(7)e x a m p l e(3)c o m . + 0161076578616d706c6503636f6d00 +#(1)b [2] + 0162c002 +# a . e x a m p l e . o r g . + 0161076578616d706c65036f726700 diff --git a/src/lib/dns/tests/testdata/name_toWire2 b/src/lib/dns/tests/testdata/name_toWire2 new file mode 100644 index 0000000..2377121 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire2 @@ -0,0 +1,14 @@ +# +# Rendering names in a large buffer. [x] means a compression pointer pointing +# to offset 'x'. +# +#bytes: +#3f 40 +#ff 00 +#(1) a (7) e x a m p l e (3) c o m . + 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +#[3fff] = a.example.com: can be compressed + ffff +#(1) b(7) e x a m p l e (3) c o m .; cannot compress as the pointer +# (0x4001) would exceed 0x4000 + 01 62 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 diff --git a/src/lib/dns/tests/testdata/name_toWire3 b/src/lib/dns/tests/testdata/name_toWire3 new file mode 100644 index 0000000..08c1474 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire3 @@ -0,0 +1,14 @@ +# +# Rendering names including one explicitly uncompressed. +# [x] means a compression pointer pointing to offset 'x'. +# +# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (bytes) +#(1) a (7) e x a m p l e (3) c o m . + 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 + +#15 29 (bytes) +#(1) b (7) e x a m p l e (3) c o m .; specified to be not compressed, +# but can be pointed to from others + 01 62 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +#[0f] referring to the second (uncompressed name) + c0 0f diff --git a/src/lib/dns/tests/testdata/name_toWire4 b/src/lib/dns/tests/testdata/name_toWire4 new file mode 100644 index 0000000..740d718 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire4 @@ -0,0 +1,16 @@ +# +# Rendering 3 names with compression, including one resulting in a chain of +# pointers (the last one). +# legend: [x] means a compression pointer pointing to offset 'x'. +#bytes: +#00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e +#(1) a (7) e x a m p l e (3) c o m . + 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 + +#0f 10 11 12 +#(1) b [2] (b.example.com.) + 01 62 c0 02 + +#13 14 +# [0f]: (b.example.com.) + c0 0f diff --git a/src/lib/dns/tests/testdata/name_toWire5.spec b/src/lib/dns/tests/testdata/name_toWire5.spec new file mode 100644 index 0000000..87e140d --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire5.spec @@ -0,0 +1,19 @@ +# +# A sequence of names that would be compressed case-sensitive manner. +# First name: "a.example.com" +# Second name: "b.eXample.com". Due to case-sensitive comparison only "com" +# can be compressed. +# Third name: "c.eXample.com". "eXample.com" part matches that of the second +# name and can be compressed. +# + +[custom] +sections: name/1:name/2:name/3 +[name/1] +name: a.example.com +[name/2] +name: b.eXample +pointer: 10 +[name/3] +name: c +pointer: 17 diff --git a/src/lib/dns/tests/testdata/name_toWire5.wire b/src/lib/dns/tests/testdata/name_toWire5.wire new file mode 100644 index 0000000..c6e62ed --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire5.wire @@ -0,0 +1,12 @@ +### +### This data file was auto-generated from name_toWire5.spec +### + +# DNS Name: a.example.com +0161076578616d706c6503636f6d00 + +# DNS Name: b.eXample + compression pointer: 10 +0162076558616d706c65c00a + +# DNS Name: c + compression pointer: 17 +0163c011 diff --git a/src/lib/dns/tests/testdata/name_toWire6.spec b/src/lib/dns/tests/testdata/name_toWire6.spec new file mode 100644 index 0000000..a536f5d --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire6.spec @@ -0,0 +1,19 @@ +# +# A sequence of names that would be compressed both case-sensitive and +# case-insensitive manner (unusual, but allowed). +# First and second name: see name_toWire5.spec. +# Third name: "c.b.EXAMPLE.com". This is rendered with case-insensitive +# compression, so "b.EXAMPLE.com" part of the name matches that of the +# second name. +# + +[custom] +sections: name/1:name/2:name/3 +[name/1] +name: a.example.com +[name/2] +name: b.eXample +pointer: 10 +[name/3] +name: c +pointer: 15 diff --git a/src/lib/dns/tests/testdata/name_toWire6.wire b/src/lib/dns/tests/testdata/name_toWire6.wire new file mode 100644 index 0000000..dcaa39f --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire6.wire @@ -0,0 +1,12 @@ +### +### This data file was auto-generated from name_toWire6.spec +### + +# DNS Name: a.example.com +0161076578616d706c6503636f6d00 + +# DNS Name: b.eXample + compression pointer: 10 +0162076558616d706c65c00a + +# DNS Name: c + compression pointer: 15 +0163c00f diff --git a/src/lib/dns/tests/testdata/name_toWire7 b/src/lib/dns/tests/testdata/name_toWire7 new file mode 100644 index 0000000..bff599f --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire7 @@ -0,0 +1,10 @@ +# +# Rendering names including one explicitly uncompressed. +# [x] means a compression pointer pointing to offset 'x'. +# +# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (bytes) +#(1) a (7) e x a m p l e (3) c o m . + 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 + +#[02] pointing to -> "example.com." + c0 02 diff --git a/src/lib/dns/tests/testdata/name_toWire8 b/src/lib/dns/tests/testdata/name_toWire8 new file mode 100644 index 0000000..d01093b --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire8 @@ -0,0 +1,7 @@ +# +# Rendering names. +# [x] means a compression pointer pointing to offset 'x'. +# +# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 (bytes) +#(1) a (7) e x a m p l e (3) c o m + 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d diff --git a/src/lib/dns/tests/testdata/name_toWire9 b/src/lib/dns/tests/testdata/name_toWire9 new file mode 100644 index 0000000..51a1987 --- /dev/null +++ b/src/lib/dns/tests/testdata/name_toWire9 @@ -0,0 +1,13 @@ +# +# Rendering names including one explicitly uncompressed. +# [x] means a compression pointer pointing to offset 'x'. +# +# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 (bytes) +#(1) a (7) e x a m p l e (3) c o m . + 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +#(1) a (7) e x a m p l e (3) c o m + 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d +#(1) a (7) e x a m p l e + 01 61 07 65 78 61 6d 70 6c 65 +#[1f] pointing to ^^ "example" + c0 1f diff --git a/src/lib/dns/tests/testdata/omitcheck.txt b/src/lib/dns/tests/testdata/omitcheck.txt new file mode 100644 index 0000000..580cab4 --- /dev/null +++ b/src/lib/dns/tests/testdata/omitcheck.txt @@ -0,0 +1 @@ + 1H IN A 192.0.2.1 diff --git a/src/lib/dns/tests/testdata/origincheck.txt b/src/lib/dns/tests/testdata/origincheck.txt new file mode 100644 index 0000000..c370ed2 --- /dev/null +++ b/src/lib/dns/tests/testdata/origincheck.txt @@ -0,0 +1,5 @@ +; We change the origin here. We want to check it is not propagated +; outside of the included file. +$ORIGIN www.example.org. + +@ 1H IN A 192.0.2.1 diff --git a/src/lib/dns/tests/testdata/question_fromWire b/src/lib/dns/tests/testdata/question_fromWire new file mode 100644 index 0000000..cbc28c0 --- /dev/null +++ b/src/lib/dns/tests/testdata/question_fromWire @@ -0,0 +1,33 @@ +# +# Wire-format data of a sequence of DNS questions. +# foo.example.com. IN NS +# bar.example.com. CH A (owner name is compressed) +# and some pathological cases +# +# 0 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 (-th byte) +#(3) f o o (7) e x a m p l e (3) c o m . + 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +#7 8 9 20 +# type/class: NS = 2, IN = 1 +00 02 00 01 + +# 1 2 3 4 5 6 +#(3) b a r [ptr=0x04] + 03 62 61 72 c0 04 +#7 8 9 30 +# type/class: A = 1, CH = 3 +00 01 00 03 + +# owner name is broken +#1 +# invalid label type +ff +#2 3 4 5 +#type/class IN/A +00 01 00 01 + +# short buffer +# (root name) +00 +#class is missing +00 01 diff --git a/src/lib/dns/tests/testdata/question_toWire1 b/src/lib/dns/tests/testdata/question_toWire1 new file mode 100644 index 0000000..77886db --- /dev/null +++ b/src/lib/dns/tests/testdata/question_toWire1 @@ -0,0 +1,14 @@ +# +# Rendering two DNS Questions without name compression +# foo.example.com. IN NS +# bar.example.com. CH A +# +#(3) f o o (7) e x a m p l e (3) c o m . + 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# type/class: NS = 2, IN = 1 +00 02 00 01 +#(3) b a r (7) e x a m p l e (3) c o m . + 03 62 61 72 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +#7 8 9 30 +# type/class: A = 1, CH = 3 +00 01 00 03 diff --git a/src/lib/dns/tests/testdata/question_toWire2 b/src/lib/dns/tests/testdata/question_toWire2 new file mode 100644 index 0000000..9117ab2 --- /dev/null +++ b/src/lib/dns/tests/testdata/question_toWire2 @@ -0,0 +1,14 @@ +# +# Rendering two DNS Questions with name compression +# foo.example.com. IN NS +# bar.example.com. CH A +# +# 0 1 2 3 4 ... (-th byte) +#(3) f o o (7) e x a m p l e (3) c o m . + 03 66 6f 6f 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# type/class: NS = 2, IN = 1 +00 02 00 01 +#(3) b a r [ptr=0x04] + 03 62 61 72 c0 04 +# type/class: A = 1, CH = 3 +00 01 00 03 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire1.spec new file mode 100644 index 0000000..f831313 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire1.spec @@ -0,0 +1,3 @@ +[custom] +sections: afsdb +[afsdb] diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire1.wire b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire1.wire new file mode 100644 index 0000000..b32776b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_afsdb_fromWire1.spec +### + +# AFSDB RDATA, RDLEN=21 +0015 +# SUBTYPE=1 SERVER=afsdb.example.com +0001 056166736462076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire2.spec new file mode 100644 index 0000000..f33e768 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire2.spec @@ -0,0 +1,6 @@ +[custom] +sections: name:afsdb +[name] +name: example.com +[afsdb] +server: afsdb.ptr=0 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire2.wire new file mode 100644 index 0000000..fdc53c5 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire2.wire @@ -0,0 +1,11 @@ +### +### This data file was auto-generated from rdata_afsdb_fromWire2.spec +### + +# DNS Name: example.com +076578616d706c6503636f6d00 + +# AFSDB RDATA, RDLEN=10 +000a +# SUBTYPE=1 SERVER=afsdb.ptr=0 +0001 056166736462c000 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire3.spec new file mode 100644 index 0000000..993032f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire3.spec @@ -0,0 +1,4 @@ +[custom] +sections: afsdb +[afsdb] +rdlen: 3 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire3.wire new file mode 100644 index 0000000..7ea4342 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire3.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_afsdb_fromWire3.spec +### + +# AFSDB RDATA, RDLEN=3 +0003 +# SUBTYPE=1 SERVER=afsdb.example.com +0001 056166736462076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire4.spec new file mode 100644 index 0000000..37abf13 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire4.spec @@ -0,0 +1,4 @@ +[custom] +sections: afsdb +[afsdb] +rdlen: 80 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire4.wire new file mode 100644 index 0000000..79ff6c2 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire4.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_afsdb_fromWire4.spec +### + +# AFSDB RDATA, RDLEN=80 +0050 +# SUBTYPE=1 SERVER=afsdb.example.com +0001 056166736462076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire5.spec new file mode 100644 index 0000000..0ea79dd --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire5.spec @@ -0,0 +1,4 @@ +[custom] +sections: afsdb +[afsdb] +server: "01234567890123456789012345678901234567890123456789012345678901234" diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire5.wire new file mode 100644 index 0000000..13eb016 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_fromWire5.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_afsdb_fromWire5.spec +### + +# AFSDB RDATA, RDLEN=71 +0047 +# SUBTYPE=1 SERVER="01234567890123456789012345678901234567890123456789012345678901234" +0001 432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_toWire1.spec b/src/lib/dns/tests/testdata/rdata_afsdb_toWire1.spec new file mode 100644 index 0000000..1946458 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_toWire1.spec @@ -0,0 +1,4 @@ +[custom] +sections: afsdb +[afsdb] +rdlen: -1 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_toWire1.wire b/src/lib/dns/tests/testdata/rdata_afsdb_toWire1.wire new file mode 100644 index 0000000..7746fa6 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_toWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_afsdb_toWire1.spec +### + +# AFSDB RDATA + +# SUBTYPE=1 SERVER=afsdb.example.com +0001 056166736462076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_toWire2.spec b/src/lib/dns/tests/testdata/rdata_afsdb_toWire2.spec new file mode 100644 index 0000000..c80011a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_toWire2.spec @@ -0,0 +1,8 @@ +[custom] +sections: name:afsdb +[name] +name: example.com. +[afsdb] +subtype: 0 +server: root.example.com +rdlen: -1 diff --git a/src/lib/dns/tests/testdata/rdata_afsdb_toWire2.wire b/src/lib/dns/tests/testdata/rdata_afsdb_toWire2.wire new file mode 100644 index 0000000..7f01512 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_afsdb_toWire2.wire @@ -0,0 +1,11 @@ +### +### This data file was auto-generated from rdata_afsdb_toWire2.spec +### + +# DNS Name: example.com. +076578616d706c6503636f6d00 + +# AFSDB RDATA + +# SUBTYPE=0 SERVER=root.example.com +0000 04726f6f74076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_caa_fromWire1.spec new file mode 100644 index 0000000..d21987c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire1.spec @@ -0,0 +1,6 @@ +# +# The simplest form of CAA: all default parameters +# +[custom] +sections: caa +[caa] diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire1.wire b/src/lib/dns/tests/testdata/rdata_caa_fromWire1.wire new file mode 100644 index 0000000..780bd8d --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_caa_fromWire1.spec +### + +# CAA RDATA, RDLEN=21 +0015 +# FLAGS=0 TAG=issue VALUE=ca.example.net +00 05 697373756563612e6578616d706c652e6e6574 diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_caa_fromWire2.spec new file mode 100644 index 0000000..867e43d --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire2.spec @@ -0,0 +1,7 @@ +# +# Mixed case CAA tag field. +# +[custom] +sections: caa +[caa] +tag: 'ISSue' diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_caa_fromWire2.wire new file mode 100644 index 0000000..09ca24d --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire2.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_caa_fromWire2.spec +### + +# CAA RDATA, RDLEN=21 +0015 +# FLAGS=0 TAG=ISSue VALUE=ca.example.net +00 05 495353756563612e6578616d706c652e6e6574 diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_caa_fromWire3.spec new file mode 100644 index 0000000..9297151 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire3.spec @@ -0,0 +1,7 @@ +# +# Missing CAA value field. +# +[custom] +sections: caa +[caa] +value: '' diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_caa_fromWire3.wire new file mode 100644 index 0000000..16b5c43 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire3.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_caa_fromWire3.spec +### + +# CAA RDATA, RDLEN=7 +0007 +# FLAGS=0 TAG=issue VALUE= +00 05 6973737565 diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_caa_fromWire4.spec new file mode 100644 index 0000000..53e16b1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire4.spec @@ -0,0 +1,7 @@ +# +# Missing CAA value field. +# +[custom] +sections: caa +[caa] +tag: '' diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_caa_fromWire4.wire new file mode 100644 index 0000000..3225e60 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire4.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_caa_fromWire4.spec +### + +# CAA RDATA, RDLEN=16 +0010 +# FLAGS=0 TAG= VALUE=ca.example.net +00 00 63612e6578616d706c652e6e6574 diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire5 b/src/lib/dns/tests/testdata/rdata_caa_fromWire5 new file mode 100644 index 0000000..123011f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire5 @@ -0,0 +1,6 @@ +# Test where CAA value field is shorter than the RDATA length + +# CAA RDATA, RDLEN=32 +0020 +# FLAGS=0 TAG=c VALUE=ca.example.net +00 01 63 63612e6578616d706c652e6e6574 diff --git a/src/lib/dns/tests/testdata/rdata_caa_fromWire6 b/src/lib/dns/tests/testdata/rdata_caa_fromWire6 new file mode 100644 index 0000000..1a35a1a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_caa_fromWire6 @@ -0,0 +1,4 @@ +# Test where RDATA is completely missing + +# CAA RDATA, RDLEN=32 +0020 diff --git a/src/lib/dns/tests/testdata/rdata_cname_fromWire b/src/lib/dns/tests/testdata/rdata_cname_fromWire new file mode 100644 index 0000000..57eae13 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_cname_fromWire @@ -0,0 +1,44 @@ +# +# various kinds of CNAME RDATA stored in an input buffer +# +# Valid non-compressed RDATA for cn.example.com. +# RDLENGTH=16 bytes +# 0 1 + 00 10 +# 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7(bytes) +#(2) c n (7) e x a m p l e (3) c o m . + 02 63 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# short length +# 8 9 + 00 0f +#20 1 2 3 4 5 6 7 8 9 30 1 2 3 4 5 + 02 63 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# length too long +# 6 7 + 00 11 +# +# 8 9 40 1 2 3 4 5 6 7 8 9 50 1 2 3 4 + 02 63 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 +# +# Valid compressed CNAME name: 'cn2' + pointer +# 5 6 + 00 06 +# 7 8 9 60 1 2 +#(3) c n 2 ptr=5 + 03 63 6e 32 c0 05 +# +# Valid compressed CNAME name but RDLENGTH is incorrect: it must be the length +# of the sequence from the head to the pointer, not the decompressed name +# length. +# 3 4 + 00 11 +# 5 6 7 8 9 70 + 03 63 6e 32 c0 05 +# incomplete name (no trailing dot). this can be tested only at the end of +# the buffer. +# 1 2 + 00 0f +# 3 4 5 6 7 8 9 80 1 2 3 4 5 6 7 + 02 63 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d diff --git a/src/lib/dns/tests/testdata/rdata_dhcid_fromWire b/src/lib/dns/tests/testdata/rdata_dhcid_fromWire new file mode 100644 index 0000000..b28b5b3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_dhcid_fromWire @@ -0,0 +1,12 @@ +# +# DHCID RDATA stored in an input buffer +# +# Valid RDATA for 0LIg0LvQtdGB0YMg0YDQvtC00LjQu9Cw0YHRjCDRkdC70L7Rh9C60LA= +# +# RDLENGTH=41 bytes +# 0 1 + 00 29 +# 0LIg0LvQtdGB0YMg0YDQvtC00LjQu9Cw0YHRjCDRkdC70L7Rh9C60LA= +d0 b2 20 d0 bb d0 b5 d1 81 d1 83 20 d1 80 d0 be +d0 b4 d0 b8 d0 bb d0 b0 d1 81 d1 8c 20 d1 91 d0 +bb d0 be d1 87 d0 ba d0 b0 diff --git a/src/lib/dns/tests/testdata/rdata_dhcid_toWire b/src/lib/dns/tests/testdata/rdata_dhcid_toWire new file mode 100644 index 0000000..99ec229 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_dhcid_toWire @@ -0,0 +1,7 @@ +# +# DHCID RDATA stored in an output buffer +# +# 0LIg0LvQtdGB0YMg0YDQvtC00LjQu9Cw0YHRjCDRkdC70L7Rh9C60LA= +d0 b2 20 d0 bb d0 b5 d1 81 d1 83 20 d1 80 d0 be +d0 b4 d0 b8 d0 bb d0 b0 d1 81 d1 8c 20 d1 91 d0 +bb d0 be d1 87 d0 ba d0 b0 diff --git a/src/lib/dns/tests/testdata/rdata_dname_fromWire b/src/lib/dns/tests/testdata/rdata_dname_fromWire new file mode 100644 index 0000000..1c899bf --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_dname_fromWire @@ -0,0 +1,44 @@ +# +# various kinds of DNAME RDATA stored in an input buffer +# +# Valid non-compressed RDATA for dn.example.com. +# RDLENGTH=16 bytes +# 0 1 + 00 10 +# 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7(bytes) +#(2) d n (7) e x a m p l e (3) c o m . + 02 64 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# short length +# 8 9 + 00 0f +#20 1 2 3 4 5 6 7 8 9 30 1 2 3 4 5 + 02 64 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# length too long +# 6 7 + 00 11 +# +# 8 9 40 1 2 3 4 5 6 7 8 9 50 1 2 3 4 + 02 64 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 +# +# Valid compressed DNAME name: 'dn2' + pointer +# 5 6 + 00 06 +# 7 8 9 60 1 2 +#(3) d n 2 ptr=5 + 03 64 6e 32 c0 05 +# +# Valid compressed DNAME name but RDLENGTH is incorrect: it must be the length +# of the sequence from the head to the pointer, not the decompressed name +# length. +# 3 4 + 00 11 +# 5 6 7 8 9 70 + 03 64 6e 32 c0 05 +# incomplete name (no trailing dot). this can be tested only at the end of +# the buffer. +# 1 2 + 00 0f +# 3 4 5 6 7 8 9 80 1 2 3 4 5 6 7 + 02 64 6e 07 65 78 61 6d 70 6c 65 03 63 6f 6d diff --git a/src/lib/dns/tests/testdata/rdata_dnskey_empty_keydata_fromWire.spec b/src/lib/dns/tests/testdata/rdata_dnskey_empty_keydata_fromWire.spec new file mode 100644 index 0000000..b65271d --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_dnskey_empty_keydata_fromWire.spec @@ -0,0 +1,7 @@ +# DNSKEY test data with empty digest + +[custom] +sections: dnskey + +[dnskey] +digest: diff --git a/src/lib/dns/tests/testdata/rdata_dnskey_empty_keydata_fromWire.wire b/src/lib/dns/tests/testdata/rdata_dnskey_empty_keydata_fromWire.wire new file mode 100644 index 0000000..35388b1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_dnskey_empty_keydata_fromWire.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_dnskey_empty_keydata_fromWire.spec +### + +# DNSKEY RDATA, RDLEN=4 +0004 +# FLAGS=257 +0101 +# PROTOCOL=3 +03 +# ALGORITHM=5 +05 +# DIGEST= + diff --git a/src/lib/dns/tests/testdata/rdata_dnskey_fromWire.spec b/src/lib/dns/tests/testdata/rdata_dnskey_fromWire.spec new file mode 100644 index 0000000..87e66db --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_dnskey_fromWire.spec @@ -0,0 +1,7 @@ +# DNSKEY test data + +[custom] +sections: dnskey + +[dnskey] +digest: BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjGrhhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA+u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy347cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQzBkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysyLKOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/bByBNsO70aEFTd diff --git a/src/lib/dns/tests/testdata/rdata_dnskey_fromWire.wire b/src/lib/dns/tests/testdata/rdata_dnskey_fromWire.wire new file mode 100644 index 0000000..0a2e41f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_dnskey_fromWire.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_dnskey_fromWire.spec +### + +# DNSKEY RDATA, RDLEN=265 +0109 +# FLAGS=257 +0101 +# PROTOCOL=3 +03 +# ALGORITHM=5 +05 +# DIGEST=BEAAAAOhHQDBrhQbtphgq2wQUpEQ5t4DtUHxoMVFu2hWLDMvoOMRXjGrhhCeFvAZih7yJHf8ZGfW6hd38hXG/xylYCO6Krpbdojwx8YMXLA5/kA+u50WIL8ZR1R6KTbsYVMf/Qx5RiNbPClw+vT+U8eXEJmO20jIS1ULgqy347cBB1zMnnz/4LJpA0da9CbKj3A254T515sNIMcwsB8/2+2E63/zZrQzBkj0BrN/9Bexjpiks3jRhZatEsXn3dTy47R09Uix5WcJt+xzqZ7+ysyLKOOedS39Z7SDmsn2eA0FKtQpwA6LXeG2w+jxmw3oA8lVUgEf/rzeC/bByBNsO70aEFTd +0440000003a11d00c1ae141bb69860ab6c10529110e6de03b541f1a0c545bb68562c332fa0e3115e31ab86109e16f0198a1ef22477fc6467d6ea1777f215c6ff1ca56023ba2aba5b7688f0c7c60c5cb039fe403ebb9d1620bf1947547a2936ec61531ffd0c7946235b3c2970faf4fe53c79710998edb48c84b550b82acb7e3b701075ccc9e7cffe0b26903475af426ca8f7036e784f9d79b0d20c730b01f3fdbed84eb7ff366b4330648f406b37ff417b18e98a4b378d18596ad12c5e7ddd4f2e3b474f548b1e56709b7ec73a99efecacc8b28e39e752dfd67b4839ac9f6780d052ad429c00e8b5de1b6c3e8f19b0de803c95552011ffebcde0bf6c1c8136c3bbd1a1054dd diff --git a/src/lib/dns/tests/testdata/rdata_ds_fromWire b/src/lib/dns/tests/testdata/rdata_ds_fromWire new file mode 100644 index 0000000..81c412c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_ds_fromWire @@ -0,0 +1,6 @@ +# RDLENGTH 36 bytes +00 24 +# DS record, keyid 12892 +32 5c 05 02 f1 e1 84 c0 e1 d6 15 d2 0e b3 c2 23 +ac ed 3b 03 c7 73 dd 95 2d 5f 0e b5 c7 77 58 6d +e1 8d a6 b5 diff --git a/src/lib/dns/tests/testdata/rdata_in_a_fromWire b/src/lib/dns/tests/testdata/rdata_in_a_fromWire new file mode 100644 index 0000000..12f508b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_in_a_fromWire @@ -0,0 +1,19 @@ +# +# various kinds of IN/A RDATA stored in an input buffer +# +# valid RDATA for 192.0.2.1 +# +# 0 1 2 3 4 5 (bytes) + 00 04 c0 00 02 01 +# +# short length +# 6 7 8 9 10 11 (bytes) + 00 03 c0 00 02 01 +# +# length too long +#12 13 14 15 16 17 18 + 00 05 c0 00 02 01 00 +# +# short buffer (this can be tested only at the end of the buffer) +#19 20 21 22 23 + 00 04 c0 00 02 diff --git a/src/lib/dns/tests/testdata/rdata_in_aaaa_fromWire b/src/lib/dns/tests/testdata/rdata_in_aaaa_fromWire new file mode 100644 index 0000000..22fdd1f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_in_aaaa_fromWire @@ -0,0 +1,18 @@ +# +# various kinds of IN/AAAA RDATA stored in an input buffer +# +# valid RDATA for 2001:db8::1234 +# +#RDLENGTH=16 +0010 +#IPv6 address (18 bytes) +2001 0db8 0000 0000 0000 0000 0000 1234 +# +# short length (36 bytes) +0008 2001 0db8 0000 0000 0000 0000 0000 1234 +# +# length too long (55 bytes) +0011 2001 0db8 0000 0000 0000 0000 0000 1234 ff +# +# short buffer (this can be tested only at the end of the buffer) +0010 2001 0db8 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.spec new file mode 100644 index 0000000..2c43db0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.spec @@ -0,0 +1,3 @@ +[custom] +sections: minfo +[minfo] diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.wire b/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.wire new file mode 100644 index 0000000..3483e9b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_fromWire1.spec +### + +# MINFO RDATA, RDLEN=44 +002c +# RMAILBOX=rmailbox.example.com EMAILBOX=emailbox.example.com +08726d61696c626f78076578616d706c6503636f6d00 08656d61696c626f78076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.spec new file mode 100644 index 0000000..d781cac --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.spec @@ -0,0 +1,7 @@ +[custom] +sections: name:minfo +[name] +name: a.example.com. +[minfo] +rmailbox: rmailbox.ptr=02 +emailbox: emailbox.ptr=02 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.wire new file mode 100644 index 0000000..d79e936 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.wire @@ -0,0 +1,11 @@ +### +### This data file was auto-generated from rdata_minfo_fromWire2.spec +### + +# DNS Name: a.example.com. +0161076578616d706c6503636f6d00 + +# MINFO RDATA, RDLEN=22 +0016 +# RMAILBOX=rmailbox.ptr=02 EMAILBOX=emailbox.ptr=02 +08726d61696c626f78c002 08656d61696c626f78c002 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.spec new file mode 100644 index 0000000..a1d4b76 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.spec @@ -0,0 +1,6 @@ +[custom] +sections: minfo +# rdlength too short +[minfo] +emailbox: emailbox.ptr=11 +rdlen: 3 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.wire new file mode 100644 index 0000000..55df1a2 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_fromWire3.spec +### + +# MINFO RDATA, RDLEN=3 +0003 +# RMAILBOX=rmailbox.example.com EMAILBOX=emailbox.ptr=11 +08726d61696c626f78076578616d706c6503636f6d00 08656d61696c626f78c00b diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.spec new file mode 100644 index 0000000..269a6ce --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.spec @@ -0,0 +1,6 @@ +[custom] +sections: minfo +# rdlength too long +[minfo] +emailbox: emailbox.ptr=11 +rdlen: 80 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.wire new file mode 100644 index 0000000..746f55a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_fromWire4.spec +### + +# MINFO RDATA, RDLEN=80 +0050 +# RMAILBOX=rmailbox.example.com EMAILBOX=emailbox.ptr=11 +08726d61696c626f78076578616d706c6503636f6d00 08656d61696c626f78c00b diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.spec new file mode 100644 index 0000000..3a888e3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.spec @@ -0,0 +1,5 @@ +[custom] +sections: minfo +# bogus rmailbox name +[minfo] +rmailbox: "01234567890123456789012345678901234567890123456789012345678901234" diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.wire new file mode 100644 index 0000000..dacd9a0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_fromWire5.spec +### + +# MINFO RDATA, RDLEN=91 +005b +# RMAILBOX="01234567890123456789012345678901234567890123456789012345678901234" EMAILBOX=emailbox.example.com +432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200 08656d61696c626f78076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.spec new file mode 100644 index 0000000..c75ed8e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.spec @@ -0,0 +1,5 @@ +[custom] +sections: minfo +# bogus emailbox name +[minfo] +emailbox: "01234567890123456789012345678901234567890123456789012345678901234" diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.wire new file mode 100644 index 0000000..4199fee --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_fromWire6.spec +### + +# MINFO RDATA, RDLEN=91 +005b +# RMAILBOX=rmailbox.example.com EMAILBOX="01234567890123456789012345678901234567890123456789012345678901234" +08726d61696c626f78076578616d706c6503636f6d00 432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWire1.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWire1.spec new file mode 100644 index 0000000..7b340a3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWire1.spec @@ -0,0 +1,5 @@ +[custom] +sections: minfo +[minfo] +emailbox: emailbox.ptr=09 +rdlen: -1 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWire1.wire b/src/lib/dns/tests/testdata/rdata_minfo_toWire1.wire new file mode 100644 index 0000000..8ac4afe --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_toWire1.spec +### + +# MINFO RDATA + +# RMAILBOX=rmailbox.example.com EMAILBOX=emailbox.ptr=09 +08726d61696c626f78076578616d706c6503636f6d00 08656d61696c626f78c009 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWire2.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWire2.spec new file mode 100644 index 0000000..132f118 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWire2.spec @@ -0,0 +1,6 @@ +[custom] +sections: minfo +[minfo] +rmailbox: root.example.com. +emailbox: emailbox.ptr=05 +rdlen: -1 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWire2.wire b/src/lib/dns/tests/testdata/rdata_minfo_toWire2.wire new file mode 100644 index 0000000..7fb847c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWire2.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_toWire2.spec +### + +# MINFO RDATA + +# RMAILBOX=root.example.com. EMAILBOX=emailbox.ptr=05 +04726f6f74076578616d706c6503636f6d00 08656d61696c626f78c005 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.spec new file mode 100644 index 0000000..d99a381 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.spec @@ -0,0 +1,7 @@ +# +# A simplest form of MINFO: all default parameters +# +[custom] +sections: minfo +[minfo] +rdlen: -1 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.wire b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.wire new file mode 100644 index 0000000..6de233e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_toWireUncompressed1.spec +### + +# MINFO RDATA + +# RMAILBOX=rmailbox.example.com EMAILBOX=emailbox.example.com +08726d61696c626f78076578616d706c6503636f6d00 08656d61696c626f78076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.spec new file mode 100644 index 0000000..0f78fcc --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.spec @@ -0,0 +1,8 @@ +# +# A simplest form of MINFO: custom rmailbox and default emailbox +# +[custom] +sections: minfo +[minfo] +rmailbox: root.example.com. +rdlen: -1 diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.wire b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.wire new file mode 100644 index 0000000..51e9e35 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_minfo_toWireUncompressed2.spec +### + +# MINFO RDATA + +# RMAILBOX=root.example.com. EMAILBOX=emailbox.example.com +04726f6f74076578616d706c6503636f6d00 08656d61696c626f78076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_mx_fromWire b/src/lib/dns/tests/testdata/rdata_mx_fromWire new file mode 100644 index 0000000..8e09154 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_mx_fromWire @@ -0,0 +1,15 @@ +# +# various kinds of MX RDATA stored in an input buffer +# +# Valid RDATA for "10 mail.example.com" +# +# RDLENGTH=18 bytes +# 0 1 + 00 12 +# 2 3 +# PREFERENCE: 10 + 00 0a +# EXCHANGE: non compressed +# 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 (bytes) +#(2) m x (7) e x a m p l e (3) c o m . + 02 6d 78 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 diff --git a/src/lib/dns/tests/testdata/rdata_mx_toWire1 b/src/lib/dns/tests/testdata/rdata_mx_toWire1 new file mode 100644 index 0000000..3049373 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_mx_toWire1 @@ -0,0 +1,12 @@ +# +# compressed MX RDATA stored in an output buffer +# +# sentinel name: example.com. +# 0 1 2 3 4 5 6 7 8 9 10 1 2 (bytes) +#(7) e x a m p l e (3) c o m . + 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# PREFERENCE: 10 + 00 0a +# EXCHANGE: compressed +#(4) m x ptr=0 + 02 6d 78 c0 00 diff --git a/src/lib/dns/tests/testdata/rdata_mx_toWire2 b/src/lib/dns/tests/testdata/rdata_mx_toWire2 new file mode 100644 index 0000000..ebd2f27 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_mx_toWire2 @@ -0,0 +1,12 @@ +# +# compressed MX RDATA stored in an output buffer +# +# sentinel name: example.com. +# 0 1 2 3 4 5 6 7 8 9 10 1 2 (bytes) +#(7) e x a m p l e (3) c o m . + 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# PREFERENCE: 10 + 00 0a +# EXCHANGE: not compressed +#(4) m x ptr=0 + 02 6d 78 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 diff --git a/src/lib/dns/tests/testdata/rdata_ns_fromWire b/src/lib/dns/tests/testdata/rdata_ns_fromWire new file mode 100644 index 0000000..973365f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_ns_fromWire @@ -0,0 +1,44 @@ +# +# various kinds of NS RDATA stored in an input buffer +# +# Valid non-compressed RDATA for ns.example.com. +# RDLENGTH=16 bytes +# 0 1 + 00 10 +# 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7(bytes) +#(2) n s (7) e x a m p l e (3) c o m . + 02 6e 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# short length +# 8 9 + 00 0f +#20 1 2 3 4 5 6 7 8 9 30 1 2 3 4 5 + 02 6e 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# length too long +# 6 7 + 00 11 +# +# 8 9 40 1 2 3 4 5 6 7 8 9 50 1 2 3 4 + 02 6e 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 +# +# Valid compressed NS name: 'ns2' + pointer +# 5 6 + 00 06 +# 7 8 9 60 1 2 +#(3) n s 2 ptr=5 + 03 6e 73 32 c0 05 +# +# Valid compressed NS name but RDLENGTH is incorrect: it must be the length +# of the sequence from the head to the pointer, not the decompressed name +# length. +# 3 4 + 00 11 +# 5 6 7 8 9 70 + 03 6e 73 32 c0 05 +# incomplete name (no trailing dot). this can be tested only at the end of +# the buffer. +# 1 2 + 00 0f +# 3 4 5 6 7 8 9 80 1 2 3 4 5 6 7 + 02 6e 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire1 b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire1 new file mode 100644 index 0000000..1dd5f52 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire1 @@ -0,0 +1,7 @@ +# RDLENGTH, 39 bytes +00 27 +# NSEC3 record: +# 1 1 1 D399EAAB H9RSFB7FPF2L8HG35CMPC765TDK23RP6 NS SOA RRSIG DNSKEY NSEC3PARAM +01 01 00 01 04 d3 99 ea ab 14 8a 77 c7 ac ef cb +c5 54 46 03 2b 2d 96 1c c5 eb 68 21 ef 26 00 07 +22 00 00 00 00 02 90 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire1.spec new file mode 100644 index 0000000..39a78d7 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire1.spec @@ -0,0 +1,7 @@ +# +# A malformed NSEC3 RDATA: bit map length is too large, causing overflow +# + +[custom] +sections: nsec3 +[nsec3] diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire10.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire10.spec new file mode 100644 index 0000000..30417f5 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire10.spec @@ -0,0 +1,8 @@ +# +# An invalid NSEC3 RDATA: a bitmap block containing empty bytes +# + +[custom] +sections: nsec3 +[nsec3] +bitmap: '01000000' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire10.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire10.wire new file mode 100644 index 0000000..99c5afd --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire10.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire10.spec +### + +# NSEC3 RDATA, RDLEN=37 +0025 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=4 +00 04 01000000 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire11.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire11.spec new file mode 100644 index 0000000..80ec59f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire11.spec @@ -0,0 +1,8 @@ +# +# An invalid NSEC3 RDATA: Saltlen is too large +# + +[custom] +sections: nsec3 +[nsec3] +rdlen: 7 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire11.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire11.wire new file mode 100644 index 0000000..48dc589 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire11.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire11.spec +### + +# NSEC3 RDATA, RDLEN=7 +0007 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=6 +00 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire12.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire12.spec new file mode 100644 index 0000000..1e01655 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire12.spec @@ -0,0 +1,9 @@ +# +# An invalid NSEC3 RDATA: Hash length is too large +# + +[custom] +sections: nsec3 +[nsec3] +# only contains the first byte of hash +rdlen: 12 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire12.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire12.wire new file mode 100644 index 0000000..e880d55 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire12.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire12.spec +### + +# NSEC3 RDATA, RDLEN=12 +000c +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=6 +00 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire13.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire13.spec new file mode 100644 index 0000000..fcc9d53 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire13.spec @@ -0,0 +1,9 @@ +# +# A valid (but unusual) NSEC3 RDATA: salt is empty. +# + +[custom] +sections: nsec3 +[nsec3] +saltlen: 0 +salt: '' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire13.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire13.wire new file mode 100644 index 0000000..86a06c5 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire13.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire13.spec +### + +# NSEC3 RDATA, RDLEN=34 +0022 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=0, Salt='' +00 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=6 +00 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire14.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire14.spec new file mode 100644 index 0000000..a0550d5 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire14.spec @@ -0,0 +1,9 @@ +# +# An invalid NSEC3 RDATA: empty hash +# + +[custom] +sections: nsec3 +[nsec3] +hashlen: 0 +hash: '' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire14.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire14.wire new file mode 100644 index 0000000..9d76b5a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire14.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire14.spec +### + +# NSEC3 RDATA, RDLEN=19 +0013 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=0, Hash='' +00 +# Bitmap: Block=0, Length=6 +00 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire15.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire15.spec new file mode 100644 index 0000000..4993e03 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire15.spec @@ -0,0 +1,10 @@ +# +# NSEC3 RDATA with empty type bitmap. It's okay. +# The test data includes bytes for a bitmap field, but RDLEN indicates +# it's not part of the RDATA and so it will be ignored. +# + +[custom] +sections: nsec3 +[nsec3] +rdlen: 31 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire15.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire15.wire new file mode 100644 index 0000000..bd636a7 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire15.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire15.spec +### + +# NSEC3 RDATA, RDLEN=31 +001f +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=6 +00 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire16.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire16.spec new file mode 100644 index 0000000..dac14ea --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire16.spec @@ -0,0 +1,8 @@ +# +# NSEC3 RDATA with an empty bitmap +# + +[custom] +sections: nsec3 +[nsec3] +nbitmap: 0 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire16.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire16.wire new file mode 100644 index 0000000..bab957e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire16.wire @@ -0,0 +1,12 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire16.spec +### + +# NSEC3 RDATA, RDLEN=31 +001f +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire17.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire17.spec new file mode 100644 index 0000000..4253349 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire17.spec @@ -0,0 +1,8 @@ +# +# An invalid NSEC3 RDATA: RDLEN is too short to include the hash len field. +# + +[custom] +sections: nsec3 +[nsec3] +rdlen: 10 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire17.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire17.wire new file mode 100644 index 0000000..f7972a0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire17.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire17.spec +### + +# NSEC3 RDATA, RDLEN=10 +000a +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=6 +00 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire2.spec new file mode 100644 index 0000000..f35de83 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire2.spec @@ -0,0 +1,9 @@ +# +# A malformed NSEC3 RDATA: RDLEN indicates it doesn't even contain the fixed +# 5 octets +# + +[custom] +sections: nsec3 +[nsec3] +rdlen: 4 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire2.wire new file mode 100644 index 0000000..ec14a58 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire2.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire2.spec +### + +# NSEC3 RDATA, RDLEN=4 +0004 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=6 +00 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire3 b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire3 new file mode 100644 index 0000000..a0c8f59 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire3 @@ -0,0 +1,6 @@ +# RDLENGTH, 39 bytes +00 27 +# NSEC3 record with a broken type bitmap +01 01 00 01 04 d3 99 ea ab 14 8a 77 c7 ac ef cb +c5 54 46 03 2b 2d 96 1c c5 eb 68 21 ef 26 00 ff +22 00 00 00 00 02 90 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire4.spec new file mode 100644 index 0000000..06d6eb4 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire4.spec @@ -0,0 +1,9 @@ +# +# A malformed NSEC3 RDATA: bit map length is too large, causing overflow +# + +[custom] +sections: nsec3 +[nsec3] +maplen: 31 +bitmap: '01' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire4.wire new file mode 100644 index 0000000..527860c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire4.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire4.spec +### + +# NSEC3 RDATA, RDLEN=34 +0022 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=31 +00 1f 01 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire5.spec new file mode 100644 index 0000000..2d5713c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire5.spec @@ -0,0 +1,13 @@ +# +# A malformed NSEC3 RDATA: incomplete bit map field +# + +[custom] +sections: nsec3 +[nsec3] +# only containing the block field of the bitmap +rdlen: 32 +#dummy data +maplen: 31 +#dummy data +bitmap: '00' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire5.wire new file mode 100644 index 0000000..97b798b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire5.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire5.spec +### + +# NSEC3 RDATA, RDLEN=32 +0020 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=31 +00 1f 00 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire6.spec new file mode 100644 index 0000000..36e9e59 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire6.spec @@ -0,0 +1,11 @@ +# +# A malformed NSEC3 RDATA: bit map length being 0 +# + +[custom] +sections: nsec3 +[nsec3] +rdlen: 33 +maplen: 0 +# dummy data: +bitmap: '01' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire6.wire new file mode 100644 index 0000000..4cf1189 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire6.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire6.spec +### + +# NSEC3 RDATA, RDLEN=33 +0021 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=0 +00 00 01 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire7.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire7.spec new file mode 100644 index 0000000..338c0c9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire7.spec @@ -0,0 +1,9 @@ +# +# NSEC3 RDATA with a longest bitmap field (32 bitmap bytes) +# + +[custom] +sections: nsec3 +[nsec3] +maplen: 32 +bitmap: '0101010101010101010101010101010101010101010101010101010101010101' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire7.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire7.wire new file mode 100644 index 0000000..1fddd58 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire7.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire7.spec +### + +# NSEC3 RDATA, RDLEN=65 +0041 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=32 +00 20 0101010101010101010101010101010101010101010101010101010101010101 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire8.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire8.spec new file mode 100644 index 0000000..041714e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire8.spec @@ -0,0 +1,9 @@ +# +# An invalid NSEC3 RDATA with an oversized bitmap field (33 bitmap bytes) +# + +[custom] +sections: nsec3 +[nsec3] +maplen: 33 +bitmap: '010101010101010101010101010101010101010101010101010101010101010101' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire8.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire8.wire new file mode 100644 index 0000000..9569094 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire8.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire8.spec +### + +# NSEC3 RDATA, RDLEN=66 +0042 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=0, Length=33 +00 21 010101010101010101010101010101010101010101010101010101010101010101 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire9.spec b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire9.spec new file mode 100644 index 0000000..b04c84f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire9.spec @@ -0,0 +1,10 @@ +# +# An invalid NSEC3 RDATA: disordered bitmap blocks +# + +[custom] +sections: nsec3 +[nsec3] +nbitmap: 2 +block0: 2 +block1: 1 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3_fromWire9.wire b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire9.wire new file mode 100644 index 0000000..9c0de10 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3_fromWire9.wire @@ -0,0 +1,16 @@ +### +### This data file was auto-generated from rdata_nsec3_fromWire9.spec +### + +# NSEC3 RDATA, RDLEN=47 +002f +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 +# Hash Len=20, Hash='hhhhhhhhhhhhhhhhhhhh' +14 6868686868686868686868686868686868686868 +# Bitmap: Block=2, Length=6 +02 06 040000000003 +# Bitmap: Block=1, Length=6 +01 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire1 b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire1 new file mode 100644 index 0000000..1b8697f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire1 @@ -0,0 +1,5 @@ +# RDLENGTH, 9 bytes +00 09 +# NSEC3PARAM record +# 1 1 1 D399EAAB +01 01 00 01 04 d3 99 ea ab diff --git a/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire11.spec b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire11.spec new file mode 100644 index 0000000..41e1784 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire11.spec @@ -0,0 +1,8 @@ +# +# An invalid NSEC3PARAM RDATA: Saltlen is too large +# + +[custom] +sections: nsec3param +[nsec3param] +rdlen: 7 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire11.wire b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire11.wire new file mode 100644 index 0000000..e9ffb46 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire11.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec3param_fromWire11.spec +### + +# NSEC3PARAM RDATA, RDLEN=7 +0007 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire13.spec b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire13.spec new file mode 100644 index 0000000..311b2dd --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire13.spec @@ -0,0 +1,9 @@ +# +# A valid (but unusual) NSEC3PARAM RDATA: salt is empty. +# + +[custom] +sections: nsec3param +[nsec3param] +saltlen: 0 +salt: '' diff --git a/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire13.wire b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire13.wire new file mode 100644 index 0000000..511da87 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire13.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec3param_fromWire13.spec +### + +# NSEC3PARAM RDATA, RDLEN=5 +0005 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=0, Salt='' +00 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire2.spec new file mode 100644 index 0000000..e04b818 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire2.spec @@ -0,0 +1,9 @@ +# +# A malformed NSEC3PARAM RDATA: RDLEN indicates it doesn't even contain the +# fixed 5 octets +# + +[custom] +sections: nsec3param +[nsec3param] +rdlen: 4 diff --git a/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire2.wire new file mode 100644 index 0000000..adc5ea9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec3param_fromWire2.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec3param_fromWire2.spec +### + +# NSEC3PARAM RDATA, RDLEN=4 +0004 +# Hash Alg=SHA1(1), Opt-Out=0, Other Flags=0, Iterations=1 +01 00 0001 +# Salt Len=5, Salt='sssss' +05 7373737373 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire1 b/src/lib/dns/tests/testdata/rdata_nsec_fromWire1 new file mode 100644 index 0000000..9c34394 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire1 @@ -0,0 +1,6 @@ +# RDLENGTH, 22 bytes +00 16 +# NSEC record +# www2.isc.org. CNAME RRSIG NSEC +04 77 77 77 32 03 69 73 63 03 6f 72 67 00 00 06 +04 00 00 00 00 03 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire10.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire10.spec new file mode 100644 index 0000000..39d19ae --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire10.spec @@ -0,0 +1,8 @@ +# +# An invalid NSEC RDATA: a bitmap block containing empty bytes +# + +[custom] +sections: nsec +[nsec] +bitmap: '01000000' diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire10.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire10.wire new file mode 100644 index 0000000..1145dbd --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire10.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire10.spec +### + +# NSEC RDATA, RDLEN=24 +0018 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 +# Bitmap: Block=0, Length=4 +00 04 01000000 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire16.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire16.spec new file mode 100644 index 0000000..d7faeed --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire16.spec @@ -0,0 +1,8 @@ +# +# An invalid NSEC RDATA: with an empty bitmap +# + +[custom] +sections: nsec +[nsec] +nbitmap: 0 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire16.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire16.wire new file mode 100644 index 0000000..943601a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire16.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire16.spec +### + +# NSEC RDATA, RDLEN=18 +0012 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire2 b/src/lib/dns/tests/testdata/rdata_nsec_fromWire2 new file mode 100644 index 0000000..e9b41e2 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire2 @@ -0,0 +1,10 @@ +# +# NSEC RDATA with a bogus RDLEN (too short) +# + +# RDLENGTH, 13 bytes (should be 22) +00 0d +# NSEC record +# www2.isc.org. CNAME RRSIG NSEC +04 77 77 77 32 03 69 73 63 03 6f 72 67 00 00 06 +04 00 00 00 00 03 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire3 b/src/lib/dns/tests/testdata/rdata_nsec_fromWire3 new file mode 100644 index 0000000..67e6b3f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire3 @@ -0,0 +1,10 @@ +# +# NSEC RDATA with an invalid type bitmap +# + +# RDLENGTH, 22 bytes +00 16 +# NSEC record +# www2.isc.org. followed by a broken bitmap +04 77 77 77 32 03 69 73 63 03 6f 72 67 00 00 ff +00 00 00 00 00 00 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire4.spec new file mode 100644 index 0000000..a5744c1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire4.spec @@ -0,0 +1,9 @@ +# +# A malformed NSEC RDATA: bit map length is too large, causing overflow +# + +[custom] +sections: nsec +[nsec] +maplen: 31 +bitmap: '01' diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire4.wire new file mode 100644 index 0000000..1c4d4a4 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire4.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire4.spec +### + +# NSEC RDATA, RDLEN=21 +0015 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 +# Bitmap: Block=0, Length=31 +00 1f 01 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire5.spec new file mode 100644 index 0000000..795d1e0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire5.spec @@ -0,0 +1,13 @@ +# +# A malformed NSEC RDATA: incomplete bit map field +# + +[custom] +sections: nsec +[nsec] +# only containing the block field of the bitmap +rdlen: 19 +#dummy data +maplen: 31 +#dummy data +bitmap: '00' diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire5.wire new file mode 100644 index 0000000..104a2b9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire5.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire5.spec +### + +# NSEC RDATA, RDLEN=19 +0013 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 +# Bitmap: Block=0, Length=31 +00 1f 00 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire6.spec new file mode 100644 index 0000000..cb864ab --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire6.spec @@ -0,0 +1,11 @@ +# +# A malformed NSEC RDATA: bit map length being 0 +# + +[custom] +sections: nsec +[nsec] +rdlen: 20 +maplen: 0 +# dummy data: +bitmap: '01' diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire6.wire new file mode 100644 index 0000000..3108ed7 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire6.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire6.spec +### + +# NSEC RDATA, RDLEN=20 +0014 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 +# Bitmap: Block=0, Length=0 +00 00 01 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire7.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire7.spec new file mode 100644 index 0000000..46b521b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire7.spec @@ -0,0 +1,9 @@ +# +# NSEC RDATA with a longest bitmap field (32 bitmap bytes) +# + +[custom] +sections: nsec +[nsec] +maplen: 32 +bitmap: '0101010101010101010101010101010101010101010101010101010101010101' diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire7.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire7.wire new file mode 100644 index 0000000..e265a3b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire7.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire7.spec +### + +# NSEC RDATA, RDLEN=52 +0034 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 +# Bitmap: Block=0, Length=32 +00 20 0101010101010101010101010101010101010101010101010101010101010101 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire8.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire8.spec new file mode 100644 index 0000000..3f957a3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire8.spec @@ -0,0 +1,9 @@ +# +# An invalid NSEC RDATA with an oversized bitmap field (33 bitmap bytes) +# + +[custom] +sections: nsec +[nsec] +maplen: 33 +bitmap: '010101010101010101010101010101010101010101010101010101010101010101' diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire8.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire8.wire new file mode 100644 index 0000000..066cd70 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire8.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire8.spec +### + +# NSEC RDATA, RDLEN=53 +0035 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 +# Bitmap: Block=0, Length=33 +00 21 010101010101010101010101010101010101010101010101010101010101010101 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire9.spec b/src/lib/dns/tests/testdata/rdata_nsec_fromWire9.spec new file mode 100644 index 0000000..a3bd0c9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire9.spec @@ -0,0 +1,10 @@ +# +# An invalid NSEC RDATA: disordered bitmap blocks +# + +[custom] +sections: nsec +[nsec] +nbitmap: 2 +block0: 2 +block1: 1 diff --git a/src/lib/dns/tests/testdata/rdata_nsec_fromWire9.wire b/src/lib/dns/tests/testdata/rdata_nsec_fromWire9.wire new file mode 100644 index 0000000..53ad6cc --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_nsec_fromWire9.wire @@ -0,0 +1,12 @@ +### +### This data file was auto-generated from rdata_nsec_fromWire9.spec +### + +# NSEC RDATA, RDLEN=34 +0022 +# Next Name=next.example.com (18 bytes) +046e657874076578616d706c6503636f6d00 +# Bitmap: Block=2, Length=6 +02 06 040000000003 +# Bitmap: Block=1, Length=6 +01 06 040000000003 diff --git a/src/lib/dns/tests/testdata/rdata_opt_fromWire1 b/src/lib/dns/tests/testdata/rdata_opt_fromWire1 new file mode 100644 index 0000000..f2eb680 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_opt_fromWire1 @@ -0,0 +1,15 @@ +# Various kinds of OPT RDATA stored in an input buffer +# +# Empty RDATA (which is okay) +# +# 0 1 (bytes) + 00 00 +# +# An OPT RR containing an NSID Option +# code=3 len=3 ID value (opaque) +# 2 3 4 5 6 7 8 9 10 + 00 07 00 2a 00 03 00 01 02 +# +# Short buffer (this can be tested only at the end of the buffer) +# 1 2 3 4 5 + 00 04 c0 00 02 diff --git a/src/lib/dns/tests/testdata/rdata_opt_fromWire2 b/src/lib/dns/tests/testdata/rdata_opt_fromWire2 new file mode 100644 index 0000000..2c5a11f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_opt_fromWire2 @@ -0,0 +1,4 @@ +# Short RDATA length +# +# OPT RDATA, RDLEN=1 +0001 diff --git a/src/lib/dns/tests/testdata/rdata_opt_fromWire3 b/src/lib/dns/tests/testdata/rdata_opt_fromWire3 new file mode 100644 index 0000000..52db1d8 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_opt_fromWire3 @@ -0,0 +1,8 @@ +# Short RDATA length (in second pseudo RR) +# +# OPT RDATA, RDLEN=8 +0008 +# Pseudo RR 1 of size 7 (code=3, len=3) +00 03 00 03 00 01 02 +# Pseudo RR 2 of size 7 exhausts RDLEN (code=4, len=3) +00 04 00 03 00 01 02 diff --git a/src/lib/dns/tests/testdata/rdata_opt_fromWire4 b/src/lib/dns/tests/testdata/rdata_opt_fromWire4 new file mode 100644 index 0000000..a302127 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_opt_fromWire4 @@ -0,0 +1,9 @@ +# Sum of option lengths would overflow RDLEN +# +# OPT RDATA, RDLEN=14 (0x000e) +000e +# Pseudo RR 1 (code=3, len=3) +00 03 00 03 00 01 02 +# Pseudo RR 2 (code=4, len=65535 overflows RDLEN) +00 04 ff ff 00 01 02 +# Rest of option data is omitted... diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_rp_fromWire1.spec new file mode 100644 index 0000000..edb9f34 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire1.spec @@ -0,0 +1,6 @@ +# +# A simplest form of RP: all default parameters +# +[custom] +sections: rp +[rp] diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire1.wire b/src/lib/dns/tests/testdata/rdata_rp_fromWire1.wire new file mode 100644 index 0000000..aa93986 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_rp_fromWire1.spec +### + +# RP RDATA, RDLEN=39 +0027 +# MAILBOX=root.example.com TEXT=rp-text.example.com +04726f6f74076578616d706c6503636f6d00 0772702d74657874076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_rp_fromWire2.spec new file mode 100644 index 0000000..57adb5a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire2.spec @@ -0,0 +1,12 @@ +# +# A simplest form of RP: names are compressed. +# +[custom] +sections: name/1:name/2:rp +[name/1] +name: a.example.com +[name/2] +name: b.example.net +[rp] +mailbox: root.ptr=2 +text: rp-text.ptr=17 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_rp_fromWire2.wire new file mode 100644 index 0000000..507bb1a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire2.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_rp_fromWire2.spec +### + +# DNS Name: a.example.com +0161076578616d706c6503636f6d00 + +# DNS Name: b.example.net +0162076578616d706c65036e657400 + +# RP RDATA, RDLEN=17 +0011 +# MAILBOX=root.ptr=2 TEXT=rp-text.ptr=17 +04726f6f74c002 0772702d74657874c011 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_rp_fromWire3.spec new file mode 100644 index 0000000..a238b7e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire3.spec @@ -0,0 +1,7 @@ +# +# RP-like RDATA but RDLEN is too short. +# +[custom] +sections: rp +[rp] +rdlen: 38 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_rp_fromWire3.wire new file mode 100644 index 0000000..c2a7086 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire3.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_rp_fromWire3.spec +### + +# RP RDATA, RDLEN=38 +0026 +# MAILBOX=root.example.com TEXT=rp-text.example.com +04726f6f74076578616d706c6503636f6d00 0772702d74657874076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_rp_fromWire4.spec new file mode 100644 index 0000000..6f3abd1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire4.spec @@ -0,0 +1,7 @@ +# +# RP-like RDATA but RDLEN is too long. +# +[custom] +sections: rp +[rp] +rdlen: 40 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_rp_fromWire4.wire new file mode 100644 index 0000000..56c643e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire4.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_rp_fromWire4.spec +### + +# RP RDATA, RDLEN=40 +0028 +# MAILBOX=root.example.com TEXT=rp-text.example.com +04726f6f74076578616d706c6503636f6d00 0772702d74657874076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_rp_fromWire5.spec new file mode 100644 index 0000000..b8d5e29 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire5.spec @@ -0,0 +1,7 @@ +# +# RP-like RDATA but mailbox name is broken. +# +[custom] +sections: rp +[rp] +mailbox: "01234567890123456789012345678901234567890123456789012345678901234" diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_rp_fromWire5.wire new file mode 100644 index 0000000..1127047 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire5.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_rp_fromWire5.spec +### + +# RP RDATA, RDLEN=90 +005a +# MAILBOX="01234567890123456789012345678901234567890123456789012345678901234" TEXT=rp-text.example.com +432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200 0772702d74657874076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_rp_fromWire6.spec new file mode 100644 index 0000000..e9e79f3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire6.spec @@ -0,0 +1,7 @@ +# +# RP-like RDATA but text name is broken. +# +[custom] +sections: rp +[rp] +text: "01234567890123456789012345678901234567890123456789012345678901234" diff --git a/src/lib/dns/tests/testdata/rdata_rp_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_rp_fromWire6.wire new file mode 100644 index 0000000..49aedc6 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_fromWire6.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_rp_fromWire6.spec +### + +# RP RDATA, RDLEN=87 +0057 +# MAILBOX=root.example.com TEXT="01234567890123456789012345678901234567890123456789012345678901234" +04726f6f74076578616d706c6503636f6d00 432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200 diff --git a/src/lib/dns/tests/testdata/rdata_rp_toWire1.spec b/src/lib/dns/tests/testdata/rdata_rp_toWire1.spec new file mode 100644 index 0000000..948bd1a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_toWire1.spec @@ -0,0 +1,8 @@ +# +# A simplest form of RP for toWire test: all default parameters except rdlen, +# which is to be omitted. +# +[custom] +sections: rp +[rp] +rdlen: -1 diff --git a/src/lib/dns/tests/testdata/rdata_rp_toWire1.wire b/src/lib/dns/tests/testdata/rdata_rp_toWire1.wire new file mode 100644 index 0000000..dcadb15 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_toWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_rp_toWire1.spec +### + +# RP RDATA + +# MAILBOX=root.example.com TEXT=rp-text.example.com +04726f6f74076578616d706c6503636f6d00 0772702d74657874076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdata_rp_toWire2.spec b/src/lib/dns/tests/testdata/rdata_rp_toWire2.spec new file mode 100644 index 0000000..09a7ddc --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_toWire2.spec @@ -0,0 +1,14 @@ +# +# A simple form of RP: names could be compressed (but MUST NOT). +# rdlen is omitted for the "to wire" test. +# +[custom] +sections: name/1:name/2:rp +[name/1] +name: a.example.com +[name/2] +name: b.example.net +[rp] +rdlen: -1 +mailbox: root.example.com +text: rp-text.example.net diff --git a/src/lib/dns/tests/testdata/rdata_rp_toWire2.wire b/src/lib/dns/tests/testdata/rdata_rp_toWire2.wire new file mode 100644 index 0000000..38057ef --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rp_toWire2.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_rp_toWire2.spec +### + +# DNS Name: a.example.com +0161076578616d706c6503636f6d00 + +# DNS Name: b.example.net +0162076578616d706c65036e657400 + +# RP RDATA + +# MAILBOX=root.example.com TEXT=rp-text.example.net +04726f6f74076578616d706c6503636f6d00 0772702d74657874076578616d706c65036e657400 diff --git a/src/lib/dns/tests/testdata/rdata_rrsig_fromWire1 b/src/lib/dns/tests/testdata/rdata_rrsig_fromWire1 new file mode 100644 index 0000000..1b799c2 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rrsig_fromWire1 @@ -0,0 +1,13 @@ +# RDLENGTH 155 bytes +00 9b +# RRSIG record +00 01 05 02 00 00 a8 c0 4b ad ad 5d 4b 86 20 5d +0a 62 03 69 73 63 03 6f 72 67 00 1e 42 64 ff 16 +53 bf 37 8f 53 c3 44 36 5f e5 7b 2f 1b 6d 4b a6 +86 4d 61 5d c8 b2 aa 12 e7 cf 55 50 17 39 03 a2 +87 a3 ea 77 97 66 05 99 cd 02 9e 4c a3 ce 61 6a +e7 62 d7 59 5b 83 e7 3d 01 5e 52 5d e8 ae 02 de +bf b1 7c 27 a1 59 94 39 f4 cb f2 7f 4e 14 79 9b +7e 8c a3 6f c6 77 18 e3 f2 52 7f 22 33 d5 91 da +4a c8 1a 5c 9d 83 43 f0 a1 08 99 ae 4c c8 d0 8d +7b 23 b5 52 47 cf 41 91 87 35 24 diff --git a/src/lib/dns/tests/testdata/rdata_rrsig_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_rrsig_fromWire2.spec new file mode 100644 index 0000000..582975a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rrsig_fromWire2.spec @@ -0,0 +1,8 @@ +# +# RRSIG RDATA with a bogus RDLEN (too short) +# + +[custom] +sections: rrsig +[rrsig] +rdlen: 19 diff --git a/src/lib/dns/tests/testdata/rdata_rrsig_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_rrsig_fromWire2.wire new file mode 100644 index 0000000..b3601a1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_rrsig_fromWire2.wire @@ -0,0 +1,12 @@ +### +### This data file was auto-generated from rdata_rrsig_fromWire2.spec +### + +# RRSIG RDATA, RDLEN=19 +0013 +# Covered=A(1) Algorithm=RSASHA1(5) Labels=2 OrigTTL=3600 +0001 05 02 00000e10 +# Expiration=1264935600, Inception=1262343600 +4b6562b0 4b3dd5b0 +# Tag=4149 Signer=example.com and Signature +1035 076578616d706c6503636f6d00 123456789abcdef123456789abcdef diff --git a/src/lib/dns/tests/testdata/rdata_soa_fromWire b/src/lib/dns/tests/testdata/rdata_soa_fromWire new file mode 100644 index 0000000..5cd67f0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_soa_fromWire @@ -0,0 +1,20 @@ +# +# A common style of SOA RDATA stored in an input buffer +# +# Valid compressed RDATA for "(ns.example.com. root.example.com. +# 2010012601 3600 300 3600000 1200)" +# RDLENGTH=43 bytes +# 0 1 + 00 2b +# MNAME: non compressed +# 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7(bytes) +#(2) n s (7) e x a m p l e (3) c o m . + 02 6e 73 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# RNAME: compressed +# 8 9 20 1 2 3 4 +#(4) r o o t ptr=5 + 04 72 6f 6f 74 c0 05 +# other numeric parameters +# 28 32 36 40 44 +# serial, refresh, retry, expire, minimum + 77ce5bb9 00000e10 0000012c 0036ee80 000004b0 diff --git a/src/lib/dns/tests/testdata/rdata_soa_toWireUncompressed.spec b/src/lib/dns/tests/testdata/rdata_soa_toWireUncompressed.spec new file mode 100644 index 0000000..389cec9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_soa_toWireUncompressed.spec @@ -0,0 +1,7 @@ +# +# A simple SOA RDATA without name compression +# + +[custom] +sections: soa +[soa] diff --git a/src/lib/dns/tests/testdata/rdata_soa_toWireUncompressed.wire b/src/lib/dns/tests/testdata/rdata_soa_toWireUncompressed.wire new file mode 100644 index 0000000..4b6442f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_soa_toWireUncompressed.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_soa_toWireUncompressed.spec +### + +# SOA RDATA, RDLEN=54 +0036 +# NNAME=ns.example.com RNAME=root.example.com +026e73076578616d706c6503636f6d00 04726f6f74076578616d706c6503636f6d00 +# SERIAL(2010012601) REFRESH(3600) RETRY(300) EXPIRE(3600000) MINIMUM(1200) +77ce5bb9 00000e10 0000012c 0036ee80 000004b0 diff --git a/src/lib/dns/tests/testdata/rdata_srv_fromWire b/src/lib/dns/tests/testdata/rdata_srv_fromWire new file mode 100644 index 0000000..0f1e4ec --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_srv_fromWire @@ -0,0 +1,36 @@ +# +# various kinds of SRV RDATA stored in an input buffer +# +# RDLENGTH=21 bytes +# 0 1 + 00 15 +# 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 20 1 2(bytes) + 00 01 00 05 05 dc 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# short length +# 3 4 + 00 12 +# 5 6 7 8 9 30 1 2 3 4 5 6 7 8 9 40 1 2 3 4 5 + 00 01 00 05 05 dc 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# length too long +# 6 7 + 00 19 +# +# 8 9 50 1 2 3 4 5 6 7 8 9 60 1 2 3 4 5 6 7 8 + 00 01 00 05 05 dc 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# +# +# incomplete target name +# 9 70 + 00 12 +# 1 2 3 4 5 6 7 8 9 80 1 2 3 4 5 6 7 8 + 00 01 00 05 05 dc 01 61 07 65 78 61 6d 70 6c 65 03 63 +# +# +# Valid compressed target name: 'a' + pointer +# 9 90 + 00 0a +# +# 1 2 3 4 5 6 7 8 9 100 + 00 01 00 05 05 dc 01 61 c0 0a diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire new file mode 100644 index 0000000..added40 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire @@ -0,0 +1,4 @@ +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +02 01 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire1.spec new file mode 100644 index 0000000..e28a62f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire1.spec @@ -0,0 +1,6 @@ +# +# A simplest form of SSHFP: all default parameters +# +[custom] +sections: sshfp +[sshfp] diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire1.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire1.wire new file mode 100644 index 0000000..c7059e1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire1.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire1.spec +### + +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +02 01 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire10 b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire10 new file mode 100644 index 0000000..220e570 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire10 @@ -0,0 +1,6 @@ +# Test where fingerprint is missing + +# SSHFP RDATA, RDLEN=32 +0020 +# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=(none) +02 01 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire11 b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire11 new file mode 100644 index 0000000..a2f8636 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire11 @@ -0,0 +1,4 @@ +# Test where RDATA is completely missing + +# SSHFP RDATA, RDLEN=32 +0020 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire12 b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire12 new file mode 100644 index 0000000..eabd06b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire12 @@ -0,0 +1,4 @@ +# SSHFP RDATA, RDLEN=02 +0002 +# ALGORITHM=4 FINGERPRINT_TYPE=9 +04 09 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2 b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2 new file mode 100644 index 0000000..a695548 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2 @@ -0,0 +1,4 @@ +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789ABCDEF67890123456789abcdef67890 +02 01 123456789ABCDEF67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2.spec new file mode 100644 index 0000000..59a336e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2.spec @@ -0,0 +1,7 @@ +# +# SSHFP RDATA +# +[custom] +sections: sshfp +[sshfp] +fingerprint: 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2.wire new file mode 100644 index 0000000..e492316 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire2.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire2.spec +### + +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +02 01 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire3.spec new file mode 100644 index 0000000..d111afd --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire3.spec @@ -0,0 +1,8 @@ +# +# SSHFP RDATA +# +[custom] +sections: sshfp +[sshfp] +algorithm: 1 +fingerprint_type: 1 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire3.wire new file mode 100644 index 0000000..daa102f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire3.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire3.spec +### + +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=1 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +01 01 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire4.spec new file mode 100644 index 0000000..b9b2658 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire4.spec @@ -0,0 +1,8 @@ +# +# SSHFP RDATA +# +[custom] +sections: sshfp +[sshfp] +algorithm: 255 +fingerprint_type: 1 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire4.wire new file mode 100644 index 0000000..f05faad --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire4.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire4.spec +### + +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=255 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +ff 01 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire5.spec new file mode 100644 index 0000000..b3a19fa --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire5.spec @@ -0,0 +1,8 @@ +# +# SSHFP RDATA +# +[custom] +sections: sshfp +[sshfp] +algorithm: 0 +fingerprint_type: 1 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire5.wire new file mode 100644 index 0000000..ddc8edb --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire5.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire5.spec +### + +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=0 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +00 01 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire6.spec new file mode 100644 index 0000000..437e282 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire6.spec @@ -0,0 +1,8 @@ +# +# SSHFP RDATA +# +[custom] +sections: sshfp +[sshfp] +algorithm: 5 +fingerprint_type: 0 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire6.wire new file mode 100644 index 0000000..d4e591e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire6.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire6.spec +### + +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=5 FINGERPRINT_TYPE=0 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +05 00 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire7.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire7.spec new file mode 100644 index 0000000..8e21d11 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire7.spec @@ -0,0 +1,8 @@ +# +# SSHFP RDATA +# +[custom] +sections: sshfp +[sshfp] +algorithm: 255 +fingerprint_type: 255 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire7.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire7.wire new file mode 100644 index 0000000..c8b9d8b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire7.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire7.spec +### + +# SSHFP RDATA, RDLEN=22 +0016 +# ALGORITHM=255 FINGERPRINT_TYPE=255 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +ff ff 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire8.spec b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire8.spec new file mode 100644 index 0000000..98aa00f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire8.spec @@ -0,0 +1,9 @@ +# +# SSHFP RDATA +# +[custom] +sections: sshfp +[sshfp] +fingerprint: 082359342fd9 +algorithm: 255 +fingerprint_type: 255 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire8.wire b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire8.wire new file mode 100644 index 0000000..32cede8 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire8.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_sshfp_fromWire8.spec +### + +# SSHFP RDATA, RDLEN=8 +0008 +# ALGORITHM=255 FINGERPRINT_TYPE=255 FINGERPRINT=082359342fd9 +ff ff 082359342fd9 diff --git a/src/lib/dns/tests/testdata/rdata_sshfp_fromWire9 b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire9 new file mode 100644 index 0000000..05fc806 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_sshfp_fromWire9 @@ -0,0 +1,6 @@ +# Test where fingerprint length is smaller than what RDATA len indicates + +# SSHFP RDATA, RDLEN=32 +0020 +# ALGORITHM=2 FINGERPRINT_TYPE=1 FINGERPRINT=123456789abcdef67890123456789abcdef67890 +02 01 123456789abcdef67890123456789abcdef67890 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire1.spec new file mode 100644 index 0000000..e46d9b3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire1.spec @@ -0,0 +1,6 @@ +# +# A simplest form of TKEY: all default parameters +# +[custom] +sections: tkey +[tkey] diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire1.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire1.wire new file mode 100644 index 0000000..e8ee944 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire1.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire1.spec +### + +# TKEY RDATA, RDLEN=58 +003a +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=32 Key=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire2.spec new file mode 100644 index 0000000..e4a1920 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire2.spec @@ -0,0 +1,8 @@ +# +# TKEY with other data +# +[custom] +sections: tkey +[tkey] +other_len: 8 +other_data: abcd0123 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire2.wire new file mode 100644 index 0000000..614844f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire2.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire2.spec +### + +# TKEY RDATA, RDLEN=66 +0042 +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=32 Key=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Other-Len=8 Other-Data=(see hex) +0008 6162636430313233 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire3.spec new file mode 100644 index 0000000..2566b58 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire3.spec @@ -0,0 +1,9 @@ +# +# TKEY without Key +# +[custom] +sections: tkey +[tkey] +key_len: 0 +other_len: 8 +other_data: abcd0123 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire3.wire new file mode 100644 index 0000000..df27910 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire3.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire3.spec +### + +# TKEY RDATA, RDLEN=34 +0022 +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=0 Key=(see hex) +0000 +# Other-Len=8 Other-Data=(see hex) +0008 6162636430313233 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire4.spec new file mode 100644 index 0000000..33459eb --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire4.spec @@ -0,0 +1,11 @@ +# +# A simplest form of TKEY, but the algorithm name is compressed (quite +# pathological, but we accept it) +# +[custom] +sections: name:tkey +[name] +name: gss-tsig +[tkey] +algorithm: ptr=0 +key_len: 32 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire4.wire new file mode 100644 index 0000000..550052e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire4.wire @@ -0,0 +1,17 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire4.spec +### + +# DNS Name: gss-tsig +086773732d7473696700 + +# TKEY RDATA, RDLEN=50 +0032 +# Algorithm=ptr=0 +c000 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=32 Key=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire5.spec new file mode 100644 index 0000000..6cfa4b4 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire5.spec @@ -0,0 +1,7 @@ +# +# TKEY-like RDATA but RDLEN is too short. +# +[custom] +sections: tkey +[tkey] +rdlen: 57 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire5.wire new file mode 100644 index 0000000..fa32566 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire5.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire5.spec +### + +# TKEY RDATA, RDLEN=57 +0039 +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=32 Key=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire6.spec new file mode 100644 index 0000000..87460a2 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire6.spec @@ -0,0 +1,7 @@ +# +# TKEY-like RDATA but RDLEN is too long. +# +[custom] +sections: tkey +[tkey] +rdlen: 60 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire6.wire new file mode 100644 index 0000000..7f5f112 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire6.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire6.spec +### + +# TKEY RDATA, RDLEN=60 +003c +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=32 Key=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire7.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire7.spec new file mode 100644 index 0000000..3fc0929 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire7.spec @@ -0,0 +1,8 @@ +# +# TKEY-like RDATA but algorithm name is broken. +# +[custom] +sections: tkey +[tkey] +algorithm: "01234567890123456789012345678901234567890123456789012345678901234" +key_len: 32 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire7.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire7.wire new file mode 100644 index 0000000..73b277c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire7.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire7.spec +### + +# TKEY RDATA, RDLEN=117 +0075 +# Algorithm="01234567890123456789012345678901234567890123456789012345678901234" +432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=32 Key=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire8.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire8.spec new file mode 100644 index 0000000..8338279 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire8.spec @@ -0,0 +1,8 @@ +# +# TKEY-like RDATA but Key len is bogus +# +[custom] +sections: tkey +[tkey] +key_len: 65535 +key: "dummy data" diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire8.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire8.wire new file mode 100644 index 0000000..abeb95b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire8.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire8.spec +### + +# TKEY RDATA, RDLEN=38 +0026 +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=65535 Key=(see hex) +ffff 2264756d6d79206461746122 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire9.spec b/src/lib/dns/tests/testdata/rdata_tkey_fromWire9.spec new file mode 100644 index 0000000..9fb63e0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire9.spec @@ -0,0 +1,8 @@ +# +# TKEY-like RDATA but Other-Data length is bogus +# +[custom] +sections: tkey +[tkey] +other_len: 65535 +otherdata: "dummy data" diff --git a/src/lib/dns/tests/testdata/rdata_tkey_fromWire9.wire b/src/lib/dns/tests/testdata/rdata_tkey_fromWire9.wire new file mode 100644 index 0000000..8e5f943 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_fromWire9.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_fromWire9.spec +### + +# TKEY RDATA, RDLEN=58 +003a +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=32 Key=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Other-Len=65535 Other-Data=(see hex) +ffff diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire1.spec b/src/lib/dns/tests/testdata/rdata_tkey_toWire1.spec new file mode 100644 index 0000000..42521a3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire1.spec @@ -0,0 +1,8 @@ +# +# An artificial TKEY RDATA for toWire test. +# +[custom] +sections: tkey +[tkey] +algorithm: gss-tsig +key_len: 0 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire1.wire b/src/lib/dns/tests/testdata/rdata_tkey_toWire1.wire new file mode 100644 index 0000000..3f49a69 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire1.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_toWire1.spec +### + +# TKEY RDATA, RDLEN=26 +001a +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=0 Key=(see hex) +0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire2.spec b/src/lib/dns/tests/testdata/rdata_tkey_toWire2.spec new file mode 100644 index 0000000..25d47e5 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire2.spec @@ -0,0 +1,11 @@ +# +# An artificial TKEY RDATA for toWire test. +# +[custom] +sections: tkey +[tkey] +algorithm: GSS-TSIG +error: 16 +key_len: 12 +# 0x1402... would be FAKEFAKE... if encoded in BASE64 +key: 0x140284140284140284140284 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire2.wire b/src/lib/dns/tests/testdata/rdata_tkey_toWire2.wire new file mode 100644 index 0000000..a1fdb9a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire2.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_toWire2.spec +### + +# TKEY RDATA, RDLEN=38 +0026 +# Algorithm=GSS-TSIG +084753532d5453494700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=16 +608d42c0 608d50d0 0003 0010 +# Key Len=12 Key=(see hex) +000c 140284140284140284140284 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire3.spec b/src/lib/dns/tests/testdata/rdata_tkey_toWire3.spec new file mode 100644 index 0000000..b3ea3db --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire3.spec @@ -0,0 +1,13 @@ +# +# An artificial TKEY RDATA for toWire test. +# +[custom] +sections: tkey +[tkey] +algorithm: gss.tsig +error: 16 +key_len: 12 +# 0x1402... would be FAKEFAKE... if encoded in BASE64 +key: 0x140284140284140284140284 +other_len: 6 +other_data: 0x140284140284 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire3.wire b/src/lib/dns/tests/testdata/rdata_tkey_toWire3.wire new file mode 100644 index 0000000..f2f8a6f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire3.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tkey_toWire3.spec +### + +# TKEY RDATA, RDLEN=44 +002c +# Algorithm=gss.tsig +03677373047473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=16 +608d42c0 608d50d0 0003 0010 +# Key Len=12 Key=(see hex) +000c 140284140284140284140284 +# Other-Len=6 Other-Data=(see hex) +0006 140284140284 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire4.spec b/src/lib/dns/tests/testdata/rdata_tkey_toWire4.spec new file mode 100644 index 0000000..e403c00 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire4.spec @@ -0,0 +1,10 @@ +# +# An artificial TKEY RDATA for toWire test. +# +[custom] +sections: name:tkey +[name] +name: gss-tsig +[tkey] +algorithm: gss-tsig +key_len: 0 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire4.wire b/src/lib/dns/tests/testdata/rdata_tkey_toWire4.wire new file mode 100644 index 0000000..81a1443 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire4.wire @@ -0,0 +1,17 @@ +### +### This data file was auto-generated from rdata_tkey_toWire4.spec +### + +# DNS Name: gss-tsig +086773732d7473696700 + +# TKEY RDATA, RDLEN=26 +001a +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=0 Key=(see hex) +0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire5.spec b/src/lib/dns/tests/testdata/rdata_tkey_toWire5.spec new file mode 100644 index 0000000..b4a1bca --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire5.spec @@ -0,0 +1,10 @@ +# +# An artificial TKEY RDATA for toWire test. +# +[custom] +sections: tkey:name +[tkey] +algorithm: gss-tsig +key_len: 0 +[name] +name: ptr=2 diff --git a/src/lib/dns/tests/testdata/rdata_tkey_toWire5.wire b/src/lib/dns/tests/testdata/rdata_tkey_toWire5.wire new file mode 100644 index 0000000..e59a1f0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tkey_toWire5.wire @@ -0,0 +1,17 @@ +### +### This data file was auto-generated from rdata_tkey_toWire5.spec +### + +# TKEY RDATA, RDLEN=26 +001a +# Algorithm=gss-tsig +086773732d7473696700 +# Inception=1619870400 Expire=1619874000 Mode=3 Error=0 +608d42c0 608d50d0 0003 0000 +# Key Len=0 Key=(see hex) +0000 +# Other-Len=0 Other-Data=(see hex) +0000 + +# DNS Name: ptr=2 +c002 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire new file mode 100644 index 0000000..38e279c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire @@ -0,0 +1,4 @@ +# TLSA RDATA, RDLEN=35 +0023 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=... +00 00 01 d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire10 b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire10 new file mode 100644 index 0000000..67cecb1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire10 @@ -0,0 +1,6 @@ +# Test where certificate association data is missing. + +# TLSA RDATA, RDLEN=35 +0023 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=(missing) +00 00 01 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire11 b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire11 new file mode 100644 index 0000000..4b8ec93 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire11 @@ -0,0 +1,4 @@ +# Test where RDATA is completely missing + +# TLSA RDATA, RDLEN=35 +0023 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire12 b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire12 new file mode 100644 index 0000000..71c7b9c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire12 @@ -0,0 +1,4 @@ +# TLSA RDATA, RDLEN=3 +0003 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=(none) +03 01 02 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire2 b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire2 new file mode 100644 index 0000000..36ce278 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire2 @@ -0,0 +1,4 @@ +# TLSA RDATA, RDLEN=35 +0023 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=... +00 00 01 d2abde240d7cd3ee6b4b28c54df034b97983A1D16E8A410E4561CB106618E971 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire3.spec new file mode 100644 index 0000000..39c8057 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire3.spec @@ -0,0 +1,7 @@ +# +# TLSA RDATA +# +[custom] +sections: tlsa +[tlsa] +certificate_usage: 0 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire3.wire new file mode 100644 index 0000000..6a8b552 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire3.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_tlsa_fromWire3.spec +### + +# TLSA RDATA, RDLEN=34 +0022 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 +00 00 01 d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire4.spec new file mode 100644 index 0000000..d97ae6a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire4.spec @@ -0,0 +1,7 @@ +# +# TLSA RDATA +# +[custom] +sections: tlsa +[tlsa] +certificate_usage: 255 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire4.wire new file mode 100644 index 0000000..b5a39c8 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire4.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_tlsa_fromWire4.spec +### + +# TLSA RDATA, RDLEN=34 +0022 +# CERTIFICATE_USAGE=255 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 +ff 00 01 d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire5.spec new file mode 100644 index 0000000..cc3e296 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire5.spec @@ -0,0 +1,7 @@ +# +# TLSA RDATA +# +[custom] +sections: tlsa +[tlsa] +selector: 255 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire5.wire new file mode 100644 index 0000000..b79f97d --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire5.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_tlsa_fromWire5.spec +### + +# TLSA RDATA, RDLEN=34 +0022 +# CERTIFICATE_USAGE=0 SELECTOR=255 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 +00 ff 01 d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire6.spec new file mode 100644 index 0000000..eed0ab9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire6.spec @@ -0,0 +1,7 @@ +# +# TLSA RDATA +# +[custom] +sections: tlsa +[tlsa] +matching_type: 255 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire6.wire new file mode 100644 index 0000000..02afe27 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire6.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_tlsa_fromWire6.spec +### + +# TLSA RDATA, RDLEN=34 +0022 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=255 CERTIFICATE_ASSOCIATION_DATA=d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 +00 00 ff d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire7.spec b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire7.spec new file mode 100644 index 0000000..576df1e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire7.spec @@ -0,0 +1,9 @@ +# +# TLSA RDATA +# +[custom] +sections: tlsa +[tlsa] +certificate_usage: 3 +selector: 1 +matching_type: 2 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire7.wire b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire7.wire new file mode 100644 index 0000000..e5c23a4 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire7.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_tlsa_fromWire7.spec +### + +# TLSA RDATA, RDLEN=34 +0022 +# CERTIFICATE_USAGE=3 SELECTOR=1 MATCHING_TYPE=2 CERTIFICATE_ASSOCIATION_DATA=d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 +03 01 02 d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire8.spec b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire8.spec new file mode 100644 index 0000000..ef5c108 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire8.spec @@ -0,0 +1,7 @@ +# +# TLSA RDATA +# +[custom] +sections: tlsa +[tlsa] +certificate_association_data: '0123' diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire8.wire b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire8.wire new file mode 100644 index 0000000..dc29a0b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire8.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_tlsa_fromWire8.spec +### + +# TLSA RDATA, RDLEN=4 +0004 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=0123 +00 00 01 0123 diff --git a/src/lib/dns/tests/testdata/rdata_tlsa_fromWire9 b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire9 new file mode 100644 index 0000000..fc4560a --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tlsa_fromWire9 @@ -0,0 +1,7 @@ +# Test where certificate association data length is smaller than what +# RDATA length indicates. + +# TLSA RDATA, RDLEN=64 +0040 +# CERTIFICATE_USAGE=0 SELECTOR=0 MATCHING_TYPE=1 CERTIFICATE_ASSOCIATION_DATA=(32 bytes) +00 00 01 d2abde240d7cd3ee6b4b28c54df034b97983a1d16e8a410e4561cb106618e971 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire1.spec new file mode 100644 index 0000000..a30c371 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire1.spec @@ -0,0 +1,6 @@ +# +# A simplest form of TSIG: all default parameters +# +[custom] +sections: tsig +[tsig] diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire1.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire1.wire new file mode 100644 index 0000000..cec3a0f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire1.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire1.spec +### + +# TSIG RDATA, RDLEN=61 +003d +# Algorithm=hmac-sha256 Time-Signed=1286978795 Fudge=300 +0b686d61632d73686132353600 00004cb5bceb 012c +# MAC Size=32 MAC=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Original-ID=2845 Error=0 +0b1d 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire2.spec new file mode 100644 index 0000000..d1e49a5 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire2.spec @@ -0,0 +1,8 @@ +# +# TSIG with other data (error = BADTIME(18)) +# +[custom] +sections: tsig +[tsig] +mac_size: 0 +error: 18 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire2.wire new file mode 100644 index 0000000..ca85df4 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire2.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire2.spec +### + +# TSIG RDATA, RDLEN=35 +0023 +# Algorithm=hmac-sha256 Time-Signed=1286978795 Fudge=300 +0b686d61632d73686132353600 00004cb5bceb 012c +# MAC Size=0 MAC=(see hex) +0000 +# Original-ID=2845 Error=18 +0b1d 0012 +# Other-Len=6 Other-Data=(see hex) +0006 00004cb5be18 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire3.spec new file mode 100644 index 0000000..57f8e83 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire3.spec @@ -0,0 +1,8 @@ +# +# TSIG without MAC (error = BADSIG(16)) +# +[custom] +sections: tsig +[tsig] +mac_size: 0 +error: 16 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire3.wire new file mode 100644 index 0000000..16c3e39 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire3.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire3.spec +### + +# TSIG RDATA, RDLEN=29 +001d +# Algorithm=hmac-sha256 Time-Signed=1286978795 Fudge=300 +0b686d61632d73686132353600 00004cb5bceb 012c +# MAC Size=0 MAC=(see hex) +0000 +# Original-ID=2845 Error=16 +0b1d 0010 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire4.spec new file mode 100644 index 0000000..8c38e9e --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire4.spec @@ -0,0 +1,11 @@ +# +# A simplest form of TSIG, but the algorithm name is compressed (quite +# pathological, but we accept it) +# +[custom] +sections: name:tsig +[name] +name: hmac-sha256 +[tsig] +algorithm: ptr=0 +mac_size: 32 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire4.wire new file mode 100644 index 0000000..6b8e0f3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire4.wire @@ -0,0 +1,17 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire4.spec +### + +# DNS Name: hmac-sha256 +0b686d61632d73686132353600 + +# TSIG RDATA, RDLEN=50 +0032 +# Algorithm=ptr=0 Time-Signed=1286978795 Fudge=300 +c000 00004cb5bceb 012c +# MAC Size=32 MAC=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Original-ID=2845 Error=0 +0b1d 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire5.spec new file mode 100644 index 0000000..da90b18 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire5.spec @@ -0,0 +1,7 @@ +# +# TSIG-like RDATA but RDLEN is too short. +# +[custom] +sections: tsig +[tsig] +rdlen: 60 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire5.wire new file mode 100644 index 0000000..9656ce2 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire5.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire5.spec +### + +# TSIG RDATA, RDLEN=60 +003c +# Algorithm=hmac-sha256 Time-Signed=1286978795 Fudge=300 +0b686d61632d73686132353600 00004cb5bceb 012c +# MAC Size=32 MAC=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Original-ID=2845 Error=0 +0b1d 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire6.spec new file mode 100644 index 0000000..9d2f627 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire6.spec @@ -0,0 +1,7 @@ +# +# TSIG-like RDATA but RDLEN is too long. +# +[custom] +sections: tsig +[tsig] +rdlen: 63 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire6.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire6.wire new file mode 100644 index 0000000..bb1ecfb --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire6.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire6.spec +### + +# TSIG RDATA, RDLEN=63 +003f +# Algorithm=hmac-sha256 Time-Signed=1286978795 Fudge=300 +0b686d61632d73686132353600 00004cb5bceb 012c +# MAC Size=32 MAC=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Original-ID=2845 Error=0 +0b1d 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire7.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire7.spec new file mode 100644 index 0000000..ed7a81c --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire7.spec @@ -0,0 +1,8 @@ +# +# TSIG-like RDATA but algorithm name is broken. +# +[custom] +sections: tsig +[tsig] +algorithm: "01234567890123456789012345678901234567890123456789012345678901234" +mac_size: 32 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire7.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire7.wire new file mode 100644 index 0000000..327211f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire7.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire7.spec +### + +# TSIG RDATA, RDLEN=117 +0075 +# Algorithm="01234567890123456789012345678901234567890123456789012345678901234" Time-Signed=1286978795 Fudge=300 +432230313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233342200 00004cb5bceb 012c +# MAC Size=32 MAC=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Original-ID=2845 Error=0 +0b1d 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire8.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire8.spec new file mode 100644 index 0000000..0b44f87 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire8.spec @@ -0,0 +1,8 @@ +# +# TSIG-like RDATA but MAC size is bogus +# +[custom] +sections: tsig +[tsig] +mac_size: 65535 +mac: "dummy data" diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire8.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire8.wire new file mode 100644 index 0000000..a4209f9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire8.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire8.spec +### + +# TSIG RDATA, RDLEN=41 +0029 +# Algorithm=hmac-sha256 Time-Signed=1286978795 Fudge=300 +0b686d61632d73686132353600 00004cb5bceb 012c +# MAC Size=65535 MAC=(see hex) +ffff 2264756d6d79206461746122 +# Original-ID=2845 Error=0 +0b1d 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire9.spec b/src/lib/dns/tests/testdata/rdata_tsig_fromWire9.spec new file mode 100644 index 0000000..f512fb4 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire9.spec @@ -0,0 +1,8 @@ +# +# TSIG-like RDATA but Other-Data length is bogus +# +[custom] +sections: tsig +[tsig] +other_len: 65535 +otherdata: "dummy data" diff --git a/src/lib/dns/tests/testdata/rdata_tsig_fromWire9.wire b/src/lib/dns/tests/testdata/rdata_tsig_fromWire9.wire new file mode 100644 index 0000000..b356825 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_fromWire9.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_fromWire9.spec +### + +# TSIG RDATA, RDLEN=61 +003d +# Algorithm=hmac-sha256 Time-Signed=1286978795 Fudge=300 +0b686d61632d73686132353600 00004cb5bceb 012c +# MAC Size=32 MAC=(see hex) +0020 7878787878787878787878787878787878787878787878787878787878787878 +# Original-ID=2845 Error=0 +0b1d 0000 +# Other-Len=65535 Other-Data=(see hex) +ffff diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire1.spec b/src/lib/dns/tests/testdata/rdata_tsig_toWire1.spec new file mode 100644 index 0000000..eb74000 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire1.spec @@ -0,0 +1,11 @@ +# +# An artificial TSIG RDATA for toWire test. +# +[custom] +sections: tsig +[tsig] +algorithm: hmac-md5 +time_signed: 1286779327 +mac_size: 0 +original_id: 16020 +error: 17 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire1.wire b/src/lib/dns/tests/testdata/rdata_tsig_toWire1.wire new file mode 100644 index 0000000..c368853 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire1.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_toWire1.spec +### + +# TSIG RDATA, RDLEN=42 +002a +# Algorithm=hmac-md5 Time-Signed=1286779327 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004cb2b1bf 012c +# MAC Size=0 MAC=(see hex) +0000 +# Original-ID=16020 Error=17 +3e94 0011 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire2.spec b/src/lib/dns/tests/testdata/rdata_tsig_toWire2.spec new file mode 100644 index 0000000..b2c38e9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire2.spec @@ -0,0 +1,13 @@ +# +# An artificial TSIG RDATA for toWire test. +# +[custom] +sections: tsig +[tsig] +algorithm: hmac-sha256 +time_signed: 1286779327 +mac_size: 12 +# 0x1402... would be FAKEFAKE... if encoded in BASE64 +mac: 0x140284140284140284140284 +original_id: 16020 +error: 16 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire2.wire b/src/lib/dns/tests/testdata/rdata_tsig_toWire2.wire new file mode 100644 index 0000000..7ea336d --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire2.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_toWire2.spec +### + +# TSIG RDATA, RDLEN=41 +0029 +# Algorithm=hmac-sha256 Time-Signed=1286779327 Fudge=300 +0b686d61632d73686132353600 00004cb2b1bf 012c +# MAC Size=12 MAC=(see hex) +000c 140284140284140284140284 +# Original-ID=16020 Error=16 +3e94 0010 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire3.spec b/src/lib/dns/tests/testdata/rdata_tsig_toWire3.spec new file mode 100644 index 0000000..6520a08 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire3.spec @@ -0,0 +1,15 @@ +# +# An artificial TSIG RDATA for toWire test. +# +[custom] +sections: tsig +[tsig] +algorithm: hmac-sha1 +time_signed: 1286779327 +mac_size: 12 +# 0x1402... would be FAKEFAKE... if encoded in BASE64 +mac: 0x140284140284140284140284 +original_id: 16020 +error: 18 +other_len: 6 +other_data: 0x140284140284 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire3.wire b/src/lib/dns/tests/testdata/rdata_tsig_toWire3.wire new file mode 100644 index 0000000..535a83b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire3.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from rdata_tsig_toWire3.spec +### + +# TSIG RDATA, RDLEN=45 +002d +# Algorithm=hmac-sha1 Time-Signed=1286779327 Fudge=300 +09686d61632d7368613100 00004cb2b1bf 012c +# MAC Size=12 MAC=(see hex) +000c 140284140284140284140284 +# Original-ID=16020 Error=18 +3e94 0012 +# Other-Len=6 Other-Data=(see hex) +0006 140284140284 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire4.spec b/src/lib/dns/tests/testdata/rdata_tsig_toWire4.spec new file mode 100644 index 0000000..d95cd23 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire4.spec @@ -0,0 +1,13 @@ +# +# An artificial TSIG RDATA for toWire test. +# +[custom] +sections: name:tsig +[name] +name: hmac-md5.sig-alg.reg.int. +[tsig] +algorithm: hmac-md5 +time_signed: 1286779327 +mac_size: 0 +original_id: 16020 +error: 17 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire4.wire b/src/lib/dns/tests/testdata/rdata_tsig_toWire4.wire new file mode 100644 index 0000000..5e8f68b --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire4.wire @@ -0,0 +1,17 @@ +### +### This data file was auto-generated from rdata_tsig_toWire4.spec +### + +# DNS Name: hmac-md5.sig-alg.reg.int. +08686d61632d6d6435077369672d616c670372656703696e7400 + +# TSIG RDATA, RDLEN=42 +002a +# Algorithm=hmac-md5 Time-Signed=1286779327 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004cb2b1bf 012c +# MAC Size=0 MAC=(see hex) +0000 +# Original-ID=16020 Error=17 +3e94 0011 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire5.spec b/src/lib/dns/tests/testdata/rdata_tsig_toWire5.spec new file mode 100644 index 0000000..81e3a78 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire5.spec @@ -0,0 +1,13 @@ +# +# An artificial TSIG RDATA for toWire test. +# +[custom] +sections: tsig:name +[tsig] +algorithm: hmac-md5 +time_signed: 1286779327 +mac_size: 0 +original_id: 16020 +error: 17 +[name] +name: ptr=2 diff --git a/src/lib/dns/tests/testdata/rdata_tsig_toWire5.wire b/src/lib/dns/tests/testdata/rdata_tsig_toWire5.wire new file mode 100644 index 0000000..bc83de6 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_tsig_toWire5.wire @@ -0,0 +1,17 @@ +### +### This data file was auto-generated from rdata_tsig_toWire5.spec +### + +# TSIG RDATA, RDLEN=42 +002a +# Algorithm=hmac-md5 Time-Signed=1286779327 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004cb2b1bf 012c +# MAC Size=0 MAC=(see hex) +0000 +# Original-ID=16020 Error=17 +3e94 0011 +# Other-Len=0 Other-Data=(see hex) +0000 + +# DNS Name: ptr=2 +c002 diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire1 b/src/lib/dns/tests/testdata/rdata_txt_fromWire1 new file mode 100644 index 0000000..547d76f --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire1 @@ -0,0 +1,9 @@ +# +# various kinds of TXT RDATA stored in an input buffer +# +# Valid RDATA for "Test-String" +# +# RDLENGTH=12 bytes + 00 0c +# T e s t - S t r i n g + 0b 54 65 73 74 2d 53 74 72 69 6e 67 diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_txt_fromWire2.spec new file mode 100644 index 0000000..c5829d9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire2.spec @@ -0,0 +1,8 @@ +# +# TXT RDATA with empty character-string. unusual, but valid. +# + +[custom] +sections: txt +[txt] +string: '' diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire2.wire b/src/lib/dns/tests/testdata/rdata_txt_fromWire2.wire new file mode 100644 index 0000000..83ebea3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire2.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_txt_fromWire2.spec +### + +# TXT RDATA, RDLEN=1 +0001 +# String Len=0, String="" +00 diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_txt_fromWire3.spec new file mode 100644 index 0000000..fe5c129 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire3.spec @@ -0,0 +1,8 @@ +# +# TXT RDATA with multiple character-strings. +# + +[custom] +sections: txt +[txt] +nstring: 2 diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire3.wire b/src/lib/dns/tests/testdata/rdata_txt_fromWire3.wire new file mode 100644 index 0000000..42fdf76 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire3.wire @@ -0,0 +1,10 @@ +### +### This data file was auto-generated from rdata_txt_fromWire3.spec +### + +# TXT RDATA, RDLEN=24 +0018 +# String Len=11, String="Test-String" +0b 546573742d537472696e67 +# String Len=11, String="Test-String" +0b 546573742d537472696e67 diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_txt_fromWire4.spec new file mode 100644 index 0000000..0e015d4 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire4.spec @@ -0,0 +1,9 @@ +# +# Malformed TXT RDATA: RDLEN is 0 +# + +[custom] +sections: txt +[txt] +rdlen: 0 +# following data is provided, but that doesn't matter. diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire4.wire b/src/lib/dns/tests/testdata/rdata_txt_fromWire4.wire new file mode 100644 index 0000000..6ac73b8 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire4.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_txt_fromWire4.spec +### + +# TXT RDATA, RDLEN=0 +0000 +# String Len=11, String="Test-String" +0b 546573742d537472696e67 diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_txt_fromWire5.spec new file mode 100644 index 0000000..7710cdf --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire5.spec @@ -0,0 +1,9 @@ +# +# Malformed TXT RDATA: character-string length is too large +# + +[custom] +sections: txt +[txt] +stringlen: 255 +string: 'too short' diff --git a/src/lib/dns/tests/testdata/rdata_txt_fromWire5.wire b/src/lib/dns/tests/testdata/rdata_txt_fromWire5.wire new file mode 100644 index 0000000..ea7a9cf --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_txt_fromWire5.wire @@ -0,0 +1,8 @@ +### +### This data file was auto-generated from rdata_txt_fromWire5.spec +### + +# TXT RDATA, RDLEN=10 +000a +# String Len=255, String="too short" +ff 746f6f2073686f7274 diff --git a/src/lib/dns/tests/testdata/rdata_unknown_fromWire b/src/lib/dns/tests/testdata/rdata_unknown_fromWire new file mode 100644 index 0000000..69ea8ff --- /dev/null +++ b/src/lib/dns/tests/testdata/rdata_unknown_fromWire @@ -0,0 +1,13 @@ +# +# various kinds of "unknown" RDATA stored in an input buffer +# +# 0 1 2 3 4 5 (bytes) + 00 04 a1 b2 c3 0d +# +# 0-length data +# 6 7 + 00 00 +# +# short buffer (this can be tested only at the end of the buffer) +# 8 9 10 1 2 + 00 04 a1 b2 c3 diff --git a/src/lib/dns/tests/testdata/rdatafields1.spec b/src/lib/dns/tests/testdata/rdatafields1.spec new file mode 100644 index 0000000..6e105fb --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields1.spec @@ -0,0 +1,10 @@ +# +# A sequence of names that could be compressed (but not compressed) +# + +[custom] +sections: name/1:name/2 +[name/1] +name: www.example.com +[name/2] +name: example.com diff --git a/src/lib/dns/tests/testdata/rdatafields1.wire b/src/lib/dns/tests/testdata/rdatafields1.wire new file mode 100644 index 0000000..42028c1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields1.wire @@ -0,0 +1,9 @@ +### +### This data file was auto-generated from rdatafields1.spec +### + +# DNS Name: www.example.com +03777777076578616d706c6503636f6d00 + +# DNS Name: example.com +076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdatafields2.spec b/src/lib/dns/tests/testdata/rdatafields2.spec new file mode 100644 index 0000000..920dc95 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields2.spec @@ -0,0 +1,11 @@ +# +# A sequence of names that can be compressed. +# + +[custom] +sections: name/1:name/2 +[name/1] +name: www.example.com +[name/2] +name: '' +pointer: 4 diff --git a/src/lib/dns/tests/testdata/rdatafields2.wire b/src/lib/dns/tests/testdata/rdatafields2.wire new file mode 100644 index 0000000..cbb0ce0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields2.wire @@ -0,0 +1,9 @@ +### +### This data file was auto-generated from rdatafields2.spec +### + +# DNS Name: www.example.com +03777777076578616d706c6503636f6d00 + +# DNS Name: + compression pointer: 4 +c004 diff --git a/src/lib/dns/tests/testdata/rdatafields3.spec b/src/lib/dns/tests/testdata/rdatafields3.spec new file mode 100644 index 0000000..b37fca3 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields3.spec @@ -0,0 +1,11 @@ +# +# TXT RDATA with multiple character-strings. +# + +[custom] +sections: txt +[txt] +nstring: 3 +string0: 'first string' +string1: 'second string' +string2: 'last string' diff --git a/src/lib/dns/tests/testdata/rdatafields3.wire b/src/lib/dns/tests/testdata/rdatafields3.wire new file mode 100644 index 0000000..3ff32f1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields3.wire @@ -0,0 +1,12 @@ +### +### This data file was auto-generated from rdatafields3.spec +### + +# TXT RDATA, RDLEN=39 +0027 +# String Len=12, String="first string" +0c 666972737420737472696e67 +# String Len=13, String="second string" +0d 7365636f6e6420737472696e67 +# String Len=11, String="last string" +0b 6c61737420737472696e67 diff --git a/src/lib/dns/tests/testdata/rdatafields4.spec b/src/lib/dns/tests/testdata/rdatafields4.spec new file mode 100644 index 0000000..24b59aa --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields4.spec @@ -0,0 +1,7 @@ +# +# Simple form of RRSIG (all fields use the default of generator script) +# + +[custom] +sections: rrsig +[rrsig] diff --git a/src/lib/dns/tests/testdata/rdatafields4.wire b/src/lib/dns/tests/testdata/rdatafields4.wire new file mode 100644 index 0000000..e574426 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields4.wire @@ -0,0 +1,12 @@ +### +### This data file was auto-generated from rdatafields4.spec +### + +# RRSIG RDATA, RDLEN=46 +002e +# Covered=A(1) Algorithm=RSASHA1(5) Labels=2 OrigTTL=3600 +0001 05 02 00000e10 +# Expiration=1264935600, Inception=1262343600 +4b6562b0 4b3dd5b0 +# Tag=4149 Signer=example.com and Signature +1035 076578616d706c6503636f6d00 123456789abcdef123456789abcdef diff --git a/src/lib/dns/tests/testdata/rdatafields5.spec b/src/lib/dns/tests/testdata/rdatafields5.spec new file mode 100644 index 0000000..2c78282 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields5.spec @@ -0,0 +1,12 @@ +# +# Names and RDATA (RRSIG) with an incompressible name. All names are +# rendered without compression. +# + +[custom] +sections: name/1:rrsig:name/2 +[name/1] +name: com +[rrsig] +[name/2] +name: www.example.com diff --git a/src/lib/dns/tests/testdata/rdatafields5.wire b/src/lib/dns/tests/testdata/rdatafields5.wire new file mode 100644 index 0000000..d0cebc9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields5.wire @@ -0,0 +1,18 @@ +### +### This data file was auto-generated from rdatafields5.spec +### + +# DNS Name: com +03636f6d00 + +# RRSIG RDATA, RDLEN=46 +002e +# Covered=A(1) Algorithm=RSASHA1(5) Labels=2 OrigTTL=3600 +0001 05 02 00000e10 +# Expiration=1264935600, Inception=1262343600 +4b6562b0 4b3dd5b0 +# Tag=4149 Signer=example.com and Signature +1035 076578616d706c6503636f6d00 123456789abcdef123456789abcdef + +# DNS Name: www.example.com +03777777076578616d706c6503636f6d00 diff --git a/src/lib/dns/tests/testdata/rdatafields6.spec b/src/lib/dns/tests/testdata/rdatafields6.spec new file mode 100644 index 0000000..f9f0da1 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields6.spec @@ -0,0 +1,13 @@ +# +# Names and RDATA (RRSIG) with an incompressible name. The name in RRSIG +# isn't compressed, but it's used as the compression target. +# + +[custom] +sections: name/1:rrsig:name/2 +[name/1] +name: com +[rrsig] +[name/2] +name: www +pointer: 25 diff --git a/src/lib/dns/tests/testdata/rdatafields6.wire b/src/lib/dns/tests/testdata/rdatafields6.wire new file mode 100644 index 0000000..0e8b3d9 --- /dev/null +++ b/src/lib/dns/tests/testdata/rdatafields6.wire @@ -0,0 +1,18 @@ +### +### This data file was auto-generated from rdatafields6.spec +### + +# DNS Name: com +03636f6d00 + +# RRSIG RDATA, RDLEN=46 +002e +# Covered=A(1) Algorithm=RSASHA1(5) Labels=2 OrigTTL=3600 +0001 05 02 00000e10 +# Expiration=1264935600, Inception=1262343600 +4b6562b0 4b3dd5b0 +# Tag=4149 Signer=example.com and Signature +1035 076578616d706c6503636f6d00 123456789abcdef123456789abcdef + +# DNS Name: www + compression pointer: 25 +03777777c019 diff --git a/src/lib/dns/tests/testdata/rrcode16_fromWire1 b/src/lib/dns/tests/testdata/rrcode16_fromWire1 new file mode 100644 index 0000000..df2a177 --- /dev/null +++ b/src/lib/dns/tests/testdata/rrcode16_fromWire1 @@ -0,0 +1,4 @@ +# +# a 16 bit wire-format data (network byte order) +# +1234 diff --git a/src/lib/dns/tests/testdata/rrcode16_fromWire2 b/src/lib/dns/tests/testdata/rrcode16_fromWire2 new file mode 100644 index 0000000..fec2dd0 --- /dev/null +++ b/src/lib/dns/tests/testdata/rrcode16_fromWire2 @@ -0,0 +1,4 @@ +# +# an incomplete segment for a 16 bit wire-format data +# +12 diff --git a/src/lib/dns/tests/testdata/rrcode32_fromWire1 b/src/lib/dns/tests/testdata/rrcode32_fromWire1 new file mode 100644 index 0000000..fb2818f --- /dev/null +++ b/src/lib/dns/tests/testdata/rrcode32_fromWire1 @@ -0,0 +1,4 @@ +# +# a 32 bit wire-format data (network byte order) +# +12345678 diff --git a/src/lib/dns/tests/testdata/rrcode32_fromWire2 b/src/lib/dns/tests/testdata/rrcode32_fromWire2 new file mode 100644 index 0000000..504d9d2 --- /dev/null +++ b/src/lib/dns/tests/testdata/rrcode32_fromWire2 @@ -0,0 +1,4 @@ +# +# an incomplete segment for a 32 bit wire-format data +# +123456 diff --git a/src/lib/dns/tests/testdata/rrset_toWire1 b/src/lib/dns/tests/testdata/rrset_toWire1 new file mode 100644 index 0000000..8f81a0e --- /dev/null +++ b/src/lib/dns/tests/testdata/rrset_toWire1 @@ -0,0 +1,23 @@ +# +# Rendering an IN/A RRset containing 2 RRs: +# test.example.com. 3600 IN A 192.0.2.1 +# test.example.com. 3600 IN A 192.0.2.2 +# +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# type/class: A = 1, IN = 1 +00 01 00 01 +# TTL: 3600 +00 00 0e 10 +#6 7 +# RDLENGTH: 4 +00 04 +# RDATA: 192.0.2.1 +c0 00 02 01 +# +# 2nd RR: mostly the same except the RDATA +04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +00 01 00 01 +00 00 0e 10 +00 04 +c0 00 02 02 diff --git a/src/lib/dns/tests/testdata/rrset_toWire2 b/src/lib/dns/tests/testdata/rrset_toWire2 new file mode 100644 index 0000000..ca6483f --- /dev/null +++ b/src/lib/dns/tests/testdata/rrset_toWire2 @@ -0,0 +1,38 @@ +# +# Rendering an IN/A RRset and NS RRset as follows: +# test.example.com. 3600 IN A 192.0.2.1 +# test.example.com. 3600 IN A 192.0.2.2 +# example.com. 1D IN NS ns.example.com. +# Names will be compressed when possible. +# +# 0 1 2 3 4 5 +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# type/class: A = 1, IN = 1 +00 01 00 01 +# TTL: 3600 +00 00 0e 10 +#6 7 +# RDLENGTH: 4 +00 04 +# RDATA: 192.0.2.1 +c0 00 02 01 +# +# 2nd RR: the owner name is compressed +c0 00 +00 01 00 01 +00 00 0e 10 +00 04 +c0 00 02 02 +# 3rd RR: the owner name and NS name are compressed +# pointing to the 5th octet of the owner name of the 1st RR +c0 05 +# type/class: NS = 2, IN = 1 +00 02 00 01 +# TTL: 1D = 86400sec = 0x15180 +00 01 51 80 +# RDLENGTH: 5 octets +00 05 +# NSDNAME: "ns." + compression pointer +#(2) n s + 02 6e 73 c0 05 diff --git a/src/lib/dns/tests/testdata/rrset_toWire3 b/src/lib/dns/tests/testdata/rrset_toWire3 new file mode 100644 index 0000000..47f8e6b --- /dev/null +++ b/src/lib/dns/tests/testdata/rrset_toWire3 @@ -0,0 +1,12 @@ +# +# Rendering an empty IN/A RRset +# +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# type/class: A = 1, ANY = 255 +00 01 00 ff +# TTL: 3600 +00 00 0e 10 +#6 7 +# RDLENGTH: 0 +00 00 diff --git a/src/lib/dns/tests/testdata/rrset_toWire4 b/src/lib/dns/tests/testdata/rrset_toWire4 new file mode 100644 index 0000000..6fb409c --- /dev/null +++ b/src/lib/dns/tests/testdata/rrset_toWire4 @@ -0,0 +1,12 @@ +# +# Rendering an empty IN/A RRset +# +#(4) t e s t (7) e x a m p l e (3) c o m . + 04 74 65 73 74 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 +# type/class: A = 1, ANY = 255 +00 01 00 fe +# TTL: 3600 +00 00 0e 10 +#6 7 +# RDLENGTH: 0 +00 00 diff --git a/src/lib/dns/tests/testdata/tsig_verify1.spec b/src/lib/dns/tests/testdata/tsig_verify1.spec new file mode 100644 index 0000000..687013a --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify1.spec @@ -0,0 +1,19 @@ +# +# An example of signed AXFR request +# + +[custom] +sections: header:question:tsig +[header] +id: 0x3410 +arcount: 1 +[question] +rrtype: AXFR +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8e951 +mac_size: 16 +mac: 0x35b2fd08268781634400c7c8a5533b13 +original_id: 0x3410 diff --git a/src/lib/dns/tests/testdata/tsig_verify1.wire b/src/lib/dns/tests/testdata/tsig_verify1.wire new file mode 100644 index 0000000..b2d12f1 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify1.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from tsig_verify1.spec +### + +# Header Section +# ID=13328 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) +3410 0000 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=example.com. QTYPE=AXFR(252) QCLASS=IN(1) +076578616d706c6503636f6d00 00fc 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302915409 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8e951 012c +# MAC Size=16 MAC=(see hex) +0010 35b2fd08268781634400c7c8a5533b13 +# Original-ID=13328 Error=0 +3410 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify10.spec b/src/lib/dns/tests/testdata/tsig_verify10.spec new file mode 100644 index 0000000..33ce83e --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify10.spec @@ -0,0 +1,22 @@ +# +# A simple DNS query message with TSIG signed whose MAC is too short +# (only 1 byte) +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 1 +mac: 0x22 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify10.wire b/src/lib/dns/tests/testdata/tsig_verify10.wire new file mode 100644 index 0000000..9ffe4ea --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify10.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from tsig_verify10.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=43) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 002b +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=1 MAC=(see hex) +0001 22 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify11.spec b/src/lib/dns/tests/testdata/tsig_verify11.spec new file mode 100644 index 0000000..9927b48 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify11.spec @@ -0,0 +1,24 @@ +# +# A simple DNS query message with TSIG signed with truncated MAC +# using common HMAC-SHA512-256 +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-sha512 +time_signed: 0x4da8877a +#mac_size: 64 +mac_size: 32 +#mac: 0xc4bc4053572d62dd1b26998111565c18056be773dedc6ecea60dff31db2f25966e5d9bafbaaed56efbd5ee2d7e2a12ede4caad630ddf69846c980409724da34e +mac: 0xc4bc4053572d62dd1b26998111565c18056be773dedc6ecea60dff31db2f2596 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify11.wire b/src/lib/dns/tests/testdata/tsig_verify11.wire new file mode 100644 index 0000000..f0a8f4f --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify11.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from tsig_verify11.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=61) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003d +# Algorithm=hmac-sha512 Time-Signed=1302890362 Fudge=300 +0b686d61632d73686135313200 00004da8877a 012c +# MAC Size=32 MAC=(see hex) +0020 c4bc4053572d62dd1b26998111565c18056be773dedc6ecea60dff31db2f2596 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify2.spec b/src/lib/dns/tests/testdata/tsig_verify2.spec new file mode 100644 index 0000000..ff98ca3 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify2.spec @@ -0,0 +1,32 @@ +# +# An example of signed AXFR response +# + +[custom] +sections: header:question:soa:tsig +[header] +id: 0x3410 +aa: 1 +qr: 1 +ancount: 1 +arcount: 1 +[question] +rrtype: AXFR +[soa] +# note that names are compressed in this RR +as_rr: True +rr_name: ptr=12 +mname: ns.ptr=12 +rname: root.ptr=12 +serial: 2011041503 +refresh: 7200 +retry: 3600 +expire: 2592000 +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8e951 +mac_size: 16 +mac: 0xbdd612cd2c7f9e0648bd6dc23713e83c +original_id: 0x3410 diff --git a/src/lib/dns/tests/testdata/tsig_verify2.wire b/src/lib/dns/tests/testdata/tsig_verify2.wire new file mode 100644 index 0000000..65f5f89 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify2.wire @@ -0,0 +1,31 @@ +### +### This data file was auto-generated from tsig_verify2.spec +### + +# Header Section +# ID=13328 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA +3410 8400 +# QDCNT=1, ANCNT=1, NSCNT=0, ARCNT=1 +0001 0001 0000 0001 + +# Question Section +# QNAME=example.com. QTYPE=AXFR(252) QCLASS=IN(1) +076578616d706c6503636f6d00 00fc 0001 + +# SOA RR (QNAME=ptr=12 Class=IN(1) TTL=86400, RDLEN=32) +c00c 0006 0001 00015180 0020 +# NNAME=ns.ptr=12 RNAME=root.ptr=12 +026e73c00c 04726f6f74c00c +# SERIAL(2011041503) REFRESH(7200) RETRY(3600) EXPIRE(2592000) MINIMUM(1200) +77de0edf 00001c20 00000e10 00278d00 000004b0 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302915409 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8e951 012c +# MAC Size=16 MAC=(see hex) +0010 bdd612cd2c7f9e0648bd6dc23713e83c +# Original-ID=13328 Error=0 +3410 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify3.spec b/src/lib/dns/tests/testdata/tsig_verify3.spec new file mode 100644 index 0000000..7e2f797 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify3.spec @@ -0,0 +1,26 @@ +# +# An example of signed AXFR response (continued) +# + +[custom] +sections: header:ns:tsig +[header] +id: 0x3410 +aa: 1 +qr: 1 +qdcount: 0 +ancount: 1 +arcount: 1 +[ns] +# note that names are compressed in this RR +as_rr: True +rr_name: example.com. +nsname: ns.ptr=12 +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8e951 +mac_size: 16 +mac: 0x102458f7f62ddd7d638d746034130968 +original_id: 0x3410 diff --git a/src/lib/dns/tests/testdata/tsig_verify3.wire b/src/lib/dns/tests/testdata/tsig_verify3.wire new file mode 100644 index 0000000..c479ac3 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify3.wire @@ -0,0 +1,25 @@ +### +### This data file was auto-generated from tsig_verify3.spec +### + +# Header Section +# ID=13328 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA +3410 8400 +# QDCNT=0, ANCNT=1, NSCNT=0, ARCNT=1 +0000 0001 0000 0001 + +# NS RR (QNAME=example.com. Class=IN(1) TTL=86400, RDLEN=5) +076578616d706c6503636f6d00 0002 0001 00015180 0005 +# NS name=ns.ptr=12 +026e73c00c + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302915409 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8e951 012c +# MAC Size=16 MAC=(see hex) +0010 102458f7f62ddd7d638d746034130968 +# Original-ID=13328 Error=0 +3410 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify4.spec b/src/lib/dns/tests/testdata/tsig_verify4.spec new file mode 100644 index 0000000..4ffbbcf --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify4.spec @@ -0,0 +1,27 @@ +# +# An example of signed DNS response with bogus MAC +# + +[custom] +sections: header:question:a:tsig +[header] +id: 0x2d65 +aa: 1 +qr: 1 +rd: 1 +ancount: 1 +arcount: 1 +[question] +name: www.example.com +[a] +as_rr: True +rr_name: ptr=12 +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +# bogus MAC +mac: 0xdeadbeefdeadbeefdeadbeefdeadbeef +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify4.wire b/src/lib/dns/tests/testdata/tsig_verify4.wire new file mode 100644 index 0000000..de5e050 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify4.wire @@ -0,0 +1,29 @@ +### +### This data file was auto-generated from tsig_verify4.spec +### + +# Header Section +# ID=11621 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA RD +2d65 8500 +# QDCNT=1, ANCNT=1, NSCNT=0, ARCNT=1 +0001 0001 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# A RR (QNAME=ptr=12 Class=IN(1) TTL=86400, RDLEN=4) +c00c 0001 0001 00015180 0004 +# Address=192.0.2.1 +c0000201 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 deadbeefdeadbeefdeadbeefdeadbeef +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify5.spec b/src/lib/dns/tests/testdata/tsig_verify5.spec new file mode 100644 index 0000000..a6cc643 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify5.spec @@ -0,0 +1,26 @@ +# +# An example of signed DNS response +# + +[custom] +sections: header:question:a:tsig +[header] +id: 0x2d65 +aa: 1 +qr: 1 +rd: 1 +ancount: 1 +arcount: 1 +[question] +name: www.example.com +[a] +as_rr: True +rr_name: ptr=12 +[tsig] +as_rr: True +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x8fcda66a7cd1a3b9948eb1869d384a9f +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify5.wire b/src/lib/dns/tests/testdata/tsig_verify5.wire new file mode 100644 index 0000000..3cfb89b --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify5.wire @@ -0,0 +1,29 @@ +### +### This data file was auto-generated from tsig_verify5.spec +### + +# Header Section +# ID=11621 QR=Response Opcode=QUERY(0) Rcode=NOERROR(0) AA RD +2d65 8500 +# QDCNT=1, ANCNT=1, NSCNT=0, ARCNT=1 +0001 0001 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# A RR (QNAME=ptr=12 Class=IN(1) TTL=86400, RDLEN=4) +c00c 0001 0001 00015180 0004 +# Address=192.0.2.1 +c0000201 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 8fcda66a7cd1a3b9948eb1869d384a9f +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify6.spec b/src/lib/dns/tests/testdata/tsig_verify6.spec new file mode 100644 index 0000000..32e0818 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify6.spec @@ -0,0 +1,21 @@ +# +# Forwarded DNS query message with TSIG signed (header ID != orig ID) +# + +[custom] +sections: header:question:tsig +[header] +id: 0x1035 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify6.wire b/src/lib/dns/tests/testdata/tsig_verify6.wire new file mode 100644 index 0000000..9e3e5b4 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify6.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from tsig_verify6.spec +### + +# Header Section +# ID=4149 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +1035 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify7.spec b/src/lib/dns/tests/testdata/tsig_verify7.spec new file mode 100644 index 0000000..377578e --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify7.spec @@ -0,0 +1,21 @@ +# +# DNS query message with TSIG that has empty MAC (invalidly) +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 0 +mac: '' +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify7.wire b/src/lib/dns/tests/testdata/tsig_verify7.wire new file mode 100644 index 0000000..4de7d24 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify7.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from tsig_verify7.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=42) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 002a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=0 MAC=(see hex) +0000 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify8.spec b/src/lib/dns/tests/testdata/tsig_verify8.spec new file mode 100644 index 0000000..5432d4a --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify8.spec @@ -0,0 +1,23 @@ +# +# DNS query message with TSIG that has empty MAC + BADKEY error +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 0 +mac: '' +# 17: BADKEY +error: 17 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify8.wire b/src/lib/dns/tests/testdata/tsig_verify8.wire new file mode 100644 index 0000000..50845eb --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify8.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from tsig_verify8.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=42) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 002a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=0 MAC=(see hex) +0000 +# Original-ID=11621 Error=17 +2d65 0011 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsig_verify9.spec b/src/lib/dns/tests/testdata/tsig_verify9.spec new file mode 100644 index 0000000..5888455 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify9.spec @@ -0,0 +1,21 @@ +# +# A simple DNS query message with TSIG signed, but TSIG key and algorithm +# names have upper case characters (unusual) +# + +[custom] +sections: header:question:tsig +[header] +id: 0x2d65 +rd: 1 +arcount: 1 +[question] +name: www.example.com +[tsig] +as_rr: True +rr_name: WWW.EXAMPLE.COM +algorithm: HMAC-MD5.SIG-ALG.REG.INT +time_signed: 0x4da8877a +mac_size: 16 +mac: 0x227026ad297beee721ce6c6fff1e9ef3 +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsig_verify9.wire b/src/lib/dns/tests/testdata/tsig_verify9.wire new file mode 100644 index 0000000..163fcee --- /dev/null +++ b/src/lib/dns/tests/testdata/tsig_verify9.wire @@ -0,0 +1,24 @@ +### +### This data file was auto-generated from tsig_verify9.spec +### + +# Header Section +# ID=11621 QR=Query Opcode=QUERY(0) Rcode=NOERROR(0) RD +2d65 0100 +# QDCNT=1, ANCNT=0, NSCNT=0, ARCNT=1 +0001 0000 0000 0001 + +# Question Section +# QNAME=www.example.com QTYPE=A(1) QCLASS=IN(1) +03777777076578616d706c6503636f6d00 0001 0001 + +# TSIG RR (QNAME=WWW.EXAMPLE.COM Class=ANY(255) TTL=0, RDLEN=58) +03575757074558414d504c4503434f4d00 00fa 00ff 00000000 003a +# Algorithm=HMAC-MD5.SIG-ALG.REG.INT Time-Signed=1302890362 Fudge=300 +08484d41432d4d4435075349472d414c470352454703494e5400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 227026ad297beee721ce6c6fff1e9ef3 +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsigrecord_toWire1.spec b/src/lib/dns/tests/testdata/tsigrecord_toWire1.spec new file mode 100644 index 0000000..a25dc46 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsigrecord_toWire1.spec @@ -0,0 +1,16 @@ +# +# A simple TSIG RR (some of the parameters are taken from a live example +# and don't have a specific meaning) +# + +[custom] +sections: tsig +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0xdadadadadadadadadadadadadadadada +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsigrecord_toWire1.wire b/src/lib/dns/tests/testdata/tsigrecord_toWire1.wire new file mode 100644 index 0000000..a125e3d --- /dev/null +++ b/src/lib/dns/tests/testdata/tsigrecord_toWire1.wire @@ -0,0 +1,14 @@ +### +### This data file was auto-generated from tsigrecord_toWire1.spec +### + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 dadadadadadadadadadadadadadadada +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 diff --git a/src/lib/dns/tests/testdata/tsigrecord_toWire2.spec b/src/lib/dns/tests/testdata/tsigrecord_toWire2.spec new file mode 100644 index 0000000..f667e4c --- /dev/null +++ b/src/lib/dns/tests/testdata/tsigrecord_toWire2.spec @@ -0,0 +1,19 @@ +# +# TSIG RR after some names that could (unexpectedly) cause name compression +# + +[custom] +sections: name/1:name/2:tsig +[name/1] +name: hmac-md5.sig-alg.reg.int +[name/2] +name: foo.example.com +[tsig] +as_rr: True +# TSIG QNAME won't be compressed +rr_name: www.example.com +algorithm: hmac-md5 +time_signed: 0x4da8877a +mac_size: 16 +mac: 0xdadadadadadadadadadadadadadadada +original_id: 0x2d65 diff --git a/src/lib/dns/tests/testdata/tsigrecord_toWire2.wire b/src/lib/dns/tests/testdata/tsigrecord_toWire2.wire new file mode 100644 index 0000000..980e1f1 --- /dev/null +++ b/src/lib/dns/tests/testdata/tsigrecord_toWire2.wire @@ -0,0 +1,20 @@ +### +### This data file was auto-generated from tsigrecord_toWire2.spec +### + +# DNS Name: hmac-md5.sig-alg.reg.int +08686d61632d6d6435077369672d616c670372656703696e7400 + +# DNS Name: foo.example.com +03666f6f076578616d706c6503636f6d00 + +# TSIG RR (QNAME=www.example.com Class=ANY(255) TTL=0, RDLEN=58) +03777777076578616d706c6503636f6d00 00fa 00ff 00000000 003a +# Algorithm=hmac-md5 Time-Signed=1302890362 Fudge=300 +08686d61632d6d6435077369672d616c670372656703696e7400 00004da8877a 012c +# MAC Size=16 MAC=(see hex) +0010 dadadadadadadadadadadadadadadada +# Original-ID=11621 Error=0 +2d65 0000 +# Other-Len=0 Other-Data=(see hex) +0000 |