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/dsdigest/ns2 | |
parent | Initial commit. (diff) | |
download | bind9-ea648e70a989cca190cd7403fe892fd2dcc290b4.tar.xz bind9-ea648e70a989cca190cd7403fe892fd2dcc290b4.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/dsdigest/ns2/bad.db.in | 21 | ||||
-rw-r--r-- | bin/tests/system/dsdigest/ns2/good.db.in | 21 | ||||
-rw-r--r-- | bin/tests/system/dsdigest/ns2/named.conf.in | 45 | ||||
-rw-r--r-- | bin/tests/system/dsdigest/ns2/sign.sh | 46 |
4 files changed, 133 insertions, 0 deletions
diff --git a/bin/tests/system/dsdigest/ns2/bad.db.in b/bin/tests/system/dsdigest/ns2/bad.db.in new file mode 100644 index 0000000..ab5ce91 --- /dev/null +++ b/bin/tests/system/dsdigest/ns2/bad.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 +@ IN SOA mname1. . ( + 2000042407 ; serial + 20 ; refresh (20 seconds) + 20 ; retry (20 seconds) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) + NS ns2 +ns2 A 10.53.0.2 + +a A 10.0.0.1 diff --git a/bin/tests/system/dsdigest/ns2/good.db.in b/bin/tests/system/dsdigest/ns2/good.db.in new file mode 100644 index 0000000..ab5ce91 --- /dev/null +++ b/bin/tests/system/dsdigest/ns2/good.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 +@ IN SOA mname1. . ( + 2000042407 ; serial + 20 ; refresh (20 seconds) + 20 ; retry (20 seconds) + 1814400 ; expire (3 weeks) + 3600 ; minimum (1 hour) + ) + NS ns2 +ns2 A 10.53.0.2 + +a A 10.0.0.1 diff --git a/bin/tests/system/dsdigest/ns2/named.conf.in b/bin/tests/system/dsdigest/ns2/named.conf.in new file mode 100644 index 0000000..73a41ba --- /dev/null +++ b/bin/tests/system/dsdigest/ns2/named.conf.in @@ -0,0 +1,45 @@ +/* + * 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. + */ + +// NS2 + +controls { /* empty */ }; + +options { + query-source address 10.53.0.2; + notify-source 10.53.0.2; + transfer-source 10.53.0.2; + port @PORT@; + pid-file "named.pid"; + listen-on { 10.53.0.2; }; + listen-on-v6 { none; }; + recursion no; + notify yes; + dnssec-enable yes; + dnssec-validation yes; +}; + +zone "." { + type hint; + file "../../common/root.hint"; +}; + +zone "good" { + type master; + file "good.db.signed"; +}; + +zone "bad" { + type master; + file "bad.db.signed"; +}; + +include "trusted.conf"; diff --git a/bin/tests/system/dsdigest/ns2/sign.sh b/bin/tests/system/dsdigest/ns2/sign.sh new file mode 100644 index 0000000..2c52d3b --- /dev/null +++ b/bin/tests/system/dsdigest/ns2/sign.sh @@ -0,0 +1,46 @@ +#!/bin/sh -e +# +# 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 + +zone1=good. +infile1=good.db.in +zonefile1=good.db +zone2=bad. +infile2=bad.db.in +zonefile2=bad.db + +keyname11=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone $zone1` +keyname12=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 2048 -n zone -f KSK $zone1` +keyname21=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 1024 -n zone $zone2` +keyname22=`$KEYGEN -q -r $RANDFILE -a RSASHA256 -b 2048 -n zone -f KSK $zone2` + +cat $infile1 $keyname11.key $keyname12.key >$zonefile1 +cat $infile2 $keyname21.key $keyname22.key >$zonefile2 + +$SIGNER -P -g -r $RANDFILE -o $zone1 $zonefile1 > /dev/null +$SIGNER -P -g -r $RANDFILE -o $zone2 $zonefile2 > /dev/null + +DSFILENAME1=dsset-`echo $zone1 |sed -e "s/\.$//g"`$TP +DSFILENAME2=dsset-`echo $zone2 |sed -e "s/\.$//g"`$TP +$DSFROMKEY -a SHA-256 $keyname12 > $DSFILENAME1 +$DSFROMKEY -a SHA-256 $keyname22 > $DSFILENAME2 + +supported=`cat ../supported` +case "$supported" in + gost) algo=GOST ;; + *) algo=SHA-384 ;; +esac + +$DSFROMKEY -a $algo $keyname12 >> $DSFILENAME1 +$DSFROMKEY -a $algo $keyname22 > $DSFILENAME2 + |