fix: populate ldns submodule and add autotools to LDNS build stage
- Re-cloned zonemaster-ldns with --recurse-submodules so the bundled ldns C library source (including Changelog and configure.ac) is present - Added autoconf, automake, libtool to Dockerfile.backend ldns-build stage so libtoolize + autoreconf can generate ldns/configure during make Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
14
zonemaster-ldns/ldns/test/01-compile.tpkg/01-compile.dsc
Normal file
14
zonemaster-ldns/ldns/test/01-compile.tpkg/01-compile.dsc
Normal file
@@ -0,0 +1,14 @@
|
||||
BaseName: 01-compile
|
||||
Version: 1.0
|
||||
Description: compile ldns
|
||||
CreationDate: Fri Oct 19 13:09:03 CEST 2005
|
||||
Maintainer: Miek Gieben
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 01-compile.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,4 @@
|
||||
Synopsis: tpkg -a ../../ exe 01-compile.tpkg
|
||||
-a path: path is where the source lives
|
||||
as the test is executed in it own subsdir it will
|
||||
need ../../ is you use a relative path
|
||||
61
zonemaster-ldns/ldns/test/01-compile.tpkg/01-compile.test
Normal file
61
zonemaster-ldns/ldns/test/01-compile.tpkg/01-compile.test
Normal file
@@ -0,0 +1,61 @@
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
# first arg is the build dir
|
||||
TPKG_BUILD=$1
|
||||
mkdir -p $TPKG_BUILD/python-site
|
||||
|
||||
cd $TPKG_BUILD
|
||||
|
||||
conf=`which autoreconf` ||\
|
||||
conf=`which autoreconf-2.59` ||\
|
||||
conf=`which autoreconf-2.61` ||\
|
||||
conf=`which autoreconf259`
|
||||
|
||||
# mk=`which gmake` ||\ We are BSD compatible nowadays
|
||||
mk=`which make`
|
||||
|
||||
loot=`which glibtoolize` ||\
|
||||
loot=`which libtoolize`
|
||||
|
||||
echo "configure: $conf"
|
||||
echo "toolize: $loot"
|
||||
echo "make: $mk"
|
||||
|
||||
if [ ! $mk ] || [ ! $conf ] || [ ! $loot ] ; then
|
||||
echo "Error, one or more build tools not found, aborting"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
if [ -e Makefile ]; then
|
||||
$mk distclean
|
||||
fi
|
||||
|
||||
( $loot -c --install \
|
||||
|| $loot -c \
|
||||
|| $loot \
|
||||
) && $conf \
|
||||
&& ( ( ( ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --enable-sha2 --enable-gost --with-drill --with-examples --with-pyldns \
|
||||
|| ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --disable-sha2 --enable-gost --with-drill --with-examples --with-pyldns \
|
||||
|| ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --enable-sha2 --disable-gost --with-drill --with-examples --with-pyldns \
|
||||
|| ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --disable-sha2 --disable-gost --with-drill --with-examples --with-pyldns \
|
||||
|| ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --disable-dane-ta-usage --enable-sha2 --enable-gost --with-drill --with-examples --with-pyldns \
|
||||
|| ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --disable-dane-ta-usage --disable-sha2 --enable-gost --with-drill --with-examples --with-pyldns \
|
||||
|| ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --disable-dane-ta-usage --enable-sha2 --disable-gost --with-drill --with-examples --with-pyldns \
|
||||
|| ./configure PYTHON_SITE_PKG=$TPKG_BUILD/python-site --disable-dane-ta-usage --disable-sha2 --disable-gost --with-drill --with-examples --with-pyldns
|
||||
) && $mk && $mk install-pyldns && make install-pyldnsx
|
||||
) \
|
||||
|| ( ( ./configure --enable-sha2 --enable-gost --with-drill --with-examples \
|
||||
|| ./configure --disable-sha2 --enable-gost --with-drill --with-examples \
|
||||
|| ./configure --enable-sha2 --disable-gost --with-drill --with-examples \
|
||||
|| ./configure --disable-sha2 --disable-gost --with-drill --with-examples \
|
||||
|| ./configure --enable-sha2 --enable-gost --with-drill --with-examples --disable-dane-ta-usage \
|
||||
|| ./configure --disable-sha2 --enable-gost --with-drill --with-examples --disable-dane-ta-usage \
|
||||
|| ./configure --enable-sha2 --disable-gost --with-drill --with-examples --disable-dane-ta-usage \
|
||||
|| ./configure --disable-sha2 --disable-gost --with-drill --with-examples --disable-dane-ta-usage
|
||||
|
||||
) && $mk && (rmdir python-site || true)
|
||||
)
|
||||
)
|
||||
|
||||
15
zonemaster-ldns/ldns/test/03-run.tpkg/03-run.dsc
Normal file
15
zonemaster-ldns/ldns/test/03-run.tpkg/03-run.dsc
Normal file
@@ -0,0 +1,15 @@
|
||||
BaseName: 03-run
|
||||
Version: 1.0
|
||||
Description: run drill and see if it works
|
||||
CreationDate: Tue Nov 1 14:29:37 CET 2005
|
||||
Maintainer: Miek Gieben
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 03-run.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 03-run.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
1
zonemaster-ldns/ldns/test/03-run.tpkg/03-run.help
Normal file
1
zonemaster-ldns/ldns/test/03-run.tpkg/03-run.help
Normal file
@@ -0,0 +1 @@
|
||||
synopsis: tpkg -a <path of ldns> exe 03-run
|
||||
21
zonemaster-ldns/ldns/test/03-run.tpkg/03-run.test
Normal file
21
zonemaster-ldns/ldns/test/03-run.tpkg/03-run.test
Normal file
@@ -0,0 +1,21 @@
|
||||
# #-- 03-run.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
# first arg is the build dir
|
||||
TPKG_BUILD=$1
|
||||
|
||||
cd $TPKG_BUILD
|
||||
cd drill/
|
||||
# this segfaulted once - nothing should be running on this port
|
||||
LD_LIBRARY_PATH="../.libs:$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="../.libs:$DYLD_LIBRARY_PATH" ./drill @localhost mx miek.nl -p 5333
|
||||
fail=$?
|
||||
if [ $fail -eq 1 ]; then
|
||||
#success
|
||||
exit 0;
|
||||
fi
|
||||
exit $fail
|
||||
@@ -0,0 +1,15 @@
|
||||
BaseName: 04-run-normal
|
||||
Version: 1.0
|
||||
Description: run drill and don't do anything fancy
|
||||
CreationDate: Tue Nov 1 14:59:25 CET 2005
|
||||
Maintainer: Miek Gieben
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 04-run-normal.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 04-run-normal.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1 @@
|
||||
synopsis: tpkg -a <path of ldns> exe 04-run-normal
|
||||
@@ -0,0 +1,23 @@
|
||||
# #-- 03-run.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
# first arg is the build dir
|
||||
TPKG_BUILD=$1
|
||||
|
||||
cd $TPKG_BUILD
|
||||
cd drill/
|
||||
LD_LIBRARY_PATH="../.libs:$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="../.libs:$DYLD_LIBRARY_PATH" ./drill @k.root-servers.net mx miek.nl && \
|
||||
LD_LIBRARY_PATH="../.libs:$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="../.libs:$DYLD_LIBRARY_PATH" ./drill mx miek.nl
|
||||
if [[ $? -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LD_LIBRARY_PATH="../.libs:$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="../.libs:$DYLD_LIBRARY_PATH" ./drill @ mx miek.nl
|
||||
if [[ $? -ne 1 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
BIN
zonemaster-ldns/ldns/test/05-iana-rr-types.tpkg/._05-iana-rr-types.dir
Executable file
BIN
zonemaster-ldns/ldns/test/05-iana-rr-types.tpkg/._05-iana-rr-types.dir
Executable file
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
BaseName: 05-iana-rr-types
|
||||
Version: 1.0
|
||||
Description: Fetch dns-parameters.xml from iana and check all RR types
|
||||
CreationDate: wo apr 24 13:49:20 CEST 2013
|
||||
Maintainer: Willem Toorop
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 05-iana-rr-types.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 05-iana-rr-types.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1 @@
|
||||
synopsis: tpkg -a <path of ldns> exe 05-iana-rr-types
|
||||
@@ -0,0 +1,47 @@
|
||||
# #-- 03-run.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
# first arg is the build dir
|
||||
TPKG_BUILD=$1
|
||||
PARAM_XML="dns-parameters.xml"
|
||||
PARAM_URL="http://www.iana.org/assignments/dns-parameters/$PARAM_XML"
|
||||
|
||||
if [ -f $PARAM_XML ]
|
||||
then
|
||||
mv $PARAM_XML ${PARAM_XML}.aandekant
|
||||
fi
|
||||
if which wget
|
||||
then
|
||||
wget "$PARAM_URL"
|
||||
elif ! ( echo quit | ftp "$PARAM_URL" )
|
||||
then
|
||||
echo "Don't have wget or ftp to get $PARAM_URL"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
EXIT_STATUS=0
|
||||
|
||||
for TYPE_VAL in `awk '/<type>[^<>]*<\/type>/{ a=$1; getline; b=$1; print a""b }' dns-parameters.xml | sed -e 's/<type>//g' -e 's/<\/type>//g' -e 's/<value>/:/g' -e 's/<\/value>//g'|egrep -v '^(Unassigned|Private|Reserved)'`
|
||||
do
|
||||
TYPE=${TYPE_VAL%:*}
|
||||
VALUE=${TYPE_VAL#*:}
|
||||
case "x$TYPE" in
|
||||
x\*) TYPE="ANY"
|
||||
;;
|
||||
xNSAP-PTR) TYPE="NSAP_PTR"
|
||||
;;
|
||||
esac
|
||||
if ! grep "LDNS_RR_TYPE_${TYPE} = ${VALUE}" ${TPKG_BUILD}/ldns/rr.h >/dev/null
|
||||
then
|
||||
echo "RR type ${TYPE} (value ${VALUE}) not implemented."
|
||||
EXIT_STATUS=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $EXIT_STATUS
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
BaseName: 08-zonereader
|
||||
Version: 1.0
|
||||
Description: Check the backward compat. of the zone parser
|
||||
CreationDate: Mon Jan 2 16:24:38 CET 2006
|
||||
Maintainer: Jelte Jansen
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 08-zonereader.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 08-zonereader.test
|
||||
AuxFiles: 08-zonereader.outputzone 08-zonereader.inputzone
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,8 @@
|
||||
No arguments are used for this test.
|
||||
|
||||
The example tool ldns-read-zone is used to read the zone from
|
||||
08-zonereader-inputzone that contains a number of different RRs. The output
|
||||
is compared to 08-zonereader-outputzone.
|
||||
|
||||
With this test the zone reading functions are checked to see if they have
|
||||
not regressed.
|
||||
3882
zonemaster-ldns/ldns/test/08-zonereader.tpkg/08-zonereader.inputzone
Normal file
3882
zonemaster-ldns/ldns/test/08-zonereader.tpkg/08-zonereader.inputzone
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
# #-- 05-nm.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
LIB=../../lib/
|
||||
export LD_LIBRARY_PATH=$LIB:$LD_LIBRARY_PATH
|
||||
|
||||
# get the libdns symbols
|
||||
../../examples/ldns-read-zone -b 08-zonereader.inputzone > 08-zonereader.current
|
||||
|
||||
diff 08-zonereader.current 08-zonereader.outputzone
|
||||
fail=$?
|
||||
rm -f 08-zonereader.current
|
||||
|
||||
exit $fail
|
||||
15
zonemaster-ldns/ldns/test/09-doc-check.tpkg/09-doc-check.dsc
Normal file
15
zonemaster-ldns/ldns/test/09-doc-check.tpkg/09-doc-check.dsc
Normal file
@@ -0,0 +1,15 @@
|
||||
BaseName: 09-doc-check
|
||||
Version: 1.0
|
||||
Description: Generate the documentation and check for errors
|
||||
CreationDate: Mon Jan 9 12:12:32 CET 2006
|
||||
Maintainer: Miek Gieben
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 09-doc-check.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 09-doc-check.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,3 @@
|
||||
No arguments are used for this test.
|
||||
|
||||
Run a make doc and check for errors.
|
||||
@@ -0,0 +1,40 @@
|
||||
# #-- 05-nm.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
: > report
|
||||
echo 0 > exit_code
|
||||
for target in doc manpage-create-errors manpage-errors
|
||||
do
|
||||
( cd $1
|
||||
if ! make $target 2>&1
|
||||
then
|
||||
echo 1 > exit_code
|
||||
fi
|
||||
|
||||
) >make-out
|
||||
|
||||
A=`cat make-out | wc -l`
|
||||
if [[ $A -gt 1 ]]
|
||||
then
|
||||
( echo "***"
|
||||
echo "*** make $target"
|
||||
echo "***"
|
||||
echo ""
|
||||
cat make-out
|
||||
echo ""
|
||||
|
||||
) >>report
|
||||
fi
|
||||
done
|
||||
|
||||
A=`cat report | wc -l`
|
||||
if [[ $A -gt 0 ]]; then
|
||||
cat report
|
||||
fi
|
||||
exit `cat exit_code`
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
++_added.justazone.example. 3600 IN TXT "added"
|
||||
~+a1.justazone.example. 3600 IN A 192.0.2.1
|
||||
~-a1.justazone.example. 3600 IN A 192.0.2.2
|
||||
~-a2.justazone.example. 3600 IN A 192.0.2.1
|
||||
~+a2.justazone.example. 3600 IN A 192.0.2.2
|
||||
~-a3.justazone.example. 3600 IN A 192.0.2.1
|
||||
~+a3.justazone.example. 3600 IN A 192.0.2.2
|
||||
~-a3.justazone.example. 3600 IN A 203.0.113.1
|
||||
~+a3.justazone.example. 3600 IN A 203.0.113.2
|
||||
~+delegation1.justazone.example. 3600 IN NS ns2.delegation1.justazone.example.
|
||||
++delegation2.justazone.example. 3600 IN NS ns1.delegation2.justazone.example.
|
||||
--delegation4.justazone.example. 3600 IN NS ns1.delegation3.justazone.example.
|
||||
~+grow2to3.justazone.example. 3600 IN TXT "three"
|
||||
~-shrink2to1.justazone.example. 3600 IN TXT "two"
|
||||
~-shrink3to2.justazone.example. 3600 IN TXT "three"
|
||||
--zz.justazone.example. 3600 IN TXT "top"
|
||||
--zz.justazone.example. 3600 IN TXT "zZZZzzz"
|
||||
+2 -2 ~7
|
||||
@@ -0,0 +1,15 @@
|
||||
BaseName: 10-ldns-compare-zones
|
||||
Version: 1.0
|
||||
Description: Check ldns-compare-zone behaviour
|
||||
CreationDate: Wed Oct 6 15:11:39 CEST 2021
|
||||
Maintainer: Willem Toorop
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 10-ldns-compare-zones.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 10-ldns-compare-zones.test
|
||||
AuxFiles: 10-ldns-compare-zones.zone1 10-ldns-compare-zones.zone2 10-ldns-compare-zones.diffs
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,4 @@
|
||||
No arguments are used for this test.
|
||||
|
||||
The example tool ldns-compare-zone is used to compare two zone files with numerous differences.
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# #-- 05-nm.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
LIB=../../lib/
|
||||
export LD_LIBRARY_PATH=$LIB:$LD_LIBRARY_PATH
|
||||
|
||||
# get the libdns symbols
|
||||
../../examples/ldns-compare-zones -as 10-ldns-compare-zones.zone1 10-ldns-compare-zones.zone2 > 10-ldns-compare-zones.out
|
||||
|
||||
diff 10-ldns-compare-zones.out 10-ldns-compare-zones.diffs
|
||||
fail=$?
|
||||
rm -f 10-ldns-compare-zones.out
|
||||
|
||||
exit $fail
|
||||
@@ -0,0 +1,31 @@
|
||||
$ORIGIN justazone.example.
|
||||
|
||||
@ SOA @ hostmaster (
|
||||
1
|
||||
1800 ; refresh (30 minutes)
|
||||
900 ; retry (15 minutes)
|
||||
604800 ; expire (1 week)
|
||||
86400 ; minimum (1 day)
|
||||
)
|
||||
; This delegation will grow to 2 records
|
||||
; this change was undetected in ldns < 1.7.2
|
||||
delegation1 NS ns1.delegation1
|
||||
|
||||
delegation3 NS ns1.delegation3
|
||||
|
||||
delegation4 NS ns1.delegation3
|
||||
delegation5 NS ns1.delegation5
|
||||
a1 A 192.0.2.2
|
||||
a2 A 192.0.2.1
|
||||
a3 A 192.0.2.1
|
||||
A 198.51.100.1
|
||||
A 203.0.113.1
|
||||
shrink3to2 TXT one
|
||||
TXT two
|
||||
TXT three
|
||||
shrink2to1 TXT one
|
||||
TXT two
|
||||
grow2to3 TXT one
|
||||
TXT two
|
||||
zz TXT top
|
||||
TXT zZZZzzz
|
||||
@@ -0,0 +1,30 @@
|
||||
$ORIGIN justazone.example.
|
||||
|
||||
@ SOA @ hostmaster (
|
||||
1
|
||||
1800 ; refresh (30 minutes)
|
||||
900 ; retry (15 minutes)
|
||||
604800 ; expire (1 week)
|
||||
86400 ; minimum (1 day)
|
||||
)
|
||||
; This delegation will grow to 2 records
|
||||
; this change was undetected in ldns < 1.7.2
|
||||
delegation1 NS ns1.delegation1
|
||||
NS ns2.delegation1
|
||||
; delegation2 is not in zone1
|
||||
delegation2 NS ns1.delegation2
|
||||
delegation3 NS ns1.delegation3
|
||||
|
||||
delegation5 NS ns1.delegation5
|
||||
a1 A 192.0.2.1
|
||||
a2 A 192.0.2.2
|
||||
a3 A 192.0.2.2
|
||||
A 198.51.100.1
|
||||
A 203.0.113.2
|
||||
shrink3to2 TXT one
|
||||
TXT two
|
||||
shrink2to1 TXT one
|
||||
grow2to3 TXT one
|
||||
TXT two
|
||||
TXT three
|
||||
_added TXT added
|
||||
@@ -0,0 +1,47 @@
|
||||
# Standard installation pathnames
|
||||
# See the file LICENSE for the license
|
||||
SHELL = @SHELL@
|
||||
VERSION = @PACKAGE_VERSION@
|
||||
basesrcdir = $(shell basename `pwd`)
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@ @LIBSSL_CPPFLAGS@ -I../..
|
||||
LDFLAGS = @LDFLAGS@ @LIBSSL_LDFLAGS@ -L../../.libs
|
||||
LIBS = @LIBS@ @LIBSSL_SSL_LIBS@ -lldns
|
||||
|
||||
# Hmmm gcc 4.6.1 expects $(LIBS) as the last argument
|
||||
|
||||
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS)
|
||||
|
||||
HEADER = config.h
|
||||
TESTS = 12-unit-tests-dnssec
|
||||
|
||||
.PHONY: all clean realclean
|
||||
%.o:
|
||||
$(COMPILE) -c $(srcdir)/$*.c
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
12-unit-tests-dnssec: 12-unit-tests-dnssec.o
|
||||
$(LINK) -o $@ $+ $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(TESTS)
|
||||
rm -f lua-rns
|
||||
|
||||
realclean: clean
|
||||
rm -rf autom4te.cache/
|
||||
rm -f config.log config.status aclocal.m4 config.h.in configure Makefile
|
||||
rm -f config.h
|
||||
|
||||
confclean: clean
|
||||
rm -rf config.log config.status config.h Makefile
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <ldns/ldns.h>
|
||||
|
||||
|
||||
ldns_status
|
||||
check_ldns_calc_keytag_part(const char *key_str, uint16_t expected_keytag)
|
||||
{
|
||||
ldns_rr *key_rr = NULL;
|
||||
uint16_t keytag;
|
||||
|
||||
ldns_status result = LDNS_STATUS_OK;
|
||||
|
||||
if (ldns_rr_new_frm_str(&key_rr, key_str, 0, NULL, NULL) !=
|
||||
LDNS_STATUS_OK) {
|
||||
printf("Key creation failed.");
|
||||
printf("Key: %s\n", key_str);
|
||||
result = LDNS_STATUS_ERR;
|
||||
} else {
|
||||
keytag = ldns_calc_keytag(key_rr);
|
||||
if (keytag == expected_keytag) {
|
||||
printf("Keytag 1 correct.");
|
||||
} else {
|
||||
printf("Bad keytag, should be %u (got %u)for:\n", expected_keytag, keytag);
|
||||
printf("%s\n", key_str);
|
||||
result = LDNS_STATUS_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
if (key_rr)
|
||||
ldns_rr_free(key_rr);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ldns_status
|
||||
check_ldns_calc_keytag(void)
|
||||
{
|
||||
const char *key_str;
|
||||
uint16_t expected_keytag;
|
||||
|
||||
ldns_status result = LDNS_STATUS_OK;
|
||||
|
||||
key_str = "jelte.nlnetlabs.nl. IN DNSKEY 256 3 5 AQOraLfzarHAlFskVGwAGnX0LRjlcOiO6y5WM4Kz+QvZ9vX28h4lOvnf d5tkxnZm7ERLTAJoFq+1w/wl7VXs2Isz75BSZ7LQh3OT2xXnS6VT5ZxX ko/UCOdoGiKZZ63jHZ0jNSTCYy8+5rfvwRD8s3gGuErp5KcHg3V8VLUK SDNNEQ==";
|
||||
expected_keytag = 42860;
|
||||
if (check_ldns_calc_keytag_part(key_str, expected_keytag) != LDNS_STATUS_OK) {
|
||||
result = LDNS_STATUS_ERR;
|
||||
}
|
||||
|
||||
key_str = "sub.jelte.nlnetlabs.nl. IN DNSKEY 256 3 3 CI4CujZjrw4hjpAP8zMyntKEQJBV96M0OhZ5HCeZ5K46eGHEJUG6RglQ M2OVYY/qRqALDs/Ptzk+Hdb0oV3RF0+fUA5+R5gX1avgbhsEPhvIInYB OPsNaXWKMJarpH2b8xHkF4XQT4TdqAf8maQcKk/RujeKR6VnXbadZUNK +SZsNWSbaDuCHbT0rWpO9nVbfoQUnNWpk1hmOh4oIlFdBtBTPck3ND+g dQrj5eJcSx0zwqjJBJIC+JxWt2rFtIEztfHxmmjbeddC2TL41O/AFPJM vUh85dnd3b1gZRc5UvA7Z2I2+ZD16FjNrmuNkNEjnlet7oiJAC0fezzX sZYCjwHfEyeaS2YXGzzZCeQpMBzeBRh3eq8pVn8r4AaRcNt1gnXbVdjd TQvp5deIGoaAHMl3yy4n0QmXgRscSIsyfK9Gn7NrlGRlCxs9rfVwcWCD Nj2MuIComXGIUYJW+ck0Rhk9Sq6M3onhSjITY9/y/SpwBna6SLpFdpEm bLYKES4gShTxjtmhJSytH0pooq9qxJ8kyH+I";
|
||||
expected_keytag = 13026;
|
||||
if (check_ldns_calc_keytag_part(key_str, expected_keytag) != LDNS_STATUS_OK) {
|
||||
result = LDNS_STATUS_ERR;
|
||||
}
|
||||
|
||||
key_str = "sub.sub.jelte.nlnetlabs.nl. IN DNSKEY 256 3 1 AQPIQ2SNclMqdHu8afxVdbIVR/20vlDp2ZcEK5xFxDKVTunuq8BLAPr4 FvnbBQ4AkNYchecNcmQvKi/jJ7xwWqyqMAU1l+d6mZUTF6sC0ug9WQ/Q zG93nOBVLwGbmGTTXhrE/pRhS/o16Ab20zsbcdAb7PChQXSgByJKvT8W XumJ3FdOLhwmqQAnFuMnZC71/HAc4WjA+2zG1SNXnbTnC8Q/4/Fg/ygh 2GjT9Cj0hhFR+A2Hf+RXvkKsDwhdxWwJfW+IhAHUtwNKydsEvZM5UR2I PSytfzZ/fWKEx5BlxLZZNKzoeBtFHjHSeZU5Lb5DFnQJx5lcsd5MP2e8 +ppjVlg3";
|
||||
expected_keytag = 22104;
|
||||
if (check_ldns_calc_keytag_part(key_str, expected_keytag) != LDNS_STATUS_OK) {
|
||||
result = LDNS_STATUS_ERR;
|
||||
}
|
||||
|
||||
/* template for adding extra keys
|
||||
key_str = "";
|
||||
expected_keytag = ;
|
||||
if (check_ldns_calc_keytag_part(key_str, expected_keytag) != LDNS_STATUS_OK) {
|
||||
result = LDNS_STATUS_ERR;
|
||||
}
|
||||
*/
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
ldns_status
|
||||
check_ldns_canonicalization(void)
|
||||
{
|
||||
const char rr_str1[] = "bla.nl. 1000 IN NS ns1.bla.nl.";
|
||||
const char rr_str2[] = "BLA.NL. 1000 IN NS NS1.BlA.Nl.";
|
||||
|
||||
ldns_rr *rr1 = NULL, *rr2 = NULL;
|
||||
ldns_status status = LDNS_STATUS_ERR;
|
||||
int diff;
|
||||
|
||||
status = ldns_rr_new_frm_str(&rr1, rr_str1, 0, NULL, NULL);
|
||||
|
||||
if (status != LDNS_STATUS_OK) {
|
||||
fprintf(stdout, "Error constructing rr: %s\n", rr_str1);
|
||||
}
|
||||
|
||||
status = ldns_rr_new_frm_str(&rr2, rr_str2, 0, NULL, NULL);
|
||||
|
||||
if (status != LDNS_STATUS_OK) {
|
||||
fprintf(stdout, "Error constructing rr: %s\n", rr_str2);
|
||||
}
|
||||
|
||||
ldns_rr2canonical(rr1);
|
||||
ldns_rr2canonical(rr2);
|
||||
|
||||
diff = ldns_rr_compare(rr1, rr2);
|
||||
if (diff != 0) {
|
||||
printf("Error, canonicalization does not work\n");
|
||||
status = LDNS_STATUS_ERR;
|
||||
} else {
|
||||
status = LDNS_STATUS_OK;
|
||||
}
|
||||
|
||||
if (rr1)
|
||||
ldns_rr_free(rr1);
|
||||
|
||||
if (rr2)
|
||||
ldns_rr_free(rr2);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int result = EXIT_SUCCESS;
|
||||
|
||||
if (check_ldns_calc_keytag() != LDNS_STATUS_OK) {
|
||||
printf("ldns_calc_keytag() failed.\n");
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (check_ldns_canonicalization() != LDNS_STATUS_OK) {
|
||||
printf("ldns_rr2canonical() failed.\n");
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
exit(result);
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(libdns, 1.1.0, dns-team@nlnetlabs.nl,libdns)
|
||||
AC_CONFIG_SRCDIR([12-unit-tests-dnssec.c])
|
||||
|
||||
OURCPPFLAGS=''
|
||||
CPPFLAGS=${CPPFLAGS:-${OURCPPFLAGS}}
|
||||
OURCFLAGS='-g'
|
||||
CFLAGS=${CFLAGS:-${OURCFLAGS}}
|
||||
|
||||
AC_AIX
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_PROGS(libtool, [glibtool libtool15 libtool], [../libtool])
|
||||
|
||||
dnl routine to help check for compiler flags.
|
||||
AC_DEFUN([CHECK_COMPILER_FLAG],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING(whether $CC supports -$1)
|
||||
cache=`echo $1 | sed 'y%.=/+-%___p_%'`
|
||||
AC_CACHE_VAL(cv_prog_cc_flag_$cache,
|
||||
[
|
||||
echo 'void f(){}' >conftest.c
|
||||
if test -z "`$CC -$1 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
eval "cv_prog_cc_flag_$cache=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
])
|
||||
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
:
|
||||
$2
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
:
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
dnl routine to help check for needed compiler flags.
|
||||
# if the given code compiles without the flag, execute argument 4
|
||||
# if the given code only compiles with the flag, execute argument 3
|
||||
# otherwise fail
|
||||
AC_DEFUN([CHECK_COMPILER_FLAG_NEEDED],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING(whether we need -$1 as a flag for $CC)
|
||||
cache=`echo $1 | sed 'y%.=/+-%___p_%'`
|
||||
AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache,
|
||||
[
|
||||
echo '$2' > conftest.c
|
||||
echo 'void f(){}' >>conftest.c
|
||||
if test -z "`$CC $CFLAGS -Werror -Wall -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_needed_$cache=no"
|
||||
else
|
||||
[
|
||||
if test -z "`$CC $CFLAGS $1 -Werror -Wall -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_needed_$cache=yes"
|
||||
else
|
||||
echo 'Test with flag fails too!'
|
||||
cat conftest.c
|
||||
echo "$CC $CFLAGS $1 -Werror -Wall -c conftest.c 2>&1"
|
||||
echo `$CC $CFLAGS $1 -Werror -Wall -c conftest.c`
|
||||
exit 1
|
||||
fi
|
||||
]
|
||||
fi
|
||||
rm -f conftest*
|
||||
])
|
||||
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
:
|
||||
$3
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
:
|
||||
$4
|
||||
fi
|
||||
])
|
||||
|
||||
AC_TYPE_SIZE_T
|
||||
CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"])
|
||||
CHECK_COMPILER_FLAG(std=c99, [C99FLAG="-std=c99"])
|
||||
CHECK_COMPILER_FLAG(xc99, [C99FLAG="-xc99"])
|
||||
|
||||
AC_C_INLINE
|
||||
AC_CHECK_TYPE(int8_t, char)
|
||||
AC_CHECK_TYPE(int16_t, short)
|
||||
AC_CHECK_TYPE(int32_t, int)
|
||||
AC_CHECK_TYPE(int64_t, long long)
|
||||
AC_CHECK_TYPE(uint8_t, unsigned char)
|
||||
AC_CHECK_TYPE(uint16_t, unsigned short)
|
||||
AC_CHECK_TYPE(uint32_t, unsigned int)
|
||||
AC_CHECK_TYPE(uint64_t, unsigned long long)
|
||||
|
||||
AC_HEADER_STDBOOL
|
||||
AC_CHECK_HEADERS([sys/types.h getopt.h stdlib.h stdio.h assert.h netinet/in.h ctype.h time.h pcap.h arpa/inet.h sys/time.h sys/socket.h sys/select.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_HEADERS([netinet/in_systm.h net/if.h netinet/ip.h netinet/udp.h netinet/if_ether.h netinet/ip6.h],,, [
|
||||
AC_INCLUDES_DEFAULT
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif])
|
||||
|
||||
AC_CHECK_HEADERS([sys/param.h sys/mount.h],,,
|
||||
[AC_INCLUDES_DEFAULT]
|
||||
[
|
||||
[
|
||||
#if HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
]
|
||||
])
|
||||
|
||||
# check to see if libraries are needed for these functions.
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
AC_CHECK_LIB(nsl, inet_pton)
|
||||
|
||||
# ssl dir if needed
|
||||
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=PATH], [set ssl library directory]),
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib"
|
||||
])
|
||||
|
||||
# check for ldns
|
||||
AC_ARG_WITH(ldns,
|
||||
AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
|
||||
,
|
||||
[
|
||||
specialldnsdir="$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib"
|
||||
LDNSDIR="$withval"
|
||||
]
|
||||
)
|
||||
|
||||
# check for ldns development source tree
|
||||
AC_MSG_CHECKING([for ldns devel source])
|
||||
ldns_dev_dir=..
|
||||
if test -f $ldns_dev_dir/ldns/util.h && \
|
||||
grep LDNS_VERSION $ldns_dev_dir/ldns/util.h >/dev/null; then
|
||||
ldns_version=`grep LDNS_VERSION $ldns_dev_dir/ldns/util.h | sed -e 's/^.*"\(.*\)".*$/\1/'`
|
||||
AC_MSG_RESULT([using $ldns_dev_dir with $ldns_version])
|
||||
CPPFLAGS="$CPPFLAGS -I$ldns_dev_dir/include"
|
||||
LDFLAGS="$LDFLAGS -L$ldns_dev_dir -L$ldns_dev_dir/lib"
|
||||
LIBS="$LIBS -lldns"
|
||||
AC_DEFINE(HAVE_LIBLDNS, 1, [If the ldns library is available.])
|
||||
LDNSDIR="$ldns_dev_dir"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_CHECK_LIB(ldns, ldns_rr_new,, [
|
||||
AC_MSG_ERROR([Can't find ldns library])
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
AC_SUBST(LDNSDIR)
|
||||
|
||||
#AC_CHECK_HEADER(ldns/ldns.h,, [
|
||||
# AC_MSG_ERROR([Can't find ldns headers (make copy-headers in devel source.)])
|
||||
# ], [AC_INCLUDES_DEFAULT]
|
||||
#)
|
||||
|
||||
AC_CHECK_LIB(pcap, pcap_open_offline,, [
|
||||
AC_MSG_WARN([Can't find pcap library (needed for ldns-dpa, will not build dpa now.)])
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_FUNCS(isblank)
|
||||
|
||||
AH_BOTTOM([
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_UDP_H
|
||||
#include <netinet/udp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PCAP_H
|
||||
#include <pcap.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IF_ETHER_H
|
||||
#include <netinet/if_ether.h>
|
||||
#endif
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind, opterr;
|
||||
|
||||
#ifndef EXIT_FAILURE
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
#ifndef EXIT_SUCCESS
|
||||
#define EXIT_SUCCESS 0
|
||||
#endif
|
||||
|
||||
#ifdef S_SPLINT_S
|
||||
#define FD_ZERO(a) /* a */
|
||||
#define FD_SET(a,b) /* a, b */
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES([12-unit-tests-dnssec.Makefile])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,16 @@
|
||||
BaseName: 12-unit-tests-dnssec
|
||||
Version: 1.0
|
||||
Description: Run unit tests on dnssec.c
|
||||
CreationDate: Wed Apr 24 15:48:07 CEST 2013
|
||||
Maintainer: Jelte Jansen
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help: 12-unit-tests-dnssec.help
|
||||
Pre: 12-unit-tests-dnssec.pre
|
||||
Post:
|
||||
Test: 12-unit-tests-dnssec.test
|
||||
AuxFiles: 12-unit-tests-dnssec.Makefile.in 12-unit-tests-dnssec.configure.ac 12-unit-tests-dnssec.c
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,4 @@
|
||||
TODO :p
|
||||
Please describe how to use this test.
|
||||
i.e. tpkg -a ARG exe testname:
|
||||
ARG is used to ...
|
||||
@@ -0,0 +1,40 @@
|
||||
# #-- 10-older-test.pre--#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
conf=`which autoconf` ||\
|
||||
conf=`which autoconf-2.59` ||\
|
||||
conf=`which autoconf-2.61` ||\
|
||||
conf=`which autoconf259`
|
||||
|
||||
hdr=`which autoheader` ||\
|
||||
hdr=`which autoheader-2.59` ||\
|
||||
hdr=`which autoheader-2.61` ||\
|
||||
hdr=`which autoheader259`
|
||||
|
||||
mk=`which gmake` ||\
|
||||
mk=`which make`
|
||||
|
||||
echo "autoconf: $conf"
|
||||
echo "autoheader: $hdr"
|
||||
echo "make: $mk"
|
||||
|
||||
if [ ! $mk ] || [ ! $conf ] || [ ! $hdr ] ; then
|
||||
echo "Error, one or more build tools not found, aborting"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
opts=`../../config.status --config`
|
||||
echo options: $opts
|
||||
|
||||
#$conf 12-unit-tests-dnssec.configure.ac > configure && \
|
||||
#chmod +x configure && \
|
||||
#$hdr 12-unit-tests-dnssec.configure.ac &&\
|
||||
#eval ./configure --with-ldns=../.. "$opts" && \
|
||||
../../config.status --file 12-unit-tests-dnssec.Makefile
|
||||
$mk -f 12-unit-tests-dnssec.Makefile
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# #-- 10-older-test.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
#PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
export LD_LIBRARY_PATH="../../.libs:$LD_LIBRARY_PATH"
|
||||
export DYLD_LIBRARY_PATH="../../.libs:$DYLD_LIBRARY_PATH"
|
||||
|
||||
# run the test
|
||||
./12-unit-tests-dnssec
|
||||
@@ -0,0 +1,45 @@
|
||||
# Standard installation pathnames
|
||||
# See the file LICENSE for the license
|
||||
SHELL = @SHELL@
|
||||
VERSION = @PACKAGE_VERSION@
|
||||
basesrcdir = $(shell basename `pwd`)
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@ @LIBSSL_CPPFLAGS@ -I../..
|
||||
LDFLAGS = @LDFLAGS@ @LIBSSL_LDFLAGS@ -L../../.libs
|
||||
LIBS = @LIBS@ @LIBSSL_SSL_LIBS@ -lldns
|
||||
|
||||
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS)
|
||||
|
||||
HEADER = config.h
|
||||
TESTS = 13-unit-tests-base
|
||||
|
||||
.PHONY: all clean realclean
|
||||
%.o:
|
||||
$(COMPILE) -c $(srcdir)/$*.c
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
13-unit-tests-base: 13-unit-tests-base.o
|
||||
$(LINK) -o $@ $+ $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(TESTS)
|
||||
rm -f lua-rns
|
||||
|
||||
realclean: clean
|
||||
rm -rf autom4te.cache/
|
||||
rm -f config.log config.status aclocal.m4 config.h.in configure Makefile
|
||||
rm -f config.h
|
||||
|
||||
confclean: clean
|
||||
rm -rf config.log config.status config.h Makefile
|
||||
@@ -0,0 +1,882 @@
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ldns/config.h"
|
||||
|
||||
#include <ldns/ldns.h>
|
||||
|
||||
int test_duration(void)
|
||||
{
|
||||
ldns_duration_type *d1 = NULL, *d2 = NULL;
|
||||
char *s1 = NULL, *s2 = NULL, *s3 = NULL;
|
||||
int r = -1;
|
||||
|
||||
if (!(d1 = ldns_duration_create()))
|
||||
fprintf(stderr, "ldns_duration_create() returned NULL\n");
|
||||
|
||||
else if (!(s1 = ldns_duration2string(d1)))
|
||||
fprintf(stderr, "ldns_duration2string() returned NULL\n");
|
||||
|
||||
else if (!(d2 = ldns_duration_create_from_string("PT0S")))
|
||||
fprintf( stderr
|
||||
, "ldns_duration_create_from_string(\"P0D\") returned NULL\n");
|
||||
|
||||
else if (ldns_duration_compare(d1, d2))
|
||||
fprintf(stderr, "0 durations not equal\n");
|
||||
|
||||
else if ((d1->years = 1), (d1->months = 3), 0)
|
||||
; /* pass */
|
||||
|
||||
else if (!(s2 = ldns_duration2string(d1)))
|
||||
fprintf(stderr, "ldns_duration2string() returned NULL\n");
|
||||
|
||||
else if (strcmp(s2, "P1Y3M"))
|
||||
fprintf(stderr, "\"%s\" should have been \"P1Y3M\"\n", s2);
|
||||
|
||||
else if ((d1->minutes = 3), 0)
|
||||
; /* pass */
|
||||
|
||||
else if (!(s3 = ldns_duration2string(d1)))
|
||||
fprintf(stderr, "ldns_duration2string() returned NULL\n");
|
||||
|
||||
else if (strcmp(s3, "P1Y3MT3M"))
|
||||
fprintf(stderr, "\"%s\" should have been \"P1Y3MT3M\"\n", s3);
|
||||
|
||||
else if (ldns_duration_compare(d1, d2) <= 0)
|
||||
fprintf(stderr, "ldns_duration_compare() error\n");
|
||||
else
|
||||
r = 0;
|
||||
|
||||
if (d1) ldns_duration_cleanup(d1);
|
||||
if (d2) ldns_duration_cleanup(d2);
|
||||
if (s1) free(s1);
|
||||
if (s2) free(s2);
|
||||
if (s3) free(s3);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
void print_data_ar(const uint8_t *data, const size_t len) {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
printf("%02x ", data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
test_base64_encode(uint8_t *data, size_t data_len, const char *expect_result)
|
||||
{
|
||||
int result;
|
||||
|
||||
char *text;
|
||||
size_t text_len;
|
||||
|
||||
text_len = ldns_b64_ntop_calculate_size(data_len);
|
||||
text = malloc(text_len);
|
||||
|
||||
result = ldns_b64_ntop(data, data_len, text, text_len);
|
||||
|
||||
text_len = result;
|
||||
|
||||
if (result < 0) {
|
||||
printf("Error 1 encoding base64 test data (result %d):\n", result);
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
result = 1;
|
||||
} else {
|
||||
if (strncmp(expect_result, text, text_len) != 0) {
|
||||
printf("Bad base64 encoding: got: ");
|
||||
printf("%s\n", text);
|
||||
printf("Expected: ");
|
||||
printf("%s\n", expect_result);
|
||||
printf("Data:\t");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
|
||||
result = 2;
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
free(text);
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
test_base64_decode(const char *str, const uint8_t *expect_data, size_t expect_data_len)
|
||||
{
|
||||
int result;
|
||||
|
||||
uint8_t *data;
|
||||
size_t data_len;
|
||||
|
||||
size_t i;
|
||||
|
||||
data_len = ldns_b64_pton_calculate_size(strlen(str));
|
||||
|
||||
if(!(data = malloc(data_len)))
|
||||
return -1;
|
||||
|
||||
result = ldns_b64_pton(str, data, data_len);
|
||||
|
||||
data_len = result;
|
||||
|
||||
if (result < 0) {
|
||||
printf("Error 2 decoding base64 test data (return code %d): %s\n", result, str);
|
||||
result = 1;
|
||||
} else {
|
||||
result = 0;
|
||||
if (data_len != expect_data_len) {
|
||||
printf("Bad base64 decoding, wrong result length for string %s:\n", str);
|
||||
printf("Got: ");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
printf("Expected: ");
|
||||
print_data_ar(expect_data, expect_data_len);
|
||||
printf("\n");
|
||||
result = 2;
|
||||
} else {
|
||||
for (i = 0; i < data_len; i++) {
|
||||
if (data[i] != expect_data[i]) {
|
||||
result = 3;
|
||||
}
|
||||
}
|
||||
if (result != 0) {
|
||||
printf("Bad base64 decoding string %s:\n", str);
|
||||
printf("Got: ");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
printf("Expected: ");
|
||||
print_data_ar(expect_data, expect_data_len);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
free(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
test_base32_encode(uint8_t *data, size_t data_len, const char *expect_result)
|
||||
{
|
||||
int result;
|
||||
|
||||
char *text;
|
||||
size_t text_len;
|
||||
|
||||
text_len = ldns_b32_ntop_calculate_size(data_len) + 10;
|
||||
text = malloc(text_len);
|
||||
|
||||
result = ldns_b32_ntop(data, data_len, text, text_len);
|
||||
|
||||
if (result < 0) {
|
||||
printf("Error 3 encoding base32 test data (result %d):\n", result);
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
result = 1;
|
||||
} else {
|
||||
if (strncmp(expect_result, text, text_len) != 0) {
|
||||
printf("Bad base32 encoding: got: ");
|
||||
printf("%s\n", text);
|
||||
printf("Expected: ");
|
||||
printf("%s\n", expect_result);
|
||||
printf("Data:\t");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
|
||||
result = 2;
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
free(text);
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
test_base32_decode(const char *str, const uint8_t *expect_data, size_t expect_data_len)
|
||||
{
|
||||
int result;
|
||||
|
||||
uint8_t *data;
|
||||
size_t data_len;
|
||||
|
||||
size_t i;
|
||||
|
||||
data_len = ldns_b32_pton_calculate_size(strlen(str)) + 10;
|
||||
|
||||
if (!(data = malloc(data_len)))
|
||||
return -1;
|
||||
|
||||
result = ldns_b32_pton(str, strlen(str), data, data_len);
|
||||
|
||||
data_len = result;
|
||||
|
||||
if (result < 0) {
|
||||
printf("Error 4 decoding base32 test data (result %d): %s\n", result, str);
|
||||
result = 1;
|
||||
} else {
|
||||
result = 0;
|
||||
if (data_len != expect_data_len) {
|
||||
printf("Bad base32 decoding, wrong result length for string %s:\n", str);
|
||||
printf("Got: ");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
printf("Expected: ");
|
||||
print_data_ar(expect_data, expect_data_len);
|
||||
printf("\n");
|
||||
result = 2;
|
||||
} else {
|
||||
for (i = 0; i < data_len; i++) {
|
||||
if (data[i] != expect_data[i]) {
|
||||
result = 3;
|
||||
}
|
||||
}
|
||||
if (result != 0) {
|
||||
printf("Bad base32 decoding string %s:\n", str);
|
||||
printf("Got: ");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
printf("Expected: ");
|
||||
print_data_ar(expect_data, expect_data_len);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
free(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
test_base32_encode_extended_hex(uint8_t *data, size_t data_len, const char *expect_result)
|
||||
{
|
||||
int result;
|
||||
|
||||
char *text;
|
||||
size_t text_len;
|
||||
|
||||
text_len = ldns_b32_ntop_calculate_size(data_len) + 10;
|
||||
text = malloc(text_len);
|
||||
|
||||
result = ldns_b32_ntop_extended_hex(data, data_len, text, text_len);
|
||||
|
||||
|
||||
if (result < 0) {
|
||||
printf("Error 5 encoding base32 extended hex test data (result %d):\n", result);
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
result = 1;
|
||||
} else {
|
||||
data_len = result;
|
||||
if (strncmp(expect_result, text, text_len) != 0) {
|
||||
printf("Bad base32 encoding: got: ");
|
||||
printf("%s\n", text);
|
||||
printf("Expected: ");
|
||||
printf("%s\n", expect_result);
|
||||
printf("Data:\t");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
|
||||
result = 2;
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
free(text);
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
test_base32_decode_extended_hex(const char *str, const uint8_t *expect_data, size_t expect_data_len)
|
||||
{
|
||||
int result;
|
||||
|
||||
uint8_t *data;
|
||||
size_t data_len;
|
||||
|
||||
size_t i;
|
||||
|
||||
data_len = ldns_b32_pton_calculate_size(strlen(str)) + 10;
|
||||
|
||||
if (!(data = malloc(data_len)))
|
||||
return -1;
|
||||
|
||||
result = ldns_b32_pton_extended_hex(str, strlen(str), data, data_len);
|
||||
|
||||
data_len = result;
|
||||
|
||||
if (result < 0) {
|
||||
printf("Error 6 decoding base32 extended hex test data (result %d): %s\n", result, str);
|
||||
result = 1;
|
||||
} else {
|
||||
result = 0;
|
||||
if (data_len != expect_data_len) {
|
||||
printf("Bad base32 decoding, wrong result length for string %s:\n", str);
|
||||
printf("Got: ");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
printf("Expected: ");
|
||||
print_data_ar(expect_data, expect_data_len);
|
||||
printf("\n");
|
||||
result = 2;
|
||||
} else {
|
||||
for (i = 0; i < data_len; i++) {
|
||||
if (data[i] != expect_data[i]) {
|
||||
result = 3;
|
||||
}
|
||||
}
|
||||
if (result != 0) {
|
||||
printf("Bad base32 decoding string %s:\n", str);
|
||||
printf("Got: ");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
printf("Expected: ");
|
||||
print_data_ar(expect_data, expect_data_len);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
free(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
test_sha1(const void *data, const void *expect_result_str)
|
||||
{
|
||||
int result;
|
||||
unsigned char *digest, *d;
|
||||
unsigned int digest_len;
|
||||
uint8_t *expect_result;
|
||||
size_t data_len;
|
||||
|
||||
data_len = strlen(data);
|
||||
|
||||
expect_result = malloc(strlen((char *)expect_result_str) / 2);
|
||||
(void) ldns_hexstring_to_data(expect_result, expect_result_str);
|
||||
|
||||
digest_len = LDNS_SHA1_DIGEST_LENGTH;
|
||||
digest = malloc(digest_len);
|
||||
|
||||
d = ldns_sha1(data, data_len, digest);
|
||||
|
||||
if (!d) {
|
||||
printf("Error in digest of test data (digesting failed):\n");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
result = 1;
|
||||
} else {
|
||||
if (strncmp((char *)expect_result, (char *)digest, digest_len) != 0) {
|
||||
printf("Bad sha1 digest: got: ");
|
||||
print_data_ar(digest, digest_len);
|
||||
printf("Expected: ");
|
||||
printf("%s\n", (char *)expect_result);
|
||||
printf("Data:\t%s\n", (char *)data);
|
||||
|
||||
result = 2;
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
free(digest);
|
||||
free(expect_result);
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
test_sha256(const void *data, const void *expect_result_str)
|
||||
{
|
||||
int result;
|
||||
unsigned char *digest, *d;
|
||||
unsigned int digest_len;
|
||||
uint8_t *expect_result;
|
||||
size_t data_len;
|
||||
|
||||
data_len = strlen(data);
|
||||
|
||||
expect_result = malloc(strlen((char *)expect_result_str) / 2);
|
||||
(void) ldns_hexstring_to_data(expect_result, expect_result_str);
|
||||
|
||||
digest_len = LDNS_SHA256_DIGEST_LENGTH;
|
||||
digest = malloc(digest_len);
|
||||
|
||||
d = ldns_sha256(data, data_len, digest);
|
||||
|
||||
if (!d) {
|
||||
printf("Error in digest of test data (digesting failed):\n");
|
||||
print_data_ar(data, data_len);
|
||||
printf("\n");
|
||||
result = 1;
|
||||
} else {
|
||||
if (strncmp((char *)expect_result, (char *)digest, digest_len) != 0) {
|
||||
printf("Bad sha256 digest: got: ");
|
||||
print_data_ar(digest, digest_len);
|
||||
printf("Expected: ");
|
||||
printf("%s\n", (char *)expect_result);
|
||||
printf("Data:\t%s\n", (char *)data);
|
||||
|
||||
result = 2;
|
||||
} else {
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
free(digest);
|
||||
free(expect_result);
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
uint8_t *data;
|
||||
size_t data_len;
|
||||
|
||||
int result = EXIT_SUCCESS;
|
||||
|
||||
/* rfc3548 example 1 */
|
||||
data_len = 6;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0x14;
|
||||
data[1] = 0xfb;
|
||||
data[2] = 0x9c;
|
||||
data[3] = 0x03;
|
||||
data[4] = 0xd9;
|
||||
data[5] = 0x7e;
|
||||
if (test_base64_encode(data, data_len, "FPucA9l+") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("FPucA9l+", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* rfc3548 example 2 */
|
||||
data_len = 5;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0x14;
|
||||
data[1] = 0xfb;
|
||||
data[2] = 0x9c;
|
||||
data[3] = 0x03;
|
||||
data[4] = 0xd9;
|
||||
if (test_base64_encode(data, data_len, "FPucA9k=") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("FPucA9k=", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* rfc3548 example 3 */
|
||||
data_len = 4;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0x14;
|
||||
data[1] = 0xfb;
|
||||
data[2] = 0x9c;
|
||||
data[3] = 0x03;
|
||||
if (test_base64_encode(data, data_len, "FPucAw==") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("FPucAw==", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
|
||||
/* base32 from http://www.garykessler.net/library/base64.html */
|
||||
data_len = 5;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0xc9;
|
||||
data[1] = 0x6e;
|
||||
data[2] = 0x96;
|
||||
data[3] = 0x17;
|
||||
data[4] = 0xad;
|
||||
/* if (test_base32_encode(data, data_len, "ZFXJMF5N") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "zfxjmf5n") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("ZFXJMF5N", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("zfxjmf5n", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
data_len = 3;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0x4d;
|
||||
data[1] = 0x5a;
|
||||
data[2] = 0x90;
|
||||
/* if (test_base32_encode(data, data_len, "JVNJA===") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "jvnja===") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("JVNJA===", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("jvnja===", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
|
||||
/* base32 extended_hex */
|
||||
data_len = 5;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0xc9;
|
||||
data[1] = 0x6e;
|
||||
data[2] = 0x96;
|
||||
data[3] = 0x17;
|
||||
data[4] = 0xad;
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "P5N9C5TD") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "p5n9c5td") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("P5N9C5TD", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("p5n9c5td", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
data_len = 3;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0x4d;
|
||||
data[1] = 0x5a;
|
||||
data[2] = 0x90;
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "9LD90===") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "9ld90===") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("9LD90===", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("9ld90===", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* base32 extended_hex (TODO no source! these need to be checked)*/
|
||||
|
||||
|
||||
/* and an encoding that went wrong once */
|
||||
data_len = 20;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0x8a;
|
||||
data[1] = 0xb3;
|
||||
data[2] = 0xeb;
|
||||
data[3] = 0x19;
|
||||
data[4] = 0xd3;
|
||||
data[5] = 0x4f;
|
||||
data[6] = 0xc3;
|
||||
data[7] = 0xa2;
|
||||
data[8] = 0x76;
|
||||
data[9] = 0xf5;
|
||||
data[10] = 0x9f;
|
||||
data[11] = 0x3b;
|
||||
data[12] = 0x7d;
|
||||
data[13] = 0xe6;
|
||||
data[14] = 0x6e;
|
||||
data[15] = 0x2f;
|
||||
data[16] = 0x10;
|
||||
data[17] = 0x3b;
|
||||
data[18] = 0x58;
|
||||
data[19] = 0x3a;
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "HAPUM6EJ9V1Q4TNLJSTNRPJE5S83MM1Q") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "hapum6ej9v1q4tnljstnrpje5s83mm1q") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("HAPUM6EJ9V1Q4TNLJSTNRPJE5S83MM1Q", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("hapum6ej9v1q4tnljstnrpje5s83mm1q", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* tests from josfessons draft */
|
||||
/* BASE64("") = "" */
|
||||
/* BASE32("") = "" */
|
||||
/* BASE32-HEX("") = "" */
|
||||
data_len = 0;
|
||||
if (test_base64_encode(data, data_len, "") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base32_encode(data, data_len, "") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base32_decode("", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base32_encode_extended_hex(data, data_len, "") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base32_decode_extended_hex("", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* BASE64("f") = "Zg==" */
|
||||
/* BASE32("f") = "MY======" */
|
||||
/* BASE32-HEX("f") = "CO======" */
|
||||
data_len = 1;
|
||||
data = malloc(data_len);
|
||||
data[0] = 'f';
|
||||
if (test_base64_encode(data, data_len, "Zg==") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("Zg==", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode(data, data_len, "MY======") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "my======") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("MY======", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("my======", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "CO======") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "co======") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("CO======", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("co======", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
|
||||
/* BASE64("fo") = "Zm8=" */
|
||||
/* BASE32("fo") = "MZXQ====" */
|
||||
/* BASE32-HEX("fo") = "CPNG====" */
|
||||
data_len = 2;
|
||||
data = malloc(data_len);
|
||||
data[0] = 'f';
|
||||
data[1] = 'o';
|
||||
if (test_base64_encode(data, data_len, "Zm8=") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("Zm8=", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode(data, data_len, "MZXQ====") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "mzxq====") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("MZXQ====", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("mzxq====", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "CPNG====") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "cpng====") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("CPNG====", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("cpng====", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* BASE64("foo") = "Zm9v" */
|
||||
/* BASE32("foo") = "MZXW6===" */
|
||||
/* BASE32-HEX("foo") = "CPNMU===" */
|
||||
data_len = 3;
|
||||
data = malloc(data_len);
|
||||
data[0] = 'f';
|
||||
data[1] = 'o';
|
||||
data[2] = 'o';
|
||||
if (test_base64_encode(data, data_len, "Zm9v") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("Zm9v", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode(data, data_len, "MZXW6===") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "mzxw6===") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("MZXW6===", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("mzxw6===", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "CPNMU===") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "cpnmu===") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("CPNMU===", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("cpnmu===", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* BASE64("foob") = "Zm9vYg==" */
|
||||
/* BASE32("foob") = "MZXW6YQ=" */
|
||||
/* BASE32-HEX("foob") = "CPNMUOG=" */
|
||||
data_len = 4;
|
||||
data = malloc(data_len);
|
||||
data[0] = 'f';
|
||||
data[1] = 'o';
|
||||
data[2] = 'o';
|
||||
data[3] = 'b';
|
||||
if (test_base64_encode(data, data_len, "Zm9vYg==") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("Zm9vYg==", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode(data, data_len, "MZXW6YQ=") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "mzxw6yq=") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("MZXW6YQ=", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("mzxw6yq=", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "CPNMUOG=") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "cpnmuog=") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("CPNMUOG=", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("cpnmuog=", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* BASE64("fooba") = "Zm9vYmE=" */
|
||||
/* BASE32("fooba") = "MZXW6YTB" */
|
||||
/* BASE32-HEX("fooba") = "CPNMUOJ1" */
|
||||
data_len = 5;
|
||||
data = malloc(data_len);
|
||||
data[0] = 'f';
|
||||
data[1] = 'o';
|
||||
data[2] = 'o';
|
||||
data[3] = 'b';
|
||||
data[4] = 'a';
|
||||
if (test_base64_encode(data, data_len, "Zm9vYmE=") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("Zm9vYmE=", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode(data, data_len, "MZXW6YTB") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "mzxw6ytb") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("MZXW6YTB", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("mzxw6ytb", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "CPNMUOJ1") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "cpnmuoj1") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("CPNMUOJ1", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("cpnmuoj1", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* BASE64("foobar") = "Zm9vYmFy" */
|
||||
/* BASE32("foobar") = "MZXW6YTBOI======" */
|
||||
/* BASE32-HEX("foobar") = "CPNMUOJ1E8======" */
|
||||
data_len = 6;
|
||||
data = malloc(data_len);
|
||||
data[0] = 'f';
|
||||
data[1] = 'o';
|
||||
data[2] = 'o';
|
||||
data[3] = 'b';
|
||||
data[4] = 'a';
|
||||
data[5] = 'r';
|
||||
if (test_base64_encode(data, data_len, "Zm9vYmFy") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base64_decode("Zm9vYmFy", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode(data, data_len, "MZXW6YTBOI======") != 0) {*/
|
||||
if (test_base32_encode(data, data_len, "mzxw6ytboi======") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode("MZXW6YTBOI======", data, data_len) != 0) {*/
|
||||
if (test_base32_decode("mzxw6ytboi======", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_encode_extended_hex(data, data_len, "CPNMUOJ1E8======") != 0) {*/
|
||||
if (test_base32_encode_extended_hex(data, data_len, "cpnmuoj1e8======") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
/* if (test_base32_decode_extended_hex("CPNMUOJ1E8======", data, data_len) != 0) {*/
|
||||
if (test_base32_decode_extended_hex("cpnmuoj1e8======", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
/* BASE16("") = "" */
|
||||
|
||||
/* BASE16("f") = "gg" */
|
||||
|
||||
/* BASE16("fo") = "gggp" */
|
||||
|
||||
/* BASE16("foo") = "gggpgp" */
|
||||
|
||||
/* BASE16("foob") = "gggpgpgc" */
|
||||
|
||||
/* BASE16("fooba") = "gggpgpgcgb" */
|
||||
|
||||
/* BASE16("foobar") = "gggpgpgcgbhc" */
|
||||
|
||||
|
||||
/* some random stuff to see if (decode(encode(data)) works */
|
||||
data_len = 20;
|
||||
data = malloc(data_len);
|
||||
data[0] = 0x21;
|
||||
data[1] = 0x99;
|
||||
data[2] = 0x1f;
|
||||
data[3] = 0xc0;
|
||||
data[4] = 0xdf;
|
||||
data[5] = 0x02;
|
||||
data[6] = 0xd1;
|
||||
data[7] = 0xd5;
|
||||
data[8] = 0xb6;
|
||||
data[9] = 0xd0;
|
||||
data[10] = 0xf8;
|
||||
data[11] = 0xf4;
|
||||
data[12] = 0xff;
|
||||
data[13] = 0xfe;
|
||||
data[14] = 0x38;
|
||||
data[15] = 0xff;
|
||||
data[16] = 0x1e;
|
||||
data[17] = 0xae;
|
||||
data[18] = 0xc8;
|
||||
data[19] = 0x3a;
|
||||
if (test_base32_encode_extended_hex(data, data_len, "46chvg6v0b8tbdmgv3qfvvhovsfati1q") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_base32_decode_extended_hex("46chvg6v0b8tbdmgv3qfvvhovsfati1q", data, data_len) != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (test_sha1("abc", "A9993E364706816ABA3E25717850C26C9CD0D89D") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_sha1("", "da39a3ee5e6b4b0d3255bfef95601890afd80709") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_sha1("Test vector from febooti.com", "a7631795f6d59cd6d14ebd0058a6394a4b93d868") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_sha1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "84983E441C3BD26EBAAE4AA1F95129E5E54670F1") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (test_sha256("", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (test_sha256("Test vector from febooti.com", "077b18fe29036ada4890bdec192186e10678597a67880290521df70df4bac9ab") != 0) {
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
free(data);
|
||||
|
||||
if (test_duration())
|
||||
result = EXIT_FAILURE;
|
||||
|
||||
printf("unit test is %s\n", result==EXIT_SUCCESS?"ok":"fail");
|
||||
exit(result);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(drill, 1.1.0, dns-team@nlnetlabs.nl, ldns-team)
|
||||
AC_CONFIG_SRCDIR([13-unit-tests-base.c])
|
||||
|
||||
AC_AIX
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# Checks for libraries.
|
||||
# Checks for header files.
|
||||
#AC_HEADER_STDC
|
||||
#AC_HEADER_SYS_WAIT
|
||||
# do the very minimum - we can always extend this
|
||||
AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h time.h])
|
||||
AC_CHECK_HEADERS(sys/param.h sys/mount.h,,,
|
||||
[
|
||||
[
|
||||
#if HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
]
|
||||
])
|
||||
|
||||
# ssl dir if needed
|
||||
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=PATH], [set ssl library directory]),
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib"
|
||||
])
|
||||
|
||||
# check for ldns
|
||||
AC_ARG_WITH(ldns,
|
||||
AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
|
||||
,
|
||||
[
|
||||
specialldnsdir="$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_LIB(ldns, ldns_rr_new,, [
|
||||
AC_MSG_ERROR([Can't find ldns library])
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_HEADER(ldns/ldns.h,, [
|
||||
AC_MSG_ERROR([Can't find ldns headers])
|
||||
]
|
||||
)
|
||||
|
||||
AH_BOTTOM([
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
|
||||
#AC_CHECK_FUNCS([mkdir rmdir strchr strrchr strstr])
|
||||
|
||||
#AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
|
||||
|
||||
AC_CONFIG_FILES([13-unit-tests-base.Makefile])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,16 @@
|
||||
BaseName: 13-unit-tests-base
|
||||
Version: 1.0
|
||||
Description: Run unit tests on base 32 / 64 converters and sha1/sha2 functions
|
||||
CreationDate: Wed Mar 15 10:15:57 CET 2006
|
||||
Maintainer: Jelte Jansen
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help: 13-unit-tests-base.help
|
||||
Pre: 13-unit-tests-base.pre
|
||||
Post:
|
||||
Test: 13-unit-tests-base.test
|
||||
AuxFiles: 13-unit-tests-base.Makefile.in 13-unit-tests-base.configure.ac 13-unit-tests-base.c
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,4 @@
|
||||
TODO :p
|
||||
Please describe how to use this test.
|
||||
i.e. tpkg -a ARG exe testname:
|
||||
ARG is used to ...
|
||||
@@ -0,0 +1,40 @@
|
||||
# #-- 10-older-test.pre--#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
conf=`which autoconf` ||\
|
||||
conf=`which autoconf-2.59` ||\
|
||||
conf=`which autoconf-2.61` ||\
|
||||
conf=`which autoconf259`
|
||||
|
||||
hdr=`which autoheader` ||\
|
||||
hdr=`which autoheader-2.59` ||\
|
||||
hdr=`which autoheader-2.61` ||\
|
||||
hdr=`which autoheader259`
|
||||
|
||||
mk=`which gmake` ||\
|
||||
mk=`which make`
|
||||
|
||||
echo "autoconf: $conf"
|
||||
echo "autoheader: $hdr"
|
||||
echo "make: $mk"
|
||||
|
||||
opts=`../../config.status --config`
|
||||
echo options: $opts
|
||||
|
||||
if [ ! $mk ] || [ ! $conf ] || [ ! $hdr ] ; then
|
||||
echo "Error, one or more build tools not found, aborting"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
#$conf 13-unit-tests-base.configure.ac > configure && \
|
||||
#chmod +x configure && \
|
||||
#$hdr 13-unit-tests-base.configure.ac &&\
|
||||
#eval ./configure --with-ldns=../../ "$opts" && \
|
||||
../../config.status --file 13-unit-tests-base.Makefile
|
||||
$mk -f 13-unit-tests-base.Makefile
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# #-- 10-older-test.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
#PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
export LD_LIBRARY_PATH="../../lib:$LD_LIBRARY_PATH"
|
||||
export DYLD_LIBRARY_PATH="../../lib:$DYLD_LIBRARY_PATH"
|
||||
|
||||
# run the test
|
||||
./13-unit-tests-base
|
||||
exit $?
|
||||
23
zonemaster-ldns/ldns/test/14-read-zone.tpkg/14-read-zone.db
Normal file
23
zonemaster-ldns/ldns/test/14-read-zone.tpkg/14-read-zone.db
Normal file
@@ -0,0 +1,23 @@
|
||||
;
|
||||
; BIND data file for miek.nl for internal use
|
||||
;
|
||||
$TTL 1H
|
||||
@ IN SOA elektron.atoom.net. miekg.atoom.net. (
|
||||
2005060700 ; Serial
|
||||
6H ; Refresh
|
||||
2H ; Retry
|
||||
7D ; Expire
|
||||
1H ) ; Negative Cache TTL
|
||||
|
||||
@ IN NS elektron.atoom.net.
|
||||
@ IN MX 10 elektron.atoom.net.
|
||||
@ IN A 192.168.1.2
|
||||
|
||||
a IN A 192.168.1.2
|
||||
www IN CNAME a
|
||||
; hallo
|
||||
|
||||
|
||||
;
|
||||
www in A 127.0.0.1
|
||||
; bla
|
||||
15
zonemaster-ldns/ldns/test/14-read-zone.tpkg/14-read-zone.dsc
Normal file
15
zonemaster-ldns/ldns/test/14-read-zone.tpkg/14-read-zone.dsc
Normal file
@@ -0,0 +1,15 @@
|
||||
BaseName: 14-read-zone
|
||||
Version: 1.0
|
||||
Description: read a zone with comment on the last line
|
||||
CreationDate: Thu Apr 6 10:50:19 CEST 2006
|
||||
Maintainer: Miek Gieben
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 14-read-zone.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 14-read-zone.test
|
||||
AuxFiles: 14-read-zone.db
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1 @@
|
||||
No arguments are needed
|
||||
@@ -0,0 +1,12 @@
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-read-zone 14-read-zone.db
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,45 @@
|
||||
# Standard installation pathnames
|
||||
# See the file LICENSE for the license
|
||||
SHELL = @SHELL@
|
||||
VERSION = @PACKAGE_VERSION@
|
||||
basesrcdir = $(shell basename `pwd`)
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@ @LIBSSL_CPPFLAGS@ -I../..
|
||||
LDFLAGS = @LDFLAGS@ @LIBSSL_LDFLAGS@ -L../../.libs
|
||||
LIBS = @LIBS@ @LIBSSL_SSL_LIBS@ -lldns
|
||||
|
||||
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS)
|
||||
|
||||
HEADER = config.h
|
||||
TESTS = 15-unit-tests-rrtypes
|
||||
|
||||
.PHONY: all clean realclean
|
||||
%.o:
|
||||
$(COMPILE) -c $(srcdir)/$*.c
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
15-unit-tests-rrtypes: 15-unit-tests-rrtypes.o
|
||||
$(LINK) -o $@ $+ $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(TESTS)
|
||||
rm -f lua-rns
|
||||
|
||||
realclean: clean
|
||||
rm -rf autom4te.cache/
|
||||
rm -f config.log config.status aclocal.m4 config.h.in configure Makefile
|
||||
rm -f config.h
|
||||
|
||||
confclean: clean
|
||||
rm -rf config.log config.status config.h Makefile
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <ldns/ldns.h>
|
||||
|
||||
static int
|
||||
err(const ldns_rr_descriptor* desc, const char* why)
|
||||
{
|
||||
printf("Type %d %s: %s\n", desc->_type, desc->_name, why);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
check_desc(const ldns_rr_descriptor* desc, ldns_rr_type type)
|
||||
{
|
||||
int i;
|
||||
int dcount = 0;
|
||||
if(!desc) {
|
||||
printf("Null!\n");
|
||||
return 0;
|
||||
}
|
||||
if(ldns_rr_descriptor_minimum(desc) != desc->_minimum)
|
||||
return err(desc, "minimum wrong");
|
||||
if(desc->_variable == LDNS_RDF_TYPE_NONE &&
|
||||
ldns_rr_descriptor_maximum(desc) != desc->_maximum)
|
||||
return err(desc, "maximum wrong");
|
||||
if(desc->_type != type && !(desc->_type == LDNS_RR_TYPE_NULL
|
||||
&& strncmp(desc->_name, "TYPE", 4)==0))
|
||||
return err(desc, "type wrong");
|
||||
|
||||
/* check wireformat desc */
|
||||
for(i=0; i<desc->_maximum; i++) {
|
||||
if(desc->_wireformat[i] !=
|
||||
ldns_rr_descriptor_field_type(desc, i))
|
||||
return err(desc, "descriptor field bad");
|
||||
if(desc->_wireformat[i] == LDNS_RDF_TYPE_DNAME)
|
||||
dcount++;
|
||||
}
|
||||
if(desc->_dname_count != dcount) {
|
||||
printf("%s counted %d, stored %d\n",
|
||||
desc->_name, dcount, desc->_dname_count);
|
||||
return 0;
|
||||
}
|
||||
if(dcount == 0 && desc->_compress != LDNS_RR_NO_COMPRESS)
|
||||
return err(desc, "compression set but no dnames in format");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
check_descriptors(void)
|
||||
{
|
||||
ldns_rr_type start = LDNS_RR_TYPE_FIRST;
|
||||
ldns_rr_type end = LDNS_RDATA_FIELD_DESCRIPTORS_COMMON /* 250 */;
|
||||
ldns_rr_type i;
|
||||
for(i=start; i<end; i++) {
|
||||
if(!check_desc(ldns_rr_descript(i), i)) {
|
||||
printf("Type %d failed\n", (int)i);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int result = EXIT_SUCCESS;
|
||||
|
||||
if (!check_descriptors()) {
|
||||
printf("check_dname_count() failed.\n");
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
exit(result);
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(libdns, 1.1.0, dns-team@nlnetlabs.nl,libdns)
|
||||
AC_CONFIG_SRCDIR([15-unit-tests-rrtypes.c])
|
||||
|
||||
OURCPPFLAGS=''
|
||||
CPPFLAGS=${CPPFLAGS:-${OURCPPFLAGS}}
|
||||
OURCFLAGS='-g'
|
||||
CFLAGS=${CFLAGS:-${OURCFLAGS}}
|
||||
|
||||
AC_AIX
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
AC_CHECK_PROGS(libtool, [glibtool libtool15 libtool], [../libtool])
|
||||
|
||||
dnl routine to help check for compiler flags.
|
||||
AC_DEFUN([CHECK_COMPILER_FLAG],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING(whether $CC supports -$1)
|
||||
cache=`echo $1 | sed 'y%.=/+-%___p_%'`
|
||||
AC_CACHE_VAL(cv_prog_cc_flag_$cache,
|
||||
[
|
||||
echo 'void f(){}' >conftest.c
|
||||
if test -z "`$CC -$1 -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_$cache=yes"
|
||||
else
|
||||
eval "cv_prog_cc_flag_$cache=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
])
|
||||
if eval "test \"`echo '$cv_prog_cc_flag_'$cache`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
:
|
||||
$2
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
:
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
dnl routine to help check for needed compiler flags.
|
||||
# if the given code compiles without the flag, execute argument 4
|
||||
# if the given code only compiles with the flag, execute argument 3
|
||||
# otherwise fail
|
||||
AC_DEFUN([CHECK_COMPILER_FLAG_NEEDED],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING(whether we need -$1 as a flag for $CC)
|
||||
cache=`echo $1 | sed 'y%.=/+-%___p_%'`
|
||||
AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache,
|
||||
[
|
||||
echo '$2' > conftest.c
|
||||
echo 'void f(){}' >>conftest.c
|
||||
if test -z "`$CC $CFLAGS -Werror -Wall -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_needed_$cache=no"
|
||||
else
|
||||
[
|
||||
if test -z "`$CC $CFLAGS $1 -Werror -Wall -c conftest.c 2>&1`"; then
|
||||
eval "cv_prog_cc_flag_needed_$cache=yes"
|
||||
else
|
||||
echo 'Test with flag fails too!'
|
||||
cat conftest.c
|
||||
echo "$CC $CFLAGS $1 -Werror -Wall -c conftest.c 2>&1"
|
||||
echo `$CC $CFLAGS $1 -Werror -Wall -c conftest.c`
|
||||
exit 1
|
||||
fi
|
||||
]
|
||||
fi
|
||||
rm -f conftest*
|
||||
])
|
||||
if eval "test \"`echo '$cv_prog_cc_flag_needed_'$cache`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
:
|
||||
$3
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
:
|
||||
$4
|
||||
fi
|
||||
])
|
||||
|
||||
AC_TYPE_SIZE_T
|
||||
CHECK_COMPILER_FLAG(O2, [CFLAGS="$CFLAGS -O2"])
|
||||
CHECK_COMPILER_FLAG(std=c99, [C99FLAG="-std=c99"])
|
||||
CHECK_COMPILER_FLAG(xc99, [C99FLAG="-xc99"])
|
||||
|
||||
AC_C_INLINE
|
||||
AC_CHECK_TYPE(int8_t, char)
|
||||
AC_CHECK_TYPE(int16_t, short)
|
||||
AC_CHECK_TYPE(int32_t, int)
|
||||
AC_CHECK_TYPE(int64_t, long long)
|
||||
AC_CHECK_TYPE(uint8_t, unsigned char)
|
||||
AC_CHECK_TYPE(uint16_t, unsigned short)
|
||||
AC_CHECK_TYPE(uint32_t, unsigned int)
|
||||
AC_CHECK_TYPE(uint64_t, unsigned long long)
|
||||
|
||||
AC_HEADER_STDBOOL
|
||||
AC_CHECK_HEADERS([sys/types.h getopt.h stdlib.h stdio.h assert.h netinet/in.h ctype.h time.h pcap.h arpa/inet.h sys/time.h sys/socket.h sys/select.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_HEADERS([netinet/in_systm.h net/if.h netinet/ip.h netinet/udp.h netinet/if_ether.h netinet/ip6.h],,, [
|
||||
AC_INCLUDES_DEFAULT
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif])
|
||||
|
||||
AC_CHECK_HEADERS([sys/param.h sys/mount.h],,,
|
||||
[AC_INCLUDES_DEFAULT]
|
||||
[
|
||||
[
|
||||
#if HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
]
|
||||
])
|
||||
|
||||
# check to see if libraries are needed for these functions.
|
||||
AC_CHECK_LIB(socket, socket)
|
||||
AC_CHECK_LIB(nsl, inet_pton)
|
||||
|
||||
# ssl dir if needed
|
||||
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=PATH], [set ssl library directory]),
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib"
|
||||
])
|
||||
|
||||
# check for ldns
|
||||
AC_ARG_WITH(ldns,
|
||||
AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
|
||||
,
|
||||
[
|
||||
specialldnsdir="$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib"
|
||||
LDNSDIR="$withval"
|
||||
]
|
||||
)
|
||||
|
||||
# check for ldns development source tree
|
||||
AC_MSG_CHECKING([for ldns devel source])
|
||||
ldns_dev_dir=..
|
||||
if test -f $ldns_dev_dir/ldns/util.h && \
|
||||
grep LDNS_VERSION $ldns_dev_dir/ldns/util.h >/dev/null; then
|
||||
ldns_version=`grep LDNS_VERSION $ldns_dev_dir/ldns/util.h | sed -e 's/^.*"\(.*\)".*$/\1/'`
|
||||
AC_MSG_RESULT([using $ldns_dev_dir with $ldns_version])
|
||||
CPPFLAGS="$CPPFLAGS -I$ldns_dev_dir/include"
|
||||
LDFLAGS="$LDFLAGS -L$ldns_dev_dir -L$ldns_dev_dir/lib"
|
||||
LIBS="$LIBS -lldns"
|
||||
AC_DEFINE(HAVE_LIBLDNS, 1, [If the ldns library is available.])
|
||||
LDNSDIR="$ldns_dev_dir"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_CHECK_LIB(ldns, ldns_rr_new,, [
|
||||
AC_MSG_ERROR([Can't find ldns library])
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
AC_SUBST(LDNSDIR)
|
||||
|
||||
#AC_CHECK_HEADER(ldns/ldns.h,, [
|
||||
# AC_MSG_ERROR([Can't find ldns headers (make copy-headers in devel source.)])
|
||||
# ], [AC_INCLUDES_DEFAULT]
|
||||
#)
|
||||
|
||||
AC_CHECK_LIB(pcap, pcap_open_offline,, [
|
||||
AC_MSG_WARN([Can't find pcap library (needed for ldns-dpa, will not build dpa now.)])
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_FUNCS(isblank)
|
||||
|
||||
AH_BOTTOM([
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_UDP_H
|
||||
#include <netinet/udp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PCAP_H
|
||||
#include <pcap.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IF_ETHER_H
|
||||
#include <netinet/if_ether.h>
|
||||
#endif
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind, opterr;
|
||||
|
||||
#ifndef EXIT_FAILURE
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
#ifndef EXIT_SUCCESS
|
||||
#define EXIT_SUCCESS 0
|
||||
#endif
|
||||
|
||||
#ifdef S_SPLINT_S
|
||||
#define FD_ZERO(a) /* a */
|
||||
#define FD_SET(a,b) /* a, b */
|
||||
#endif
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES([15-unit-tests-rrtypes.Makefile])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,16 @@
|
||||
BaseName: 15-unit-tests-rrtypes
|
||||
Version: 1.0
|
||||
Description: Run unit tests on rr types
|
||||
CreationDate: Wed Apr 24 15:47:06 CEST 2013
|
||||
Maintainer: Jelte Jansen
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help: 15-unit-tests-rrtypes.help
|
||||
Pre: 15-unit-tests-rrtypes.pre
|
||||
Post:
|
||||
Test: 15-unit-tests-rrtypes.test
|
||||
AuxFiles: 15-unit-tests-rrtypes.Makefile.in 15-unit-tests-rrtypes.configure.ac 15-unit-tests-rrtypes.c
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,4 @@
|
||||
TODO :p
|
||||
Please describe how to use this test.
|
||||
i.e. tpkg -a ARG exe testname:
|
||||
ARG is used to ...
|
||||
@@ -0,0 +1,39 @@
|
||||
# #-- 10-older-test.pre--#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
conf=`which autoconf` ||\
|
||||
conf=`which autoconf-2.59` ||\
|
||||
conf=`which autoconf-2.61` ||\
|
||||
conf=`which autoconf259`
|
||||
|
||||
hdr=`which autoheader` ||\
|
||||
hdr=`which autoheader-2.59` ||\
|
||||
hdr=`which autoheader-2.61` ||\
|
||||
hdr=`which autoheader259`
|
||||
|
||||
mk=`which gmake` ||\
|
||||
mk=`which make`
|
||||
|
||||
echo "autoconf: $conf"
|
||||
echo "autoheader: $hdr"
|
||||
echo "make: $mk"
|
||||
|
||||
opts=`../../config.status --config`
|
||||
echo options: $opts
|
||||
|
||||
if [ ! $mk ] || [ ! $conf ] || [ ! $hdr ] ; then
|
||||
echo "Error, one or more build tools not found, aborting"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
#$conf 15-unit-tests-rrtypes.configure.ac > configure && \
|
||||
#chmod +x configure && \
|
||||
#$hdr 15-unit-tests-rrtypes.configure.ac &&\
|
||||
#eval ./configure --with-ldns=../../ "$opts" && \
|
||||
../../config.status --file 15-unit-tests-rrtypes.Makefile
|
||||
$mk -f 15-unit-tests-rrtypes.Makefile
|
||||
@@ -0,0 +1,14 @@
|
||||
# #-- 10-older-test.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
#PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
export "LD_LIBRARY_PATH=../../.libs:$LD_LIBRARY_PATH"
|
||||
export "DYLD_LIBRARY_PATH=../../.libs:$DYLD_LIBRARY_PATH"
|
||||
|
||||
# run the test
|
||||
./15-unit-tests-rrtypes
|
||||
exit $?
|
||||
@@ -0,0 +1,45 @@
|
||||
# Standard installation pathnames
|
||||
# See the file LICENSE for the license
|
||||
SHELL = @SHELL@
|
||||
VERSION = @PACKAGE_VERSION@
|
||||
basesrcdir = $(shell basename `pwd`)
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
mandir = @mandir@
|
||||
datarootdir = @datarootdir@
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@ @LIBSSL_CPPFLAGS@ -I../..
|
||||
LDFLAGS = @LDFLAGS@ @LIBSSL_LDFLAGS@ -L../../.libs
|
||||
LIBS = @LIBS@ @LIBSSL_SSL_LIBS@ -lldns
|
||||
|
||||
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS)
|
||||
|
||||
HEADER = config.h
|
||||
TESTS = 16-unit-tests-edns
|
||||
|
||||
.PHONY: all clean realclean
|
||||
%.o:
|
||||
$(COMPILE) -c $(srcdir)/$*.c
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
16-unit-tests-edns: 16-unit-tests-edns.o
|
||||
$(LINK) -o $@ $+ $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(TESTS)
|
||||
rm -f lua-rns
|
||||
|
||||
realclean: clean
|
||||
rm -rf autom4te.cache/
|
||||
rm -f config.log config.status aclocal.m4 config.h.in configure Makefile
|
||||
rm -f config.h
|
||||
|
||||
confclean: clean
|
||||
rm -rf config.log config.status config.h Makefile
|
||||
@@ -0,0 +1,273 @@
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include <ldns/ldns.h>
|
||||
|
||||
static int
|
||||
check_option_entries(ldns_edns_option *edns, ldns_edns_option_code code,
|
||||
size_t size, uint8_t *hex_data)
|
||||
{
|
||||
size_t i;
|
||||
uint8_t *edns_data;
|
||||
ldns_buffer *buf;
|
||||
|
||||
if (ldns_edns_get_size(edns) != size) {
|
||||
printf("Error: EDNS size is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
if (ldns_edns_get_code(edns) != code) {
|
||||
printf("Error: EDNS code is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
edns_data = ldns_edns_get_data(edns);
|
||||
if (!(edns_data)) {
|
||||
printf("Error: EDNS data is not returned\n");
|
||||
return 0;
|
||||
}
|
||||
for (i = 0; i < size; i++) {
|
||||
if (edns_data[i] != hex_data[i]) {
|
||||
printf("Error: EDNS data is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
buf = ldns_edns_get_wireformat_buffer(edns);
|
||||
if (ldns_buffer_read_u16(buf) != code) {
|
||||
ldns_buffer_free(buf);
|
||||
printf("Error: EDNS type is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
if (ldns_buffer_read_u16(buf) != size) {
|
||||
ldns_buffer_free(buf);
|
||||
printf("Error: EDNS length is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
if (ldns_buffer_read_u8_at(buf, i+4) != hex_data[i]) {
|
||||
printf("Error: EDNS data is incorrect: %d, %d\n",
|
||||
ldns_buffer_read_u8_at(buf, i+4), hex_data[i]);
|
||||
ldns_buffer_free(buf);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ldns_buffer_free(buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
check_option(void)
|
||||
{
|
||||
ldns_edns_option *edns;
|
||||
ldns_edns_option *clone;
|
||||
uint8_t *data = LDNS_XMALLOC(uint8_t, 4);
|
||||
|
||||
uint8_t hex_data[] = {74, 65, 73, 74};
|
||||
|
||||
/* Fill the data with "test" in hex */
|
||||
data[0] = hex_data[0];
|
||||
data[1] = hex_data[1];
|
||||
data[2] = hex_data[2];
|
||||
data[3] = hex_data[3];
|
||||
|
||||
edns = ldns_edns_new(LDNS_EDNS_EDE, 4, data);
|
||||
|
||||
if (!(check_option_entries(edns, LDNS_EDNS_EDE, 4, hex_data))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ldns_edns_deep_free(edns);
|
||||
|
||||
edns = ldns_edns_new_from_data(LDNS_EDNS_EDE, 4, hex_data);
|
||||
|
||||
if (!(check_option_entries(edns, LDNS_EDNS_EDE, 4, hex_data))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
clone = ldns_edns_clone(edns);
|
||||
|
||||
if (!(check_option_entries(clone, LDNS_EDNS_EDE, 4, hex_data))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ldns_edns_deep_free(edns);
|
||||
ldns_edns_deep_free(clone);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int check_option_list_entries(ldns_edns_option_list *list,
|
||||
ldns_edns_option *option, size_t count, ldns_edns_option_code code, size_t size,
|
||||
uint8_t *hex_data)
|
||||
{
|
||||
size_t c = ldns_edns_option_list_get_count(list);
|
||||
|
||||
if (c != count) {
|
||||
printf("Error: EDNS list count is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(option)) {
|
||||
printf("Error: EDNS list option setter doesn't return option\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(check_option_entries(option, code, size, hex_data))) {
|
||||
printf("Error: EDNS list option is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
check_option_list(void)
|
||||
{
|
||||
size_t size, i;
|
||||
ldns_edns_option_list* list;
|
||||
ldns_edns_option_list* clone;
|
||||
ldns_edns_option *option;
|
||||
ldns_edns_option *copy;
|
||||
ldns_edns_option *pop;
|
||||
ldns_buffer *buf;
|
||||
uint8_t hex_data[] = {74, 65, 73, 74};
|
||||
uint8_t hex_data2[] = {74, 65, 73, 74, 74};
|
||||
|
||||
list = ldns_edns_option_list_new(); // don't verify, this function asserts
|
||||
|
||||
/* Add first option */
|
||||
option = ldns_edns_new_from_data(LDNS_EDNS_EDE, 4, hex_data);
|
||||
|
||||
if (ldns_edns_option_list_get_count(list)) {
|
||||
printf("Error: EDNS list count is incorrect after init\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ldns_edns_option_list_push(list, option);
|
||||
|
||||
copy = ldns_edns_option_list_get_option(list, 0);
|
||||
|
||||
if (!(check_option_list_entries(list, copy, 1, LDNS_EDNS_EDE, 4, hex_data))) {
|
||||
printf("Error: EDNS list entries are incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
size = ldns_edns_option_list_get_options_size(list);
|
||||
|
||||
if (size != 8) { // size of the data + 4 for the code and size
|
||||
printf("Error: EDNS list total option size is incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Add second option */
|
||||
option = ldns_edns_new_from_data(LDNS_EDNS_PADDING, 5, hex_data2);
|
||||
|
||||
ldns_edns_option_list_push(list, option);
|
||||
|
||||
if (!(check_option_list_entries(list, option, 2, LDNS_EDNS_PADDING, 5, hex_data2))) {
|
||||
printf("Error: EDNS list entries are incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
buf = ldns_edns_option_list2wireformat_buffer(list);
|
||||
|
||||
if (!(buf)) {
|
||||
printf("Error: EDNS list entries list2wireformat buffer is NULL\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Verify the wireformat options with the hex data */
|
||||
ldns_buffer_skip(buf, 4);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (ldns_buffer_read_u8(buf) != hex_data[i]) {
|
||||
printf("Error: EDNS data is incorrect: %d, %d\n",
|
||||
ldns_buffer_read_u8_at(buf, i), hex_data[i]);
|
||||
ldns_buffer_free(buf);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ldns_buffer_skip(buf, 4);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (ldns_buffer_read_u8(buf) != hex_data2[i]) {
|
||||
printf("Error: EDNS data is incorrect: %d, %d\n",
|
||||
ldns_buffer_read_u8_at(buf, i), hex_data2[i]);
|
||||
ldns_buffer_free(buf);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
ldns_buffer_free(buf);
|
||||
buf = NULL;
|
||||
|
||||
/* Replace the first option with a copy of the second */
|
||||
option = ldns_edns_new_from_data(LDNS_EDNS_PADDING, 5, hex_data2);
|
||||
|
||||
pop = ldns_edns_option_list_set_option(list, option, 0);
|
||||
|
||||
if (!(check_option_list_entries(list, pop, 2, LDNS_EDNS_EDE, 4, hex_data))) {
|
||||
printf("Error: EDNS list entries are incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ldns_edns_deep_free(pop);
|
||||
|
||||
/* Remove one option from the list */
|
||||
|
||||
pop = ldns_edns_option_list_pop(list);
|
||||
|
||||
if (!(check_option_list_entries(list, option, 1, LDNS_EDNS_PADDING, 5, hex_data2))) {
|
||||
printf("Error: EDNS list entries are incorrect\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ldns_edns_deep_free(pop);
|
||||
|
||||
/* Clone the list */
|
||||
clone = ldns_edns_option_list_clone(list);
|
||||
|
||||
if (!(clone)) {
|
||||
printf("Error: EDNS list clone does not exist\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(check_option_list_entries(clone, option, 1, LDNS_EDNS_PADDING, 5, hex_data2))) {
|
||||
printf("Error: EDNS list entries are incorrect\n");
|
||||
ldns_edns_option_list_deep_free(clone);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Remove final entry from cloned list */
|
||||
pop = ldns_edns_option_list_pop(list);
|
||||
|
||||
ldns_edns_deep_free(pop);
|
||||
|
||||
if (ldns_edns_option_list_get_count(clone) == 0) {
|
||||
printf("Error: EDNS list entries are incorrect at zero\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
ldns_edns_option_list_deep_free(clone);
|
||||
|
||||
ldns_edns_option_list_deep_free(list);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int result = EXIT_SUCCESS;
|
||||
|
||||
if (!check_option()) {
|
||||
printf("check_option() failed.\n");
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
if (!check_option_list()) {
|
||||
printf("check_option_list() failed.\n");
|
||||
result = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
exit(result);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(drill, 1.1.0, dns-team@nlnetlabs.nl, ldns-team)
|
||||
AC_CONFIG_SRCDIR([13-unit-tests-base.c])
|
||||
|
||||
AC_AIX
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# Checks for libraries.
|
||||
# Checks for header files.
|
||||
#AC_HEADER_STDC
|
||||
#AC_HEADER_SYS_WAIT
|
||||
# do the very minimum - we can always extend this
|
||||
AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h assert.h netinet/in.hctype.h time.h])
|
||||
AC_CHECK_HEADERS(sys/param.h sys/mount.h,,,
|
||||
[
|
||||
[
|
||||
#if HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
]
|
||||
])
|
||||
|
||||
# ssl dir if needed
|
||||
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=PATH], [set ssl library directory]),
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval -L$withval/lib"
|
||||
])
|
||||
|
||||
# check for ldns
|
||||
AC_ARG_WITH(ldns,
|
||||
AC_HELP_STRING([--with-ldns=PATH specify prefix of path of ldns library to use])
|
||||
,
|
||||
[
|
||||
specialldnsdir="$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_LIB(ldns, ldns_rr_new,, [
|
||||
AC_MSG_ERROR([Can't find ldns library])
|
||||
]
|
||||
)
|
||||
|
||||
AC_CHECK_HEADER(ldns/ldns.h,, [
|
||||
AC_MSG_ERROR([Can't find ldns headers])
|
||||
]
|
||||
)
|
||||
|
||||
AH_BOTTOM([
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
])
|
||||
|
||||
|
||||
#AC_CHECK_FUNCS([mkdir rmdir strchr strrchr strstr])
|
||||
|
||||
#AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
|
||||
|
||||
AC_CONFIG_FILES([13-unit-tests-base.Makefile])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,16 @@
|
||||
BaseName: 16-unit-tests-edns
|
||||
Version: 1.0
|
||||
Description: Run EDNS unit tests on base 32 / 64 converters and sha1/sha2 functions
|
||||
CreationDate: Wed Mar 15 10:15:57 CET 2006
|
||||
Maintainer: Tom Carpay
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: 16-unit-tests-edns.pre
|
||||
Post:
|
||||
Test: 16-unit-tests-edns.test
|
||||
AuxFiles: 16-unit-tests-edns.Makefile.in 16-unit-tests-edns.configure.ac 16-unit-tests-edns.c
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1,45 @@
|
||||
# #-- 16-unit-tests-edns.pre--#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
conf=`which autoconf` ||\
|
||||
conf=`which autoconf-2.59` ||\
|
||||
conf=`which autoconf-2.61` ||\
|
||||
conf=`which autoconf259`
|
||||
|
||||
hdr=`which autoheader` ||\
|
||||
hdr=`which autoheader-2.59` ||\
|
||||
hdr=`which autoheader-2.61` ||\
|
||||
hdr=`which autoheader259`
|
||||
|
||||
mk=`which gmake` ||\
|
||||
mk=`which make`
|
||||
|
||||
echo "autoconf: $conf"
|
||||
echo "autoheader: $hdr"
|
||||
echo "make: $mk"
|
||||
|
||||
opts=`../../config.status --config`
|
||||
echo options: $opts
|
||||
|
||||
if [ ! $mk ] || [ ! $conf ] || [ ! $hdr ] ; then
|
||||
echo "Error, one or more build tools not found, aborting"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
ssl=``
|
||||
if [[ "$OSTYPE" == "darwin"* && -d "/opt/homebrew/Cellar/openssl@1.1" ]]; then
|
||||
ssl=/opt/homebrew/Cellar/openssl@1.1/1.1.1n/
|
||||
fi;
|
||||
|
||||
#$conf 13-unit-tests-base.configure.ac > configure && \
|
||||
#chmod +x configure && \
|
||||
#$hdr 13-unit-tests-base.configure.ac &&\
|
||||
#eval ./configure --with-ldns=../../ with-ssl=$ssl "$opts" && \
|
||||
../../config.status --file 16-unit-tests-edns.Makefile
|
||||
$mk -f 16-unit-tests-edns.Makefile
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# #-- 16-unit-tests-edns.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
#PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
export LD_LIBRARY_PATH="../../lib:$LD_LIBRARY_PATH"
|
||||
export DYLD_LIBRARY_PATH="../../lib:$DYLD_LIBRARY_PATH"
|
||||
|
||||
# run the test
|
||||
./16-unit-tests-edns
|
||||
exit $?
|
||||
@@ -0,0 +1,3 @@
|
||||
search jelte.nlnetlabs.nl
|
||||
nameserver 192.168.8.8
|
||||
nameserver 192.168.8.21
|
||||
@@ -0,0 +1,3 @@
|
||||
domain jelte.nlnetlabs.nl
|
||||
nameserver 192.168.8.8
|
||||
nameserver 192.168.8.21
|
||||
@@ -0,0 +1,5 @@
|
||||
domain jelte.nlnetlabs.nl
|
||||
search nlnetlabs.nl
|
||||
search fluim.net
|
||||
nameserver 192.168.8.8
|
||||
nameserver 192.168.8.21
|
||||
@@ -0,0 +1,6 @@
|
||||
domain jelte.nlnetlabs.nl
|
||||
search nlnetlabs.nl
|
||||
search fluim.net
|
||||
sortlist 192.168.8.0/255.255.255.0 195.169.215.155
|
||||
nameserver 192.168.8.8
|
||||
nameserver 192.168.8.21
|
||||
@@ -0,0 +1,4 @@
|
||||
domain jelte.nlnetlabs.nl
|
||||
options debug
|
||||
nameserver 192.168.8.8
|
||||
nameserver 192.168.8.21
|
||||
@@ -0,0 +1,4 @@
|
||||
domain jelte.nlnetlabs.nl
|
||||
options rotate attempts inet6
|
||||
nameserver 192.168.8.8
|
||||
nameserver 192.168.8.21
|
||||
@@ -0,0 +1,15 @@
|
||||
BaseName: 17-stub-resolver
|
||||
Version: 1.0
|
||||
Description: try to create stub resolvers from different resolv.conf files
|
||||
CreationDate: Fri Jun 30 10:05:09 CEST 2006
|
||||
Maintainer: Jelte Jansen
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 17-stub-resolver.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 17-stub-resolver.test
|
||||
AuxFiles: 17-resolv.conf1 17-resolv.conf2 17-resolv.conf3 17-resolv.conf4 17-resolv.conf5 17-resolv.conf6
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1 @@
|
||||
No arguments are needed
|
||||
@@ -0,0 +1,79 @@
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
RESULT=0
|
||||
|
||||
echo "17-resolv.conf1:"
|
||||
cat 17-resolv.conf1
|
||||
echo ""
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-resolver 17-resolv.conf1
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "17-resolv.conf2:"
|
||||
cat 17-resolv.conf2
|
||||
echo ""
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-resolver 17-resolv.conf2
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "17-resolv.conf3:"
|
||||
cat 17-resolv.conf3
|
||||
echo ""
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-resolver 17-resolv.conf3
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "17-resolv.conf4:"
|
||||
cat 17-resolv.conf4
|
||||
echo ""
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-resolver 17-resolv.conf4
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "17-resolv.conf5:"
|
||||
cat 17-resolv.conf5
|
||||
echo ""
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-resolver 17-resolv.conf5
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "17-resolv.conf6:"
|
||||
cat 17-resolv.conf6
|
||||
echo ""
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-resolver 17-resolv.conf6
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
RESULT=1
|
||||
fi
|
||||
|
||||
|
||||
exit $RESULT
|
||||
@@ -0,0 +1,15 @@
|
||||
BaseName: 18-drill-tests1
|
||||
Version: 1.0
|
||||
Description: some basic execution tests of drill with ldns-fake-server (print, chase)
|
||||
CreationDate: Wed Nov 29 16:16:37 CET 2006
|
||||
Maintainer: Jelte Jansen
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 18-drill-tests1.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 18-drill-tests1.test
|
||||
AuxFiles: test1-server-data test1-answer-output test1-drill-output test2-server-data test2-key
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1 @@
|
||||
No arguments are needed
|
||||
@@ -0,0 +1,88 @@
|
||||
# test for drill
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
. ../common.sh
|
||||
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
export LD_LIBRARY_PATH="../../lib:$LD_LIBRARY_PATH"
|
||||
export DYLD_LIBRARY_PATH="../../lib:$DYLD_LIBRARY_PATH"
|
||||
TMPF1="tmpf1"
|
||||
TMPF2="tmpf2"
|
||||
|
||||
# start fake server
|
||||
../../examples/ldns-testns -r test1-server-data > $TMPF1 &
|
||||
PID=$!
|
||||
echo "PID1 IS $PID"
|
||||
ps waux | grep testns
|
||||
wait_ldns_testns_up $TMPF1
|
||||
PORT=`cat $TMPF1 | grep Listening | cut -d ' ' -f 4`
|
||||
if test -z "$PORT"; then
|
||||
echo "ldns-testns did not come up"
|
||||
cat $TMPF1
|
||||
kill $PID
|
||||
kill -9 $PID
|
||||
exit 1
|
||||
fi
|
||||
echo "ldns-testns listening on port $PORT"
|
||||
|
||||
../../drill/drill -p $PORT www.kanariepiet.com. @localhost
|
||||
../../drill/drill -p $PORT www.kanariepiet.com. @localhost | grep -v WHEN | grep -v time | grep -v HEADER | grep -v SERVER > $TMPF2
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Error querying fake server"
|
||||
echo "Server output:"
|
||||
cat $TMPF1
|
||||
RESULT=1
|
||||
fi
|
||||
../../drill/drill -p $PORT -t CH TXT server.stop. @localhost
|
||||
|
||||
echo "diff test1-answer-output $TMPF2"
|
||||
diff test1-answer-output $TMPF2
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Error, answer not printed correctly"
|
||||
RESULT=1
|
||||
fi
|
||||
|
||||
# make sure testns server is stopped
|
||||
kill $PID >/dev/null 2>&1
|
||||
kill -9 $PID >/dev/null 2>&1
|
||||
|
||||
PORT=
|
||||
# start fake server
|
||||
../../examples/ldns-testns -r test2-server-data > $TMPF1 &
|
||||
PID=$!
|
||||
echo "PID2 IS $PID"
|
||||
ps waux | grep testns
|
||||
wait_ldns_testns_up $TMPF1
|
||||
PORT=`cat $TMPF1 | grep Listening | cut -d " " -f 4`
|
||||
|
||||
echo "../../drill/drill -p $PORT -k test2-key -S @localhost ok.ok.test.jelte.nlnetlabs.nl"
|
||||
|
||||
if ../../drill/drill -h | grep \\s\\-S\\s >/dev/null; then
|
||||
../../drill/drill -p $PORT -k test2-key -S @localhost ok.ok.test.jelte.nlnetlabs.nl> $TMPF2
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
cat $TMPF2
|
||||
if grep "No trusted keys found in tree: first error was: DNSSEC signature has expired" $TMPF2; then
|
||||
echo "yes it is expired"
|
||||
else
|
||||
echo "Error in chase"
|
||||
RESULT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
echo "SKIP (drill lacks -S)"
|
||||
fi
|
||||
|
||||
../../drill/drill -p $PORT -t CH TXT server.stop. @localhost
|
||||
|
||||
# make sure testns server is stopped
|
||||
kill $PID >/dev/null 2>&1
|
||||
kill -9 $PID >/dev/null 2>&1
|
||||
|
||||
rm -f $TMPF1
|
||||
rm -f $TMPF2
|
||||
echo "DONE"
|
||||
|
||||
exit $RESULT
|
||||
@@ -0,0 +1,16 @@
|
||||
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
|
||||
;; QUESTION SECTION:
|
||||
;; www.kanariepiet.com. IN A
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.kanariepiet.com. 68060 IN A 82.94.237.50
|
||||
|
||||
;; AUTHORITY SECTION:
|
||||
kanariepiet.com. 68060 IN NS ns2.hexon-is.nl.
|
||||
kanariepiet.com. 68060 IN NS ns1.hexon-is.nl.
|
||||
|
||||
;; ADDITIONAL SECTION:
|
||||
ns1.hexon-is.nl. 24512 IN A 82.94.237.2
|
||||
ns2.hexon-is.nl. 24512 IN A 212.204.219.91
|
||||
|
||||
;; MSG SIZE rcvd: 132
|
||||
@@ -0,0 +1,19 @@
|
||||
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 23460
|
||||
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
|
||||
;; QUESTION SECTION:
|
||||
;; www.kanariepiet.com. IN A
|
||||
|
||||
;; ANSWER SECTION:
|
||||
www.kanariepiet.com. 68060 IN A 82.94.237.50
|
||||
|
||||
;; AUTHORITY SECTION:
|
||||
kanariepiet.com. 68060 IN NS ns2.hexon-is.nl.
|
||||
kanariepiet.com. 68060 IN NS ns1.hexon-is.nl.
|
||||
|
||||
;; ADDITIONAL SECTION:
|
||||
ns1.hexon-is.nl. 24512 IN A 82.94.237.2
|
||||
ns2.hexon-is.nl. 24512 IN A 212.204.219.91
|
||||
|
||||
;; Query time: 0 msec
|
||||
;; WHEN: Thu Jan 1 01:00:00 1970
|
||||
;; MSG SIZE rcvd: 222
|
||||
@@ -0,0 +1,19 @@
|
||||
ENTRY_BEGIN
|
||||
ADJUST copy_id
|
||||
HEX_ANSWER_BEGIN
|
||||
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||
;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
5b a4 81 80 00 01 00 01 00 02 00 02 03 77 77 77 0b 6b 61 6e ; 1- 20
|
||||
61 72 69 65 70 69 65 74 03 63 6f 6d 00 00 01 00 01 03 77 77 ; 21- 40
|
||||
77 0b 6b 61 6e 61 72 69 65 70 69 65 74 03 63 6f 6d 00 00 01 ; 41- 60
|
||||
00 01 00 01 09 dc 00 04 52 5e ed 32 0b 6b 61 6e 61 72 69 65 ; 61- 80
|
||||
70 69 65 74 03 63 6f 6d 00 00 02 00 01 00 01 09 dc 00 11 03 ; 81- 100
|
||||
6e 73 32 08 68 65 78 6f 6e 2d 69 73 02 6e 6c 00 0b 6b 61 6e ; 101- 120
|
||||
61 72 69 65 70 69 65 74 03 63 6f 6d 00 00 02 00 01 00 01 09 ; 121- 140
|
||||
dc 00 11 03 6e 73 31 08 68 65 78 6f 6e 2d 69 73 02 6e 6c 00 ; 141- 160
|
||||
03 6e 73 31 08 68 65 78 6f 6e 2d 69 73 02 6e 6c 00 00 01 00 ; 161- 180
|
||||
01 00 00 5f c0 00 04 52 5e ed 02 03 6e 73 32 08 68 65 78 6f ; 181- 200
|
||||
6e 2d 69 73 02 6e 6c 00 00 01 00 01 00 00 5f c0 00 04 d4 cc ; 201- 220
|
||||
db 5b
|
||||
HEX_ANSWER_END
|
||||
ENTRY_END
|
||||
1
zonemaster-ldns/ldns/test/18-drill-tests1.tpkg/test2-key
Normal file
1
zonemaster-ldns/ldns/test/18-drill-tests1.tpkg/test2-key
Normal file
@@ -0,0 +1 @@
|
||||
test.jelte.nlnetlabs.nl. 3600 IN DNSKEY 256 3 RSASHA1 AQPSu30bsy0UAdRQIN5RqcUBnXDKgOTL+BOiPDZkwilHgX/CafIrBMfwRmWmpxu6dg6gU5xjplHmhRdOkU/Wjh4d41AfJlS/w6Z5dF5jRj5VXVGElhPQVxdZTyhIpZBeNqZw1VZ2+SoLRdRvmEUfAShr+iRurOppRJVBqB5sfLWldw== ; {id = 26552, size = 1024b}
|
||||
388
zonemaster-ldns/ldns/test/18-drill-tests1.tpkg/test2-server-data
Normal file
388
zonemaster-ldns/ldns/test/18-drill-tests1.tpkg/test2-server-data
Normal file
@@ -0,0 +1,388 @@
|
||||
$TTL 3600
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH qname
|
||||
MATCH qtype
|
||||
REPLY NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
ok.ok.test.jelte.nlnetlabs.nl IN A
|
||||
HEX_ANSWER_BEGIN
|
||||
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||
;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
2b d2 81 80 00 01 00 02 00 02 00 03 02 6f 6b 02 6f 6b 04 74 ; 1- 20
|
||||
65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 ; 21- 40
|
||||
6e 6c 00 00 01 00 01 02 6f 6b 02 6f 6b 04 74 65 73 74 05 6a ; 41- 60
|
||||
65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 01 ; 61- 80
|
||||
00 01 00 00 02 2c 00 04 c3 a9 d7 9b 02 6f 6b 02 6f 6b 04 74 ; 81- 100
|
||||
65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 ; 101- 120
|
||||
6e 6c 00 00 2e 00 01 00 00 02 2c 00 b1 00 01 05 06 00 00 02 ; 121- 140
|
||||
58 71 2d 95 80 41 68 7b 80 be d3 02 6f 6b 02 6f 6b 04 74 65 ; 141- 160
|
||||
73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e ; 161- 180
|
||||
6c 00 44 38 b5 58 5e 59 18 5c 15 26 1c 1b f0 c5 61 23 02 ef ; 181- 200
|
||||
a0 14 c8 34 37 82 41 d8 33 9b 2b 13 f6 2c 83 be 6d e3 d9 52 ; 201- 220
|
||||
75 66 51 5f 8e 26 45 be a2 ea f0 46 90 cf bf f9 04 83 37 10 ; 221- 240
|
||||
f5 17 1c 59 a9 0f 20 4d d7 af d2 66 46 24 0f 41 70 ed 2e f7 ; 241- 260
|
||||
ad 2a d6 c9 0b 98 99 d7 5c b6 29 26 6c bb c9 29 1f 44 17 92 ; 261- 280
|
||||
e0 37 70 44 4b 4c 97 1c b6 e8 70 35 8a 3e 80 f4 6a 90 bd 09 ; 281- 300
|
||||
60 4b 47 80 7e 56 9c 04 16 89 02 6f 6b 02 6f 6b 04 74 65 73 ; 301- 320
|
||||
74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c ; 321- 340
|
||||
00 00 02 00 01 00 00 02 2c 00 14 05 6a 65 6c 74 65 09 6e 6c ; 341- 360
|
||||
6e 65 74 6c 61 62 73 02 6e 6c 00 02 6f 6b 02 6f 6b 04 74 65 ; 361- 380
|
||||
73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e ; 381- 400
|
||||
6c 00 00 2e 00 01 00 00 02 2c 00 b1 00 02 05 06 00 00 02 58 ; 401- 420
|
||||
71 2d 95 80 41 68 7b 80 be d3 02 6f 6b 02 6f 6b 04 74 65 73 ; 421- 440
|
||||
74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c ; 441- 460
|
||||
00 54 8a 07 0c e7 86 b6 45 c9 6a ec aa d7 b0 3c 81 7a b1 2d ; 461- 480
|
||||
d6 54 fb f8 38 6f db b9 19 c0 ca a3 95 06 b0 1a 39 f0 2c 18 ; 481- 500
|
||||
e0 58 0b 34 4d 12 b5 9b e5 2a 8c f0 47 80 22 95 d5 ca a3 2c ; 501- 520
|
||||
85 df 7f 38 d8 77 c4 b6 57 aa 32 15 05 0c d6 c9 ed de 08 fe ; 521- 540
|
||||
91 a7 21 92 f7 b0 75 b0 2b e3 11 94 d0 85 fa 9a 87 8d 71 ae ; 541- 560
|
||||
d6 62 f0 35 04 28 fe 5f dc ac 16 2f 73 03 13 87 0d 98 84 c8 ; 561- 580
|
||||
ce 16 54 11 f5 7e 84 30 06 05 6a 65 6c 74 65 09 6e 6c 6e 65 ; 581- 600
|
||||
74 6c 61 62 73 02 6e 6c 00 00 01 00 01 00 00 02 2c 00 04 c3 ; 601- 620
|
||||
a9 d7 9b 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 ; 621- 640
|
||||
6e 6c 00 00 2e 00 01 00 00 02 2c 00 a6 00 01 05 03 00 00 02 ; 641- 660
|
||||
58 45 92 ca 93 45 6b 3d 93 a7 6c 05 6a 65 6c 74 65 09 6e 6c ; 661- 680
|
||||
6e 65 74 6c 61 62 73 02 6e 6c 00 7b 41 df dd 63 d2 0d c6 fd ; 681- 700
|
||||
ac c8 cd 65 ea aa 34 1d d9 ba e1 55 ed 1b f6 17 01 39 e9 de ; 701- 720
|
||||
20 9c ae 5b 62 5f ce 81 b1 e8 78 42 c2 10 b0 58 fa d3 dd a2 ; 721- 740
|
||||
b7 ee 5f 15 3b d2 a0 47 14 1e 58 2f ad 2f e2 5f 59 e6 84 7f ; 741- 760
|
||||
6d 84 f1 0f 40 42 ab 41 4b 38 b6 27 12 35 60 e2 71 d7 18 f0 ; 761- 780
|
||||
f5 33 4a b8 f5 ba 6a 13 97 02 59 cb 4d d5 e7 5e c7 17 d3 0b ; 781- 800
|
||||
9b 1a 6d 04 a4 60 98 49 bc a9 38 7e f7 b6 ec 37 61 8f cd 00 ; 801- 820
|
||||
00 29 10 00 00 00 80 00 00 00
|
||||
HEX_ANSWER_END
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH qname
|
||||
MATCH qtype
|
||||
REPLY NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
ok.ok.test.jelte.nlnetlabs.nl IN DNSKEY
|
||||
HEX_ANSWER_BEGIN
|
||||
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||
;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
2a 1c 81 80 00 01 00 04 00 02 00 03 02 6f 6b 02 6f 6b 04 74 ; 1- 20
|
||||
65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 ; 21- 40
|
||||
6e 6c 00 00 30 00 01 02 6f 6b 02 6f 6b 04 74 65 73 74 05 6a ; 41- 60
|
||||
65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 30 ; 61- 80
|
||||
00 01 00 00 0d 4a 00 86 01 01 03 05 01 03 da 88 03 a9 ee 68 ; 81- 100
|
||||
4c 29 54 1b 49 db 0f d6 e7 39 4b 92 f2 1e ed 57 dd ec 1d 77 ; 101- 120
|
||||
4b fc e9 e8 fc f9 a7 d7 13 c9 a8 ae f9 0e 07 f2 30 a1 84 b1 ; 121- 140
|
||||
0e f0 c8 94 9a f1 d4 fa aa 62 46 05 c2 e4 cd 0e a1 40 92 ba ; 141- 160
|
||||
11 f2 48 1d 16 de cf e5 70 bc 0a 95 8f bf c3 d5 0e 0e 30 06 ; 161- 180
|
||||
e3 5c a6 98 ec 1f 1c 37 aa 39 c7 3e 6b c6 fc 02 d1 ae bb 65 ; 181- 200
|
||||
9e 1a cd d8 d9 c1 30 1e 41 6e 21 90 af d2 51 f7 24 02 bf f7 ; 201- 220
|
||||
b8 f9 02 6f 6b 02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 09 ; 221- 240
|
||||
6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 30 00 01 00 00 0d ; 241- 260
|
||||
4a 00 86 01 00 03 05 01 03 d1 5b 0a 73 35 2f 0f 3f 73 59 6b ; 261- 280
|
||||
fa 2b 27 d0 63 cb a3 03 a0 9d a5 f0 92 07 37 ae 47 d3 c0 15 ; 281- 300
|
||||
0f 5e a0 e9 d6 37 cf 92 4e 82 fe 16 6c 7e 33 90 95 ea 8f 16 ; 301- 320
|
||||
18 82 ac ef ac 16 4b 39 9b ab a0 9b 77 72 52 24 b4 dd ec 15 ; 321- 340
|
||||
ed 3c e5 d2 30 cf e1 a0 c6 63 62 2a 34 09 5e 3f 78 8a 02 eb ; 341- 360
|
||||
1f dd 0f ae 6b 27 23 77 70 b7 45 c8 a3 f6 67 6c 77 67 1f 60 ; 361- 380
|
||||
b1 28 34 6f 89 a9 4a aa bf 3f 86 ad 29 54 db a5 f1 02 6f 6b ; 381- 400
|
||||
02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 ; 401- 420
|
||||
6c 61 62 73 02 6e 6c 00 00 2e 00 01 00 00 0d 4a 00 b1 00 30 ; 421- 440
|
||||
05 06 00 00 0e 10 71 2d 95 80 41 68 7b 80 be d3 02 6f 6b 02 ; 441- 460
|
||||
6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c ; 461- 480
|
||||
61 62 73 02 6e 6c 00 9f 29 69 e6 53 7d 8b d3 7f c9 82 36 71 ; 481- 500
|
||||
02 59 d4 6c 61 e4 25 f0 4b 3e 83 5e f9 09 ea 5f ef 23 34 3e ; 501- 520
|
||||
e1 4d 6a 63 61 35 9d 03 fd c5 38 14 6e db 18 43 0f 3b 53 ec ; 521- 540
|
||||
7f c9 87 73 60 c1 1c 2e ad 26 e2 46 2c 69 6f 6b 55 37 07 e5 ; 541- 560
|
||||
45 57 b7 d2 35 83 8b 21 93 07 49 e6 e5 6a e6 0d f8 86 66 01 ; 561- 580
|
||||
d3 4b de 56 f0 cf cf 49 85 0b 88 53 64 d1 81 71 66 b1 61 f9 ; 581- 600
|
||||
6b 57 98 c9 2e 0d 12 1e 73 eb 2b f0 c3 c2 e8 02 6f 6b 02 6f ; 601- 620
|
||||
6b 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 ; 621- 640
|
||||
62 73 02 6e 6c 00 00 2e 00 01 00 00 0d 4a 00 b1 00 30 05 06 ; 641- 660
|
||||
00 00 0e 10 71 2d 95 80 41 68 7b 80 e0 8a 02 6f 6b 02 6f 6b ; 661- 680
|
||||
04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 ; 681- 700
|
||||
73 02 6e 6c 00 81 d2 31 24 d7 af 69 33 33 fc 7e cd 98 a2 7f ; 701- 720
|
||||
fd ea 80 7f a9 ce e1 d5 1d b7 ff 41 01 77 f3 93 f6 f4 85 ed ; 721- 740
|
||||
98 c3 6c 48 cb f0 d6 67 02 e4 d4 eb fc 2f f5 32 f2 20 71 80 ; 741- 760
|
||||
46 f0 34 6e 31 62 ba d0 4f e1 4d 91 0b f0 1f a2 50 d7 52 d1 ; 761- 780
|
||||
04 d8 8d ba fd 2d e7 e3 40 fc f5 3d ee e7 c2 10 45 e6 2a 65 ; 781- 800
|
||||
92 70 5f 28 68 4e 4b d5 15 79 eb 34 cc 08 d0 a5 e6 ad 67 06 ; 801- 820
|
||||
8a 35 e1 ae 54 38 cd cc 25 10 e9 33 8b 02 6f 6b 02 6f 6b 04 ; 821- 840
|
||||
74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 ; 841- 860
|
||||
02 6e 6c 00 00 02 00 01 00 00 01 92 00 14 05 6a 65 6c 74 65 ; 861- 880
|
||||
09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 02 6f 6b 02 6f 6b ; 881- 900
|
||||
04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 ; 901- 920
|
||||
73 02 6e 6c 00 00 2e 00 01 00 00 01 92 00 b1 00 02 05 06 00 ; 921- 940
|
||||
00 02 58 71 2d 95 80 41 68 7b 80 be d3 02 6f 6b 02 6f 6b 04 ; 941- 960
|
||||
74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 ; 961- 980
|
||||
02 6e 6c 00 54 8a 07 0c e7 86 b6 45 c9 6a ec aa d7 b0 3c 81 ; 981-1000
|
||||
7a b1 2d d6 54 fb f8 38 6f db b9 19 c0 ca a3 95 06 b0 1a 39 ; 1001-1020
|
||||
f0 2c 18 e0 58 0b 34 4d 12 b5 9b e5 2a 8c f0 47 80 22 95 d5 ; 1021-1040
|
||||
ca a3 2c 85 df 7f 38 d8 77 c4 b6 57 aa 32 15 05 0c d6 c9 ed ; 1041-1060
|
||||
de 08 fe 91 a7 21 92 f7 b0 75 b0 2b e3 11 94 d0 85 fa 9a 87 ; 1061-1080
|
||||
8d 71 ae d6 62 f0 35 04 28 fe 5f dc ac 16 2f 73 03 13 87 0d ; 1081-1100
|
||||
98 84 c8 ce 16 54 11 f5 7e 84 30 06 05 6a 65 6c 74 65 09 6e ; 1101-1120
|
||||
6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 01 00 01 00 00 01 92 ; 1121-1140
|
||||
00 04 c3 a9 d7 9b 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 ; 1141-1160
|
||||
62 73 02 6e 6c 00 00 2e 00 01 00 00 01 92 00 a6 00 01 05 03 ; 1161-1180
|
||||
00 00 02 58 45 92 ca 93 45 6b 3d 93 a7 6c 05 6a 65 6c 74 65 ; 1181-1200
|
||||
09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 7b 41 df dd 63 d2 ; 1201-1220
|
||||
0d c6 fd ac c8 cd 65 ea aa 34 1d d9 ba e1 55 ed 1b f6 17 01 ; 1221-1240
|
||||
39 e9 de 20 9c ae 5b 62 5f ce 81 b1 e8 78 42 c2 10 b0 58 fa ; 1241-1260
|
||||
d3 dd a2 b7 ee 5f 15 3b d2 a0 47 14 1e 58 2f ad 2f e2 5f 59 ; 1261-1280
|
||||
e6 84 7f 6d 84 f1 0f 40 42 ab 41 4b 38 b6 27 12 35 60 e2 71 ; 1281-1300
|
||||
d7 18 f0 f5 33 4a b8 f5 ba 6a 13 97 02 59 cb 4d d5 e7 5e c7 ; 1301-1320
|
||||
17 d3 0b 9b 1a 6d 04 a4 60 98 49 bc a9 38 7e f7 b6 ec 37 61 ; 1321-1340
|
||||
8f cd 00 00 29 10 00 00 00 80 00 00 00
|
||||
HEX_ANSWER_END
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH qname
|
||||
MATCH qtype
|
||||
REPLY NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
ok.ok.test.jelte.nlnetlabs.nl IN DS
|
||||
HEX_ANSWER_BEGIN
|
||||
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||
;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
00 5f 81 80 00 01 00 02 00 02 00 03 02 6f 6b 02 6f 6b 04 74 ; 1- 20
|
||||
65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 ; 21- 40
|
||||
6e 6c 00 00 2b 00 01 02 6f 6b 02 6f 6b 04 74 65 73 74 05 6a ; 41- 60
|
||||
65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2b ; 61- 80
|
||||
00 01 00 00 0d 3d 00 18 e0 8b 05 01 1b da 71 22 be fc 94 70 ; 81- 100
|
||||
cb 04 4f 9f 6e 35 73 0d 8f 44 dd a2 02 6f 6b 02 6f 6b 04 74 ; 101- 120
|
||||
65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 ; 121- 140
|
||||
6e 6c 00 00 2e 00 01 00 00 0d 3d 00 ae 00 2b 05 06 00 00 0e ; 141- 160
|
||||
10 71 2d 95 80 41 68 7b 80 a0 b8 02 6f 6b 04 74 65 73 74 05 ; 161- 180
|
||||
6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 4b ; 181- 200
|
||||
3c 16 a3 ee a4 e6 dd 09 33 3b 26 73 eb ad 39 77 4f 75 20 b1 ; 201- 220
|
||||
5d 95 79 dc 98 22 21 0a da bc 98 90 bc cc dc 32 3e a3 da 8e ; 221- 240
|
||||
0a d7 6a a9 87 20 eb 66 a3 a8 7d 54 91 70 b3 46 00 83 d1 79 ; 241- 260
|
||||
ad 26 22 ed ba d4 6c 8a e6 bf 74 cf 1f de bd c4 4a 02 c9 c2 ; 261- 280
|
||||
8f f0 22 a7 45 e5 9c f7 86 53 10 87 12 ec 8d ea 7e 1a cb 84 ; 281- 300
|
||||
5a 05 9b 86 c2 5e 48 21 ed 3c c9 08 bc aa b9 39 15 da b2 26 ; 301- 320
|
||||
d9 e9 31 b8 3e 47 4b 02 6f 6b 02 6f 6b 04 74 65 73 74 05 6a ; 321- 340
|
||||
65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 02 ; 341- 360
|
||||
00 01 00 00 01 85 00 14 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 ; 361- 380
|
||||
6c 61 62 73 02 6e 6c 00 02 6f 6b 02 6f 6b 04 74 65 73 74 05 ; 381- 400
|
||||
6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 ; 401- 420
|
||||
2e 00 01 00 00 01 85 00 b1 00 02 05 06 00 00 02 58 71 2d 95 ; 421- 440
|
||||
80 41 68 7b 80 be d3 02 6f 6b 02 6f 6b 04 74 65 73 74 05 6a ; 441- 460
|
||||
65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 54 8a ; 461- 480
|
||||
07 0c e7 86 b6 45 c9 6a ec aa d7 b0 3c 81 7a b1 2d d6 54 fb ; 481- 500
|
||||
f8 38 6f db b9 19 c0 ca a3 95 06 b0 1a 39 f0 2c 18 e0 58 0b ; 501- 520
|
||||
34 4d 12 b5 9b e5 2a 8c f0 47 80 22 95 d5 ca a3 2c 85 df 7f ; 521- 540
|
||||
38 d8 77 c4 b6 57 aa 32 15 05 0c d6 c9 ed de 08 fe 91 a7 21 ; 541- 560
|
||||
92 f7 b0 75 b0 2b e3 11 94 d0 85 fa 9a 87 8d 71 ae d6 62 f0 ; 561- 580
|
||||
35 04 28 fe 5f dc ac 16 2f 73 03 13 87 0d 98 84 c8 ce 16 54 ; 581- 600
|
||||
11 f5 7e 84 30 06 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 ; 601- 620
|
||||
62 73 02 6e 6c 00 00 01 00 01 00 00 01 85 00 04 c3 a9 d7 9b ; 621- 640
|
||||
05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 ; 641- 660
|
||||
00 2e 00 01 00 00 01 85 00 a6 00 01 05 03 00 00 02 58 45 92 ; 661- 680
|
||||
ca 93 45 6b 3d 93 a7 6c 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 ; 681- 700
|
||||
6c 61 62 73 02 6e 6c 00 7b 41 df dd 63 d2 0d c6 fd ac c8 cd ; 701- 720
|
||||
65 ea aa 34 1d d9 ba e1 55 ed 1b f6 17 01 39 e9 de 20 9c ae ; 721- 740
|
||||
5b 62 5f ce 81 b1 e8 78 42 c2 10 b0 58 fa d3 dd a2 b7 ee 5f ; 741- 760
|
||||
15 3b d2 a0 47 14 1e 58 2f ad 2f e2 5f 59 e6 84 7f 6d 84 f1 ; 761- 780
|
||||
0f 40 42 ab 41 4b 38 b6 27 12 35 60 e2 71 d7 18 f0 f5 33 4a ; 781- 800
|
||||
b8 f5 ba 6a 13 97 02 59 cb 4d d5 e7 5e c7 17 d3 0b 9b 1a 6d ; 801- 820
|
||||
04 a4 60 98 49 bc a9 38 7e f7 b6 ec 37 61 8f cd 00 00 29 10 ; 821- 840
|
||||
00 00 00 80 00 00 00
|
||||
HEX_ANSWER_END
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH qname
|
||||
MATCH qtype
|
||||
REPLY NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
ok.test.jelte.nlnetlabs.nl IN DNSKEY
|
||||
HEX_ANSWER_BEGIN
|
||||
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||
;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
16 b8 81 80 00 01 00 04 00 02 00 03 02 6f 6b 04 74 65 73 74 ; 1- 20
|
||||
05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 ; 21- 40
|
||||
00 30 00 01 02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 09 6e ; 41- 60
|
||||
6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 30 00 01 00 00 0d 32 ; 61- 80
|
||||
00 86 01 01 03 05 01 03 c5 3e fc d8 93 5e 23 d5 91 49 64 f2 ; 81- 100
|
||||
ee b3 71 42 e9 93 e6 b8 7c 31 c5 ab 98 7e 04 98 99 16 f2 e5 ; 101- 120
|
||||
8f 5a b0 71 e8 1e bd 2a 89 ee 93 78 5a 56 eb d2 a1 91 cb d1 ; 121- 140
|
||||
fa 42 f3 fa 25 60 d1 05 dc 2e 88 c2 11 92 91 57 92 08 d2 fb ; 141- 160
|
||||
2c 4b b4 f9 d7 e3 53 58 86 f3 bf bc e1 02 a2 8e 4c 0b cb a3 ; 161- 180
|
||||
a1 15 b9 72 2b c1 56 4c c2 8f 42 16 36 81 1b 08 de 6a fb 51 ; 181- 200
|
||||
65 e3 b8 1b dd 03 dd 04 c1 9f 45 3b 1a 87 dd a3 02 6f 6b 04 ; 201- 220
|
||||
74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 ; 221- 240
|
||||
02 6e 6c 00 00 30 00 01 00 00 0d 32 00 86 01 00 03 05 01 03 ; 241- 260
|
||||
db c6 a7 88 2b 06 c0 7e da 9f 74 57 19 69 b2 a8 66 39 8c c0 ; 261- 280
|
||||
c7 f2 d2 04 f6 60 68 28 9a 41 8a fc fb 2f 14 b8 15 e2 f1 a6 ; 281- 300
|
||||
3b 00 bc ae 35 44 69 2f 4f 7b cf 52 f5 be 98 b7 2a 52 cf a1 ; 301- 320
|
||||
51 79 54 bf ff b9 29 88 1b 43 52 be 5e 74 39 99 de d6 d0 3f ; 321- 340
|
||||
31 0b 48 7b 19 e3 f7 ae 1f 4a 18 bf c8 8a 2d 09 26 f2 fa 97 ; 341- 360
|
||||
84 92 5d 84 b7 86 69 d3 46 ff 76 a2 c9 ed 23 91 6d 15 c7 1c ; 361- 380
|
||||
f2 70 1a f2 0c 07 51 3f 02 6f 6b 04 74 65 73 74 05 6a 65 6c ; 381- 400
|
||||
74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2e 00 01 ; 401- 420
|
||||
00 00 0d 32 00 ae 00 30 05 05 00 00 0e 10 71 2d 95 80 41 68 ; 421- 440
|
||||
7b 80 a0 b8 02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 09 6e ; 441- 460
|
||||
6c 6e 65 74 6c 61 62 73 02 6e 6c 00 a3 ba 25 1f 7e 6f c1 2e ; 461- 480
|
||||
0c c8 d7 b2 36 db 74 d9 ad f9 a5 56 a3 84 5a 89 81 b7 6b da ; 481- 500
|
||||
8d 67 56 6f 64 22 84 45 b3 00 98 6e c1 02 b7 c0 3a fb 23 8c ; 501- 520
|
||||
f3 a6 c4 2d b9 48 0b b5 6d 25 64 0e 2f e9 fe 3f 0a 3e 1b 72 ; 521- 540
|
||||
45 dc 9d 92 c7 c4 32 b0 47 30 9f d9 f1 cb a2 84 c2 67 a9 99 ; 541- 560
|
||||
26 4d 0c ef 2b b8 dc 9e a6 6c 75 e0 dc c5 0e b9 72 fa b1 4c ; 561- 580
|
||||
e1 0b d0 32 7e 36 a7 e9 dc ed 30 46 be b0 55 59 8d a6 ff 09 ; 581- 600
|
||||
02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 ; 601- 620
|
||||
6c 61 62 73 02 6e 6c 00 00 2e 00 01 00 00 0d 32 00 ae 00 30 ; 621- 640
|
||||
05 05 00 00 0e 10 71 2d 95 80 41 68 7b 80 e9 51 02 6f 6b 04 ; 641- 660
|
||||
74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 ; 661- 680
|
||||
02 6e 6c 00 59 fc 9d f0 ae 3a f0 90 42 d0 3e 6f e8 60 f7 1f ; 681- 700
|
||||
d1 69 76 19 89 b4 ec 0f d2 73 61 f5 e4 16 c1 52 6c 6f a5 b8 ; 701- 720
|
||||
22 69 cf 84 84 1d ae 03 f7 d8 cc a1 cf 27 6f fb 9f 99 e2 cb ; 721- 740
|
||||
63 52 6d 31 c1 de 18 48 cf 2c df 81 f0 01 5d 87 cf 3f bc 72 ; 741- 760
|
||||
8a 95 5a 4b d6 f4 77 3f cf 04 b9 bf d5 bc e0 39 d2 92 e6 ea ; 761- 780
|
||||
c8 c9 96 1f 51 97 b0 08 4e d3 0c d4 02 9e b8 46 d0 d5 c0 5e ; 781- 800
|
||||
6f 91 29 42 f9 8b a5 97 3d 47 27 7a 02 6f 6b 04 74 65 73 74 ; 801- 820
|
||||
05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 ; 821- 840
|
||||
00 02 00 01 00 00 01 7a 00 14 05 6a 65 6c 74 65 09 6e 6c 6e ; 841- 860
|
||||
65 74 6c 61 62 73 02 6e 6c 00 02 6f 6b 04 74 65 73 74 05 6a ; 861- 880
|
||||
65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2e ; 881- 900
|
||||
00 01 00 00 01 7a 00 ae 00 02 05 05 00 00 02 58 71 2d 95 80 ; 901- 920
|
||||
41 68 7b 80 a0 b8 02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 ; 921- 940
|
||||
09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 0b cb 07 b4 e1 41 ; 941- 960
|
||||
bd 70 46 44 75 e5 b8 d5 0d 63 a3 d7 93 ad 13 55 5b 6f 58 7e ; 961- 980
|
||||
4b dd 82 21 58 1b 7b 94 33 39 d8 a9 a1 a4 23 17 5b 9a d2 35 ; 981-1000
|
||||
d2 67 8b 3d bb a7 a4 42 65 0a ce 06 2b 5c 6d 79 d6 8c 8f 60 ; 1001-1020
|
||||
13 4e 37 3a 17 f7 ea 87 f3 8f f1 8a b2 c3 d0 4d ea d2 91 84 ; 1021-1040
|
||||
1a b2 01 9c 59 67 a4 eb f4 3e 51 0a 8f 32 0f 8d 40 11 2d 52 ; 1041-1060
|
||||
c9 90 12 cb 46 b9 ba 48 4d 35 7d 88 77 f6 0a ca f3 a8 03 7f ; 1061-1080
|
||||
1e 27 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e ; 1081-1100
|
||||
6c 00 00 01 00 01 00 00 01 7a 00 04 c3 a9 d7 9b 05 6a 65 6c ; 1101-1120
|
||||
74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2e 00 01 ; 1121-1140
|
||||
00 00 01 7a 00 a6 00 01 05 03 00 00 02 58 45 92 ca 93 45 6b ; 1141-1160
|
||||
3d 93 a7 6c 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 ; 1161-1180
|
||||
02 6e 6c 00 7b 41 df dd 63 d2 0d c6 fd ac c8 cd 65 ea aa 34 ; 1181-1200
|
||||
1d d9 ba e1 55 ed 1b f6 17 01 39 e9 de 20 9c ae 5b 62 5f ce ; 1201-1220
|
||||
81 b1 e8 78 42 c2 10 b0 58 fa d3 dd a2 b7 ee 5f 15 3b d2 a0 ; 1221-1240
|
||||
47 14 1e 58 2f ad 2f e2 5f 59 e6 84 7f 6d 84 f1 0f 40 42 ab ; 1241-1260
|
||||
41 4b 38 b6 27 12 35 60 e2 71 d7 18 f0 f5 33 4a b8 f5 ba 6a ; 1261-1280
|
||||
13 97 02 59 cb 4d d5 e7 5e c7 17 d3 0b 9b 1a 6d 04 a4 60 98 ; 1281-1300
|
||||
49 bc a9 38 7e f7 b6 ec 37 61 8f cd 00 00 29 10 00 00 00 80 ; 1301-1320
|
||||
00 00 00
|
||||
HEX_ANSWER_END
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH qname
|
||||
MATCH qtype
|
||||
REPLY NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
ok.test.jelte.nlnetlabs.nl IN DS
|
||||
HEX_ANSWER_BEGIN
|
||||
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||
;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
d2 e0 81 80 00 01 00 02 00 02 00 03 02 6f 6b 04 74 65 73 74 ; 1- 20
|
||||
05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 ; 21- 40
|
||||
00 2b 00 01 02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 09 6e ; 41- 60
|
||||
6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2b 00 01 00 00 0d 2a ; 61- 80
|
||||
00 18 e9 52 05 01 8a 2b f5 bc a9 db 0d e0 24 ad 54 20 03 7d ; 81- 100
|
||||
30 b1 bf e2 4d 8c 02 6f 6b 04 74 65 73 74 05 6a 65 6c 74 65 ; 101- 120
|
||||
09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2e 00 01 00 00 ; 121- 140
|
||||
0d 2a 00 ab 00 2b 05 05 00 00 0e 10 45 a3 5e 4c 45 7e 74 4c ; 141- 160
|
||||
67 b8 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c ; 161- 180
|
||||
61 62 73 02 6e 6c 00 c8 ab 39 fd 90 56 8e 20 9b 6f c9 d8 b3 ; 181- 200
|
||||
ca 96 d7 eb fa 3b 98 80 92 ca c2 55 e5 f5 4d ff f0 88 27 1c ; 201- 220
|
||||
09 1b d6 f5 4a 9b bd a0 3b 62 9a 82 fd a8 73 67 9f c8 44 4c ; 221- 240
|
||||
78 8c 77 b0 d3 44 68 89 31 51 9b 47 9c 98 63 89 04 2b 7e 43 ; 241- 260
|
||||
60 12 14 9d fb ee 46 9f a8 4c 26 aa 61 1c 8c 70 56 5e 3c 70 ; 261- 280
|
||||
45 57 27 dd 93 4c 6b a6 57 dc cf a1 f6 6f ce 39 d2 e6 5a b3 ; 281- 300
|
||||
ca cc 7a 5a ef 05 12 2e 00 b8 57 5a f3 6b a8 02 6f 6b 04 74 ; 301- 320
|
||||
65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 ; 321- 340
|
||||
6e 6c 00 00 02 00 01 00 00 01 71 00 14 05 6a 65 6c 74 65 09 ; 341- 360
|
||||
6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 02 6f 6b 04 74 65 73 ; 361- 380
|
||||
74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c ; 381- 400
|
||||
00 00 2e 00 01 00 00 01 71 00 ae 00 02 05 05 00 00 02 58 71 ; 401- 420
|
||||
2d 95 80 41 68 7b 80 a0 b8 02 6f 6b 04 74 65 73 74 05 6a 65 ; 421- 440
|
||||
6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 0b cb 07 ; 441- 460
|
||||
b4 e1 41 bd 70 46 44 75 e5 b8 d5 0d 63 a3 d7 93 ad 13 55 5b ; 461- 480
|
||||
6f 58 7e 4b dd 82 21 58 1b 7b 94 33 39 d8 a9 a1 a4 23 17 5b ; 481- 500
|
||||
9a d2 35 d2 67 8b 3d bb a7 a4 42 65 0a ce 06 2b 5c 6d 79 d6 ; 501- 520
|
||||
8c 8f 60 13 4e 37 3a 17 f7 ea 87 f3 8f f1 8a b2 c3 d0 4d ea ; 521- 540
|
||||
d2 91 84 1a b2 01 9c 59 67 a4 eb f4 3e 51 0a 8f 32 0f 8d 40 ; 541- 560
|
||||
11 2d 52 c9 90 12 cb 46 b9 ba 48 4d 35 7d 88 77 f6 0a ca f3 ; 561- 580
|
||||
a8 03 7f 1e 27 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 ; 581- 600
|
||||
73 02 6e 6c 00 00 01 00 01 00 00 01 71 00 04 c3 a9 d7 9b 05 ; 601- 620
|
||||
6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 ; 621- 640
|
||||
2e 00 01 00 00 01 71 00 a6 00 01 05 03 00 00 02 58 45 92 ca ; 641- 660
|
||||
93 45 6b 3d 93 a7 6c 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c ; 661- 680
|
||||
61 62 73 02 6e 6c 00 7b 41 df dd 63 d2 0d c6 fd ac c8 cd 65 ; 681- 700
|
||||
ea aa 34 1d d9 ba e1 55 ed 1b f6 17 01 39 e9 de 20 9c ae 5b ; 701- 720
|
||||
62 5f ce 81 b1 e8 78 42 c2 10 b0 58 fa d3 dd a2 b7 ee 5f 15 ; 721- 740
|
||||
3b d2 a0 47 14 1e 58 2f ad 2f e2 5f 59 e6 84 7f 6d 84 f1 0f ; 741- 760
|
||||
40 42 ab 41 4b 38 b6 27 12 35 60 e2 71 d7 18 f0 f5 33 4a b8 ; 761- 780
|
||||
f5 ba 6a 13 97 02 59 cb 4d d5 e7 5e c7 17 d3 0b 9b 1a 6d 04 ; 781- 800
|
||||
a4 60 98 49 bc a9 38 7e f7 b6 ec 37 61 8f cd 00 00 29 10 00 ; 801- 820
|
||||
00 00 80 00 00 00
|
||||
HEX_ANSWER_END
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH qname
|
||||
MATCH qtype
|
||||
REPLY NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
test.jelte.nlnetlabs.nl IN DNSKEY
|
||||
HEX_ANSWER_BEGIN
|
||||
; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
||||
;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
16 fc 81 80 00 01 00 02 00 02 00 03 04 74 65 73 74 05 6a 65 ; 1- 20
|
||||
6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 30 00 ; 21- 40
|
||||
01 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 ; 41- 60
|
||||
62 73 02 6e 6c 00 00 30 00 01 00 00 0d 1d 00 86 01 00 03 05 ; 61- 80
|
||||
01 03 d2 bb 7d 1b b3 2d 14 01 d4 50 20 de 51 a9 c5 01 9d 70 ; 81- 100
|
||||
ca 80 e4 cb f8 13 a2 3c 36 64 c2 29 47 81 7f c2 69 f2 2b 04 ; 101- 120
|
||||
c7 f0 46 65 a6 a7 1b ba 76 0e a0 53 9c 63 a6 51 e6 85 17 4e ; 121- 140
|
||||
91 4f d6 8e 1e 1d e3 50 1f 26 54 bf c3 a6 79 74 5e 63 46 3e ; 141- 160
|
||||
55 5d 51 84 96 13 d0 57 17 59 4f 28 48 a5 90 5e 36 a6 70 d5 ; 161- 180
|
||||
56 76 f9 2a 0b 45 d4 6f 98 45 1f 01 28 6b fa 24 6e ac ea 69 ; 181- 200
|
||||
44 95 41 a8 1e 6c 7c b5 a5 77 04 74 65 73 74 05 6a 65 6c 74 ; 201- 220
|
||||
65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2e 00 01 00 ; 221- 240
|
||||
00 0d 1d 00 ab 00 30 05 04 00 00 0e 10 45 a3 5e 4c 45 7e 74 ; 241- 260
|
||||
4c 67 b8 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 ; 261- 280
|
||||
6c 61 62 73 02 6e 6c 00 58 10 42 10 36 5b 17 07 5f b0 ba 5d ; 281- 300
|
||||
ff a9 9a dd 62 d0 73 bd be cd 9c e5 e0 9e 32 22 af c8 b1 51 ; 301- 320
|
||||
ab 8c f8 98 52 2e c8 02 b2 66 df 44 c6 f4 f0 8e 6f 51 d9 f2 ; 321- 340
|
||||
05 b7 61 cb fd f7 21 4a 37 70 da d1 c9 81 39 61 b5 5f 27 0d ; 341- 360
|
||||
b8 af 7f 0c 6b e9 ce 1e 90 19 08 15 3f e1 66 1d 89 ba dc a5 ; 361- 380
|
||||
e8 1d 8c da fc d5 52 54 28 05 75 ad 29 09 d5 94 c0 17 5d 7e ; 381- 400
|
||||
7f 93 26 d0 3e 21 22 99 ce bb 6c b4 d6 7e 12 7b 04 74 65 73 ; 401- 420
|
||||
74 05 6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c ; 421- 440
|
||||
00 00 02 00 01 00 00 01 65 00 14 05 6a 65 6c 74 65 09 6e 6c ; 441- 460
|
||||
6e 65 74 6c 61 62 73 02 6e 6c 00 04 74 65 73 74 05 6a 65 6c ; 461- 480
|
||||
74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 2e 00 01 ; 481- 500
|
||||
00 00 01 65 00 ab 00 02 05 04 00 00 02 58 45 a3 5e 4c 45 7e ; 501- 520
|
||||
74 4c 67 b8 04 74 65 73 74 05 6a 65 6c 74 65 09 6e 6c 6e 65 ; 521- 540
|
||||
74 6c 61 62 73 02 6e 6c 00 a9 fc 4e a2 f5 f2 dd c0 52 9a 63 ; 541- 560
|
||||
8c 06 db 77 21 bb af fe 1a cf d2 28 70 28 46 a7 0a eb c5 15 ; 561- 580
|
||||
69 d1 0d 4a 4a bd 12 69 37 9b 80 a4 59 f9 aa 28 50 f5 da 34 ; 581- 600
|
||||
99 de e7 d4 5b b2 a9 d1 d3 3b d4 4f 44 b0 8f c0 c2 69 37 e5 ; 601- 620
|
||||
40 c3 5b a9 cb 02 60 a3 e0 f8 4d 86 fb 17 39 93 31 33 04 03 ; 621- 640
|
||||
04 51 60 0e 26 1a 77 22 1f 68 0b b8 9d 93 fa 9a c0 9d 97 6e ; 641- 660
|
||||
5d 35 53 42 68 9f ff aa 48 42 21 b0 df 86 8e 13 a9 05 6a 65 ; 661- 680
|
||||
6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 00 01 00 ; 681- 700
|
||||
01 00 00 01 64 00 04 c3 a9 d7 9b 05 6a 65 6c 74 65 09 6e 6c ; 701- 720
|
||||
6e 65 74 6c 61 62 73 02 6e 6c 00 00 2e 00 01 00 00 01 64 00 ; 721- 740
|
||||
a6 00 01 05 03 00 00 02 58 45 92 ca 93 45 6b 3d 93 a7 6c 05 ; 741- 760
|
||||
6a 65 6c 74 65 09 6e 6c 6e 65 74 6c 61 62 73 02 6e 6c 00 7b ; 761- 780
|
||||
41 df dd 63 d2 0d c6 fd ac c8 cd 65 ea aa 34 1d d9 ba e1 55 ; 781- 800
|
||||
ed 1b f6 17 01 39 e9 de 20 9c ae 5b 62 5f ce 81 b1 e8 78 42 ; 801- 820
|
||||
c2 10 b0 58 fa d3 dd a2 b7 ee 5f 15 3b d2 a0 47 14 1e 58 2f ; 821- 840
|
||||
ad 2f e2 5f 59 e6 84 7f 6d 84 f1 0f 40 42 ab 41 4b 38 b6 27 ; 841- 860
|
||||
12 35 60 e2 71 d7 18 f0 f5 33 4a b8 f5 ba 6a 13 97 02 59 cb ; 861- 880
|
||||
4d d5 e7 5e c7 17 d3 0b 9b 1a 6d 04 a4 60 98 49 bc a9 38 7e ; 881- 900
|
||||
f7 b6 ec 37 61 8f cd 00 00 29 10 00 00 00 80 00 00 00
|
||||
HEX_ANSWER_END
|
||||
ENTRY_END
|
||||
|
||||
15
zonemaster-ldns/ldns/test/19-keygen.tpkg/19-keygen.dsc
Normal file
15
zonemaster-ldns/ldns/test/19-keygen.tpkg/19-keygen.dsc
Normal file
@@ -0,0 +1,15 @@
|
||||
BaseName: 19-keygen
|
||||
Version: 1.0
|
||||
Description: Check the output of the key generator
|
||||
CreationDate: Mon Dec 10 13:52:06 CET 2007
|
||||
Maintainer: Jelte Jansen
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 19-keygen.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 19-keygen.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
8
zonemaster-ldns/ldns/test/19-keygen.tpkg/19-keygen.help
Normal file
8
zonemaster-ldns/ldns/test/19-keygen.tpkg/19-keygen.help
Normal file
@@ -0,0 +1,8 @@
|
||||
No arguments are used for this test.
|
||||
|
||||
The example tool ldns-read-zone is used to read the zone from
|
||||
19-keygen-inputzone that contains a number of different RRs. The output
|
||||
is compared to 19-keygen-outputzone.
|
||||
|
||||
With this test the zone reading functions are checked to see if they have
|
||||
not regressed.
|
||||
147
zonemaster-ldns/ldns/test/19-keygen.tpkg/19-keygen.test
Normal file
147
zonemaster-ldns/ldns/test/19-keygen.tpkg/19-keygen.test
Normal file
@@ -0,0 +1,147 @@
|
||||
# #-- 05-nm.test --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# use .tpkg.var.test for in test variable passing
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
# svnserve resets the path, you may need to adjust it, like this:
|
||||
PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
LIB=../../lib/
|
||||
export LD_LIBRARY_PATH=$LIB:$LD_LIBRARY_PATH
|
||||
result=0
|
||||
|
||||
#
|
||||
# create keys
|
||||
#
|
||||
RSA=`../../examples/ldns-keygen -b 512 -r /dev/zero -a RSASHA1 rsa.com`
|
||||
ECDSA=`../../examples/ldns-keygen -r /dev/zero -a ECDSAP384SHA384 ecdsa.com`
|
||||
HMAC=`../../examples/ldns-keygen -b 512 -r /dev/zero -a hmac-md5.sig-alg.reg.int hmac.com`
|
||||
|
||||
#
|
||||
# Test whether readzone agrees
|
||||
#
|
||||
|
||||
cat $RSA.key > 1
|
||||
../../examples/ldns-read-zone $RSA.key | tail -1 | sed -e "s/3600[ ]*IN/IN/" > 2
|
||||
d=`diff 1 2`
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "RSA Error: readzone on generated key differs:"
|
||||
echo "Generated key:"
|
||||
cat 1
|
||||
echo "Readzone part:"
|
||||
cat 2
|
||||
echo "Diff:"
|
||||
echo $d
|
||||
result=1
|
||||
fi;
|
||||
cat $ECDSA.key > 1
|
||||
../../examples/ldns-read-zone $ECDSA.key | tail -1 | sed -e "s/3600[ ]*IN/IN/" > 2
|
||||
d=`diff 1 2`
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "ECDSA Error: readzone on generated key differs:"
|
||||
echo "Generated key:"
|
||||
cat 1
|
||||
echo "Readzone part:"
|
||||
cat 2
|
||||
echo "Diff:"
|
||||
echo $d
|
||||
result=1
|
||||
fi;
|
||||
|
||||
cat $HMAC.key > 1
|
||||
../../examples/ldns-read-zone $HMAC.key | tail -1 | sed -e "s/3600[ ]*IN/IN/" > 2
|
||||
d=`diff 1 2`
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "HMAC Error: readzone on generated key differs:"
|
||||
echo "Generated key:"
|
||||
cat 1
|
||||
echo "Readzone part:"
|
||||
cat 2
|
||||
echo "Diff:"
|
||||
echo $d
|
||||
result=1
|
||||
fi;
|
||||
|
||||
RSASHA256=`../../examples/ldns-keygen -b 512 -r /dev/zero -a RSASHA256 256.com`
|
||||
fail=$?
|
||||
if [ $fail == 0 ]; then
|
||||
cat $RSASHA256.key > 1
|
||||
../../examples/ldns-read-zone $RSASHA256.key | tail -1 | sed -e "s/3600[ ]*IN/IN/" > 2
|
||||
d=`diff 1 2`
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "RSASHA256 Error: readzone on generated key differs:"
|
||||
echo "Generated key:"
|
||||
cat 1
|
||||
echo "Readzone part:"
|
||||
cat 2
|
||||
echo "Diff:"
|
||||
echo $d
|
||||
result=1
|
||||
fi;
|
||||
grep 512b $RSASHA256.key >& /dev/null
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "RSASHA256 key does not appear to be 512 bits"
|
||||
result=$fail
|
||||
cat $RSASHA256.key
|
||||
fi;
|
||||
rm $RSASHA256.*
|
||||
else
|
||||
echo "RSASHA256 not supported"
|
||||
fi;
|
||||
|
||||
RSASHA512=`../../examples/ldns-keygen -b 512 -r /dev/zero -a RSASHA512 -b 1024 512.com`
|
||||
fail=$?
|
||||
if [ $fail == 0 ]; then
|
||||
cat $RSASHA512.key > 1
|
||||
../../examples/ldns-read-zone $RSASHA512.key | tail -1 | sed -e "s/3600[ ]*IN/IN/" > 2
|
||||
d=`diff 1 2`
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "RSASHA512 Error: readzone on generated key differs:"
|
||||
echo "Generated key:"
|
||||
cat 1
|
||||
echo "Readzone part:"
|
||||
cat 2
|
||||
echo "Diff:"
|
||||
echo $d
|
||||
result=1
|
||||
fi;
|
||||
grep 1024b $RSASHA512.key >& /dev/null
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "RSASHA512 key does not appear to be 1024 bits"
|
||||
result=$fail
|
||||
cat $RSASHA512.key
|
||||
fi;
|
||||
rm $RSASHA512.*
|
||||
else
|
||||
echo "RSASHA512 not supported"
|
||||
fi;
|
||||
|
||||
grep 512b $RSA.key >& /dev/null
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "RSA key does not appear to be 512 bits"
|
||||
result=$fail
|
||||
cat $RSA.key
|
||||
fi;
|
||||
grep 384b $ECDSA.key >& /dev/null
|
||||
fail=$?
|
||||
if [ $fail != 0 ]; then
|
||||
echo "ECDSA key does not appear to be 384 bits"
|
||||
result=$fail
|
||||
cat $ECDSA.key
|
||||
fi;
|
||||
|
||||
rm $RSA.*
|
||||
rm $ECDSA.*
|
||||
rm $HMAC.*
|
||||
echo "exit $result"
|
||||
|
||||
exit $result;
|
||||
|
||||
1247
zonemaster-ldns/ldns/test/20-sign-zone.tpkg/20-sign-zone.db
Normal file
1247
zonemaster-ldns/ldns/test/20-sign-zone.tpkg/20-sign-zone.db
Normal file
File diff suppressed because it is too large
Load Diff
15
zonemaster-ldns/ldns/test/20-sign-zone.tpkg/20-sign-zone.dsc
Normal file
15
zonemaster-ldns/ldns/test/20-sign-zone.tpkg/20-sign-zone.dsc
Normal file
@@ -0,0 +1,15 @@
|
||||
BaseName: 20-sign-zone
|
||||
Version: 1.0
|
||||
Description: sign a zone file and verify it
|
||||
CreationDate: Tue Feb 10 09:40:53 CET 2009
|
||||
Maintainer: Jelte
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 20-sign-zone.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 20-sign-zone.test
|
||||
AuxFiles: 20-sign-zone.db Kjelte.nlnetlabs.nl.+005+09693.key Kjelte.nlnetlabs.nl.+005+09693.private Kjelte.nlnetlabs.nl.+005+51181.key Kjelte.nlnetlabs.nl.+005+51181.private
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1 @@
|
||||
No arguments are needed
|
||||
@@ -0,0 +1,19 @@
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH \
|
||||
../../examples/ldns-signzone -b jelte.nlnetlabs.nl Kjelte.nlnetlabs.nl.+005+09693
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Signer failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
../../examples/ldns-verify-zone jelte.nlnetlabs.nl.signed
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Verification failed"
|
||||
exit 2
|
||||
fi
|
||||
exit 0
|
||||
@@ -0,0 +1 @@
|
||||
jelte.nlnetlabs.nl. 3600 IN DNSKEY 256 3 5 AwEAAa1rGRf+7OfCNijf7dQqYhtBMe3MH/tzR5m6zURKmuZ1FhT168wGBglcrnFrcbZsCYakpiuWxAFPA7rdB8i2xCwLdLg8zzim4x+ufaUA8bwrEFzqWPCaJ6eoL2T73PEACYOyq2B9CfHHfg3XuShv6al6APka8sPlXFDdKekTvp2j ;{id = 9693 (zsk), size = 1024b}
|
||||
@@ -0,0 +1,10 @@
|
||||
Private-key-format: v1.2
|
||||
Algorithm: 5 (RSASHA1)
|
||||
Modulus: rWsZF/7s58I2KN/t1CpiG0Ex7cwf+3NHmbrNREqa5nUWFPXrzAYGCVyucWtxtmwJhqSmK5bEAU8Dut0HyLbELAt0uDzPOKbjH659pQDxvCsQXOpY8Jonp6gvZPvc8QAJg7KrYH0J8cd+Dde5KG/pqXoA+Rryw+VcUN0p6RO+naM=
|
||||
PublicExponent: AQAB
|
||||
PrivateExponent: kyfaN15/MXq/8pdyfSMp9O6xq5QXX4xHKdA19slIAF9Cya6U1KAX50HaVSxTZfTvcG2vBDX/RQ0DoUGGJW/RrhgKv+awrWHJWmVQGgBPeDAQ3FQwI7augLcI+qXM+S2bmTRx4vv0+aw478U3kA5McrZZ1aXHpkpP++z7Q/Q8W4E=
|
||||
Prime1: 4INzM4AMUOZSnesIOkqNWiIoFhMgvt/hpAMkaiCjhNSGc93dVr2C7S6NDC0A22BSIdv94R/CurNT09UsPpN8cw==
|
||||
Prime2: xb03LtU4vC/lpxJLF70Jg1BKypqDdxoTEaALsSHIc6dqNwlbrnJWpvZYkhBywMy6q8/bUUIlmPazXESolJK+EQ==
|
||||
Exponent1: Iwgfx59pTI5DweRUilPrrm659ofRijcAzEi5O94P5cALorSxvsEfVsb2tzmmcpSa/DGJccE071Df+aO/nZwBxQ==
|
||||
Exponent2: XJt6Tae0c4YnEvDhVFPHMcWX0X091rjSd22yLBn7TBb7Cp2KX4/S/0zePEIRzDPVtQOa3lqRSys24x6QqUx0UQ==
|
||||
Coefficient: X8UoYtwkSmc4hcVoXc9y03IFo6Rf8xu4zEL5zQfWk6zGlJHuZFezjYqcQa+K9im/U/5IcdAP/RnYfzLh8H9G1w==
|
||||
@@ -0,0 +1 @@
|
||||
jelte.nlnetlabs.nl. 3600 IN DNSKEY 257 3 5 AwEAAbJmmaN7pQw30zL2TsdhQ+Vl8fxzDrKT/3aquftoHBUgkjHuVdRMr03nMTjxBpWodDrvG/GYG46L2Nws3Ykcdfxglhx60coN+rq7vimJl9E60CYT83xugT1lvoBzGxm6yPzFKb4NT015GwrkqqC1XJA1FmN09SXAPRwI6yk7Ru7ODjBeSRZ3LyVsBL6gMO902FSw8mWKyZZONxxzuyC0WepODghU5qVbHs8/WVdJc4CjKoM3OnRpAxposrhxSmDsavbi7+kR1Cd3wyQEDTY8STaJzEiwfasO2gJJL/FZzsjoHrOf6qYruZyPTBhApmygqSu+aDAlsRRFDEMuU44ZuTU= ;{id = 51181 (ksk), size = 2048b}
|
||||
@@ -0,0 +1,10 @@
|
||||
Private-key-format: v1.2
|
||||
Algorithm: 5 (RSASHA1)
|
||||
Modulus: smaZo3ulDDfTMvZOx2FD5WXx/HMOspP/dqq5+2gcFSCSMe5V1EyvTecxOPEGlah0Ou8b8ZgbjovY3CzdiRx1/GCWHHrRyg36uru+KYmX0TrQJhPzfG6BPWW+gHMbGbrI/MUpvg1PTXkbCuSqoLVckDUWY3T1JcA9HAjrKTtG7s4OMF5JFncvJWwEvqAw73TYVLDyZYrJlk43HHO7ILRZ6k4OCFTmpVsezz9ZV0lzgKMqgzc6dGkDGmiyuHFKYOxq9uLv6RHUJ3fDJAQNNjxJNonMSLB9qw7aAkkv8VnOyOges5/qpiu5nI9MGECmbKCpK75oMCWxFEUMQy5Tjhm5NQ==
|
||||
PublicExponent: AQAB
|
||||
PrivateExponent: ln5QuwWR7KWnJ0V6nVzivsBqCzEwQ9rvVTaeX4OqtPPd//rzMn1iINCXyFYi3NrW+eQ9aWeMT4qPbOT4GTMGINmFqA6/rLhwO1gnCblFdb4sWwLXkq9RnO6YbpkrUmAsLndQSD/IFy3Db0QI4Ds+E3SFJ29BYhAyPNUVM5oKs2V9FShbSs0jrBR1Pb9GdCUHiyNheVIaRmpwmhzyyO/Govhy60rN0KildQBG5yOR+gUM0O/ZgLBhzBjgnvocFj6qW1wZsxJSrRweXQ7ISLDabDr81A0rIahCKhph0I4S45W+g+cnFCL0DjwgQ9zBMvbT6EstIIcGaFDSoeTrUHSpAQ==
|
||||
Prime1: 2kR0TxB0zidXQnvwQ3Itl+fH62x5JdlhREfrvu1tZ55dZlGxCXRw75x9AwOltIYTv6EusXAqLO+gCnP+mS4WPTsm+A5mpneNUVusj9DYG71j01Tp0wVQ+shH3N7QKhYZJ/q8gKRyu9kKpveQA3Rc/Nzo0zjolFi7MvrBKKnSgkE=
|
||||
Prime2: 0T3Tja6G5M8zZv77Rmv58jEGETU0BMhdRsByKW6bFLd5le2+s8OXCHTCdULxvhK0K8OTO2ki7Q7v68k+g8yMhba0DxW402v9vz3a7ln9gi8kFmqQRnm8Wp6s6iFqiIOOLWDUqBeBLHii/JlOdZnXuL2LtqGZwYcVIG/w5YBM0fU=
|
||||
Exponent1: Ga80gJlPJXM7sXckLsug0d9Uhz+cgfeymnZcJ3uJBEh+dSvnyVUKdSfVDiW/uh6M9F/jPr4UOHV6P8CmlR/3Pf1X+Ji5O52V450GEWZiB+GhfZzgZxSZEum+ix8tH8a57xpyVDEFz1UbC8rWB5IJ3zefrjtkIxDN9pHLaR2SyAE=
|
||||
Exponent2: SliDcJYQjAArLW9v7Me02Z8dnsOepgxjSB5c8efA5o2CgAknd0wJwBFsfqm4p2aR6fLlv3hN1pk2Gjs5IS9uxpvyQmHfeA+o62iY/5OuBbGmSui2NrROfoxeuBoDdln4DJuZM9iWJyz+DG6UeCifg56lo9Crhx3uHcZoe8MoiHk=
|
||||
Coefficient: DH+bYSWwL1ggJHjI6a01ZvWANob3bf3Rbg5umrY7oHFpF3dWgau8rGwi0dxbDqMQOJzx3s9z0r0ZZ8KJr91Xs0c+1NhE2l/eL1j+gqMMDTTJUr9T39cZ/9BzHo81ineV5RlDuQ7P24ISvjYFUj/7zQIWPY7ach1uA0Oh8XW+p1A=
|
||||
@@ -0,0 +1,34 @@
|
||||
; loosely based on jelte.nlnetlabs.nl.
|
||||
|
||||
jelte.nlnetlabs.nl. 3600 IN SOA ns.jelte.nlnetlabs.nl. jelte.jelte.nlnetlabs.nl. 808 28800 7200 604800 3600
|
||||
jelte.nlnetlabs.nl. 3600 IN NS ns.jelte.nlnetlabs.nl.
|
||||
jelte.nlnetlabs.nl. 3600 IN NS ext.ns.whyscream.net.
|
||||
jelte.nlnetlabs.nl. 3600 IN NS ns-ext.nlnetlabs.nl.
|
||||
jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
jelte.nlnetlabs.nl. 60 IN MX 10 smtp.jelte.nlnetlabs.nl.
|
||||
jelte.nlnetlabs.nl. 3600 IN AAAA 2a02:348:55:5250::80
|
||||
jelte.nlnetlabs.nl. 0 IN TYPE65534 \# 5 0846480001
|
||||
dnssec.jelte.nlnetlabs.nl. 3600 IN NS ns2.jelte.nlnetlabs.nl.
|
||||
dnssec.jelte.nlnetlabs.nl. 3600 IN DS 8340 5 1 5733A59841EA708AE9223822124B07B555E17332
|
||||
dragon.jelte.nlnetlabs.nl. 1234 IN AAAA 2002:c3a9:dd9d:8:219:d1ff:fe81:5c10
|
||||
git.jelte.nlnetlabs.nl. 3600 IN AAAA 2a02:348:55:5250::80
|
||||
git.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
imap.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
nepmail.jelte.nlnetlabs.nl. 3600 IN MX 10 mirre.nlnetlabs.nl.
|
||||
ns.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
ns.jelte.nlnetlabs.nl. 3600 IN AAAA 2a02:348:55:5250::53
|
||||
ns-ext.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
ns2.jelte.nlnetlabs.nl. 3600 IN A 195.169.221.157
|
||||
ns2.jelte.nlnetlabs.nl. 3600 IN AAAA 2002:c3a9:dd9d:1::1
|
||||
nsec3.jelte.nlnetlabs.nl. 3600 IN NS ns2.jelte.nlnetlabs.nl.
|
||||
nsec3.jelte.nlnetlabs.nl. 3600 IN DS 21665 7 1 8D5E7DEDC1501A38009882DD1508246EB4A2251C
|
||||
smtp.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
svn.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
talon.jelte.nlnetlabs.nl. 3600 IN A 195.169.221.157
|
||||
v6.jelte.nlnetlabs.nl. 3600 IN AAAA 2002:c3a9:dd9d:1::1
|
||||
vps.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
vpsv6.jelte.nlnetlabs.nl. 3600 IN AAAA 2a02:348:55:5250::1
|
||||
www.jelte.nlnetlabs.nl. 3600 IN A 178.18.82.80
|
||||
www.jelte.nlnetlabs.nl. 3600 IN AAAA 2a02:348:55:5250::80
|
||||
wwwv6.jelte.nlnetlabs.nl. 3600 IN AAAA 2a02:348:55:5250::80
|
||||
|
||||
15
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/25-ZONEMD.dsc
Normal file
15
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/25-ZONEMD.dsc
Normal file
@@ -0,0 +1,15 @@
|
||||
BaseName: 25-ZONEMD
|
||||
Version: 1.0
|
||||
Description: Check ldns-verify-zone on RFC8976 Appendix A example zones
|
||||
CreationDate: Wed Jan 20 16:41:56 CET 2021
|
||||
Maintainer: Willem
|
||||
Category:
|
||||
Component:
|
||||
Depends:
|
||||
Help: 25-ZONEMD.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 25-ZONEMD.test
|
||||
AuxFiles: A.1.Simple-EXAMPLE-Zone A.2.Complex-EXAMPLE-Zone A.3.EXAMPLE-Zone-with-multiple-digests A.4.The-URI.ARPA-Zone A.5.The-ROOT-SERVERS.NET-Zone repeated-ZONEMD-scheme-and-algorithm
|
||||
Passed:
|
||||
Failure:
|
||||
1
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/25-ZONEMD.help
Normal file
1
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/25-ZONEMD.help
Normal file
@@ -0,0 +1 @@
|
||||
No arguments are needed
|
||||
42
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/25-ZONEMD.test
Normal file
42
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/25-ZONEMD.test
Normal file
@@ -0,0 +1,42 @@
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
|
||||
export LD_LIBRARY_PATH="../../lib:${LD_LIBRARY_PATH}"
|
||||
|
||||
# These must succeed
|
||||
#
|
||||
for ZONE in A.1.Simple-EXAMPLE-Zone \
|
||||
A.2.Complex-EXAMPLE-Zone \
|
||||
A.3.EXAMPLE-Zone-with-multiple-digests \
|
||||
A.4.The-URI.ARPA-Zone \
|
||||
A.5.The-ROOT-SERVERS.NET-Zone
|
||||
do
|
||||
echo Verifying ${ZONE}
|
||||
if [ "${ZONE}" = "A.4.The-URI.ARPA-Zone" ]
|
||||
then
|
||||
# Allow DNSSEC to fail (ZONEMD has no signature)
|
||||
#
|
||||
../../examples/ldns-verify-zone -ZZZV 4 -t 20181021203928 ${ZONE}
|
||||
else
|
||||
../../examples/ldns-verify-zone -ZV 4 ${ZONE}
|
||||
fi
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "ZONE ${ZONE} failed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# These must fail
|
||||
#
|
||||
for ZONE in repeated-ZONEMD-scheme-and-algorithm
|
||||
do
|
||||
echo Verifying ${ZONE}
|
||||
../../examples/ldns-verify-zone -ZV 4 ${ZONE}
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "ZONE ${ZONE} validated (which it should not)"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,13 @@
|
||||
example. 86400 IN SOA ns1 admin 2018031900 (
|
||||
1800 900 604800 86400 )
|
||||
86400 IN NS ns1
|
||||
86400 IN NS ns2
|
||||
86400 IN ZONEMD 2018031900 1 1 (
|
||||
c68090d90a7aed71
|
||||
6bc459f9340e3d7c
|
||||
1370d4d24b7e2fc3
|
||||
a1ddc0b9a87153b9
|
||||
a9713b3c9ae5cc27
|
||||
777f98b8e730044c )
|
||||
ns1 3600 IN A 203.0.113.63
|
||||
ns2 3600 IN AAAA 2001:db8::63
|
||||
@@ -0,0 +1,25 @@
|
||||
example. 86400 IN SOA ns1 admin 2018031900 (
|
||||
1800 900 604800 86400 )
|
||||
86400 IN NS ns1
|
||||
86400 IN NS ns2
|
||||
86400 IN ZONEMD 2018031900 1 1 (
|
||||
31cefb03814f5062
|
||||
ad12fa951ba0ef5f
|
||||
8da6ae354a415767
|
||||
246f7dc932ceb1e7
|
||||
42a2108f529db6a3
|
||||
3a11c01493de358d )
|
||||
ns1 3600 IN A 203.0.113.63
|
||||
ns2 3600 IN AAAA 2001:db8::63
|
||||
occluded.sub 7200 IN TXT "I'm occluded but must be digested"
|
||||
sub 7200 IN NS ns1
|
||||
duplicate 300 IN TXT "I must be digested just once"
|
||||
duplicate 300 IN TXT "I must be digested just once"
|
||||
foo.test. 555 IN TXT "out-of-zone data must be excluded"
|
||||
non-apex 900 IN ZONEMD 2018031900 1 1 (
|
||||
616c6c6f77656420
|
||||
6275742069676e6f
|
||||
7265642e20616c6c
|
||||
6f77656420627574
|
||||
2069676e6f726564
|
||||
2e20616c6c6f7765 )
|
||||
@@ -0,0 +1,30 @@
|
||||
example. 86400 IN SOA ns1 admin 2018031900 (
|
||||
1800 900 604800 86400 )
|
||||
example. 86400 IN NS ns1.example.
|
||||
example. 86400 IN NS ns2.example.
|
||||
example. 86400 IN ZONEMD 2018031900 1 1 (
|
||||
62e6cf51b02e54b9
|
||||
b5f967d547ce4313
|
||||
6792901f9f88e637
|
||||
493daaf401c92c27
|
||||
9dd10f0edb1c56f8
|
||||
080211f8480ee306 )
|
||||
example. 86400 IN ZONEMD 2018031900 1 2 (
|
||||
08cfa1115c7b948c
|
||||
4163a901270395ea
|
||||
226a930cd2cbcf2f
|
||||
a9a5e6eb85f37c8a
|
||||
4e114d884e66f176
|
||||
eab121cb02db7d65
|
||||
2e0cc4827e7a3204
|
||||
f166b47e5613fd27 )
|
||||
example. 86400 IN ZONEMD 2018031900 1 240 (
|
||||
e2d523f654b9422a
|
||||
96c5a8f44607bbee )
|
||||
example. 86400 IN ZONEMD 2018031900 241 1 (
|
||||
e1846540e33a9e41
|
||||
89792d18d5d131f6
|
||||
05fc283e )
|
||||
ns1.example. 3600 IN A 203.0.113.63
|
||||
ns2.example. 86400 IN TXT "This example has multiple digests"
|
||||
ns2.example. 3600 IN AAAA 2001:db8::63
|
||||
137
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/A.4.The-URI.ARPA-Zone
Normal file
137
zonemaster-ldns/ldns/test/25-ZONEMD.tpkg/A.4.The-URI.ARPA-Zone
Normal file
@@ -0,0 +1,137 @@
|
||||
; <<>> DiG 9.9.4 <<>> @lax.xfr.dns.icann.org uri.arpa axfr
|
||||
; (2 servers found)
|
||||
;; global options: +cmd
|
||||
uri.arpa. 3600 IN SOA sns.dns.icann.org. (
|
||||
noc.dns.icann.org. 2018100702 10800 3600 1209600 3600 )
|
||||
uri.arpa. 3600 IN RRSIG NSEC 8 2 3600 (
|
||||
20181028142623 20181007205525 47155 uri.arpa.
|
||||
eEC4w/oXLR1Epwgv4MBiDtSBsXhqrJVvJWUpbX8XpetAvD35bxwNCUTi
|
||||
/pAJVUXefegWeiriD2rkTgCBCMmn7YQIm3gdR+HjY/+o3BXNQnz97f+e
|
||||
HAE9EDDzoNVfL1PyV/2fde9tDeUuAGVVwmD399NGq9jWYMRpyri2kysr q/g= )
|
||||
uri.arpa. 86400 IN RRSIG NS 8 2 86400 (
|
||||
20181028172020 20181007175821 47155 uri.arpa.
|
||||
ATyV2A2A8ZoggC+68u4GuP5MOUuR+2rr3eWOkEU55zAHld/7FiBxl4ln
|
||||
4byJYy7NudUwlMOEXajqFZE7DVl8PpcvrP3HeeGaVzKqaWj+aus0jbKF
|
||||
Bsvs2b1qDZemBfkz/IfAhUTJKnto0vSUicJKfItu0GjyYNJCz2CqEuGD Wxc= )
|
||||
uri.arpa. 600 IN RRSIG MX 8 2 600 (
|
||||
20181028170556 20181007175821 47155 uri.arpa.
|
||||
e7/r3KXDohX1lyVavetFFObp8fB8aXT76HnN9KCQDxSnSghNM83UQV0t
|
||||
lTtD8JVeN1mCvcNFZpagwIgB7XhTtm6Beur/m5ES+4uSnVeS6Q66HBZK
|
||||
A3mR95IpevuVIZvvJ+GcCAQpBo6KRODYvJ/c/ZG6sfYWkZ7qg/Em5/+3 4UI= )
|
||||
uri.arpa. 3600 IN RRSIG DNSKEY 8 2 3600 (
|
||||
20181028152832 20181007175821 15796 uri.arpa.
|
||||
nzpbnh0OqsgBBP8St28pLvPEQ3wZAUdEBuUwil+rtjjWlYYiqjPxZ286
|
||||
XF4Rq1usfV5x71jZz5IqswOaQgia91ylodFpLuXD6FTGs2nXGhNKkg1V
|
||||
chHgtwj70mXU72GefVgo8TxrFYzxuEFP5ZTP92t97FVWVVyyFd86sbbR
|
||||
6DZj3uA2wEvqBVLECgJLrMQ9Yy7MueJl3UA4h4E6zO2JY9Yp0W9woq0B
|
||||
dqkkwYTwzogyYffPmGAJG91RJ2h6cHtFjEZe2MnaY2glqniZ0WT9vXXd
|
||||
uFPm0KD9U77Ac+ZtctAF9tsZwSdAoL365E2L1usZbA+K0BnPPqGFJRJk
|
||||
5R0A1w== )
|
||||
uri.arpa. 3600 IN RRSIG DNSKEY 8 2 3600 (
|
||||
20181028152832 20181007175821 55480 uri.arpa.
|
||||
lWtQV/5szQjkXmbcD47/+rOW8kJPksRFHlzxxmzt906+DBYyfrH6uq5X
|
||||
nHvrUlQO6M12uhqDeL+bDFVgqSpNy+42/OaZvaK3J8EzPZVBHPJykKMV
|
||||
63T83aAiJrAyHzOaEdmzLCpalqcEE2ImzlLHSafManRfJL8Yuv+JDZFj
|
||||
2WDWfEcUuwkmIZWX11zxp+DxwzyUlRl7x4+ok5iKZWIg5UnBAf6B8T75
|
||||
WnXzlhCw3F2pXI0a5LYg71L3Tp/xhjN6Yy9jGlIRf5BjB59X2zra3a2R
|
||||
PkI09SSnuEwHyF1mDaV5BmQrLGRnCjvwXA7ho2m+vv4SP5dUdXf+GTeA
|
||||
1HeBfw== )
|
||||
uri.arpa. 3600 IN RRSIG SOA 8 2 3600 (
|
||||
20181029114753 20181008222815 47155 uri.arpa.
|
||||
qn8yBNoHDjGdT79U2Wu9IIahoS0YPOgYP8lG+qwPcrZ1BwGiHywuoUa2
|
||||
Mx6BWZlg+HDyaxj2iOmox+IIqoUHhXUbO7IUkJFlgrOKCgAR2twDHrXu
|
||||
9BUQHy9SoV16wYm3kBTEPyxW5FFm8vcdnKAF7sxSY8BbaYNpRIEjDx4A JUc= )
|
||||
uri.arpa. 3600 IN NSEC ftp.uri.arpa. NS SOA (
|
||||
MX RRSIG NSEC DNSKEY )
|
||||
uri.arpa. 86400 IN NS a.iana-servers.net.
|
||||
uri.arpa. 86400 IN NS b.iana-servers.net.
|
||||
uri.arpa. 86400 IN NS c.iana-servers.net.
|
||||
uri.arpa. 86400 IN NS ns2.lacnic.net.
|
||||
uri.arpa. 86400 IN NS sec3.apnic.net.
|
||||
uri.arpa. 600 IN MX 10 pechora.icann.org.
|
||||
uri.arpa. 3600 IN DNSKEY 256 3 8 (
|
||||
AwEAAcBi7tSart2J599zbYWspMNGN70IBWb4ziqyQYH9MTB/VCz6WyUK
|
||||
uXunwiJJbbQ3bcLqTLWEw134B6cTMHrZpjTAb5WAwg4XcWUu8mdcPTiL
|
||||
Bl6qVRlRD0WiFCTzuYUfkwsh1Rbr7rvrxSQhF5rh71zSpwV5jjjp65Wx
|
||||
SdJjlH0B )
|
||||
uri.arpa. 3600 IN DNSKEY 257 3 8 (
|
||||
AwEAAbNVv6ulgRdO31MtAehz7j3ALRjwZglWesnzvllQl/+hBRZr9QoY
|
||||
cO2I+DkO4Q1NKxox4DUIxj8SxPO3GwDuOFR9q2/CFi2O0mZjafbdYtWc
|
||||
3zSdBbi3q0cwCIx7GuG9eqlL+pg7mdk9dgdNZfHwB0LnqTD8ebLPsrO/
|
||||
Id7kBaiqYOfMlZnh2fp+2h6OOJZHtY0DK1UlssyB5PKsE0tVzo5s6zo9
|
||||
iXKe5u+8WTMaGDY49vG80JPAKE7ezMiH/NZcUMiE0PRZ8D3foq2dYuS5
|
||||
ym+vA83Z7v8A+Rwh4UGnjxKB8zmr803V0ASAmHz/gwH5Vb0nH+LObwFt
|
||||
l3wpbp+Wpm8= )
|
||||
uri.arpa. 3600 IN DNSKEY 257 3 8 (
|
||||
AwEAAbwnFTakCvaUKsXji4mgmxZUJi1IygbnGahbkmFEa0L16J+TchKR
|
||||
wcgzVfsxUGa2MmeA4hgkAooC3uy+tTmoMsgy8uq/JAj24DjiHzd46LfD
|
||||
FK/qMidVqFpYSHeq2Vv5ojkuIsx4oe4KsafGWYNOczKZgH5loGjN2aJG
|
||||
mrIm++XCphOskgCsQYl65MIzuXffzJyxlAuts+ecAIiVeqRaqQfr8LRU
|
||||
7wIsLxinXirprtQrbor+EtvlHp9qXE6ARTZDzf4jvsNpKvLFZtmxzFf3
|
||||
e/UJz5eHjpwDSiZL7xE8aE1o1nGfPtJx9ZnB3bapltaJ5wY+5XOCKgY0
|
||||
xmJVvNQlwdE= )
|
||||
ftp.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 (
|
||||
20181028080856 20181007175821 47155 uri.arpa.
|
||||
HClGAqPxzkYkAT7Q/QNtQeB6YrkP6EPOef+9Qo5/2zngwAewXEAQiyF9
|
||||
jD1USJiroM11QqBS3v3aIdW/LXORs4Ez3hLcKNO1cKHsOuWAqzmE+BPP
|
||||
Arfh8N95jqh/q6vpaB9UtMkQ53tM2fYU1GszOLN0knxbHgDHAh2axMGH lqM= )
|
||||
ftp.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 (
|
||||
20181028103644 20181007205525 47155 uri.arpa.
|
||||
WoLi+vZzkxaoLr2IGZnwkRvcDf6KxiWQd1WZP/U+AWnV+7MiqsWPZaf0
|
||||
9toRErerGoFOiOASNxZjBGJrRgjmavOM9U+LZSconP9zrNFd4dIu6kp5
|
||||
YxlQJ0uHOvx1ZHFCj6lAt1ACUIw04ZhMydTmi27c8MzEOMepvn7iH7r7 k7k= )
|
||||
ftp.uri.arpa. 3600 IN NSEC http.uri.arpa. NAPTR (
|
||||
RRSIG NSEC )
|
||||
ftp.uri.arpa. 604800 IN NAPTR 0 0 "" "" (
|
||||
"!^ftp://([^:/?#]*).*$!\\1!i" . )
|
||||
http.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 (
|
||||
20181029010647 20181007175821 47155 uri.arpa.
|
||||
U03NntQ73LHWpfLmUK8nMsqkwVsOGW2KdsyuHYAjqQSZvKbtmbv7HBmE
|
||||
H1+Ii3Z+wtfdMZBy5aC/6sHdx69BfZJs16xumycMlAy6325DKTQbIMN+
|
||||
ift9GrKBC7cgCd2msF/uzSrYxxg4MJQzBPvlkwXnY3b7eJSlIXisBIn7 3b8= )
|
||||
http.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 (
|
||||
20181029011815 20181007205525 47155 uri.arpa.
|
||||
T7mRrdag+WSmG+n22mtBSQ/0Y3v+rdDnfQV90LN5Fq32N5K2iYFajF7F
|
||||
Tp56oOznytfcL4fHrqOE0wRc9NWOCCUec9C7Wa1gJQcllEvgoAM+L6f0
|
||||
RsEjWq6+9jvlLKMXQv0xQuMX17338uoD/xiAFQSnDbiQKxwWMqVAimv5 7Zs= )
|
||||
http.uri.arpa. 3600 IN NSEC mailto.uri.arpa. NAPTR (
|
||||
RRSIG NSEC )
|
||||
http.uri.arpa. 604800 IN NAPTR 0 0 "" "" (
|
||||
"!^http://([^:/?#]*).*$!\\1!i" . )
|
||||
mailto.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 (
|
||||
20181028110727 20181007175821 47155 uri.arpa.
|
||||
GvxzVL85rEukwGqtuLxek9ipwjBMfTOFIEyJ7afC8HxVMs6mfFa/nEM/
|
||||
IdFvvFg+lcYoJSQYuSAVYFl3xPbgrxVSLK125QutCFMdC/YjuZEnq5cl
|
||||
fQciMRD7R3+znZfm8d8u/snLV9w4D+lTBZrJJUBe1Efc8vum5vvV7819 ZoY= )
|
||||
mailto.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 (
|
||||
20181028141825 20181007205525 47155 uri.arpa.
|
||||
MaADUgc3fc5v++M0YmqjGk3jBdfIA5RuP62hUSlPsFZO4k37erjIGCfF
|
||||
j+g84yc+QgbSde0PQHszl9fE/+SU5ZXiS9YdcbzSZxp2erFpZOTchrpg
|
||||
916T4vx6i59scodjb0l6bDyZ+mtIPrc1w6b4hUyOUTsDQoAJYxdfEuMg Vy4= )
|
||||
mailto.uri.arpa. 3600 IN NSEC urn.uri.arpa. NAPTR (
|
||||
RRSIG NSEC )
|
||||
mailto.uri.arpa. 604800 IN NAPTR 0 0 "" "" (
|
||||
"!^mailto:(.*)@(.*)$!\\2!i" . )
|
||||
urn.uri.arpa. 3600 IN RRSIG NSEC 8 3 3600 (
|
||||
20181028123243 20181007175821 47155 uri.arpa.
|
||||
Hgsw4Deops1O8uWyELGe6hpR/OEqCnTHvahlwiQkHhO5CSEQrbhmFAWe
|
||||
UOkmGAdTEYrSz+skLRQuITRMwzyFf4oUkZihGyhZyzHbcxWfuDc/Pd/9
|
||||
DSl56gdeBwy1evn5wBTms8yWQVkNtphbJH395gRqZuaJs3LD/qTyJ5Dp LvA= )
|
||||
urn.uri.arpa. 604800 IN RRSIG NAPTR 8 3 604800 (
|
||||
20181029071816 20181007205525 47155 uri.arpa.
|
||||
ALIZD0vBqAQQt40GQ0Efaj8OCyE9xSRJRdyvyn/H/wZVXFRFKrQYrLAS
|
||||
D/K7q6CMTOxTRCu2J8yes63WJiaJEdnh+dscXzZkmOg4n5PsgZbkvUSW
|
||||
BiGtxvz5jNncM0xVbkjbtByrvJQAO1cU1mnlDKe1FmVB1uLpVdA9Ib4J hMU= )
|
||||
urn.uri.arpa. 3600 IN NSEC uri.arpa. NAPTR RRSIG (
|
||||
NSEC )
|
||||
urn.uri.arpa. 604800 IN NAPTR 0 0 "" "" (
|
||||
"/urn:([^:]+)/\\1/i" . )
|
||||
uri.arpa. 3600 IN SOA sns.dns.icann.org. (
|
||||
noc.dns.icann.org. 2018100702 10800 3600 1209600 3600 )
|
||||
;; Query time: 66 msec
|
||||
;; SERVER: 192.0.32.132#53(192.0.32.132)
|
||||
;; WHEN: Sun Oct 21 20:39:28 UTC 2018
|
||||
;; XFR size: 34 records (messages 1, bytes 3941)
|
||||
uri.arpa. 3600 IN ZONEMD 2018100702 1 1 (
|
||||
1291b78ddf7669b1a39d014d87626b709b55774c5d7d58fa
|
||||
dc556439889a10eaf6f11d615900a4f996bd46279514e473 )
|
||||
@@ -0,0 +1,48 @@
|
||||
root-servers.net. 3600000 IN SOA a.root-servers.net. (
|
||||
nstld.verisign-grs.com. 2018091100 14400 7200 1209600 3600000 )
|
||||
root-servers.net. 3600000 IN NS a.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS b.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS c.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS d.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS e.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS f.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS g.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS h.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS i.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS j.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS k.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS l.root-servers.net.
|
||||
root-servers.net. 3600000 IN NS m.root-servers.net.
|
||||
a.root-servers.net. 3600000 IN AAAA 2001:503:ba3e::2:30
|
||||
a.root-servers.net. 3600000 IN A 198.41.0.4
|
||||
b.root-servers.net. 3600000 IN MX 20 mail.isi.edu.
|
||||
b.root-servers.net. 3600000 IN AAAA 2001:500:200::b
|
||||
b.root-servers.net. 3600000 IN A 199.9.14.201
|
||||
c.root-servers.net. 3600000 IN AAAA 2001:500:2::c
|
||||
c.root-servers.net. 3600000 IN A 192.33.4.12
|
||||
d.root-servers.net. 3600000 IN AAAA 2001:500:2d::d
|
||||
d.root-servers.net. 3600000 IN A 199.7.91.13
|
||||
e.root-servers.net. 3600000 IN AAAA 2001:500:a8::e
|
||||
e.root-servers.net. 3600000 IN A 192.203.230.10
|
||||
f.root-servers.net. 3600000 IN AAAA 2001:500:2f::f
|
||||
f.root-servers.net. 3600000 IN A 192.5.5.241
|
||||
g.root-servers.net. 3600000 IN AAAA 2001:500:12::d0d
|
||||
g.root-servers.net. 3600000 IN A 192.112.36.4
|
||||
h.root-servers.net. 3600000 IN AAAA 2001:500:1::53
|
||||
h.root-servers.net. 3600000 IN A 198.97.190.53
|
||||
i.root-servers.net. 3600000 IN MX 10 mx.i.root-servers.org.
|
||||
i.root-servers.net. 3600000 IN AAAA 2001:7fe::53
|
||||
i.root-servers.net. 3600000 IN A 192.36.148.17
|
||||
j.root-servers.net. 3600000 IN AAAA 2001:503:c27::2:30
|
||||
j.root-servers.net. 3600000 IN A 192.58.128.30
|
||||
k.root-servers.net. 3600000 IN AAAA 2001:7fd::1
|
||||
k.root-servers.net. 3600000 IN A 193.0.14.129
|
||||
l.root-servers.net. 3600000 IN AAAA 2001:500:9f::42
|
||||
l.root-servers.net. 3600000 IN A 199.7.83.42
|
||||
m.root-servers.net. 3600000 IN AAAA 2001:dc3::35
|
||||
m.root-servers.net. 3600000 IN A 202.12.27.33
|
||||
root-servers.net. 3600000 IN SOA a.root-servers.net. (
|
||||
nstld.verisign-grs.com. 2018091100 14400 7200 1209600 3600000 )
|
||||
root-servers.net. 3600000 IN ZONEMD 2018091100 1 1 (
|
||||
f1ca0ccd91bd5573d9f431c00ee0101b2545c97602be0a97
|
||||
8a3b11dbfc1c776d5b3e86ae3d973d6b5349ba7f04340f79 )
|
||||
@@ -0,0 +1,9 @@
|
||||
example. 86400 IN NS ns.example.
|
||||
example. 86400 IN SOA ns.example. admin.example. 2018031900 1800 900 604800 86400
|
||||
example. 86400 IN ZONEMD 2018031900 1 1 8ee54f64ce0d57fd70e1a4811a9ca9e849e2e50cb5 (
|
||||
98edf3ba9c2a58625335c1f966835f0d4338d9f78f
|
||||
557227d63bf6 )
|
||||
ZONEMD 2018031900 1 1 000000000000000000000000000000000000000000 (
|
||||
000000000000000000000000000000000000000000
|
||||
000000000000 )
|
||||
ns.example. 3600 IN A 127.0.0.1
|
||||
@@ -0,0 +1 @@
|
||||
one 12345 IN LOC 12 45 52.333 N 105 40 33.452 W -24m 0.1m 0.1m 0.1m
|
||||
@@ -0,0 +1,16 @@
|
||||
BaseName: 26-loc-centimetre
|
||||
Version: 1.0
|
||||
Description: Verify parsing of centimetres in LOC records.
|
||||
CreationDate: di 7 sep 2021 10:58:42 CEST
|
||||
Maintainer:
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help: 26-loc-centimetre.help
|
||||
Pre:
|
||||
Post:
|
||||
Test: 26-loc-centimetre.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
||||
@@ -0,0 +1 @@
|
||||
This requires no arguments.
|
||||
@@ -0,0 +1,13 @@
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
|
||||
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
|
||||
|
||||
export LD_LIBRARY_PATH=../../lib:$LD_LIBRARY_PATH
|
||||
|
||||
OUTPUT=`../../examples/ldns-read-zone 26-loc-centimetre.db`
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo $OUTPUT | grep 0.10m
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user