tests in tdir format.
git-svn-id: https://unbound.nlnetlabs.nl/svn/trunk@4264 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
2ca4cc3a77
commit
8ba25b126a
16
testdata/00-lint.tdir/00-lint.dsc
vendored
Normal file
16
testdata/00-lint.tdir/00-lint.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 00-lint
|
||||
Version: 1.0
|
||||
Description: Put source into lint.
|
||||
CreationDate: Wed Jan 3 14:12:02 CET 2007
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 00-lint.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
11
testdata/00-lint.tdir/00-lint.test
vendored
Normal file
11
testdata/00-lint.tdir/00-lint.test
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
# #-- 00-lint.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
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
get_make
|
||||
|
||||
(cd $PRE ; $MAKE lint)
|
||||
|
16
testdata/01-doc.tdir/01-doc.dsc
vendored
Normal file
16
testdata/01-doc.tdir/01-doc.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 01-doc
|
||||
Version: 1.0
|
||||
Description: Check documentation
|
||||
CreationDate: Wed Jan 3 15:15:01 CET 2007
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 01-doc.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
47
testdata/01-doc.tdir/01-doc.test
vendored
Normal file
47
testdata/01-doc.tdir/01-doc.test
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
# #-- 01-doc.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
|
||||
. ../common.sh
|
||||
|
||||
set_doxygen_path
|
||||
|
||||
PRE="../.."
|
||||
get_make
|
||||
(cd $PRE ; $MAKE doc) > mylog 2>&1
|
||||
|
||||
bad=0
|
||||
if grep -e "Warning" -e "warning" -e "Error" -e "error" mylog >/dev/null 2>&1;
|
||||
then
|
||||
cat mylog
|
||||
bad=1
|
||||
else
|
||||
# "doxygen ok"
|
||||
cat mylog
|
||||
fi
|
||||
|
||||
(cd $PRE; find . -name "*.h" -print) >hlist
|
||||
(cd $PRE; find . -name "*.c" -print) >>hlist
|
||||
# filter out config.h
|
||||
fgrep -v -e "config.h" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "util/configparser" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "util/configlexer" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "util/configyyrename" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "util/locks.h" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "util/storage/lookup3.c" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "ldns-src/" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "libunbound/python/libunbound_wrap.c" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "pythonmod/interface.h" hlist > ilist; mv ilist hlist
|
||||
fgrep -v -e "dnstap" hlist > ilist; mv ilist hlist
|
||||
# filter out compat
|
||||
fgrep -v -e "compat/" hlist > ilist; mv ilist hlist
|
||||
for h in `cat hlist`; do
|
||||
if fgrep "`basename $h`" $PRE/doc/html/files.html >/dev/null; then
|
||||
: # ok
|
||||
else
|
||||
echo "Warning: $h has no documentation."
|
||||
bad=1
|
||||
fi
|
||||
done
|
||||
exit $bad
|
16
testdata/02-unittest.tdir/02-unittest.dsc
vendored
Normal file
16
testdata/02-unittest.tdir/02-unittest.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 02-unittest
|
||||
Version: 1.0
|
||||
Description: Unit tests.
|
||||
CreationDate: Thu Jan 4 16:32:42 CET 2007
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 02-unittest.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
26
testdata/02-unittest.tdir/02-unittest.test
vendored
Normal file
26
testdata/02-unittest.tdir/02-unittest.test
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
# #-- 02-unittest.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
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
get_make
|
||||
(cd $PRE ; $MAKE unittest; $MAKE lock-verify)
|
||||
|
||||
if (cd $PRE; ./unittest); then
|
||||
echo "unit test worked."
|
||||
else
|
||||
echo "unit test failed."
|
||||
exit 1
|
||||
fi
|
||||
if test -f $PRE/ublocktrace.0; then
|
||||
if (cd $PRE; ./lock-verify ublocktrace.*); then
|
||||
echo "lock-verify test worked."
|
||||
else
|
||||
echo "lock-verify test failed."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
16
testdata/03-testbound.tdir/03-testbound.dsc
vendored
Normal file
16
testdata/03-testbound.tdir/03-testbound.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 03-testbound
|
||||
Version: 1.0
|
||||
Description: Run testbound event replay scenarios.
|
||||
CreationDate: Tue Feb 13 16:36:18 CET 2007
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 03-testbound.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
123
testdata/03-testbound.tdir/03-testbound.test
vendored
Normal file
123
testdata/03-testbound.tdir/03-testbound.test
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
# #-- 03-testbound.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
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
get_make
|
||||
(cd $PRE ; $MAKE testbound)
|
||||
exitval=0
|
||||
# quiet="" to make verbose
|
||||
|
||||
do_valgrind=no
|
||||
# valgrind mode for debug
|
||||
#if grep "staticexe=-static" $PRE/Makefile >/dev/null 2>&1; then
|
||||
# if test -x "`which valgrind`"; then
|
||||
# do_valgrind=yes
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# self-test (unit test of testbound)
|
||||
if test $do_valgrind = "yes"; then
|
||||
if (valgrind $PRE/testbound -s >tmpout 2>&1;); then
|
||||
echo "selftest OK "
|
||||
else
|
||||
echo "selftest FAILED"
|
||||
exit 1
|
||||
fi
|
||||
if grep "All heap blocks were freed -- no leaks are possible." tmpout >/dev/null 2>&1; then
|
||||
: # clean
|
||||
else
|
||||
echo "Memory leaked in selftest"
|
||||
grep "in use at exit" tmpout
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if ($PRE/testbound -s >/dev/null 2>&1;); then
|
||||
echo "selftest OK "
|
||||
else
|
||||
echo "selftest FAILED"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# the .crpl are not always supported and need checking for SHA256 and GOST
|
||||
# support.
|
||||
# the .rpl should work on any system (portable).
|
||||
for input in $PRE/testdata/*.rpl $PRE/testdata/*.crpl; do
|
||||
header=`grep SCENARIO_BEGIN $input | head -1 | sed -e 's/SCENARIO_BEGIN //'`
|
||||
cleaninput=`echo $input | sed -e "s?$PRE/testdata/??"`
|
||||
|
||||
# detect if SHA256 is needed
|
||||
if echo $cleaninput | grep sha2 >/dev/null 2>&1; then
|
||||
if $PRE/testbound -2 >/dev/null 2>&1; then
|
||||
: # the SHA256 is supported
|
||||
else
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# detect if GOST is needed
|
||||
if echo $cleaninput | grep gost >/dev/null 2>&1; then
|
||||
if $PRE/testbound -g >/dev/null 2>&1; then
|
||||
: # GOST is supported
|
||||
else
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# detect if CLIENT_SUBNET is needed
|
||||
if echo $cleaninput | grep subnet >/dev/null 2>&1; then
|
||||
if $PRE/testbound -c >/dev/null 2>&1; then
|
||||
: # CLIENT_SUBNET is supported
|
||||
else
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# detect if IPSECMOD is needed
|
||||
if echo $cleaninput | grep ipsecmod >/dev/null 2>&1; then
|
||||
if $PRE/testbound -i >/dev/null 2>&1; then
|
||||
: # IPSECMOD is supported
|
||||
else
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $do_valgrind = "yes"; then
|
||||
if (valgrind $PRE/testbound -p $input >tmpout 2>&1;); then
|
||||
echo " OK $cleaninput: $header"
|
||||
else
|
||||
echo "FAILED $cleaninput: $header"
|
||||
exitval=1
|
||||
fi
|
||||
if grep "All heap blocks were freed -- no leaks are possible." tmpout >/dev/null 2>&1; then
|
||||
: # clean
|
||||
else
|
||||
echo "Memory leaked in $cleaninput"
|
||||
grep "in use at exit" tmpout
|
||||
exitval=1
|
||||
fi
|
||||
else
|
||||
# do valgrind=no
|
||||
if ($PRE/testbound -p $input >/dev/null 2>&1;); then
|
||||
echo " OK $cleaninput: $header"
|
||||
else
|
||||
echo "FAILED $cleaninput: $header"
|
||||
exitval=1
|
||||
fi
|
||||
fi
|
||||
if test -f ublocktrace.0; then
|
||||
if $PRE/lock-verify ublocktrace.*; then
|
||||
#echo "lock-verify test $input worked."
|
||||
i=i
|
||||
else
|
||||
echo "lock-verify test $input failed."
|
||||
exitval=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
exit $exitval
|
16
testdata/04-checkconf.tdir/04-checkconf.dsc
vendored
Normal file
16
testdata/04-checkconf.tdir/04-checkconf.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 04-checkconf
|
||||
Version: 1.0
|
||||
Description: Test configuration checker.
|
||||
CreationDate: Fri Sep 28 15:46:27 CEST 2007
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 04-checkconf.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
72
testdata/04-checkconf.tdir/04-checkconf.test
vendored
Normal file
72
testdata/04-checkconf.tdir/04-checkconf.test
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
# #-- 04-checkconf.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
|
||||
|
||||
PRE="../.."
|
||||
# test that failed exit code is used
|
||||
$PRE/unbound-checkconf bla bla bla>/dev/null
|
||||
if test $? != 1; then
|
||||
echo "exit code for usage wrong"
|
||||
exit 1
|
||||
fi
|
||||
$PRE/unbound-checkconf -h >/dev/null
|
||||
if test $? != 1; then
|
||||
echo "exit code for usage wrong"
|
||||
exit 1
|
||||
fi
|
||||
$PRE/unbound-checkconf notexist_file
|
||||
if test $? != 1; then
|
||||
echo "exit code for nofile wrong"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# detect windows
|
||||
if grep "define UB_ON_WINDOWS 1" ../../config.h; then
|
||||
onwin=1
|
||||
else
|
||||
onwin=0
|
||||
fi
|
||||
|
||||
# test check of config files.
|
||||
for f in bad.*; do
|
||||
echo
|
||||
echo $PRE/unbound-checkconf $f
|
||||
if test $f = "bad.user" -a $onwin -eq 1; then
|
||||
echo "skipped on windows"
|
||||
continue
|
||||
fi
|
||||
|
||||
$PRE/unbound-checkconf $f
|
||||
if test $? != 1; then
|
||||
echo "exit code case $f wrong"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for f in good.*; do
|
||||
echo
|
||||
echo $PRE/unbound-checkconf $f
|
||||
$PRE/unbound-checkconf $f
|
||||
if test $? != 0; then
|
||||
echo "exit code case $f wrong"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo $PRE/unbound-checkconf warn.algo
|
||||
$PRE/unbound-checkconf warn.algo > outfile 2>&1
|
||||
if test $? != 0; then
|
||||
cat outfile
|
||||
echo "wrong exit code, warning should not fail with error"
|
||||
exit 1
|
||||
fi
|
||||
cat outfile
|
||||
if grep "unsupported algo" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Failed, should print warning"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
8
testdata/04-checkconf.tdir/bad.badfwd
vendored
Normal file
8
testdata/04-checkconf.tdir/bad.badfwd
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
server:
|
||||
# to make sure the check doesn't fail on username or chrootdir.
|
||||
username: ""
|
||||
chroot: ""
|
||||
|
||||
forward-zone:
|
||||
name: "example.com"
|
||||
forward-addr: 123.123.AAAA.123
|
17
testdata/04-checkconf.tdir/bad.badif
vendored
Normal file
17
testdata/04-checkconf.tdir/bad.badif
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# bad host and interface lines.
|
||||
server:
|
||||
username: ""
|
||||
interface: 127.0.0.1
|
||||
interface: 127.0.0.1
|
||||
interface: 127.0.0.1
|
||||
outgoing-interface: ::1
|
||||
outgoing-interface: ::1
|
||||
outgoing-interface: ::1
|
||||
|
||||
forward-zone:
|
||||
name: root.
|
||||
forward-host: 127.0.0.1
|
||||
|
||||
stub-zone:
|
||||
name: com.
|
||||
stub-host: ::3
|
2
testdata/04-checkconf.tdir/bad.badip
vendored
Normal file
2
testdata/04-checkconf.tdir/bad.badip
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
server:
|
||||
interface: 123.AAAA.123.123
|
35
testdata/04-checkconf.tdir/bad.bind
vendored
Normal file
35
testdata/04-checkconf.tdir/bad.bind
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
# test daemon
|
||||
options {
|
||||
directory "/home/wouter/bla";
|
||||
version "test BIND 24";
|
||||
pid-file "/home/wouter/named_24.pid";
|
||||
dnssec-enable yes;
|
||||
listen-on-v6 { any; };
|
||||
};
|
||||
|
||||
// logging clause
|
||||
logging {
|
||||
channel mainlog {
|
||||
file "named_24.log" size 10m;
|
||||
severity info;
|
||||
};
|
||||
category default {
|
||||
mainlog;
|
||||
};
|
||||
};
|
||||
|
||||
zone "." IN {
|
||||
type hint;
|
||||
file "root.servers";
|
||||
};
|
||||
|
||||
zone "localhost" IN {
|
||||
type master;
|
||||
file "localhost.zone";
|
||||
allow-update { none; };
|
||||
};
|
||||
zone "0.0.127.in-addr.arpa" IN {
|
||||
type master;
|
||||
file "localhost.rev";
|
||||
allow-update { none; };
|
||||
};
|
2
testdata/04-checkconf.tdir/bad.user
vendored
Normal file
2
testdata/04-checkconf.tdir/bad.user
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
server:
|
||||
username: blabla_noexist_user
|
246
testdata/04-checkconf.tdir/good.all
vendored
Normal file
246
testdata/04-checkconf.tdir/good.all
vendored
Normal file
@ -0,0 +1,246 @@
|
||||
# To test, all options are used.
|
||||
#
|
||||
# Example configuration file.
|
||||
#
|
||||
# See unbound.conf(5) man page.
|
||||
#
|
||||
# this is a comment.
|
||||
|
||||
#Use this to include other text into the file.
|
||||
#include: "otherfile.conf"
|
||||
|
||||
# The server clause sets the main parameters.
|
||||
server:
|
||||
# whitespace is not necessary, but looks cleaner.
|
||||
|
||||
# verbosity number, 0 is least verbose. 1 is default.
|
||||
verbosity: 2
|
||||
|
||||
# number of threads to create. 1 disables threading.
|
||||
num-threads: 1
|
||||
|
||||
# specify the interfaces to answer queries from by ip-address.
|
||||
# If you give none the default (all) interface is used.
|
||||
# specify every interface on a new 'interface:' labelled line.
|
||||
interface: 192.0.2.153
|
||||
interface: 192.0.2.154
|
||||
interface: 2001:DB8::5
|
||||
|
||||
# port to answer queries from
|
||||
port: 53
|
||||
|
||||
# number of port to allocate per thread, determines the size of the
|
||||
# port range. A larger port range gives more resistance to certain
|
||||
# spoof attacks, as it gets harder to guess which port is used.
|
||||
# But also takes more system resources (for open sockets).
|
||||
outgoing-range: 16
|
||||
|
||||
outgoing-port-permit: 1000-1020
|
||||
outgoing-port-avoid: 2000-2048
|
||||
outgoing-port-avoid: 3000
|
||||
|
||||
# number of outgoing simultaneous tcp buffers to hold per thread.
|
||||
outgoing-num-tcp: 10
|
||||
|
||||
# number of incoming simultaneous tcp buffers to hold per thread.
|
||||
incoming-num-tcp: 10
|
||||
|
||||
# buffer size for handling DNS data. No messages larger than this
|
||||
# size can be sent or received, by UDP or TCP. In bytes.
|
||||
msg-buffer-size: 65552
|
||||
|
||||
# the amount of memory to use for the message cache.
|
||||
# in bytes. default is 4 Mb
|
||||
msg-cache-size: 4194304
|
||||
|
||||
# the number of slabs to use for the message cache.
|
||||
# the number of slabs must be a power of 2.
|
||||
# more slabs reduce lock contention, but fragment memory usage.
|
||||
msg-cache-slabs: 4
|
||||
|
||||
# the number of queries that a thread gets to service.
|
||||
num-queries-per-thread: 1024
|
||||
|
||||
# the amount of memory to use for the RRset cache.
|
||||
# in bytes. default is 4 Mb
|
||||
rrset-cache-size: 4194304
|
||||
|
||||
# the number of slabs to use for the RRset cache.
|
||||
# the number of slabs must be a power of 2.
|
||||
# more slabs reduce lock contention, but fragment memory usage.
|
||||
rrset-cache-slabs: 4
|
||||
|
||||
# the time to live (TTL) value for cached roundtrip times and
|
||||
# EDNS version information for hosts. In seconds.
|
||||
infra-host-ttl: 900
|
||||
|
||||
# the time to live (TTL) value for cached lame delegations. In sec.
|
||||
infra-lame-ttl: 900
|
||||
|
||||
# the number of slabs to use for the Infrastructure cache.
|
||||
# the number of slabs must be a power of 2.
|
||||
# more slabs reduce lock contention, but fragment memory usage.
|
||||
infra-cache-slabs: 4
|
||||
|
||||
# the maximum number of hosts that are cached (roundtrip times, EDNS).
|
||||
infra-cache-numhosts: 10000
|
||||
|
||||
# the maximum size of the lame zones cached per host. in bytes.
|
||||
infra-cache-lame-size: 10240
|
||||
|
||||
# Enable IPv4, "yes" or "no".
|
||||
do-ip4: yes
|
||||
|
||||
# Enable IPv6, "yes" or "no".
|
||||
do-ip6: yes
|
||||
|
||||
# Enable UDP, "yes" or "no".
|
||||
do-udp: yes
|
||||
|
||||
# Enable TCP, "yes" or "no".
|
||||
do-tcp: yes
|
||||
|
||||
# if given, a chroot(2) is done to the given directory.
|
||||
# i.e. you can chroot to the working directory, for example,
|
||||
# for extra security, but make sure all files are in that directory.
|
||||
chroot: ""
|
||||
|
||||
# if given, user privileges are dropped (after binding port),
|
||||
# and the given username is assumed. Default is nothing "".
|
||||
username: "nobody"
|
||||
|
||||
# the working directory.
|
||||
directory: "."
|
||||
|
||||
# the log file, "" means log to stderr.
|
||||
# Use of this option sets use-syslog to "no".
|
||||
logfile: ""
|
||||
|
||||
# Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
|
||||
# log to, with identity "unbound". If yes, it overrides the logfile.
|
||||
use-syslog: no
|
||||
|
||||
# the pid file.
|
||||
pidfile: "unbound.pid"
|
||||
|
||||
# enable to not answer id.server and hostname.bind queries.
|
||||
hide-identity: no
|
||||
|
||||
# enable to not answer version.server and version.bind queries.
|
||||
hide-version: no
|
||||
|
||||
# the identity to report. Leave "" or default to return hostname.
|
||||
identity: ""
|
||||
|
||||
# the version to report. Leave "" or default to return package version.
|
||||
version: ""
|
||||
|
||||
# the target fetch policy.
|
||||
# series of integers describing the policy per dependency depth.
|
||||
# The number of values in the list determines the maximum dependency
|
||||
# depth the recursor will pursue before giving up. Each integer means:
|
||||
# -1 : fetch all targets opportunistically,
|
||||
# 0: fetch on demand,
|
||||
# positive value: fetch that many targets opportunistically.
|
||||
# Enclose the list of numbers between quotes ("").
|
||||
target-fetch-policy: "3 2 1 0 0"
|
||||
|
||||
# Harden against very small EDNS buffer sizes.
|
||||
harden-short-bufsize: yes
|
||||
|
||||
# Harden against unseemly large queries.
|
||||
harden-large-queries: yes
|
||||
|
||||
# Harden against out of zone rrsets, to avoid spoofing attempts.
|
||||
harden-glue: yes
|
||||
|
||||
# Do not query the following addresses. No DNS queries are sent there.
|
||||
# List one address per entry. To block other ports than the default
|
||||
# DNS port, use "1.2.3.4@123" to block port 123 for 1.2.3.4.
|
||||
do-not-query-address: 127.0.0.1
|
||||
do-not-query-address: 127.0.0.2
|
||||
do-not-query-address: 127.255.255.255
|
||||
do-not-query-address: ::1
|
||||
|
||||
# module configuration of the server. A string with identifiers
|
||||
# separated by spaces. "iterator" or "validator iterator"
|
||||
module-config: "validator iterator"
|
||||
|
||||
# File with trusted keys for validation. Specify more than one file
|
||||
# with several entries, one file per entry.
|
||||
# Zone file format, with DS and DNSKEY entries.
|
||||
trust-anchor-file: ""
|
||||
|
||||
# Trusted key for validation. DS or DNSKEY. specify the RR on a
|
||||
# single line, surrounded by "". TTL is ignored. class is IN default.
|
||||
# (These examples are from August 2007 and may not be valid anymore).
|
||||
trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
|
||||
trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
|
||||
|
||||
# File with trusted keys for validation. Specify more than one file
|
||||
# with several entries, one file per entry. Like trust-anchor-file
|
||||
# but has a different file format. Format is BIND-9 style format,
|
||||
# the trusted-keys { name flag proto algo "key"; }; clauses are read.
|
||||
trusted-keys-file: ""
|
||||
|
||||
# Override the date for validation with a specific fixed date.
|
||||
# Do not set this unless you are debugging signature inception
|
||||
# and expiration. "" or "0" turns the feature off.
|
||||
val-override-date: ""
|
||||
|
||||
# The time to live for bogus data, rrsets and messages. This avoids
|
||||
# some of the revalidation, until the time interval expires. in secs.
|
||||
val-bogus-ttl: 900
|
||||
|
||||
# Should additional section of secure message also be kept clean of
|
||||
# unsecure data. Useful to shield the users of this validator from
|
||||
# potential bogus data in the additional section. All unsigned data
|
||||
# in the additional section is removed from secure messages.
|
||||
val-clean-additional: yes
|
||||
|
||||
# Turn permissive mode on to permit bogus messages. Thus, messages
|
||||
# for which security checks failed will be returned to clients,
|
||||
# instead of SERVFAIL. It still performs the security checks, which
|
||||
# result in interesting log files and possibly the AD bit in
|
||||
# replies if the message is found secure. The default is off.
|
||||
val-permissive-mode: no
|
||||
|
||||
# It is possible to configure NSEC3 maximum iteration counts per
|
||||
# keysize. Keep this table very short, as linear search is done.
|
||||
# A message with an NSEC3 with larger count is marked insecure.
|
||||
# List in ascending order the keysize and count values.
|
||||
val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
|
||||
|
||||
# the amount of memory to use for the key cache.
|
||||
# in bytes. default is 4 Mb
|
||||
key-cache-size: 4194304
|
||||
|
||||
# the number of slabs to use for the key cache.
|
||||
# the number of slabs must be a power of 2.
|
||||
# more slabs reduce lock contention, but fragment memory usage.
|
||||
key-cache-slabs: 4
|
||||
|
||||
|
||||
# Stub zones.
|
||||
# Create entries like below, to make all queries for 'example.com' and
|
||||
# 'example.org' go to the given list of nameservers. list zero or more
|
||||
# nameservers by hostname or by ipaddress.
|
||||
stub-zone:
|
||||
name: "example.com"
|
||||
stub-addr: 192.0.2.68
|
||||
stub-zone:
|
||||
name: "example.org"
|
||||
stub-host: ns.example.com.
|
||||
|
||||
# Forward zones
|
||||
# Create entries like below, to make all queries for 'example.com' and
|
||||
# 'example.org' go to the given list of servers. These servers have to handle
|
||||
# recursion to other nameservers. List zero or more nameservers by hostname
|
||||
# or by ipaddress. Use an entry with name "." to forward all queries.
|
||||
forward-zone:
|
||||
name: "example.com"
|
||||
forward-addr: 192.0.2.68
|
||||
forward-addr: 192.0.2.73@5355 # forward to port 5355.
|
||||
forward-zone:
|
||||
name: "example.org"
|
||||
forward-host: fwd.example.com
|
23
testdata/04-checkconf.tdir/good.ifport
vendored
Normal file
23
testdata/04-checkconf.tdir/good.ifport
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# bug301 : unbound-checkconf cannot parse interface '0.0.0.0@5353'
|
||||
|
||||
#Use this to include other text into the file.
|
||||
#include: "otherfile.conf"
|
||||
|
||||
# The server clause sets the main parameters.
|
||||
server:
|
||||
# specify the interfaces to answer queries from by ip-address.
|
||||
# If you give none the default (all) interface is used.
|
||||
# specify every interface on a new 'interface:' labelled line.
|
||||
interface: 192.0.2.153
|
||||
interface: 192.0.2.154
|
||||
interface: 2001:DB8::5
|
||||
interface: 0.0.0.0@5353
|
||||
|
||||
# config
|
||||
chroot: ""
|
||||
username: "nobody"
|
||||
directory: "."
|
||||
logfile: ""
|
||||
use-syslog: no
|
||||
pidfile: "unbound.pid"
|
6
testdata/04-checkconf.tdir/good.include
vendored
Normal file
6
testdata/04-checkconf.tdir/good.include
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
# include some file to test include functionality.
|
||||
|
||||
include: "good.all"
|
||||
|
||||
server:
|
||||
identity: "my identity"
|
9
testdata/04-checkconf.tdir/warn.algo
vendored
Normal file
9
testdata/04-checkconf.tdir/warn.algo
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
server:
|
||||
chroot: ""
|
||||
directory: ""
|
||||
pidfile: ""
|
||||
username: ""
|
||||
logfile: ""
|
||||
|
||||
trust-anchor: "jelte.nlnetlabs.nl. DS 42860 2000 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
|
||||
|
16
testdata/05-asynclook.tdir/05-asynclook.dsc
vendored
Normal file
16
testdata/05-asynclook.tdir/05-asynclook.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 05-asynclook
|
||||
Version: 1.0
|
||||
Description: Test async lookup using libunbound
|
||||
CreationDate: Fri Jan 25 09:50:35 CET 2008
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: 05-asynclook.pre
|
||||
Post: 05-asynclook.post
|
||||
Test: 05-asynclook.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
12
testdata/05-asynclook.tdir/05-asynclook.hosts
vendored
Normal file
12
testdata/05-asynclook.tdir/05-asynclook.hosts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# Host Database
|
||||
#
|
||||
# This file should contain the addresses and aliases for local hosts that
|
||||
# share this file. Replace 'my.domain' below with the domainname of your
|
||||
# machine.
|
||||
#
|
||||
::1 localhost localhost.my.domain
|
||||
127.0.0.1 localhost localhost.my.domain
|
||||
# Imaginary network.
|
||||
10.0.0.2 myname.my.domain myname
|
||||
10.0.0.3 myfriend.my.domain myfriend
|
||||
10.20.30.40 virtual.virtual.virtual.local
|
10
testdata/05-asynclook.tdir/05-asynclook.post
vendored
Normal file
10
testdata/05-asynclook.tdir/05-asynclook.post
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# #-- 05-asynclook.post --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# source the test var file when it's there
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
#
|
||||
# do your teardown here
|
||||
|
||||
. ../common.sh
|
||||
kill_pid $FWD_PID
|
20
testdata/05-asynclook.tdir/05-asynclook.pre
vendored
Normal file
20
testdata/05-asynclook.tdir/05-asynclook.pre
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# #-- 05-asynclook.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
|
||||
|
||||
. ../common.sh
|
||||
get_random_port 2
|
||||
FWD_PORT=$(($RND_PORT + 1))
|
||||
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
||||
|
||||
# start forwarder
|
||||
get_ldns_testns
|
||||
$LDNS_TESTNS -p $FWD_PORT 05-asynclook.testns >fwd.log 2>&1 &
|
||||
FWD_PID=$!
|
||||
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
||||
|
||||
cat .tpkg.var.test
|
||||
|
||||
wait_ldns_testns_up fwd.log
|
198
testdata/05-asynclook.tdir/05-asynclook.test
vendored
Normal file
198
testdata/05-asynclook.tdir/05-asynclook.test
vendored
Normal file
@ -0,0 +1,198 @@
|
||||
# #-- 05-asynclook.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
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
# test if fwder is up
|
||||
echo "> dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile"
|
||||
dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile
|
||||
if grep "10.20.30.40" outfile; then
|
||||
echo "fwder is up"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "fwder not up"
|
||||
exit 1
|
||||
fi
|
||||
rm outfile
|
||||
|
||||
# create asynclook
|
||||
get_make
|
||||
echo "> (cd $PRE ; $MAKE asynclook)"
|
||||
(cd $PRE ; $MAKE asynclook)
|
||||
if test ! -x $PRE/asynclook; then
|
||||
echo "cannot build asynclook test program"
|
||||
exit 1
|
||||
fi
|
||||
(cd $PRE ; $MAKE lock-verify)
|
||||
|
||||
# check the locks.
|
||||
function locktest() {
|
||||
if test -x $PRE/lock-verify -a -f ublocktrace.0; then
|
||||
$PRE/lock-verify ublocktrace.*
|
||||
if test $? -ne 0; then
|
||||
echo "lock-verify error"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# detect if there is forking on this system.
|
||||
HAVE_FORK=yes
|
||||
if grep "undef HAVE_FORK" $PRE/config.h >/dev/null 2>&1; then
|
||||
HAVE_FORK=no
|
||||
fi
|
||||
|
||||
if test $HAVE_FORK = yes; then
|
||||
# test hosts reading (directed at local auth info)
|
||||
echo '> $PRE/asynclook -H 05-asynclook.hosts virtual.virtual.virtual.local 2>&1 | tee outfile'
|
||||
$PRE/asynclook -H 05-asynclook.hosts virtual.virtual.virtual.local 2>&1 | tee outfile
|
||||
if grep "virtual.virtual.virtual.local: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
# test async lookups (directed at testns)
|
||||
echo '> $PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
echo '> $PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
fi #HAVE_FORK
|
||||
|
||||
echo '> $PRE/asynclook -t -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -t -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
if test $HAVE_FORK = yes; then
|
||||
# test cancellation
|
||||
echo '> $PRE/asynclook -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
fi #HAVE_FORK
|
||||
|
||||
echo '> $PRE/asynclook -t -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -t -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
if test $HAVE_FORK = yes; then
|
||||
# test blocking mode
|
||||
echo '> $PRE/asynclook -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
fi #HAVE_FORK
|
||||
|
||||
echo '> $PRE/asynclook -t -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -t -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
exit 0
|
35
testdata/05-asynclook.tdir/05-asynclook.testns
vendored
Normal file
35
testdata/05-asynclook.tdir/05-asynclook.testns
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
; nameserver test file
|
||||
$ORIGIN example.com.
|
||||
$TTL 3600
|
||||
|
||||
; for priming query
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
@ IN NS
|
||||
SECTION ANSWER
|
||||
@ IN NS 127.0.0.1
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www IN A
|
||||
SECTION ANSWER
|
||||
www IN A 10.20.30.40
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www2 IN A
|
||||
SECTION ANSWER
|
||||
www2 IN A 10.20.30.42
|
||||
ENTRY_END
|
||||
|
16
testdata/06-ianaports.tdir/06-ianaports.dsc
vendored
Normal file
16
testdata/06-ianaports.tdir/06-ianaports.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 06-ianaports
|
||||
Version: 1.0
|
||||
Description: check if iana assigned ports have changed.
|
||||
CreationDate: Thu Apr 10 12:42:40 CEST 2008
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 06-ianaports.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
27
testdata/06-ianaports.tdir/06-ianaports.test
vendored
Normal file
27
testdata/06-ianaports.tdir/06-ianaports.test
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
# #-- 06-ianaports.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
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
mkdir util
|
||||
get_make
|
||||
echo "> $MAKE -f $PRE/Makefile iana_update"
|
||||
$MAKE -f $PRE/Makefile iana_update
|
||||
if test $? -ne 0; then
|
||||
echo "cannot iana update"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
diff -u $PRE/util/iana_ports.inc util/iana_ports.inc
|
||||
if test $? -ne 0; then
|
||||
echo "IANA assigned ports have updated, make iana_update and commit"
|
||||
echo "cp util/iana_ports.inc $PRE/util/iana_ports.inc"
|
||||
cp util/iana_ports.inc $PRE/util/iana_ports.inc
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
16
testdata/07-confroot.tdir/07-confroot.dsc
vendored
Normal file
16
testdata/07-confroot.tdir/07-confroot.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 07-confroot
|
||||
Version: 1.0
|
||||
Description: test checkconf with chroot dir.
|
||||
CreationDate: Mon Apr 14 14:54:59 CEST 2008
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre:
|
||||
Post:
|
||||
Test: 07-confroot.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
287
testdata/07-confroot.tdir/07-confroot.test
vendored
Normal file
287
testdata/07-confroot.tdir/07-confroot.test
vendored
Normal file
@ -0,0 +1,287 @@
|
||||
# #-- 07-confroot.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
|
||||
|
||||
PRE="../.."
|
||||
|
||||
if uname | grep "MINGW" >/dev/null; then
|
||||
# no chroot, no need to test.
|
||||
# (test fails on / en \ comparisons, by the way).
|
||||
echo "no chroot on windows, end test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# create config file
|
||||
cwd=`pwd -P`
|
||||
subdir=$cwd/subdir
|
||||
user=`whoami`
|
||||
mkdir subdir
|
||||
if test $? -ne 0; then
|
||||
echo "could not create subdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: $cwd
|
||||
directory: $subdir
|
||||
username: $user
|
||||
|
||||
pidfile: "/unbound.pid"
|
||||
root-hints: "root.ca"
|
||||
root-hints: "$subdir/root.cb"
|
||||
root-hints: "/subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
trust-anchor-file: "/subdir/trustanchor.conf"
|
||||
trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
trusted-keys-file: "trustkeys.conf"
|
||||
trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
trusted-keys-file: "/subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
# fake root file
|
||||
echo ". NS a.root-servers.net." > subdir/root.ca
|
||||
echo "a.root-servers.net. IN A 127.0.0.1" >> subdir/root.ca
|
||||
echo ". CH NS b.root-servers.net." > subdir/root.cb
|
||||
echo "b.root-servers.net. CH A 127.0.0.1" >> subdir/root.cb
|
||||
echo ". HS NS c.root-servers.net." > subdir/root.cc
|
||||
echo "c.root-servers.net. HS A 127.0.0.1" >> subdir/root.cc
|
||||
echo "" > subdir/trustkeys.conf
|
||||
echo "" > subdir/trustkeys2.conf
|
||||
echo "" > subdir/trustkeys3.conf
|
||||
echo "" > subdir/trustanchor.conf
|
||||
echo "" > subdir/trustanchor2.conf
|
||||
echo "" > subdir/trustanchor3.conf
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 0; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 1"
|
||||
|
||||
### NEXT TEST
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: $cwd
|
||||
directory: "subdir"
|
||||
username: $user
|
||||
|
||||
pidfile: "/unbound.pid"
|
||||
root-hints: "root.ca"
|
||||
root-hints: "$subdir/root.cb"
|
||||
root-hints: "/subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
trust-anchor-file: "/subdir/trustanchor.conf"
|
||||
trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
trusted-keys-file: "trustkeys.conf"
|
||||
trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
trusted-keys-file: "/subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 0; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 2"
|
||||
|
||||
### NEXT TEST
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: $cwd
|
||||
directory: "/subdir"
|
||||
username: $user
|
||||
|
||||
pidfile: "/unbound.pid"
|
||||
root-hints: "root.ca"
|
||||
root-hints: "$subdir/root.cb"
|
||||
root-hints: "/subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
trust-anchor-file: "/subdir/trustanchor.conf"
|
||||
trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
trusted-keys-file: "trustkeys.conf"
|
||||
trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
trusted-keys-file: "/subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 0; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 3"
|
||||
|
||||
### NEXT TEST
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: "."
|
||||
directory: "./subdir"
|
||||
username: $user
|
||||
|
||||
pidfile: "/unbound.pid"
|
||||
root-hints: "root.ca"
|
||||
#root-hints: "$subdir/root.cb"
|
||||
root-hints: "/subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
#trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
trust-anchor-file: "/subdir/trustanchor.conf"
|
||||
trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
trusted-keys-file: "trustkeys.conf"
|
||||
#trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
trusted-keys-file: "/subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 1; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 4"
|
||||
|
||||
### NEXT TEST
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: ""
|
||||
directory: "subdir"
|
||||
username: $user
|
||||
|
||||
pidfile: "/unbound.pid"
|
||||
root-hints: "root.ca"
|
||||
root-hints: "$subdir/root.cb"
|
||||
#root-hints: "/subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
#trust-anchor-file: "/subdir/trustanchor.conf"
|
||||
trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
trusted-keys-file: "trustkeys.conf"
|
||||
trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
#trusted-keys-file: "/subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 0; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 5"
|
||||
|
||||
### NEXT TEST
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: ""
|
||||
directory: ""
|
||||
username: $user
|
||||
|
||||
pidfile: "/unbound.pid"
|
||||
#root-hints: "root.ca"
|
||||
root-hints: "$subdir/root.cb"
|
||||
root-hints: "subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
trust-anchor-file: "subdir/trustanchor.conf"
|
||||
#trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
#trusted-keys-file: "trustkeys.conf"
|
||||
trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
trusted-keys-file: "subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 0; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 6"
|
||||
|
||||
### NEXT TEST
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: "."
|
||||
directory: ""
|
||||
username: $user
|
||||
|
||||
pidfile: "/nosubdir/unbound.pid"
|
||||
#root-hints: "root.ca"
|
||||
#root-hints: "$subdir/root.cb"
|
||||
root-hints: "subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
#trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
trust-anchor-file: "subdir/trustanchor.conf"
|
||||
#trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
#trusted-keys-file: "trustkeys.conf"
|
||||
#trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
trusted-keys-file: "subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 1; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 7"
|
||||
|
||||
### NEXT TEST
|
||||
|
||||
cat > test.conf <<EOF
|
||||
server:
|
||||
chroot: $cwd
|
||||
directory: ""
|
||||
username: $user
|
||||
|
||||
pidfile: "/unbound.pid"
|
||||
#root-hints: "root.ca"
|
||||
root-hints: "$subdir/root.cb"
|
||||
root-hints: "/subdir/root.cc"
|
||||
|
||||
logfile: "output.log"
|
||||
|
||||
trust-anchor-file: "$subdir/trustanchor.conf"
|
||||
trust-anchor-file: "/subdir/trustanchor.conf"
|
||||
#trust-anchor-file: "trustanchor.conf"
|
||||
|
||||
#trusted-keys-file: "trustkeys.conf"
|
||||
trusted-keys-file: "$subdir/trustkeys2.conf"
|
||||
trusted-keys-file: "/subdir/trustkeys3.conf"
|
||||
EOF
|
||||
|
||||
$PRE/unbound-checkconf test.conf
|
||||
if test $? -ne 0; then
|
||||
echo "Checkconf of config with chroot inside it failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK 8"
|
||||
|
||||
|
||||
exit 0
|
16
testdata/08-host-lib.tdir/08-host-lib.dsc
vendored
Normal file
16
testdata/08-host-lib.tdir/08-host-lib.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 08-host-lib
|
||||
Version: 1.0
|
||||
Description: Test async lookup using libunbound
|
||||
CreationDate: Fri May 16 13:21:58 CEST 2008
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: 08-host-lib.pre
|
||||
Post: 08-host-lib.post
|
||||
Test: 08-host-lib.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
12
testdata/08-host-lib.tdir/08-host-lib.hosts
vendored
Normal file
12
testdata/08-host-lib.tdir/08-host-lib.hosts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# Host Database
|
||||
#
|
||||
# This file should contain the addresses and aliases for local hosts that
|
||||
# share this file. Replace 'my.domain' below with the domainname of your
|
||||
# machine.
|
||||
#
|
||||
::1 localhost localhost.my.domain
|
||||
127.0.0.1 localhost localhost.my.domain
|
||||
# Imaginary network.
|
||||
10.0.0.2 myname.my.domain myname
|
||||
10.0.0.3 myfriend.my.domain myfriend
|
||||
10.20.30.40 virtual.virtual.virtual.local
|
10
testdata/08-host-lib.tdir/08-host-lib.post
vendored
Normal file
10
testdata/08-host-lib.tdir/08-host-lib.post
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# #-- 08-host-lib.post --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# source the test var file when it's there
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
#
|
||||
# do your teardown here
|
||||
|
||||
. ../common.sh
|
||||
kill_pid $FWD_PID
|
19
testdata/08-host-lib.tdir/08-host-lib.pre
vendored
Normal file
19
testdata/08-host-lib.tdir/08-host-lib.pre
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# #-- 08-host-lib.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
|
||||
|
||||
. ../common.sh
|
||||
get_random_port 2
|
||||
FWD_PORT=$(($RND_PORT + 1))
|
||||
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
||||
|
||||
# start forwarder
|
||||
get_ldns_testns
|
||||
$LDNS_TESTNS -p $FWD_PORT 08-host-lib.testns >fwd.log 2>&1 &
|
||||
FWD_PID=$!
|
||||
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
||||
|
||||
cat .tpkg.var.test
|
||||
wait_ldns_testns_up fwd.log
|
194
testdata/08-host-lib.tdir/08-host-lib.test
vendored
Normal file
194
testdata/08-host-lib.tdir/08-host-lib.test
vendored
Normal file
@ -0,0 +1,194 @@
|
||||
# #-- 08-host-lib.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
|
||||
|
||||
PRE="../.."
|
||||
. ../common.sh
|
||||
|
||||
if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
|
||||
# nothing
|
||||
:
|
||||
else
|
||||
echo "forking is not available; test skipped."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# test if fwder is up
|
||||
echo "> dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile"
|
||||
dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile
|
||||
if grep "10.20.30.40" outfile; then
|
||||
echo "fwder is up"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "fwder not up"
|
||||
exit 1
|
||||
fi
|
||||
rm outfile
|
||||
|
||||
# create asynclook
|
||||
get_make
|
||||
echo "> (cd $PRE ; $MAKE asynclook)"
|
||||
(cd $PRE ; $MAKE asynclook)
|
||||
if test ! -x $PRE/asynclook; then
|
||||
echo "cannot build asynclook test program"
|
||||
exit 1
|
||||
fi
|
||||
(cd $PRE ; $MAKE lock-verify)
|
||||
|
||||
# check the locks.
|
||||
function locktest() {
|
||||
if test -x $PRE/lock-verify -a -f ublocktrace.0; then
|
||||
$PRE/lock-verify ublocktrace.*
|
||||
if test $? -ne 0; then
|
||||
echo "lock-verify error"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# test hosts reading (directed at local auth info)
|
||||
echo '> $PRE/asynclook -H 08-host-lib.hosts virtual.virtual.virtual.local 2>&1 | tee outfile'
|
||||
$PRE/asynclook -H 08-host-lib.hosts virtual.virtual.virtual.local 2>&1 | tee outfile
|
||||
if grep "virtual.virtual.virtual.local: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
# test async lookups (directed at testns)
|
||||
echo '> $PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
echo '> $PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
echo '> $PRE/asynclook -t -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -t -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
# test cancellation
|
||||
echo '> $PRE/asynclook -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
echo '> $PRE/asynclook -t -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -t -c -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: cancelled" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
# test blocking mode
|
||||
echo '> $PRE/asynclook -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
echo '> $PRE/asynclook -t -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile'
|
||||
$PRE/asynclook -t -b -f "127.0.0.1@"$FWD_PORT www.example.com www2.example.com 2>&1 | tee outfile
|
||||
if grep "www.example.com: 10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "www2.example.com: 10.20.30.42" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
cat fwd.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
locktest
|
||||
rm outfile
|
||||
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
exit 0
|
35
testdata/08-host-lib.tdir/08-host-lib.testns
vendored
Normal file
35
testdata/08-host-lib.tdir/08-host-lib.testns
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
; nameserver test file
|
||||
$ORIGIN example.com.
|
||||
$TTL 3600
|
||||
|
||||
; for priming query
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
@ IN NS
|
||||
SECTION ANSWER
|
||||
@ IN NS 127.0.0.1
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www IN A
|
||||
SECTION ANSWER
|
||||
www IN A 10.20.30.40
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www2 IN A
|
||||
SECTION ANSWER
|
||||
www2 IN A 10.20.30.42
|
||||
ENTRY_END
|
||||
|
24
testdata/09-unbound-control.tdir/09-unbound-control.conf
vendored
Normal file
24
testdata/09-unbound-control.tdir/09-unbound-control.conf
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
server:
|
||||
verbosity: 2
|
||||
# num-threads: 1
|
||||
interface: 127.0.0.1
|
||||
port: @PORT@
|
||||
use-syslog: no
|
||||
directory: ""
|
||||
pidfile: "unbound.pid"
|
||||
chroot: ""
|
||||
username: ""
|
||||
do-not-query-localhost: no
|
||||
remote-control:
|
||||
control-enable: yes
|
||||
control-interface: 127.0.0.1
|
||||
# control-interface: ::1
|
||||
control-port: @CONTROL_PORT@
|
||||
server-key-file: "unbound_server.key"
|
||||
server-cert-file: "unbound_server.pem"
|
||||
control-key-file: "unbound_control.key"
|
||||
control-cert-file: "unbound_control.pem"
|
||||
forward-zone:
|
||||
name: "."
|
||||
forward-addr: "127.0.0.1@@TOPORT@"
|
||||
|
16
testdata/09-unbound-control.tdir/09-unbound-control.dsc
vendored
Normal file
16
testdata/09-unbound-control.tdir/09-unbound-control.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 09-unbound-control
|
||||
Version: 1.0
|
||||
Description: 09 test unbound-control remote control tool
|
||||
CreationDate: Mon Sep 15 11:14:08 CEST 2008
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: 09-unbound-control.pre
|
||||
Post: 09-unbound-control.post
|
||||
Test: 09-unbound-control.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
13
testdata/09-unbound-control.tdir/09-unbound-control.post
vendored
Normal file
13
testdata/09-unbound-control.tdir/09-unbound-control.post
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
# #-- 09-unbound-control.post --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# source the test var file when it's there
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
#
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
kill_pid $FWD_PID
|
||||
# it was stopped with unbound-control (if the test succeeded)
|
||||
kill $UNBOUND_PID >/dev/null 2>&1
|
||||
kill $UNBOUND_PID >/dev/null 2>&1
|
||||
exit 0
|
33
testdata/09-unbound-control.tdir/09-unbound-control.pre
vendored
Normal file
33
testdata/09-unbound-control.tdir/09-unbound-control.pre
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# #-- 09-unbound-control.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
|
||||
|
||||
. ../common.sh
|
||||
get_random_port 3
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
FWD_PORT=$(($RND_PORT + 1))
|
||||
CONTROL_PORT=$(($RND_PORT + 2))
|
||||
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
||||
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
||||
echo "CONTROL_PORT=$CONTROL_PORT" >> .tpkg.var.test
|
||||
|
||||
# start forwarder
|
||||
get_ldns_testns
|
||||
$LDNS_TESTNS -p $FWD_PORT 09-unbound-control.testns >fwd.log 2>&1 &
|
||||
FWD_PID=$!
|
||||
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
||||
|
||||
# make config file
|
||||
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' -e 's/@CONTROL_PORT\@/'$CONTROL_PORT'/' < 09-unbound-control.conf > ub.conf
|
||||
# start unbound in the background
|
||||
PRE="../.."
|
||||
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
||||
UNBOUND_PID=$!
|
||||
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
||||
|
||||
cat .tpkg.var.test
|
||||
wait_ldns_testns_up fwd.log
|
||||
wait_unbound_up unbound.log
|
||||
|
406
testdata/09-unbound-control.tdir/09-unbound-control.test
vendored
Normal file
406
testdata/09-unbound-control.tdir/09-unbound-control.test
vendored
Normal file
@ -0,0 +1,406 @@
|
||||
# #-- 09-unbound-control.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
|
||||
|
||||
PRE="../.."
|
||||
|
||||
# exit value is 1 on usage
|
||||
$PRE/unbound-control -h
|
||||
if test $? -ne 1; then
|
||||
echo "wrong exit value for usage."
|
||||
exit 1
|
||||
else
|
||||
echo "exit value for usage: OK"
|
||||
fi
|
||||
|
||||
# use lock-verify if possible
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# exit value is 1 when a bad command is given.
|
||||
echo "$PRE/unbound-control -c ub.conf blablargh"
|
||||
$PRE/unbound-control -c ub.conf blablargh
|
||||
if test $? -ne 1; then
|
||||
echo "wrong exit value on error."
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.lo
|
||||
exit 1
|
||||
else
|
||||
echo "correct exit value on error"
|
||||
fi
|
||||
|
||||
# reload the server. test if the server came up by putting a new
|
||||
# local-data element in the server.
|
||||
echo "server: local-data: 'afterreload. IN A 5.6.7.8'" >> ub.conf
|
||||
echo "$PRE/unbound-control -c ub.conf reload"
|
||||
$PRE/unbound-control -c ub.conf reload
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "> dig afterreload."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT afterreload. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "5.6.7.8" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# must have had queries now. 1 since reload.
|
||||
echo "$PRE/unbound-control -c ub.conf stats"
|
||||
$PRE/unbound-control -c ub.conf stats > tmp.$$
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
if grep "^total.num.queries=[1-9][0-9]*$" tmp.$$; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "bad stats"
|
||||
cat tmp.$$
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# verbosity
|
||||
echo "$PRE/unbound-control -c ub.conf verbosity 2"
|
||||
$PRE/unbound-control -c ub.conf verbosity 2
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check syntax error in parse
|
||||
echo "$PRE/unbound-control -c ub.conf verbosity jkdf"
|
||||
$PRE/unbound-control -c ub.conf verbosity jkdf
|
||||
if test $? -ne 1; then
|
||||
echo "wrong exit value after failure"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check bad credentials
|
||||
cp ub.conf bad.conf
|
||||
echo "remote-control:" >> bad.conf
|
||||
echo " server-key-file: bad_server.key" >> bad.conf
|
||||
echo " server-cert-file: bad_server.pem" >> bad.conf
|
||||
echo " control-key-file: bad_control.key" >> bad.conf
|
||||
echo " control-cert-file: bad_control.pem" >> bad.conf
|
||||
echo "$PRE/unbound-control -c bad.conf verbosity 2"
|
||||
$PRE/unbound-control -c bad.conf verbosity 2
|
||||
if test $? -ne 1; then
|
||||
echo "wrong exit value after failure"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check spoofedclient credentials
|
||||
rm -f bad.conf
|
||||
cp ub.conf bad.conf
|
||||
echo "remote-control:" >> bad.conf
|
||||
echo " server-key-file: unbound_server.key" >> bad.conf
|
||||
echo " server-cert-file: unbound_server.pem" >> bad.conf
|
||||
echo " control-key-file: bad_control.key" >> bad.conf
|
||||
echo " control-cert-file: bad_control.pem" >> bad.conf
|
||||
echo "$PRE/unbound-control -c bad.conf verbosity 2"
|
||||
$PRE/unbound-control -c bad.conf verbosity 2
|
||||
if test $? -ne 1; then
|
||||
echo "wrong exit value after failure"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create a new local zone
|
||||
echo "> test of local zone"
|
||||
echo "$PRE/unbound-control -c ub.conf local_zone example.net static"
|
||||
$PRE/unbound-control -c ub.conf local_zone example.net static
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "$PRE/unbound-control -c ub.conf local_data www.example.net A 192.0.2.1"
|
||||
$PRE/unbound-control -c ub.conf local_data www.example.net A 192.0.2.1
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check that www.example.net exists
|
||||
echo "> dig www.example.net."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT www.example.net. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "192.0.2.1" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check that mail.example.net has nxdomain
|
||||
echo "> dig mail.example.net."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT mail.example.net. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "NXDOMAIN" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove www.example.net - check it gets nxdomain
|
||||
echo "$PRE/unbound-control -c ub.conf local_data_remove www.example.net"
|
||||
$PRE/unbound-control -c ub.conf local_data_remove www.example.net
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "> dig www.example.net."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT www.example.net. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "NXDOMAIN" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove nonexistent name - check bug#287(segfault) does not happen.
|
||||
echo "$PRE/unbound-control -c ub.conf local_data_remove test.example.net"
|
||||
$PRE/unbound-control -c ub.conf local_data_remove test.example.net
|
||||
# if crash then then we get: error: could not SSL_read from unbound-control
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove example.net - check its gone.
|
||||
echo "$PRE/unbound-control -c ub.conf local_zone_remove example.net"
|
||||
$PRE/unbound-control -c ub.conf local_zone_remove example.net
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "> dig www.example.net."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT www.example.net. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "SERVFAIL" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# dump the cache
|
||||
echo "> test cache dump"
|
||||
# fillup cache
|
||||
echo "dig www.example.com"
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com.
|
||||
echo "$PRE/unbound-control -c ub.conf dump_cache"
|
||||
$PRE/unbound-control -c ub.conf dump_cache > tmp.$$
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
cat tmp.$$
|
||||
if grep 10.20.30.40 tmp.$$; then
|
||||
echo "OK example.com is in cache dump"
|
||||
else
|
||||
echo "Not OK cache dump"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# test lookup
|
||||
echo "$PRE/unbound-control -c ub.conf lookup www.example.com"
|
||||
$PRE/unbound-control -c ub.conf lookup www.example.com
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
# answer to lookup is meaningless because of use a forwarder, oh well.
|
||||
|
||||
# load the cache dump.
|
||||
echo "$PRE/unbound-control -c ub.conf load_cache < tmp.$$"
|
||||
$PRE/unbound-control -c ub.conf load_cache < tmp.$$
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "> dig www.example.com."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# load local-zones from file
|
||||
echo "$PRE/unbound-control -c ub.conf local_zones < local_zones"
|
||||
$PRE/unbound-control -c ub.conf local_zones < local_zones
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "> dig localzonefromfile."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT localzonefromfile | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "REFUSED" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# load local-data from file
|
||||
echo "$PRE/unbound-control -c ub.conf local_datas < local_data"
|
||||
$PRE/unbound-control -c ub.conf local_datas < local_data
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "> dig localdatafromfile."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT -t txt localdatafromfile | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "local data from file OK" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove local-zone and local-data from file
|
||||
echo "$PRE/unbound-control -c ub.conf local_zones_remove < local_zones_remove"
|
||||
$PRE/unbound-control -c ub.conf local_zones_remove < local_zones_remove
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "$PRE/unbound-control -c ub.conf local_datas_remove < local_data_remove"
|
||||
$PRE/unbound-control -c ub.conf local_datas_remove < local_data_remove
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
echo "> check zone and data removal list_local_zones"
|
||||
$PRE/unbound-control -c ub.conf list_local_zones | tee outfile
|
||||
if grep "localzonefromfile" outfile; then
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "local data from file OK" outfile; then
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "otherlocalzone" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# flushing
|
||||
echo "$PRE/unbound-control -c ub.conf flush www.example.net"
|
||||
$PRE/unbound-control -c ub.conf flush www.example.net
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$PRE/unbound-control -c ub.conf flush_type www.example.net TXT"
|
||||
$PRE/unbound-control -c ub.conf flush_type www.example.net TXT
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$PRE/unbound-control -c ub.conf flush_zone example.net"
|
||||
$PRE/unbound-control -c ub.conf flush_zone example.net
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# now stop the server
|
||||
echo "$PRE/unbound-control -c ub.conf stop"
|
||||
$PRE/unbound-control -c ub.conf stop
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value after success"
|
||||
exit 1
|
||||
fi
|
||||
# see if the server has really exited.
|
||||
TRY_MAX=20
|
||||
for (( try=0 ; try <= $TRY_MAX ; try++ )) ; do
|
||||
if kill -0 $UNBOUND_PID 2>&1 | tee tmp.$$; then
|
||||
echo "not stopped yet, waiting"
|
||||
sleep 1
|
||||
else
|
||||
echo "stopped OK; break"
|
||||
break;
|
||||
fi
|
||||
if grep "No such process" tmp.$$; then
|
||||
echo "stopped OK; break"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if kill -0 $UNBOUND_PID; then
|
||||
echo "still up!"
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "not stopped, failure"
|
||||
exit 1
|
||||
else
|
||||
echo "stopped OK"
|
||||
|
||||
if test -f ublocktrace.0; then
|
||||
if $PRE/lock-verify ublocktrace.*; then
|
||||
echo "lock-verify test worked."
|
||||
else
|
||||
echo "lock-verify test failed."
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "> OK"
|
||||
exit 0
|
22
testdata/09-unbound-control.tdir/09-unbound-control.testns
vendored
Normal file
22
testdata/09-unbound-control.tdir/09-unbound-control.testns
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
; nameserver test file
|
||||
$ORIGIN example.com.
|
||||
$TTL 3600
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www IN A
|
||||
SECTION ANSWER
|
||||
www IN A 10.20.30.40
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA SERVFAIL
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www.example.net. IN A
|
||||
ENTRY_END
|
||||
|
15
testdata/09-unbound-control.tdir/bad_control.key
vendored
Normal file
15
testdata/09-unbound-control.tdir/bad_control.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQDti51Z6qASvAjPFFhLLlq8BwtsnmfqMPMn57dKAghb4OifeL4G
|
||||
SLOE02/hKDkdkOvaUG2UqDNh2OoPTuJk4A+mG2LJoziFhHKlIebo9v2YiFWOBVtO
|
||||
DWc3tXPT1IlSEN0xnAGelMmeLcPeCPe+A5IDlIHzF/+YiDgS38S9dL17owIDAQAB
|
||||
AoGAG3w/DatfMCu/nS5OdQx9BSqPgNbnUSqux9xA0fhgPTlN0T3oRtPcqa7JUDUW
|
||||
PryI/a62ry+zGkw98N2AxolCZg3N7Z3vuRx2FMcKKNwpTzDmcZW7TmMk5FPof6gE
|
||||
PnYl/ff0w+kxqA+L2EexH3Xi6ApLSZcjyzKWj+dL2AuT9gkCQQD3dPitwITxgCAD
|
||||
IaHw23e3FRkM/hw1Gp8bt6nbuxitVxxpO96q1EQ+fCy/mf0bMEJDp3xzMEIfP3r4
|
||||
GmNbaxa1AkEA9b8LeBLbQ2cm2+UMeUgygBsRirdUQ786auqH38Jbvi/j6S9sDl2x
|
||||
q1vRtikEBZJWfkhsOzrzwFDKe1bI/EEn9wJAAzOwRA9JqRZPU7sLrWIpmmTbfh+L
|
||||
neRKSsGFoSI6n4ORCouLxgoZF/XjXldPvxpQwS9ZnOPy9xSLMsqknno0QQJAeDtA
|
||||
IT8Yh6GwIWWu9KeeDY8wxe1sDLlCm4yjbZZpzGMh3rSU6XJtuqjxsW3fydoO9zn3
|
||||
ugLdvvnIFxAexUwbgQJBANyM13xcObfUJOj9rjlGCh0CDh/04ONl8SH8HBnM8guA
|
||||
RJI5S6vBHweVRopEZcF1sQm6wMf3ej/sGkyyNvJxRkY=
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/09-unbound-control.tdir/bad_control.pem
vendored
Normal file
11
testdata/09-unbound-control.tdir/bad_control.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBozCCAQwCCQDd5/rocjG5vDANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkyNjEyMjQ0NFoXDTI4MDYxMzEyMjQ0NFowGjEYMBYGA1UE
|
||||
AxMPdW5ib3VuZC1jb250cm9sMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDt
|
||||
i51Z6qASvAjPFFhLLlq8BwtsnmfqMPMn57dKAghb4OifeL4GSLOE02/hKDkdkOva
|
||||
UG2UqDNh2OoPTuJk4A+mG2LJoziFhHKlIebo9v2YiFWOBVtODWc3tXPT1IlSEN0x
|
||||
nAGelMmeLcPeCPe+A5IDlIHzF/+YiDgS38S9dL17owIDAQABMA0GCSqGSIb3DQEB
|
||||
BQUAA4GBAHpvcKqY48X9WsqogV16L+zT7iXhZ4tySA9EBk1a+0gud/iDPKSBi7mK
|
||||
4rzphVfb4S207dVmTG+1WNpa6l3pTGML6XLElxqIu/kr7w4cF0rKvZxWPsBRqYjH
|
||||
5HrK8CrQ0+YvUHXiu7IaACLGvKXY4Tqa3HQyvEtzLWJ4HhOrGx8F
|
||||
-----END CERTIFICATE-----
|
15
testdata/09-unbound-control.tdir/bad_server.key
vendored
Normal file
15
testdata/09-unbound-control.tdir/bad_server.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICWwIBAAKBgQC9hurNHBtB7QFEuPJOnCylUWUF2/US3v9yQQQXnstuXMQXRaq1
|
||||
1uviLmwaGurV9tngX59HITsBT74NQrtFKfEDLViLrm2arAM9Ozsn4tnv30HXPRDj
|
||||
UOc1M05Q7UzjaSrOv+TkPEqyhtUyaP1DYo0bcmbxtSkYc2ZEWCwhPklUwQIDAQAB
|
||||
AoGATjzZxN4ramWaNnJapJTX4U7eczK/0pB3xwSL2exVcjOdRzYdKH+WVIJxYb1m
|
||||
3/jNLFCNAeH356yxeevoPr73nG75YJ9I1ZWQWTnS3SDK6JD1+3pmAD0bQWFoitpf
|
||||
FoSH9H4X5gFB5vCZ99YVoYH1UXWPcgvUHwxz0voImt6lCKECQQD4YQ4A3M0+Ki8v
|
||||
Hl+5FKULnS0UtBkweCvkF/X1zZRjjYr6hLnqldFkkgTBKWe17pUXX0nwRMbP1YZX
|
||||
i+vDq5JNAkEAw1eYsmC0nVAMawo57N6LYavGv/n5u1cvpTpKDtn4cXH0Uqq13Kyu
|
||||
2FUTzan2NhCEK78UzbWaeewBJmxYda1+RQJAdShKk6uTAEyjnwUjv8h2JWlJN2fQ
|
||||
LeWxRlDrCruiz+aW9J4gl/99GoQpy/c83TshhjnDRZsbcDNWv/rXBZ/rTQJAFQva
|
||||
CtX6f7yBKgM3DHtJvyM3zbVMH9Ab9QxbsE/xwZ9KeKGl6Hm+eNZpxM3cFiUfaGs0
|
||||
/ZjkZOB1m0MvILaplQJAXC3PJ/E+87banGZRJl5qtS6/HoX5lH9TPkL8Essy7ANO
|
||||
2BT2OTQawD1A+VKIrQHXs085Of8tQUfrfHHt7s3Kqg==
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/09-unbound-control.tdir/bad_server.pem
vendored
Normal file
11
testdata/09-unbound-control.tdir/bad_server.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBmzCCAQQCCQCDugnhq8B6LzANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkyNjEyMjQ0M1oXDTI4MDYxMzEyMjQ0M1owEjEQMA4GA1UE
|
||||
AxMHdW5ib3VuZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvYbqzRwbQe0B
|
||||
RLjyTpwspVFlBdv1Et7/ckEEF57LblzEF0Wqtdbr4i5sGhrq1fbZ4F+fRyE7AU++
|
||||
DUK7RSnxAy1Yi65tmqwDPTs7J+LZ799B1z0Q41DnNTNOUO1M42kqzr/k5DxKsobV
|
||||
Mmj9Q2KNG3Jm8bUpGHNmRFgsIT5JVMECAwEAATANBgkqhkiG9w0BAQUFAAOBgQCy
|
||||
zGMW35/9xXoEWsuLFWUOaEKVq5DXuXtXbcMpDW6k2ELoraa305vh7Zwhj5JSqfcm
|
||||
O0xyqIzXvz/cYdyOTgEkdMDZ/EvQsxKTwvj6eA4614yB1r3Ju5eZd4Gpo6BHhSpu
|
||||
oqsrr0duJ+JOANTyaBplIxM1sjHbR4FGtmrFknBYBQ==
|
||||
-----END CERTIFICATE-----
|
1
testdata/09-unbound-control.tdir/local_data
vendored
Normal file
1
testdata/09-unbound-control.tdir/local_data
vendored
Normal file
@ -0,0 +1 @@
|
||||
localdatafromfile 3600 TXT "local data from file OK"
|
1
testdata/09-unbound-control.tdir/local_data_remove
vendored
Normal file
1
testdata/09-unbound-control.tdir/local_data_remove
vendored
Normal file
@ -0,0 +1 @@
|
||||
localdatafromfile
|
2
testdata/09-unbound-control.tdir/local_zones
vendored
Normal file
2
testdata/09-unbound-control.tdir/local_zones
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
localzonefromfile refuse
|
||||
otherlocalzone static
|
1
testdata/09-unbound-control.tdir/local_zones_remove
vendored
Normal file
1
testdata/09-unbound-control.tdir/local_zones_remove
vendored
Normal file
@ -0,0 +1 @@
|
||||
localzonefromfile
|
15
testdata/09-unbound-control.tdir/unbound_control.key
vendored
Normal file
15
testdata/09-unbound-control.tdir/unbound_control.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQDD6DogNCsSeEa1u99+6PUVbGzjMzzei9MIK6s94+zcpp7OAOBa
|
||||
rzPA0vlyuNtUsEN3qwPomQQQmIgbT7OXkzC1wqioxwa609xoL8oW/I7e336rEyvH
|
||||
ST6JwUdIg0Lzg/USJ81eTwMnzYSd4Bpsqr9eP33ubaR7Gh/6o76loLOlcQIDAQAB
|
||||
AoGAFT3e35MIgI4uDJJ8X0RfHp2NCO2LUg4TKbWical/C0W9vlR1/x80G1pE1d2Z
|
||||
WotqJVWTrOq6eBox19RCgtLg2wPGk9uD62+9SDT37heWFlUCElWq50pQG6k9ThiG
|
||||
DDypkZyZ/52+DdWybiaQJkuK6O5qQXuNAtVJMpghu4GnHAECQQDsupnZUQDpapzr
|
||||
4FC4MSkL2+A1PRt6g4VhwoqOpJXaHfVnH6F7AwUuOLNwGdR5Cvv70pfJ7Jqg8L2m
|
||||
Kxyl5bORAkEA09rn34YQ0pHJdHidbl2kInIuYTz09+TO3LWwan17nISH9aaYvVDr
|
||||
p9x1B4Qzw9qyxT9oll7ze/5Rw/7C3AQj4QJAT2B2a+b8bkgAXBs4FbruL3rHoDJg
|
||||
P2FQXSpVOWU4lg2LlsuFYvDtUMVUbZdLplanjZXcral3Y9W1Ub2M+ped8QJAYQN+
|
||||
aRpge7ys7vwIw7B36Bo3aOncF+ScYe+FkM5Tm7II/JHEofT7ZQwMP1vnxIlSkgbe
|
||||
YvWqNB6a3NC99LikoQJBAM4UhDdRg63Tr6Idky6CQaH///zAN7nArJfffKGWFdw9
|
||||
DKrWpNqvYZtX/cfEJucKcRCm5YL8CKFYbQy4VoCxUcE=
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/09-unbound-control.tdir/unbound_control.pem
vendored
Normal file
11
testdata/09-unbound-control.tdir/unbound_control.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBozCCAQwCCQD6XaN6FzW/4DANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkxMTA5MDk0MFoXDTI4MDUyOTA5MDk0MFowGjEYMBYGA1UE
|
||||
AxMPdW5ib3VuZC1jb250cm9sMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD
|
||||
6DogNCsSeEa1u99+6PUVbGzjMzzei9MIK6s94+zcpp7OAOBarzPA0vlyuNtUsEN3
|
||||
qwPomQQQmIgbT7OXkzC1wqioxwa609xoL8oW/I7e336rEyvHST6JwUdIg0Lzg/US
|
||||
J81eTwMnzYSd4Bpsqr9eP33ubaR7Gh/6o76loLOlcQIDAQABMA0GCSqGSIb3DQEB
|
||||
BQUAA4GBAGFAXmaQHuFgAuc6HVhYZJdToxLBhfxGpot4oZNjcb1Cdoz3OL34MU1B
|
||||
9E5psj2PpGPIi8/RwoqBtAJHJ+J5cWngo03o4ZmdwKNSzaxlp141z/3rUtFqEHEC
|
||||
iO6gPCT3U7dt6MyC7r6vdMqyW6aldP3CtwD0gQziKAMoj+TAfAcq
|
||||
-----END CERTIFICATE-----
|
15
testdata/09-unbound-control.tdir/unbound_server.key
vendored
Normal file
15
testdata/09-unbound-control.tdir/unbound_server.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICWwIBAAKBgQC3F7Jsv2u01pLL9rFnjsMU/IaCFUIz/624DcaE84Z4gjMl5kWA
|
||||
3axQcqul1wlwSrbKwrony+d9hH/+MX0tZwvl8w3OmhmOAiaQ+SHCsIuOjVwQjX0s
|
||||
RLB61Pz5+PAiVvnPa9JIYB5QrK6DVEsxIHj8MOc5JKORrnESsFDh6yeMeQIDAQAB
|
||||
AoGAAuWoGBprTOA8UGfl5LqYkaNxSWumsYXxLMFjC8WCsjN1NbtQDDr1uAwodSZS
|
||||
6ujzvX+ZTHnofs7y64XC8k34HTOCD2zlW7kijWbT8YjRYFU6o9F5zUGD9RCan0ds
|
||||
sVscT2psLSzfdsmFAcbmnGdxYkXk2PC1FHtaqExxehralGUCQQDcqrg9uQKXlhQi
|
||||
XAaPr8SiWvtRm2a9IMMZkRfUWZclPHq6fCWNuUaCD+cTat4wAuqeknAz33VEosw3
|
||||
fXGsok//AkEA1GjIHXrOcSlpfVJb6NeOBugjRtZ7ZDT5gbtnMS9ob0qntKV6saaL
|
||||
CNmJwuD9Q3XkU5j1+uHvYGP2NzcJd2CjhwJACV0hNlVMe9w9fHvFN4Gw6WbM9ViP
|
||||
0oS6YrJafYNTu5vGZXVxLoNnL4u3NYa6aPUmuZXjNwBLfJ8f5VboZPf6RwJAINd2
|
||||
oYA8bSi/A755MX4qmozH74r4Fx1Nuq5UHTm8RwDe/0Javx8F/j9MWpJY9lZDEF3l
|
||||
In5OebPa/NyInSmW/wJAZuP9aRn0nDBkHYri++1A7NykMiJ/nH0mDECbnk+wxx0S
|
||||
LwqIetBhxb8eQwMg45+iAH7CHAMQ8BQuF/nFE6eotg==
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/09-unbound-control.tdir/unbound_server.pem
vendored
Normal file
11
testdata/09-unbound-control.tdir/unbound_server.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBmzCCAQQCCQDsNJ1UmphEFzANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkxMTA5MDk0MFoXDTI4MDUyOTA5MDk0MFowEjEQMA4GA1UE
|
||||
AxMHdW5ib3VuZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtxeybL9rtNaS
|
||||
y/axZ47DFPyGghVCM/+tuA3GhPOGeIIzJeZFgN2sUHKrpdcJcEq2ysK6J8vnfYR/
|
||||
/jF9LWcL5fMNzpoZjgImkPkhwrCLjo1cEI19LESwetT8+fjwIlb5z2vSSGAeUKyu
|
||||
g1RLMSB4/DDnOSSjka5xErBQ4esnjHkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAZ
|
||||
9N0lnLENs4JMvPS+mn8C5m9bkkFITd32IiLjf0zgYpIUbFXH6XaEr9GNZBUG8feG
|
||||
l/6WRXnbnVSblI5odQ4XxGZ9inYY6qtW30uv76HvoKp+QZ1c3460ddR8NauhcCHH
|
||||
Z7S+QbLXi+r2JAhpPozZCjBHlRD0ixzA1mKQTJhJZg==
|
||||
-----END CERTIFICATE-----
|
8
testdata/10-unbound-anchor.tdir/10-unbound-anchor.conf
vendored
Normal file
8
testdata/10-unbound-anchor.tdir/10-unbound-anchor.conf
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# test config to direct traffic to testns.
|
||||
server:
|
||||
do-not-query-localhost: no
|
||||
fake-sha1: yes
|
||||
forward-zone:
|
||||
name: "."
|
||||
forward-addr: "127.0.0.1@@TOPORT@"
|
||||
|
16
testdata/10-unbound-anchor.tdir/10-unbound-anchor.dsc
vendored
Normal file
16
testdata/10-unbound-anchor.tdir/10-unbound-anchor.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: 10-unbound-anchor
|
||||
Version: 1.0
|
||||
Description: Test unbound-anchor for 5011 and cert update.
|
||||
CreationDate: Thu Sep 30 15:35:09 CEST 2010
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: 10-unbound-anchor.pre
|
||||
Post: 10-unbound-anchor.post
|
||||
Test: 10-unbound-anchor.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
10
testdata/10-unbound-anchor.tdir/10-unbound-anchor.post
vendored
Normal file
10
testdata/10-unbound-anchor.tdir/10-unbound-anchor.post
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# #-- 10-unbound-anchor.post --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# source the test var file when it's there
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
#
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
kill_pid $FWD_PID
|
||||
kill_pid $PETAL_PID
|
33
testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre
vendored
Normal file
33
testdata/10-unbound-anchor.tdir/10-unbound-anchor.pre
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# #-- 10-unbound-anchor.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
|
||||
|
||||
. ../common.sh
|
||||
PRE="../.."
|
||||
get_random_port 2
|
||||
PETAL_PORT=$RND_PORT
|
||||
FWD_PORT=$(($RND_PORT + 1))
|
||||
echo "PETAL_PORT=$PETAL_PORT" >> .tpkg.var.test
|
||||
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
||||
|
||||
get_make
|
||||
(cd $PRE; $MAKE petal)
|
||||
|
||||
# start forwarder
|
||||
get_ldns_testns
|
||||
$LDNS_TESTNS -p $FWD_PORT 10-unbound-anchor.testns >fwd.log 2>&1 &
|
||||
FWD_PID=$!
|
||||
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
||||
|
||||
# start https daemon
|
||||
$PRE/petal -v -a "127.0.0.1" -p $PETAL_PORT >petal.log 2>&1 &
|
||||
PETAL_PID=$!
|
||||
echo "PETAL_PID=$PETAL_PID" >> .tpkg.var.test
|
||||
cat .tpkg.var.test
|
||||
sed -e "s/@TOPORT@/$FWD_PORT/" < 10-unbound-anchor.conf > ub.conf
|
||||
|
||||
wait_ldns_testns_up fwd.log
|
||||
wait_petal_up petal.log
|
||||
|
162
testdata/10-unbound-anchor.tdir/10-unbound-anchor.test
vendored
Normal file
162
testdata/10-unbound-anchor.tdir/10-unbound-anchor.test
vendored
Normal file
@ -0,0 +1,162 @@
|
||||
# #-- 10-unbound-anchor.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
|
||||
|
||||
PRE="../.."
|
||||
OPTS="-u 127.0.0.1 -P $PETAL_PORT -C ub.conf -v -a root.key -c root.pem -n petal"
|
||||
DS=`cat K.+005+37348.ds`
|
||||
|
||||
# check that the root.key file works.
|
||||
function check_works() {
|
||||
if $PRE/unbound-host -C ub.conf -f root.key -t DNSKEY -v . | grep "(secure)" >/dev/null; then
|
||||
echo OK
|
||||
else
|
||||
echo "not OK"
|
||||
cat fwd.log
|
||||
cat petal.log
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# check that the root.key file works, but insecurely.
|
||||
function check_insecure() {
|
||||
if $PRE/unbound-host -C ub.conf -f root.key -t DNSKEY -v . | grep "(insecure)" >/dev/null; then
|
||||
echo OK
|
||||
else
|
||||
echo "not OK"
|
||||
cat fwd.log
|
||||
cat petal.log
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# test with good start key, and must do 5011 (no URL possible)
|
||||
echo "*** TEST 1 ***"
|
||||
echo $DS > root.key
|
||||
$PRE/unbound-anchor -x "notexist.xml" -s "notexist.p7s" $OPTS
|
||||
if test $? != 0; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
check_works
|
||||
# save for test 5
|
||||
cp root.key root.key.probed
|
||||
|
||||
# force update with the cert.
|
||||
echo "*** TEST 2 ***"
|
||||
cp test_cert.pem root.pem
|
||||
$PRE/unbound-anchor -F -x "root.xml" -s "root.p7s" $OPTS
|
||||
if test $? != 1; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
check_works
|
||||
|
||||
# 5011 fails
|
||||
echo "*** TEST 3 ***"
|
||||
echo ". IN DS 37000 5 1 b00000000000000000000100f0000000000000b2" > root.key
|
||||
$PRE/unbound-anchor -x "root.xml" -s "root.p7s" $OPTS
|
||||
if test $? != 1; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
check_works
|
||||
|
||||
# cert fails (bad p7s).
|
||||
echo "*** TEST 4 ***"
|
||||
echo ". IN DS 44444 5 1 b00000000000000000000100f0000000000000b2" > root.key
|
||||
$PRE/unbound-anchor -F -x "bad.xml" -s "bad.p7s" $OPTS
|
||||
if test $? != 0; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "DS 44444" root.key >/dev/null ; then
|
||||
echo OK
|
||||
else
|
||||
echo "keyfile changed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# cert fails (bad name).
|
||||
echo "*** TEST 4b ***"
|
||||
echo ". IN DS 44444 5 1 b00000000000000000000100f0000000000000b2" > root.key
|
||||
$PRE/unbound-anchor -F -x "bad.xml" -s "bad.p7s" $OPTS -n "not-it"
|
||||
if test $? != 0; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "DS 44444" root.key >/dev/null ; then
|
||||
echo OK
|
||||
else
|
||||
echo "keyfile changed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 5011 fails, and probe-time too recent.
|
||||
echo "*** TEST 5 ***"
|
||||
# break the probed key.
|
||||
sed -e 's/bp0KIK3J3/b00KIK0J0/' < root.key.probed > root.key
|
||||
$PRE/unbound-anchor -x "notexist.xml" -s "notexist.p7s" $OPTS
|
||||
if test $? != 0; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep "b00KIK0J0" root.key >/dev/null ; then
|
||||
echo OK
|
||||
else
|
||||
echo "keyfile changed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 5011 fails, and probe time is very, very old.
|
||||
echo "*** TEST 6 ***"
|
||||
mv root.key bla.key
|
||||
# last probe was Sun Sep 9 03:46:40 2001
|
||||
sed -e 's/;;last_success: .*$/;;last_success: 1000000000/' < bla.key > root.key
|
||||
rm bla.key
|
||||
$PRE/unbound-anchor -x "root.xml" -s "root.p7s" $OPTS
|
||||
if test $? != 1; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
check_works
|
||||
|
||||
# 5011 update probe is only needed.
|
||||
echo "*** TEST 7 ***"
|
||||
$PRE/unbound-anchor -x "notexist.xml" -s "notexist.p7s" $OPTS
|
||||
if test $? != 0; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
check_works
|
||||
|
||||
# root goes to insecure (0 anchors).
|
||||
echo "*** TEST 8 ***"
|
||||
$PRE/unbound-anchor -F -x "no_more_keys.xml" -s "no_more_keys.p7s" $OPTS
|
||||
if test $? != 1; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep ";;REVOKED" root.key >/dev/null; then echo "REVOKED"; else
|
||||
echo "not revoked"; exit 1; fi
|
||||
check_insecure
|
||||
|
||||
# insecure input file
|
||||
echo "*** TEST 9 ***"
|
||||
$PRE/unbound-anchor -x "notexist.xml" -s "notexist.p7s" $OPTS
|
||||
if test $? != 0; then
|
||||
echo "Exitcode not OK"
|
||||
exit 1
|
||||
fi
|
||||
if grep ";;REVOKED" root.key >/dev/null; then echo "REVOKED"; else
|
||||
echo "not revoked"; exit 1; fi
|
||||
check_insecure
|
||||
|
||||
|
||||
echo "logs"
|
||||
cat fwd.log
|
||||
cat petal.log
|
||||
|
||||
exit 0
|
17
testdata/10-unbound-anchor.tdir/10-unbound-anchor.testns
vendored
Normal file
17
testdata/10-unbound-anchor.tdir/10-unbound-anchor.testns
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
; nameserver test file
|
||||
$ORIGIN .
|
||||
$TTL 3600
|
||||
|
||||
; for easy test: valid until 2030.
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
. IN DNSKEY
|
||||
SECTION ANSWER
|
||||
. 3600 IN DNSKEY 257 3 5 AwEAAcjV/I6yYY0LGBEqBFZS0K6zcbCVAfarbOoCKBUEfsR/nVdy3pwMydXopUVhg4Z07tTu8w2gYTPALPv5E6EJFJebA34R0OcvTPRDr3671zVwZO9HyQK+RuT/0d7G/pdCeJX2gHHiVrG796nf078O/agtojZ8+HJ1V3oLnDZYBSDWv2oL2LB2Mpj+610W7RrmEmQQm2KaMP6aX3YMbAyBIrDjVzJTir4/WwJEHRHq59Xw91egJkS2bp0KIK3J3tQFqw== ;{id = 37348 (ksk), size = 1536b}
|
||||
. 3600 IN RRSIG DNSKEY 5 0 3600 20300930162500 20100530162500 37348 . tjIVLqaVr2o1pLYxNbozR8OxPnGnCJN/rROZoIVzjEgvofyHx24hGMXak6lIlLHZ9GSmOxUM/71MeunhSdMqfjsoktc7MkpB8eR6ATePjdaPTdRH519wHH7qEkHj5WJNKvJOvG7Q9xs6O3KANErr+iotHjOJYpgbmZFoENJvLzqj4FVJ0bIglgD+SZGJGv9/qA+eWAK7WuWSe+ulMU/WH/SnxB/NKDjSAa//TyjzLhlIRR5UTjLIUymWxG4D3TbJ ;{id = 37348}
|
||||
|
||||
ENTRY_END
|
||||
|
BIN
testdata/10-unbound-anchor.tdir/127.0.0.1/bad.p7s
vendored
Normal file
BIN
testdata/10-unbound-anchor.tdir/127.0.0.1/bad.p7s
vendored
Normal file
Binary file not shown.
10
testdata/10-unbound-anchor.tdir/127.0.0.1/bad.xml
vendored
Normal file
10
testdata/10-unbound-anchor.tdir/127.0.0.1/bad.xml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TrustAnchor id="AD42165F-3B1A-4778-8F42-D34A1D41FD93" source="http://data.iana.org/root-anchors/root-anchors.xml">
|
||||
<Zone>.</Zone>
|
||||
<KeyDigest id="Kjqmt7v" validFrom="2010-07-15T00:00:00+00:00">
|
||||
<KeyTag>37348</KeyTag>
|
||||
<Algorithm>5</Algorithm>
|
||||
<DigestType>1</DigestType>
|
||||
<Digest>b56a31943f14faa31224d147f8b1107b78590000</Digest>
|
||||
</KeyDigest>
|
||||
</TrustAnchor>
|
BIN
testdata/10-unbound-anchor.tdir/127.0.0.1/no_more_keys.p7s
vendored
Normal file
BIN
testdata/10-unbound-anchor.tdir/127.0.0.1/no_more_keys.p7s
vendored
Normal file
Binary file not shown.
16
testdata/10-unbound-anchor.tdir/127.0.0.1/no_more_keys.xml
vendored
Normal file
16
testdata/10-unbound-anchor.tdir/127.0.0.1/no_more_keys.xml
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TrustAnchor id="AD42165F-3B1A-4778-8F42-D34A1D41FD93" source="http://data.iana.org/root-anchors/root-anchors.xml">
|
||||
<Zone>.</Zone>
|
||||
<KeyDigest id="Kjqmt7v" validFrom="2010-07-15T00:00:00+00:00" validUntil="2010-07-16T00:00:00+00:00">
|
||||
<KeyTag>37348</KeyTag>
|
||||
<Algorithm>5</Algorithm>
|
||||
<DigestType>1</DigestType>
|
||||
<Digest>b56a31943f14faa31224d147f8b1107b78598eb2</Digest>
|
||||
</KeyDigest>
|
||||
<KeyDigest id="Kjqmt7v" validFrom="2010-07-18T00:00:00+00:00" validUntil="2010-07-19T00:00:00+00:00">
|
||||
<KeyTag>37348</KeyTag>
|
||||
<Algorithm>5</Algorithm>
|
||||
<DigestType>1</DigestType>
|
||||
<Digest>b56a31943f14faa31224d147f8b1107b78598eb2</Digest>
|
||||
</KeyDigest>
|
||||
</TrustAnchor>
|
BIN
testdata/10-unbound-anchor.tdir/127.0.0.1/root.p7s
vendored
Normal file
BIN
testdata/10-unbound-anchor.tdir/127.0.0.1/root.p7s
vendored
Normal file
Binary file not shown.
10
testdata/10-unbound-anchor.tdir/127.0.0.1/root.xml
vendored
Normal file
10
testdata/10-unbound-anchor.tdir/127.0.0.1/root.xml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TrustAnchor id="AD42165F-3B1A-4778-8F42-D34A1D41FD93" source="http://data.iana.org/root-anchors/root-anchors.xml">
|
||||
<Zone>.</Zone>
|
||||
<KeyDigest id="Kjqmt7v" validFrom="2010-07-15T00:00:00+00:00">
|
||||
<KeyTag>37348</KeyTag>
|
||||
<Algorithm>5</Algorithm>
|
||||
<DigestType>1</DigestType>
|
||||
<Digest>b56a31943f14faa31224d147f8b1107b78598eb2</Digest>
|
||||
</KeyDigest>
|
||||
</TrustAnchor>
|
1
testdata/10-unbound-anchor.tdir/K.+005+37348.ds
vendored
Normal file
1
testdata/10-unbound-anchor.tdir/K.+005+37348.ds
vendored
Normal file
@ -0,0 +1 @@
|
||||
. 3600 IN DS 37348 5 1 b56a31943f14faa31224d147f8b1107b78598eb2 ; xotek-pusin-gezoc-gevep-feged-gigyg-livor-cagil-riveh-nafar-duxix
|
1
testdata/10-unbound-anchor.tdir/K.+005+37348.key
vendored
Normal file
1
testdata/10-unbound-anchor.tdir/K.+005+37348.key
vendored
Normal file
@ -0,0 +1 @@
|
||||
. 3600 IN DNSKEY 257 3 5 AwEAAcjV/I6yYY0LGBEqBFZS0K6zcbCVAfarbOoCKBUEfsR/nVdy3pwMydXopUVhg4Z07tTu8w2gYTPALPv5E6EJFJebA34R0OcvTPRDr3671zVwZO9HyQK+RuT/0d7G/pdCeJX2gHHiVrG796nf078O/agtojZ8+HJ1V3oLnDZYBSDWv2oL2LB2Mpj+610W7RrmEmQQm2KaMP6aX3YMbAyBIrDjVzJTir4/WwJEHRHq59Xw91egJkS2bp0KIK3J3tQFqw== ;{id = 37348 (ksk), size = 1536b}
|
10
testdata/10-unbound-anchor.tdir/K.+005+37348.private
vendored
Normal file
10
testdata/10-unbound-anchor.tdir/K.+005+37348.private
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
Private-key-format: v1.2
|
||||
Algorithm: 5 (RSASHA1)
|
||||
Modulus: yNX8jrJhjQsYESoEVlLQrrNxsJUB9qts6gIoFQR+xH+dV3LenAzJ1eilRWGDhnTu1O7zDaBhM8As+/kToQkUl5sDfhHQ5y9M9EOvfrvXNXBk70fJAr5G5P/R3sb+l0J4lfaAceJWsbv3qd/Tvw79qC2iNnz4cnVXegucNlgFINa/agvYsHYymP7rXRbtGuYSZBCbYpow/ppfdgxsDIEisONXMlOKvj9bAkQdEern1fD3V6AmRLZunQogrcne1AWr
|
||||
PublicExponent: AQAB
|
||||
PrivateExponent: XKH2f4rfW8LGMwSCQ56nCi1SPvQ7l56x+a1M94S/Q7row7ED5E4xuiw4LqwvkhDVJ/meuaZDry7wkLftydT6XoLtNXTaOgejIvclNvtE5C0XIRanLFC/OliUYIDAZNwPGVCYX8ZIfcbi1Sp5Ng9EofCb1haSGn/Wnar31knaweRdTrAUIPl49+QhJmaHCrTtHVuYEOZjIaOPSGIBvxZAk//3yF6FXY3RVRaNRTcELWvLclSdtt52etVV0/SEWhjh
|
||||
Prime1: 4wEpv8UVvqOkOKSxeu1ao42FWHwqzwUdFyNeKrUxg3E7ad5i9V0aaFhqbJKzQtVUreeEtoXsSRvjvbWJ4wSCwEay1qVD4xEJ4UFtasESxQvv1iVsBQ7zEywRkwSIT46/
|
||||
Prime2: 4n0h+1TXflSEqdxC4lPiwyIC/z+1iyq0kFru70SB395S44HAynbQBdsapZX29msfl+/tiu2DncIXe1oVaDDqPpbrOT5NZMH9xQnZDSCbM8l7Gyx5UB3MsbT+71J2VrAV
|
||||
Exponent1: p81LTDvmyAZ1NX3gyCq+TpolkPQwPNnd2CXHzTAlirFgJvFCG3gYNjvtZ5bFtki2ENtMShQTRzO7lJemds71zCY2ut5toWMN95oCxOA1/LzHLHh7Mf4MBwcTcqbuEElH
|
||||
Exponent2: w0ZyWxkuZxyF+VIQVMVQuT+E6ABNDX03i1LruV4OwC8WtlM0HxxLhREBK41eDd4UslJKM8NO/GDRECh+VoP+IxLKImPGJL5hh1ZTTs8zIXZw7t/shJf82acdOsiVgW51
|
||||
Coefficient: 10OZvNAPHe/wBO2+AO49EUohPksOxFy9dwspB1XUjlPB9zv93dUfZdou3pjZq1EkxnRChaAwmRMYxks3UiTmDuybMNzKlaFQajyB+UowjA1dStFYbDFpVrIqv6H0q7W2
|
21
testdata/10-unbound-anchor.tdir/keys/test_cert.key
vendored
Normal file
21
testdata/10-unbound-anchor.tdir/keys/test_cert.key
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIDfAIBAAKBwQC48GhhmIU66TZKc3QiyF4L5bsm8Aly/y2SzLP+GACepK0OcOtD
|
||||
i2sXrTtoJDvGOPZ9ICqmIy8u/Q/cK26txNEeZFcClLcYF/U+NaqjEwrwkHEIgc3g
|
||||
8qnKrhzM61I8foAWVT7cqxFHDKYuClNITXk1i//Yzpnf9wvVKQ51W9UOtm/WA7g4
|
||||
IDHCuAjocyyNC3B7XqYawFDOsdMI4ZW7hC0hIRQOvBkvbvY8WxmsSkdd30u1KmoI
|
||||
Sg4y6OvnikrEEQkCAwEAAQKBwQC3hQlv37RF82sGkm8qnP6Ge+AuEYCu9v44cJ4k
|
||||
hZkH1I5OiEtN6anKAwOyolIWsCwZmrP3zW5jCIiWiRr5oReLOzMEwqK2a//XTdYY
|
||||
oSr38b3ZHUY59VP8Zq75woMGuNed35kAmGxzDRP1gI/TmvTvaHlqYyvxBtxnZJij
|
||||
Za1CrT+a9JvR6hI8xXrE33CF0T6JO1v3v0HeBuve5+83cCHKo+GyqIBjL3FJgefZ
|
||||
EsPz6rGnPDKTYgMyaljFV3LI5ikCYQDlaBnyiWk1C7tYO5x3CRoHoiuiiREZCncK
|
||||
QkSxjiDoSP0rc+3BQp2kG3yy6S9mN4qMQPELEtBa6bORogxNK+Pxg8TRI/+xgeFt
|
||||
bod5Bd4pfl6Y5hXm21JwELFlOzPI3PMCYQDOYK6Z7vegiOJyyAJXMjcI07H8S0Gr
|
||||
SZW8f4tHRzO+RrRpR5ANzarELX7nF/Qj5mPXiZNiiMDGocxqkNzIa5HFLOqBhRkv
|
||||
o7yC1Cj582dUBFHyEbsZxR6UMTPLdE3UaRMCYACC1Nv3dmaJ2ib+KwEQ4h/2Ooao
|
||||
K4OUxGMfdqu2l1gtIXNBVNxDW7qL3SFA57wgj4x0cJUHu7MYJjBC3igl2uIk2wFk
|
||||
RSOOGIR35JFec/o/r9JDYPUcs/hP8TU6hokCBQJgHbH/rZqa+vh3TPjGjXFmRdjg
|
||||
JWNWwaTG7OaVTd5K7bgSwYtQiQvs5Gl/dxUVRg0ilKLxGB6BTpN9bGAHxLbltK9v
|
||||
1s8l/praxyBr/PsvBQHSILi4aU7ZxY0G3OGRSV0NAmBx28Msdgc0yHh3qSkbwVEr
|
||||
gr7av1iOH73ee+o4CmMWXYUBHOMW5Su0s0QHjNGDMiRiRoCvzYqdLcJj9/sFJxOT
|
||||
CM35WGGeKDMNubX7C6YroQ91q7kUmhi7HHY3QOyhCDU=
|
||||
-----END RSA PRIVATE KEY-----
|
15
testdata/10-unbound-anchor.tdir/keys/test_cert.pem
vendored
Normal file
15
testdata/10-unbound-anchor.tdir/keys/test_cert.pem
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICWTCCAYKgAwIBAgIJAN5YIkuCvJf5MA0GCSqGSIb3DQEBBQUAMCYxDjAMBgNV
|
||||
BAMTBXBldGFsMRQwEgYJKoZIhvcNAQkBFgVwZXRhbDAeFw0xMzAxMTcxMTUyNDVa
|
||||
Fw0zMjEwMDQxMTUyNDVaMCYxDjAMBgNVBAMTBXBldGFsMRQwEgYJKoZIhvcNAQkB
|
||||
FgVwZXRhbDCB3zANBgkqhkiG9w0BAQEFAAOBzQAwgckCgcEAuPBoYZiFOuk2SnN0
|
||||
IsheC+W7JvAJcv8tksyz/hgAnqStDnDrQ4trF607aCQ7xjj2fSAqpiMvLv0P3Ctu
|
||||
rcTRHmRXApS3GBf1PjWqoxMK8JBxCIHN4PKpyq4czOtSPH6AFlU+3KsRRwymLgpT
|
||||
SE15NYv/2M6Z3/cL1SkOdVvVDrZv1gO4OCAxwrgI6HMsjQtwe16mGsBQzrHTCOGV
|
||||
u4QtISEUDrwZL272PFsZrEpHXd9LtSpqCEoOMujr54pKxBEJAgMBAAGjDzANMAsG
|
||||
A1UdDwQEAwIChDANBgkqhkiG9w0BAQUFAAOBwQCaA3ys5hDPMNV1oXIxH6u2KfAX
|
||||
C9tYJId/SR0x8whsZuNaSEZAgImdM5dnyWdjey8Pio772E9/F2aUBGFkdadZx4My
|
||||
d7hBfEi/NECEKs86k9g0ijbin41NKtnajb6GwyNQ9vDx7Z5FS8BZ3CD0BZIdCQUE
|
||||
gKuDSWBROQU3tqrjdk2QTwGQkj2mgzT871Jn1MwZw0mczPjS1y469Ejym8wi3uCd
|
||||
EboDOoGBCpmUQbxBv6JI75cUCdmNNEwjQjZ0XQw=
|
||||
-----END CERTIFICATE-----
|
167
testdata/10-unbound-anchor.tdir/keys/unbound-control-setup
vendored
Executable file
167
testdata/10-unbound-anchor.tdir/keys/unbound-control-setup
vendored
Executable file
@ -0,0 +1,167 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# unbound-control-setup.sh - set up SSL certificates for unbound-control
|
||||
#
|
||||
# Copyright (c) 2008, NLnet Labs. All rights reserved.
|
||||
#
|
||||
# This software is open source.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# Neither the name of the NLNET LABS nor the names of its contributors may
|
||||
# be used to endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# settings:
|
||||
|
||||
# directory for files
|
||||
DESTDIR=/usr/local/etc/unbound
|
||||
|
||||
# issuer and subject name for certificates
|
||||
SERVERNAME=petal
|
||||
CLIENTNAME=unbound-anchor
|
||||
|
||||
# validity period for certificates
|
||||
DAYS=7200
|
||||
|
||||
# size of keys in bits
|
||||
BITS=1536
|
||||
|
||||
# hash algorithm
|
||||
HASH=sha1
|
||||
|
||||
# base name for unbound server keys
|
||||
SVR_BASE=test_cert
|
||||
|
||||
# base name for unbound-control keys
|
||||
CTL_BASE=unbound_control
|
||||
|
||||
# we want -rw-r--- access (say you run this as root: grp=yes (server), all=no).
|
||||
umask 0026
|
||||
|
||||
# end of options
|
||||
|
||||
# functions:
|
||||
error ( ) {
|
||||
echo "$0 fatal error: $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# check arguments:
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-d)
|
||||
if test $# -eq 1; then error "need argument for -d"; fi
|
||||
DESTDIR="$2"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "unbound-control-setup.sh - setup SSL keys for unbound-control"
|
||||
echo " -d dir use directory to store keys and certificates."
|
||||
echo " default: $DESTDIR"
|
||||
echo "please run this command using the same user id that the "
|
||||
echo "unboun daemon uses, it needs read privileges."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# go!:
|
||||
echo "setup in directory $DESTDIR"
|
||||
cd "$DESTDIR" || error "could not cd to $DESTDIR"
|
||||
|
||||
# create certificate keys; do not recreate if they already exist.
|
||||
if test -f $SVR_BASE.key; then
|
||||
echo "$SVR_BASE.key exists"
|
||||
else
|
||||
echo "generating $SVR_BASE.key"
|
||||
openssl genrsa -out $SVR_BASE.key $BITS || error "could not genrsa"
|
||||
fi
|
||||
if test -f $CTL_BASE.key; then
|
||||
echo "$CTL_BASE.key exists"
|
||||
else
|
||||
echo "generating $CTL_BASE.key"
|
||||
openssl genrsa -out $CTL_BASE.key $BITS || error "could not genrsa"
|
||||
fi
|
||||
|
||||
# create self-signed cert for server
|
||||
cat >request.cfg <<EOF
|
||||
[req]
|
||||
default_bits=$BITS
|
||||
default_md=$HASH
|
||||
prompt=no
|
||||
distinguished_name=req_distinguished_name
|
||||
x509_extensions=v3_ca
|
||||
|
||||
[req_distinguished_name]
|
||||
commonName=$SERVERNAME
|
||||
emailAddress=$SERVERNAME
|
||||
|
||||
[v3_ca]
|
||||
keyUsage=digitalSignature, keyCertSign
|
||||
EOF
|
||||
test -f request.cfg || error "could not create request.cfg"
|
||||
|
||||
echo "create $SVR_BASE.pem (self signed certificate)"
|
||||
openssl req -key $SVR_BASE.key -config request.cfg -new -x509 -days $DAYS -out $SVR_BASE.pem || error "could not create $SVR_BASE.pem"
|
||||
# create trusted usage pem
|
||||
openssl x509 -in $SVR_BASE.pem -addtrust serverAuth -out $SVR_BASE"_trust.pem"
|
||||
|
||||
# create client request and sign it, piped
|
||||
cat >request.cfg <<EOF
|
||||
[req]
|
||||
default_bits=$BITS
|
||||
default_md=$HASH
|
||||
prompt=no
|
||||
distinguished_name=req_distinguished_name
|
||||
|
||||
[req_distinguished_name]
|
||||
commonName=$CLIENTNAME
|
||||
EOF
|
||||
test -f request.cfg || error "could not create request.cfg"
|
||||
|
||||
echo "create $CTL_BASE.pem (signed client certificate)"
|
||||
openssl req -key $CTL_BASE.key -config request.cfg -new | openssl x509 -req -days $DAYS -CA $SVR_BASE"_trust.pem" -CAkey $SVR_BASE.key -CAcreateserial -$HASH -out $CTL_BASE.pem
|
||||
test -f $CTL_BASE.pem || error "could not create $CTL_BASE.pem"
|
||||
# create trusted usage pem
|
||||
# openssl x509 -in $CTL_BASE.pem -addtrust clientAuth -out $CTL_BASE"_trust.pem"
|
||||
|
||||
# see details with openssl x509 -noout -text < $SVR_BASE.pem
|
||||
# echo "create $CTL_BASE""_browser.pfx (web client certificate)"
|
||||
# echo "create webbrowser PKCS#12 .PFX certificate file. In Firefox import in:"
|
||||
# echo "preferences - advanced - encryption - view certificates - your certs"
|
||||
# echo "empty password is used, simply click OK on the password dialog box."
|
||||
# openssl pkcs12 -export -in $CTL_BASE"_trust.pem" -inkey $CTL_BASE.key -name "unbound remote control client cert" -out $CTL_BASE"_browser.pfx" -password "pass:" || error "could not create browser certificate"
|
||||
|
||||
# remove unused permissions
|
||||
chmod o-rw $SVR_BASE.pem $SVR_BASE.key $CTL_BASE.pem $CTL_BASE.key
|
||||
|
||||
# remove crap
|
||||
rm -f request.cfg
|
||||
rm -f $CTL_BASE"_trust.pem" $SVR_BASE"_trust.pem" $SVR_BASE"_trust.srl"
|
||||
|
||||
echo "Setup success. Certificates created. Enable in unbound.conf file to use"
|
||||
|
||||
exit 0
|
21
testdata/10-unbound-anchor.tdir/keys/unbound_control.key
vendored
Normal file
21
testdata/10-unbound-anchor.tdir/keys/unbound_control.key
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIDfAIBAAKBwQC2p0MTVVEfvOpaWlI6rLKGxaHfw/4JUxXCwDHRkkyB0hkISRMx
|
||||
8imB+io0aY2Uck9zl0BTgPaKtFeA0+lukZk75keOuATPFZwbCGs+6Tx5AoN4+NzI
|
||||
aVay5AuO8E1u6AVdmcAqByP+R92yz5f3T93/cSsYzqPZ6Y1wO9sabtrkGTYwnfMg
|
||||
nSttyvlBIhRDWbEO+rWL2CCi0JtrnpiK8sa2ysQCq9Y6ZiGjT9PEWIZwkxQ6y5TI
|
||||
WVtyitoknpDheZcCAwEAAQKBwAgeXSPh2e5ANmZ3t0n2XSUSacSJcKQ3djMm2dAH
|
||||
4bCvhv9QSDMjIWcumGul+W4Muq1XnrtXcx3tMCqAwNJyVE5OSQX19fjCbCLjd+je
|
||||
8xop23AoF6As1nazHjRnR/nTBD7QNx2xbaW8RNbaGpTe2G2lpdbg9myRpyqiB8Pk
|
||||
73x/AQcPqm4SHBJS+kU/Q9k9yZRHGQ/PhYlvAmY0SCndew28Pcs+IdCI32k7e/aP
|
||||
SCEQvVqKeIiSJ0Zj8RSk8Pz1cQJhANtNsvcEa2V8NxI9yL2zwvBXwoBuU+d9Pszt
|
||||
Ooqc/kmvU0FV06HgiIPtTSoHLI7Zh9h5Xn4DFGmtS8WeGhwSVCN1iwcW9F2ldgAw
|
||||
LXcoXjEK21KXYFNAYeo07vul/Ly/yQJhANU3lM8hAqq7FB4R5zgUCcp08FOVA8tl
|
||||
kEK1JoAdfp6Wv4M2xGJ6tmKcf92r0F8zBDV6oZX/dtPwFzWhBZUi+zaA8PcEqbwt
|
||||
CJtmM5ycoX6kkkIfXtAVNZiTIYHn01beXwJgQBFA+V03KtzREeku3gzIJILe9bpF
|
||||
lNlIIYIkmh4nQ8uOnQW/4AjCmRgYdPDHmav/PcSnUFUB/6V6/26i3hSUtA9A4H9a
|
||||
QIl4IbHxdmA6tEUhsc07fNbQRCXWs3nYjiPRAmEAjDe4MhsYYOUUzs2hTFzJL46F
|
||||
ucHGtA0/uM7e2eQLsAmdOpJaxhTDOsiGwmXKa8DmJLFX8IgHQkujR850GGbf5DEZ
|
||||
xqkXYrwO6/tjN7w97EYYNUniFV/NVmBz6bVmY7trAmAvvg7MoBlb/o6nwoCQqnUM
|
||||
QyjIy9A0t8+KHNMFSQwUldG+HIwiU4/7y2zCqBYJg8NOjrdj/3+73A24rP8wRp15
|
||||
zqQCS7mLLWmYx7pWE1ZHN8eY3xGoHmr7LzlB+dzYG+w=
|
||||
-----END RSA PRIVATE KEY-----
|
14
testdata/10-unbound-anchor.tdir/keys/unbound_control.pem
vendored
Normal file
14
testdata/10-unbound-anchor.tdir/keys/unbound_control.pem
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICNjCCAV8CCQCbt2WrJa/ewzANBgkqhkiG9w0BAQUFADAmMQ4wDAYDVQQDEwVw
|
||||
ZXRhbDEUMBIGCSqGSIb3DQEJARYFcGV0YWwwHhcNMTMwMTE3MTE1MjQ1WhcNMzIx
|
||||
MDA0MTE1MjQ1WjAZMRcwFQYDVQQDEw51bmJvdW5kLWFuY2hvcjCB3zANBgkqhkiG
|
||||
9w0BAQEFAAOBzQAwgckCgcEAtqdDE1VRH7zqWlpSOqyyhsWh38P+CVMVwsAx0ZJM
|
||||
gdIZCEkTMfIpgfoqNGmNlHJPc5dAU4D2irRXgNPpbpGZO+ZHjrgEzxWcGwhrPuk8
|
||||
eQKDePjcyGlWsuQLjvBNbugFXZnAKgcj/kfdss+X90/d/3ErGM6j2emNcDvbGm7a
|
||||
5Bk2MJ3zIJ0rbcr5QSIUQ1mxDvq1i9ggotCba56YivLGtsrEAqvWOmYho0/TxFiG
|
||||
cJMUOsuUyFlbcoraJJ6Q4XmXAgMBAAEwDQYJKoZIhvcNAQEFBQADgcEAhc3wYcbD
|
||||
Uu9Osbu3bhbxLCkhedq/3weEO8RDU3AyB8diioAikagIOb99UeVE3WIds+JIPD6J
|
||||
mK5UvS+lPR8SEOMRd0H91bEEp1Zn+gHAS/Z7k/x9t38Xk1N0jOnElc6n4vl42KLO
|
||||
z2laJWcte7YXjzFjaNxP9fsGgEx1vRxcjtpXQWSY+oj+RVm5kRs5WKX5MCyD/p+y
|
||||
Xitg7/a0ITKbW1GpVwaX6nPaeoze68m3qmy64l080XCna3igbhi3h2ay
|
||||
-----END CERTIFICATE-----
|
21
testdata/10-unbound-anchor.tdir/keys/unbound_server.key
vendored
Normal file
21
testdata/10-unbound-anchor.tdir/keys/unbound_server.key
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIDfQIBAAKBwQC1xQ/Kca6zszZbcCtdOTIH2Uy2gOy/DfabMUU7TmNPm0dVE0NJ
|
||||
RuN+Rm304SonpwghfP2/ULZNnuDgpG03/32yI7k/VzG6iA4hiF7tT/KAAWC/+2l1
|
||||
QCsawCV2bSrFK0VhcZr7ALqXd8vkDaQ867K029ypjOQtAJ85qdO3mERy7TGtdUcu
|
||||
O6hLeVet419YeQ2F8cfNxn63d7bOzNGLPW5xwaCd3UcgD+Ib0k4xfFvbinvPQUeU
|
||||
J/i4YDWexFYSL+ECAwEAAQKBwCLXXQl+9O+5AEhSnd1Go1Jh0pSA7eBJOuXQcebG
|
||||
Rb7ykp+6C4G2NtDziwwPRNdI6wQQQ0sym18RfyVQHydGr78/nbiIbB3HCn5e92Mh
|
||||
mefzW6ow9Kvm2txLzGKA1lvoyRbNm81jnG/eygi3u7Nqd5PNv+4dHj2RkTlmxOeh
|
||||
qnDMVP5md8uZPv6lYNnrnIzvLCR5vnPNdVwn89AqzI85IcDZdy0R9ZX4NBbsDgAU
|
||||
6ig6uXuRXvSGiyJ/OUXSrnogaQJhAOjvkHUhVZQkPOxO90TNH4j0GdKKtbSWxIdz
|
||||
lKfuJeBAEqs0TL+C6vbS81Xw3W1alyDdUBk3rJMOBqW6Ryq5HNL+j5H+Jfsh7fvc
|
||||
Yle+5wHGci0P9zCFZCrY8It7n9XFIwJhAMfEi6oJa2G8waPJ1bQhxka82Tf9pnKM
|
||||
XCn/1BBOFjVIx5F842cpA+zp5a62GENTGYPQTTRBB/2/ZwnW5aIkrlg54AtmbqBZ
|
||||
Oh+2kJdJQD/tfoVmc5soUE2ScTHadK5RKwJhAN4w9kjkXS+MSZjX0kIMsBIBVkhh
|
||||
C+aREjJqa9ir7/Ey7RvmLXdYuCxtGLRXp7/R8+rjcK49Tx6O+IRJZe042mfhbq3C
|
||||
EhS1Tr86f4xXix9EXlDhs9bSxrOgcAN9Dv/opQJhAK7eBcPaav0rVfYh/8emqQHS
|
||||
3fJ9Pu6WnzbEksWTFS2ff9KDGCx9YspIFJ5TF/oXDAaumGZdZrlgirm6O1kr8tGY
|
||||
F97i04PZl1+bWAaWQH+1TUNI43m2WFUPE7coG2tb8QJgcddDg9VlXliZqgcETZfJ
|
||||
kJmYETxrcSn3ao6v116N8yxhEgUgjkmsCTiFgx36iDVnXwK6PIt+sIu8MC7eYNa3
|
||||
berrv/M21K0LRn20IWRxvUobG070weHCAgkko7fTWgr2
|
||||
-----END RSA PRIVATE KEY-----
|
14
testdata/10-unbound-anchor.tdir/keys/unbound_server.pem
vendored
Normal file
14
testdata/10-unbound-anchor.tdir/keys/unbound_server.pem
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICFzCCAUACCQDO660L5y5LGDANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVw
|
||||
ZXRhbDAeFw0xMDA5MzAxMzQzMDFaFw0zMDA2MTcxMzQzMDFaMBAxDjAMBgNVBAMT
|
||||
BXBldGFsMIHfMA0GCSqGSIb3DQEBAQUAA4HNADCByQKBwQC1xQ/Kca6zszZbcCtd
|
||||
OTIH2Uy2gOy/DfabMUU7TmNPm0dVE0NJRuN+Rm304SonpwghfP2/ULZNnuDgpG03
|
||||
/32yI7k/VzG6iA4hiF7tT/KAAWC/+2l1QCsawCV2bSrFK0VhcZr7ALqXd8vkDaQ8
|
||||
67K029ypjOQtAJ85qdO3mERy7TGtdUcuO6hLeVet419YeQ2F8cfNxn63d7bOzNGL
|
||||
PW5xwaCd3UcgD+Ib0k4xfFvbinvPQUeUJ/i4YDWexFYSL+ECAwEAATANBgkqhkiG
|
||||
9w0BAQUFAAOBwQBBkX9KDP2RXbg+xPmdJ4P6CwvA5x1LZwC++ydVx4NlvT0pWicD
|
||||
ZUnXjcWAJlkeOuUBAqFG7WHTrXpUUAjmdqFVq2yFjteUYBdrFz0RDB2jM9feeKYO
|
||||
mTgxdZyT9a6humxCxt5VfgT02axLjm/2AqCyFPMbf4PASoJDln01AEuZLZ8Xl2gV
|
||||
bYHMnHTGoD1Hu6FNEzRgkMC6XT8X3YjHvzQhpc/qL5wEfEsinQGdX4twsuWbf8xd
|
||||
q7miNnkO8vd0maw=
|
||||
-----END CERTIFICATE-----
|
21
testdata/10-unbound-anchor.tdir/petal.key
vendored
Normal file
21
testdata/10-unbound-anchor.tdir/petal.key
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIDfQIBAAKBwQC1xQ/Kca6zszZbcCtdOTIH2Uy2gOy/DfabMUU7TmNPm0dVE0NJ
|
||||
RuN+Rm304SonpwghfP2/ULZNnuDgpG03/32yI7k/VzG6iA4hiF7tT/KAAWC/+2l1
|
||||
QCsawCV2bSrFK0VhcZr7ALqXd8vkDaQ867K029ypjOQtAJ85qdO3mERy7TGtdUcu
|
||||
O6hLeVet419YeQ2F8cfNxn63d7bOzNGLPW5xwaCd3UcgD+Ib0k4xfFvbinvPQUeU
|
||||
J/i4YDWexFYSL+ECAwEAAQKBwCLXXQl+9O+5AEhSnd1Go1Jh0pSA7eBJOuXQcebG
|
||||
Rb7ykp+6C4G2NtDziwwPRNdI6wQQQ0sym18RfyVQHydGr78/nbiIbB3HCn5e92Mh
|
||||
mefzW6ow9Kvm2txLzGKA1lvoyRbNm81jnG/eygi3u7Nqd5PNv+4dHj2RkTlmxOeh
|
||||
qnDMVP5md8uZPv6lYNnrnIzvLCR5vnPNdVwn89AqzI85IcDZdy0R9ZX4NBbsDgAU
|
||||
6ig6uXuRXvSGiyJ/OUXSrnogaQJhAOjvkHUhVZQkPOxO90TNH4j0GdKKtbSWxIdz
|
||||
lKfuJeBAEqs0TL+C6vbS81Xw3W1alyDdUBk3rJMOBqW6Ryq5HNL+j5H+Jfsh7fvc
|
||||
Yle+5wHGci0P9zCFZCrY8It7n9XFIwJhAMfEi6oJa2G8waPJ1bQhxka82Tf9pnKM
|
||||
XCn/1BBOFjVIx5F842cpA+zp5a62GENTGYPQTTRBB/2/ZwnW5aIkrlg54AtmbqBZ
|
||||
Oh+2kJdJQD/tfoVmc5soUE2ScTHadK5RKwJhAN4w9kjkXS+MSZjX0kIMsBIBVkhh
|
||||
C+aREjJqa9ir7/Ey7RvmLXdYuCxtGLRXp7/R8+rjcK49Tx6O+IRJZe042mfhbq3C
|
||||
EhS1Tr86f4xXix9EXlDhs9bSxrOgcAN9Dv/opQJhAK7eBcPaav0rVfYh/8emqQHS
|
||||
3fJ9Pu6WnzbEksWTFS2ff9KDGCx9YspIFJ5TF/oXDAaumGZdZrlgirm6O1kr8tGY
|
||||
F97i04PZl1+bWAaWQH+1TUNI43m2WFUPE7coG2tb8QJgcddDg9VlXliZqgcETZfJ
|
||||
kJmYETxrcSn3ao6v116N8yxhEgUgjkmsCTiFgx36iDVnXwK6PIt+sIu8MC7eYNa3
|
||||
berrv/M21K0LRn20IWRxvUobG070weHCAgkko7fTWgr2
|
||||
-----END RSA PRIVATE KEY-----
|
14
testdata/10-unbound-anchor.tdir/petal.pem
vendored
Normal file
14
testdata/10-unbound-anchor.tdir/petal.pem
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICFzCCAUACCQDO660L5y5LGDANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVw
|
||||
ZXRhbDAeFw0xMDA5MzAxMzQzMDFaFw0zMDA2MTcxMzQzMDFaMBAxDjAMBgNVBAMT
|
||||
BXBldGFsMIHfMA0GCSqGSIb3DQEBAQUAA4HNADCByQKBwQC1xQ/Kca6zszZbcCtd
|
||||
OTIH2Uy2gOy/DfabMUU7TmNPm0dVE0NJRuN+Rm304SonpwghfP2/ULZNnuDgpG03
|
||||
/32yI7k/VzG6iA4hiF7tT/KAAWC/+2l1QCsawCV2bSrFK0VhcZr7ALqXd8vkDaQ8
|
||||
67K029ypjOQtAJ85qdO3mERy7TGtdUcuO6hLeVet419YeQ2F8cfNxn63d7bOzNGL
|
||||
PW5xwaCd3UcgD+Ib0k4xfFvbinvPQUeUJ/i4YDWexFYSL+ECAwEAATANBgkqhkiG
|
||||
9w0BAQUFAAOBwQBBkX9KDP2RXbg+xPmdJ4P6CwvA5x1LZwC++ydVx4NlvT0pWicD
|
||||
ZUnXjcWAJlkeOuUBAqFG7WHTrXpUUAjmdqFVq2yFjteUYBdrFz0RDB2jM9feeKYO
|
||||
mTgxdZyT9a6humxCxt5VfgT02axLjm/2AqCyFPMbf4PASoJDln01AEuZLZ8Xl2gV
|
||||
bYHMnHTGoD1Hu6FNEzRgkMC6XT8X3YjHvzQhpc/qL5wEfEsinQGdX4twsuWbf8xd
|
||||
q7miNnkO8vd0maw=
|
||||
-----END CERTIFICATE-----
|
10
testdata/10-unbound-anchor.tdir/signit
vendored
Normal file
10
testdata/10-unbound-anchor.tdir/signit
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
# PKCS7 sign it
|
||||
#infile=127.0.0.1/no_more_keys.xml
|
||||
#outfile=127.0.0.1/no_more_keys.p7s
|
||||
infile=127.0.0.1/root.xml
|
||||
outfile=127.0.0.1/root.p7s
|
||||
set -v
|
||||
|
||||
openssl smime -sign -in $infile -out $outfile -inkey test_cert.key -signer test_cert.pem -outform DER -binary || echo "could not sign"
|
||||
openssl smime -verify -content $infile -in $outfile -inform DER -CAfile test_cert.pem || echo "could not verify"
|
||||
openssl pkcs7 -print_certs -inform der -in $outfile -text
|
21
testdata/10-unbound-anchor.tdir/test_cert.key
vendored
Normal file
21
testdata/10-unbound-anchor.tdir/test_cert.key
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIDfAIBAAKBwQC48GhhmIU66TZKc3QiyF4L5bsm8Aly/y2SzLP+GACepK0OcOtD
|
||||
i2sXrTtoJDvGOPZ9ICqmIy8u/Q/cK26txNEeZFcClLcYF/U+NaqjEwrwkHEIgc3g
|
||||
8qnKrhzM61I8foAWVT7cqxFHDKYuClNITXk1i//Yzpnf9wvVKQ51W9UOtm/WA7g4
|
||||
IDHCuAjocyyNC3B7XqYawFDOsdMI4ZW7hC0hIRQOvBkvbvY8WxmsSkdd30u1KmoI
|
||||
Sg4y6OvnikrEEQkCAwEAAQKBwQC3hQlv37RF82sGkm8qnP6Ge+AuEYCu9v44cJ4k
|
||||
hZkH1I5OiEtN6anKAwOyolIWsCwZmrP3zW5jCIiWiRr5oReLOzMEwqK2a//XTdYY
|
||||
oSr38b3ZHUY59VP8Zq75woMGuNed35kAmGxzDRP1gI/TmvTvaHlqYyvxBtxnZJij
|
||||
Za1CrT+a9JvR6hI8xXrE33CF0T6JO1v3v0HeBuve5+83cCHKo+GyqIBjL3FJgefZ
|
||||
EsPz6rGnPDKTYgMyaljFV3LI5ikCYQDlaBnyiWk1C7tYO5x3CRoHoiuiiREZCncK
|
||||
QkSxjiDoSP0rc+3BQp2kG3yy6S9mN4qMQPELEtBa6bORogxNK+Pxg8TRI/+xgeFt
|
||||
bod5Bd4pfl6Y5hXm21JwELFlOzPI3PMCYQDOYK6Z7vegiOJyyAJXMjcI07H8S0Gr
|
||||
SZW8f4tHRzO+RrRpR5ANzarELX7nF/Qj5mPXiZNiiMDGocxqkNzIa5HFLOqBhRkv
|
||||
o7yC1Cj582dUBFHyEbsZxR6UMTPLdE3UaRMCYACC1Nv3dmaJ2ib+KwEQ4h/2Ooao
|
||||
K4OUxGMfdqu2l1gtIXNBVNxDW7qL3SFA57wgj4x0cJUHu7MYJjBC3igl2uIk2wFk
|
||||
RSOOGIR35JFec/o/r9JDYPUcs/hP8TU6hokCBQJgHbH/rZqa+vh3TPjGjXFmRdjg
|
||||
JWNWwaTG7OaVTd5K7bgSwYtQiQvs5Gl/dxUVRg0ilKLxGB6BTpN9bGAHxLbltK9v
|
||||
1s8l/praxyBr/PsvBQHSILi4aU7ZxY0G3OGRSV0NAmBx28Msdgc0yHh3qSkbwVEr
|
||||
gr7av1iOH73ee+o4CmMWXYUBHOMW5Su0s0QHjNGDMiRiRoCvzYqdLcJj9/sFJxOT
|
||||
CM35WGGeKDMNubX7C6YroQ91q7kUmhi7HHY3QOyhCDU=
|
||||
-----END RSA PRIVATE KEY-----
|
15
testdata/10-unbound-anchor.tdir/test_cert.pem
vendored
Normal file
15
testdata/10-unbound-anchor.tdir/test_cert.pem
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICWTCCAYKgAwIBAgIJAN5YIkuCvJf5MA0GCSqGSIb3DQEBBQUAMCYxDjAMBgNV
|
||||
BAMTBXBldGFsMRQwEgYJKoZIhvcNAQkBFgVwZXRhbDAeFw0xMzAxMTcxMTUyNDVa
|
||||
Fw0zMjEwMDQxMTUyNDVaMCYxDjAMBgNVBAMTBXBldGFsMRQwEgYJKoZIhvcNAQkB
|
||||
FgVwZXRhbDCB3zANBgkqhkiG9w0BAQEFAAOBzQAwgckCgcEAuPBoYZiFOuk2SnN0
|
||||
IsheC+W7JvAJcv8tksyz/hgAnqStDnDrQ4trF607aCQ7xjj2fSAqpiMvLv0P3Ctu
|
||||
rcTRHmRXApS3GBf1PjWqoxMK8JBxCIHN4PKpyq4czOtSPH6AFlU+3KsRRwymLgpT
|
||||
SE15NYv/2M6Z3/cL1SkOdVvVDrZv1gO4OCAxwrgI6HMsjQtwe16mGsBQzrHTCOGV
|
||||
u4QtISEUDrwZL272PFsZrEpHXd9LtSpqCEoOMujr54pKxBEJAgMBAAGjDzANMAsG
|
||||
A1UdDwQEAwIChDANBgkqhkiG9w0BAQUFAAOBwQCaA3ys5hDPMNV1oXIxH6u2KfAX
|
||||
C9tYJId/SR0x8whsZuNaSEZAgImdM5dnyWdjey8Pio772E9/F2aUBGFkdadZx4My
|
||||
d7hBfEi/NECEKs86k9g0ijbin41NKtnajb6GwyNQ9vDx7Z5FS8BZ3CD0BZIdCQUE
|
||||
gKuDSWBROQU3tqrjdk2QTwGQkj2mgzT871Jn1MwZw0mczPjS1y469Ejym8wi3uCd
|
||||
EboDOoGBCpmUQbxBv6JI75cUCdmNNEwjQjZ0XQw=
|
||||
-----END CERTIFICATE-----
|
15
testdata/ctrl_itr.tdir/bad_control.key
vendored
Normal file
15
testdata/ctrl_itr.tdir/bad_control.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQDti51Z6qASvAjPFFhLLlq8BwtsnmfqMPMn57dKAghb4OifeL4G
|
||||
SLOE02/hKDkdkOvaUG2UqDNh2OoPTuJk4A+mG2LJoziFhHKlIebo9v2YiFWOBVtO
|
||||
DWc3tXPT1IlSEN0xnAGelMmeLcPeCPe+A5IDlIHzF/+YiDgS38S9dL17owIDAQAB
|
||||
AoGAG3w/DatfMCu/nS5OdQx9BSqPgNbnUSqux9xA0fhgPTlN0T3oRtPcqa7JUDUW
|
||||
PryI/a62ry+zGkw98N2AxolCZg3N7Z3vuRx2FMcKKNwpTzDmcZW7TmMk5FPof6gE
|
||||
PnYl/ff0w+kxqA+L2EexH3Xi6ApLSZcjyzKWj+dL2AuT9gkCQQD3dPitwITxgCAD
|
||||
IaHw23e3FRkM/hw1Gp8bt6nbuxitVxxpO96q1EQ+fCy/mf0bMEJDp3xzMEIfP3r4
|
||||
GmNbaxa1AkEA9b8LeBLbQ2cm2+UMeUgygBsRirdUQ786auqH38Jbvi/j6S9sDl2x
|
||||
q1vRtikEBZJWfkhsOzrzwFDKe1bI/EEn9wJAAzOwRA9JqRZPU7sLrWIpmmTbfh+L
|
||||
neRKSsGFoSI6n4ORCouLxgoZF/XjXldPvxpQwS9ZnOPy9xSLMsqknno0QQJAeDtA
|
||||
IT8Yh6GwIWWu9KeeDY8wxe1sDLlCm4yjbZZpzGMh3rSU6XJtuqjxsW3fydoO9zn3
|
||||
ugLdvvnIFxAexUwbgQJBANyM13xcObfUJOj9rjlGCh0CDh/04ONl8SH8HBnM8guA
|
||||
RJI5S6vBHweVRopEZcF1sQm6wMf3ej/sGkyyNvJxRkY=
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/ctrl_itr.tdir/bad_control.pem
vendored
Normal file
11
testdata/ctrl_itr.tdir/bad_control.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBozCCAQwCCQDd5/rocjG5vDANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkyNjEyMjQ0NFoXDTI4MDYxMzEyMjQ0NFowGjEYMBYGA1UE
|
||||
AxMPdW5ib3VuZC1jb250cm9sMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDt
|
||||
i51Z6qASvAjPFFhLLlq8BwtsnmfqMPMn57dKAghb4OifeL4GSLOE02/hKDkdkOva
|
||||
UG2UqDNh2OoPTuJk4A+mG2LJoziFhHKlIebo9v2YiFWOBVtODWc3tXPT1IlSEN0x
|
||||
nAGelMmeLcPeCPe+A5IDlIHzF/+YiDgS38S9dL17owIDAQABMA0GCSqGSIb3DQEB
|
||||
BQUAA4GBAHpvcKqY48X9WsqogV16L+zT7iXhZ4tySA9EBk1a+0gud/iDPKSBi7mK
|
||||
4rzphVfb4S207dVmTG+1WNpa6l3pTGML6XLElxqIu/kr7w4cF0rKvZxWPsBRqYjH
|
||||
5HrK8CrQ0+YvUHXiu7IaACLGvKXY4Tqa3HQyvEtzLWJ4HhOrGx8F
|
||||
-----END CERTIFICATE-----
|
15
testdata/ctrl_itr.tdir/bad_server.key
vendored
Normal file
15
testdata/ctrl_itr.tdir/bad_server.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICWwIBAAKBgQC9hurNHBtB7QFEuPJOnCylUWUF2/US3v9yQQQXnstuXMQXRaq1
|
||||
1uviLmwaGurV9tngX59HITsBT74NQrtFKfEDLViLrm2arAM9Ozsn4tnv30HXPRDj
|
||||
UOc1M05Q7UzjaSrOv+TkPEqyhtUyaP1DYo0bcmbxtSkYc2ZEWCwhPklUwQIDAQAB
|
||||
AoGATjzZxN4ramWaNnJapJTX4U7eczK/0pB3xwSL2exVcjOdRzYdKH+WVIJxYb1m
|
||||
3/jNLFCNAeH356yxeevoPr73nG75YJ9I1ZWQWTnS3SDK6JD1+3pmAD0bQWFoitpf
|
||||
FoSH9H4X5gFB5vCZ99YVoYH1UXWPcgvUHwxz0voImt6lCKECQQD4YQ4A3M0+Ki8v
|
||||
Hl+5FKULnS0UtBkweCvkF/X1zZRjjYr6hLnqldFkkgTBKWe17pUXX0nwRMbP1YZX
|
||||
i+vDq5JNAkEAw1eYsmC0nVAMawo57N6LYavGv/n5u1cvpTpKDtn4cXH0Uqq13Kyu
|
||||
2FUTzan2NhCEK78UzbWaeewBJmxYda1+RQJAdShKk6uTAEyjnwUjv8h2JWlJN2fQ
|
||||
LeWxRlDrCruiz+aW9J4gl/99GoQpy/c83TshhjnDRZsbcDNWv/rXBZ/rTQJAFQva
|
||||
CtX6f7yBKgM3DHtJvyM3zbVMH9Ab9QxbsE/xwZ9KeKGl6Hm+eNZpxM3cFiUfaGs0
|
||||
/ZjkZOB1m0MvILaplQJAXC3PJ/E+87banGZRJl5qtS6/HoX5lH9TPkL8Essy7ANO
|
||||
2BT2OTQawD1A+VKIrQHXs085Of8tQUfrfHHt7s3Kqg==
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/ctrl_itr.tdir/bad_server.pem
vendored
Normal file
11
testdata/ctrl_itr.tdir/bad_server.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBmzCCAQQCCQCDugnhq8B6LzANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkyNjEyMjQ0M1oXDTI4MDYxMzEyMjQ0M1owEjEQMA4GA1UE
|
||||
AxMHdW5ib3VuZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvYbqzRwbQe0B
|
||||
RLjyTpwspVFlBdv1Et7/ckEEF57LblzEF0Wqtdbr4i5sGhrq1fbZ4F+fRyE7AU++
|
||||
DUK7RSnxAy1Yi65tmqwDPTs7J+LZ799B1z0Q41DnNTNOUO1M42kqzr/k5DxKsobV
|
||||
Mmj9Q2KNG3Jm8bUpGHNmRFgsIT5JVMECAwEAATANBgkqhkiG9w0BAQUFAAOBgQCy
|
||||
zGMW35/9xXoEWsuLFWUOaEKVq5DXuXtXbcMpDW6k2ELoraa305vh7Zwhj5JSqfcm
|
||||
O0xyqIzXvz/cYdyOTgEkdMDZ/EvQsxKTwvj6eA4614yB1r3Ju5eZd4Gpo6BHhSpu
|
||||
oqsrr0duJ+JOANTyaBplIxM1sjHbR4FGtmrFknBYBQ==
|
||||
-----END CERTIFICATE-----
|
26
testdata/ctrl_itr.tdir/ctrl_itr.conf
vendored
Normal file
26
testdata/ctrl_itr.tdir/ctrl_itr.conf
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
server:
|
||||
verbosity: 2
|
||||
# num-threads: 1
|
||||
interface: 127.0.0.1
|
||||
port: @PORT@
|
||||
use-syslog: no
|
||||
directory: ""
|
||||
pidfile: "unbound.pid"
|
||||
chroot: ""
|
||||
username: ""
|
||||
do-not-query-localhost: no
|
||||
# disabled validator
|
||||
module-config: "iterator"
|
||||
remote-control:
|
||||
control-enable: yes
|
||||
control-interface: 127.0.0.1
|
||||
# control-interface: ::1
|
||||
control-port: @CONTROL_PORT@
|
||||
server-key-file: "unbound_server.key"
|
||||
server-cert-file: "unbound_server.pem"
|
||||
control-key-file: "unbound_control.key"
|
||||
control-cert-file: "unbound_control.pem"
|
||||
forward-zone:
|
||||
name: "."
|
||||
forward-addr: "127.0.0.1@@TOPORT@"
|
||||
|
16
testdata/ctrl_itr.tdir/ctrl_itr.dsc
vendored
Normal file
16
testdata/ctrl_itr.tdir/ctrl_itr.dsc
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
BaseName: ctrl_itr
|
||||
Version: 1.0
|
||||
Description: iterator only test unbound-control
|
||||
CreationDate: Thu Jan 16 14:08:12 CET 2014
|
||||
Maintainer: dr. W.C.A. Wijngaards
|
||||
Category:
|
||||
Component:
|
||||
CmdDepends:
|
||||
Depends:
|
||||
Help:
|
||||
Pre: ctrl_itr.pre
|
||||
Post: ctrl_itr.post
|
||||
Test: ctrl_itr.test
|
||||
AuxFiles:
|
||||
Passed:
|
||||
Failure:
|
13
testdata/ctrl_itr.tdir/ctrl_itr.post
vendored
Normal file
13
testdata/ctrl_itr.tdir/ctrl_itr.post
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
# #-- ctrl_itr.post --#
|
||||
# source the master var file when it's there
|
||||
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
|
||||
# source the test var file when it's there
|
||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||
#
|
||||
# do your teardown here
|
||||
. ../common.sh
|
||||
kill_pid $FWD_PID
|
||||
# it was stopped with unbound-control (if the test succeeded)
|
||||
kill $UNBOUND_PID >/dev/null 2>&1
|
||||
kill $UNBOUND_PID >/dev/null 2>&1
|
||||
exit 0
|
33
testdata/ctrl_itr.tdir/ctrl_itr.pre
vendored
Normal file
33
testdata/ctrl_itr.tdir/ctrl_itr.pre
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# #-- ctrl_itr.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
|
||||
|
||||
. ../common.sh
|
||||
get_random_port 3
|
||||
UNBOUND_PORT=$RND_PORT
|
||||
FWD_PORT=$(($RND_PORT + 1))
|
||||
CONTROL_PORT=$(($RND_PORT + 2))
|
||||
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
|
||||
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test
|
||||
echo "CONTROL_PORT=$CONTROL_PORT" >> .tpkg.var.test
|
||||
|
||||
# start forwarder
|
||||
get_ldns_testns
|
||||
$LDNS_TESTNS -p $FWD_PORT ctrl_itr.testns >fwd.log 2>&1 &
|
||||
FWD_PID=$!
|
||||
echo "FWD_PID=$FWD_PID" >> .tpkg.var.test
|
||||
|
||||
# make config file
|
||||
sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' -e 's/@CONTROL_PORT\@/'$CONTROL_PORT'/' < ctrl_itr.conf > ub.conf
|
||||
# start unbound in the background
|
||||
PRE="../.."
|
||||
$PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
|
||||
UNBOUND_PID=$!
|
||||
echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
|
||||
|
||||
cat .tpkg.var.test
|
||||
wait_ldns_testns_up fwd.log
|
||||
wait_unbound_up unbound.log
|
||||
|
39
testdata/ctrl_itr.tdir/ctrl_itr.test
vendored
Normal file
39
testdata/ctrl_itr.tdir/ctrl_itr.test
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# #-- ctrl_itr.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
|
||||
|
||||
PRE="../.."
|
||||
|
||||
# exit value is 1 on usage
|
||||
$PRE/unbound-control -c ub.conf forward_add +i bla bla
|
||||
if test $? -ne 0; then
|
||||
echo "wrong exit value."
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
exit 1
|
||||
else
|
||||
echo "exit value: OK"
|
||||
fi
|
||||
|
||||
|
||||
# test if the server is up.
|
||||
echo "> dig www.example.com."
|
||||
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile
|
||||
echo "> check answer"
|
||||
if grep "10.20.30.40" outfile; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "Not OK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "> cat logfiles"
|
||||
cat fwd.log
|
||||
cat unbound.log
|
||||
echo "> OK"
|
||||
exit 0
|
22
testdata/ctrl_itr.tdir/ctrl_itr.testns
vendored
Normal file
22
testdata/ctrl_itr.tdir/ctrl_itr.testns
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
; nameserver test file
|
||||
$ORIGIN example.com.
|
||||
$TTL 3600
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA NOERROR
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www IN A
|
||||
SECTION ANSWER
|
||||
www IN A 10.20.30.40
|
||||
ENTRY_END
|
||||
|
||||
ENTRY_BEGIN
|
||||
MATCH opcode qtype qname
|
||||
REPLY QR AA SERVFAIL
|
||||
ADJUST copy_id
|
||||
SECTION QUESTION
|
||||
www.example.net. IN A
|
||||
ENTRY_END
|
||||
|
15
testdata/ctrl_itr.tdir/unbound_control.key
vendored
Normal file
15
testdata/ctrl_itr.tdir/unbound_control.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQDD6DogNCsSeEa1u99+6PUVbGzjMzzei9MIK6s94+zcpp7OAOBa
|
||||
rzPA0vlyuNtUsEN3qwPomQQQmIgbT7OXkzC1wqioxwa609xoL8oW/I7e336rEyvH
|
||||
ST6JwUdIg0Lzg/USJ81eTwMnzYSd4Bpsqr9eP33ubaR7Gh/6o76loLOlcQIDAQAB
|
||||
AoGAFT3e35MIgI4uDJJ8X0RfHp2NCO2LUg4TKbWical/C0W9vlR1/x80G1pE1d2Z
|
||||
WotqJVWTrOq6eBox19RCgtLg2wPGk9uD62+9SDT37heWFlUCElWq50pQG6k9ThiG
|
||||
DDypkZyZ/52+DdWybiaQJkuK6O5qQXuNAtVJMpghu4GnHAECQQDsupnZUQDpapzr
|
||||
4FC4MSkL2+A1PRt6g4VhwoqOpJXaHfVnH6F7AwUuOLNwGdR5Cvv70pfJ7Jqg8L2m
|
||||
Kxyl5bORAkEA09rn34YQ0pHJdHidbl2kInIuYTz09+TO3LWwan17nISH9aaYvVDr
|
||||
p9x1B4Qzw9qyxT9oll7ze/5Rw/7C3AQj4QJAT2B2a+b8bkgAXBs4FbruL3rHoDJg
|
||||
P2FQXSpVOWU4lg2LlsuFYvDtUMVUbZdLplanjZXcral3Y9W1Ub2M+ped8QJAYQN+
|
||||
aRpge7ys7vwIw7B36Bo3aOncF+ScYe+FkM5Tm7II/JHEofT7ZQwMP1vnxIlSkgbe
|
||||
YvWqNB6a3NC99LikoQJBAM4UhDdRg63Tr6Idky6CQaH///zAN7nArJfffKGWFdw9
|
||||
DKrWpNqvYZtX/cfEJucKcRCm5YL8CKFYbQy4VoCxUcE=
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/ctrl_itr.tdir/unbound_control.pem
vendored
Normal file
11
testdata/ctrl_itr.tdir/unbound_control.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBozCCAQwCCQD6XaN6FzW/4DANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkxMTA5MDk0MFoXDTI4MDUyOTA5MDk0MFowGjEYMBYGA1UE
|
||||
AxMPdW5ib3VuZC1jb250cm9sMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD
|
||||
6DogNCsSeEa1u99+6PUVbGzjMzzei9MIK6s94+zcpp7OAOBarzPA0vlyuNtUsEN3
|
||||
qwPomQQQmIgbT7OXkzC1wqioxwa609xoL8oW/I7e336rEyvHST6JwUdIg0Lzg/US
|
||||
J81eTwMnzYSd4Bpsqr9eP33ubaR7Gh/6o76loLOlcQIDAQABMA0GCSqGSIb3DQEB
|
||||
BQUAA4GBAGFAXmaQHuFgAuc6HVhYZJdToxLBhfxGpot4oZNjcb1Cdoz3OL34MU1B
|
||||
9E5psj2PpGPIi8/RwoqBtAJHJ+J5cWngo03o4ZmdwKNSzaxlp141z/3rUtFqEHEC
|
||||
iO6gPCT3U7dt6MyC7r6vdMqyW6aldP3CtwD0gQziKAMoj+TAfAcq
|
||||
-----END CERTIFICATE-----
|
15
testdata/ctrl_itr.tdir/unbound_server.key
vendored
Normal file
15
testdata/ctrl_itr.tdir/unbound_server.key
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICWwIBAAKBgQC3F7Jsv2u01pLL9rFnjsMU/IaCFUIz/624DcaE84Z4gjMl5kWA
|
||||
3axQcqul1wlwSrbKwrony+d9hH/+MX0tZwvl8w3OmhmOAiaQ+SHCsIuOjVwQjX0s
|
||||
RLB61Pz5+PAiVvnPa9JIYB5QrK6DVEsxIHj8MOc5JKORrnESsFDh6yeMeQIDAQAB
|
||||
AoGAAuWoGBprTOA8UGfl5LqYkaNxSWumsYXxLMFjC8WCsjN1NbtQDDr1uAwodSZS
|
||||
6ujzvX+ZTHnofs7y64XC8k34HTOCD2zlW7kijWbT8YjRYFU6o9F5zUGD9RCan0ds
|
||||
sVscT2psLSzfdsmFAcbmnGdxYkXk2PC1FHtaqExxehralGUCQQDcqrg9uQKXlhQi
|
||||
XAaPr8SiWvtRm2a9IMMZkRfUWZclPHq6fCWNuUaCD+cTat4wAuqeknAz33VEosw3
|
||||
fXGsok//AkEA1GjIHXrOcSlpfVJb6NeOBugjRtZ7ZDT5gbtnMS9ob0qntKV6saaL
|
||||
CNmJwuD9Q3XkU5j1+uHvYGP2NzcJd2CjhwJACV0hNlVMe9w9fHvFN4Gw6WbM9ViP
|
||||
0oS6YrJafYNTu5vGZXVxLoNnL4u3NYa6aPUmuZXjNwBLfJ8f5VboZPf6RwJAINd2
|
||||
oYA8bSi/A755MX4qmozH74r4Fx1Nuq5UHTm8RwDe/0Javx8F/j9MWpJY9lZDEF3l
|
||||
In5OebPa/NyInSmW/wJAZuP9aRn0nDBkHYri++1A7NykMiJ/nH0mDECbnk+wxx0S
|
||||
LwqIetBhxb8eQwMg45+iAH7CHAMQ8BQuF/nFE6eotg==
|
||||
-----END RSA PRIVATE KEY-----
|
11
testdata/ctrl_itr.tdir/unbound_server.pem
vendored
Normal file
11
testdata/ctrl_itr.tdir/unbound_server.pem
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBmzCCAQQCCQDsNJ1UmphEFzANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwd1
|
||||
bmJvdW5kMB4XDTA4MDkxMTA5MDk0MFoXDTI4MDUyOTA5MDk0MFowEjEQMA4GA1UE
|
||||
AxMHdW5ib3VuZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtxeybL9rtNaS
|
||||
y/axZ47DFPyGghVCM/+tuA3GhPOGeIIzJeZFgN2sUHKrpdcJcEq2ysK6J8vnfYR/
|
||||
/jF9LWcL5fMNzpoZjgImkPkhwrCLjo1cEI19LESwetT8+fjwIlb5z2vSSGAeUKyu
|
||||
g1RLMSB4/DDnOSSjka5xErBQ4esnjHkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAZ
|
||||
9N0lnLENs4JMvPS+mn8C5m9bkkFITd32IiLjf0zgYpIUbFXH6XaEr9GNZBUG8feG
|
||||
l/6WRXnbnVSblI5odQ4XxGZ9inYY6qtW30uv76HvoKp+QZ1c3460ddR8NauhcCHH
|
||||
Z7S+QbLXi+r2JAhpPozZCjBHlRD0ixzA1mKQTJhJZg==
|
||||
-----END CERTIFICATE-----
|
BIN
testdata/ctrl_pipe.tdir/._bad_control.key
vendored
Normal file
BIN
testdata/ctrl_pipe.tdir/._bad_control.key
vendored
Normal file
Binary file not shown.
BIN
testdata/ctrl_pipe.tdir/._bad_control.pem
vendored
Normal file
BIN
testdata/ctrl_pipe.tdir/._bad_control.pem
vendored
Normal file
Binary file not shown.
BIN
testdata/ctrl_pipe.tdir/._bad_server.key
vendored
Normal file
BIN
testdata/ctrl_pipe.tdir/._bad_server.key
vendored
Normal file
Binary file not shown.
BIN
testdata/ctrl_pipe.tdir/._bad_server.pem
vendored
Normal file
BIN
testdata/ctrl_pipe.tdir/._bad_server.pem
vendored
Normal file
Binary file not shown.
BIN
testdata/ctrl_pipe.tdir/._ctrl_pipe.conf
vendored
Normal file
BIN
testdata/ctrl_pipe.tdir/._ctrl_pipe.conf
vendored
Normal file
Binary file not shown.
BIN
testdata/ctrl_pipe.tdir/._ctrl_pipe.dsc
vendored
Normal file
BIN
testdata/ctrl_pipe.tdir/._ctrl_pipe.dsc
vendored
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user