diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:37:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:37:14 +0000 |
commit | ea648e70a989cca190cd7403fe892fd2dcc290b4 (patch) | |
tree | e2b6b1c647da68b0d4d66082835e256eb30970e8 /bin/tests/system/staticstub/ns3 | |
parent | Initial commit. (diff) | |
download | bind9-upstream.tar.xz bind9-upstream.zip |
Adding upstream version 1:9.11.5.P4+dfsg.upstream/1%9.11.5.P4+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | bin/tests/system/staticstub/ns3/example.db.in | 30 | ||||
-rw-r--r-- | bin/tests/system/staticstub/ns3/example.org.db | 22 | ||||
-rw-r--r-- | bin/tests/system/staticstub/ns3/named.conf.in | 43 | ||||
-rwxr-xr-x | bin/tests/system/staticstub/ns3/sign.sh | 42 | ||||
-rw-r--r-- | bin/tests/system/staticstub/ns3/undelegated.db.in | 21 |
5 files changed, 158 insertions, 0 deletions
diff --git a/bin/tests/system/staticstub/ns3/example.db.in b/bin/tests/system/staticstub/ns3/example.db.in new file mode 100644 index 0000000..85fc1d8 --- /dev/null +++ b/bin/tests/system/staticstub/ns3/example.db.in @@ -0,0 +1,30 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$ORIGIN . +$TTL 300 ; 5 minutes +example IN SOA ns3.example. hostmaster.example. ( + 2010080900 ; serial + 20 ; refresh (20 seconds) + 20 ; retry (20 seconds) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) +example. NS ns4.example. ; fake +example. A 10.53.0.4 ; fake +example. AAAA ::1 ; fake + +ns4.example. A 10.53.0.4 +data.example. TXT "some" "test" "data" +data2.example. TXT "2nd test data" +data3.example. TXT "3rd test data" +data4.example. TXT "4th test data" + +sub.example. NS ns.sub.example. +ns.sub.example. A 10.53.0.4 diff --git a/bin/tests/system/staticstub/ns3/example.org.db b/bin/tests/system/staticstub/ns3/example.org.db new file mode 100644 index 0000000..becf883 --- /dev/null +++ b/bin/tests/system/staticstub/ns3/example.org.db @@ -0,0 +1,22 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$ORIGIN . +$TTL 300 ; 5 minutes +example.org IN SOA ns.example.org. hostmaster.example.org. ( + 2010080906 ; serial + 20 ; refresh (20 seconds) + 20 ; retry (20 seconds) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) +example.org. NS ns.example.org. +ns.example.org. A 10.53.0.3 + +data.example.org. TXT "example org data" diff --git a/bin/tests/system/staticstub/ns3/named.conf.in b/bin/tests/system/staticstub/ns3/named.conf.in new file mode 100644 index 0000000..b582196 --- /dev/null +++ b/bin/tests/system/staticstub/ns3/named.conf.in @@ -0,0 +1,43 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-sha256; +}; + +controls { + inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; }; +}; + +options { + query-source address 10.53.0.3; + notify-source 10.53.0.3; + transfer-source 10.53.0.3; + port @PORT@; + pid-file "named.pid"; + listen-on { 10.53.0.3; }; + listen-on-v6 { none; }; + recursion no; + notify no; +}; + +EXAMPLE_ZONE_PLACEHOLDER + +zone "example.org" { + type master; + file "example.org.db"; +}; + +zone "undelegated" { + type master; + file "undelegated.db.signed"; +}; diff --git a/bin/tests/system/staticstub/ns3/sign.sh b/bin/tests/system/staticstub/ns3/sign.sh new file mode 100755 index 0000000..32af7d0 --- /dev/null +++ b/bin/tests/system/staticstub/ns3/sign.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright (C) Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# See the COPYRIGHT file distributed with this work for additional +# information regarding copyright ownership. + +SYSTEMTESTTOP=../.. +. $SYSTEMTESTTOP/conf.sh + +zone=example. +infile=example.db.in +zonefile=example.db + +(cd ../ns4 && $SHELL -e sign.sh ) + +cp ../ns4/dsset-sub.example$TP . + +keyname1=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone $zone` +keyname2=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 2048 -f KSK -n zone $zone` +cat $infile $keyname1.key $keyname2.key > $zonefile + +$SIGNER -g -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1 + +# Configure the resolving server with a trusted key. +keyfile_to_trusted_keys $keyname2 > trusted.conf + +zone=undelegated +infile=undelegated.db.in +zonefile=undelegated.db +keyname1=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone $zone` +keyname2=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 2048 -f KSK -n zone $zone` +cat $infile $keyname1.key $keyname2.key > $zonefile + +$SIGNER -g -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1 + +keyfile_to_trusted_keys $keyname2 >> trusted.conf +cp trusted.conf ../ns2/trusted.conf diff --git a/bin/tests/system/staticstub/ns3/undelegated.db.in b/bin/tests/system/staticstub/ns3/undelegated.db.in new file mode 100644 index 0000000..c85337d --- /dev/null +++ b/bin/tests/system/staticstub/ns3/undelegated.db.in @@ -0,0 +1,21 @@ +; Copyright (C) Internet Systems Consortium, Inc. ("ISC") +; +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. +; +; See the COPYRIGHT file distributed with this work for additional +; information regarding copyright ownership. + +$TTL 300 ; 5 minutes +undelegated. IN SOA ns3.undelegated. hostmaster.undelegated. ( + 2010080900 ; serial + 20 ; refresh (20 seconds) + 20 ; retry (20 seconds) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) +undelegated. NS ns3.undelegated. +undelegated. A 10.53.0.4 +undelegated. AAAA ::1 +ns3.undelegated. A 10.53.0.3 |