From: Mark Andrews Date: Wed, 19 May 2010 07:47:11 +0000 (+0000) Subject: 2902. [func] Add regression test for change 2897. [RT #21040] X-Git-Tag: v9.7.1b1^3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e023d9a290fc28a585618704396b6ac93e5356e;p=thirdparty%2Fbind9.git 2902. [func] Add regression test for change 2897. [RT #21040] --- diff --git a/CHANGES b/CHANGES index 812e9706b2f..ddf3f60ae83 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ --- 9.7.1b1 released --- +2902. [func] Add regression test for change 2897. [RT #21040] + 2901. [port] Use AC_C_FLEXIBLE_ARRAY_MEMBER. [RT #21316] 2900. [bug] The placeholder negative caching element was not diff --git a/bin/tests/system/autosign/clean.sh b/bin/tests/system/autosign/clean.sh index 0d22a8c98f1..cda0011abff 100644 --- a/bin/tests/system/autosign/clean.sh +++ b/bin/tests/system/autosign/clean.sh @@ -14,11 +14,11 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: clean.sh,v 1.3.6.2 2010/01/18 23:48:01 tbox Exp $ +# $Id: clean.sh,v 1.3.6.3 2010/05/19 07:47:11 marka Exp $ rm -f */K* */dsset-* */*.signed */trusted.conf */tmp* */*.jnl */*.bk rm -f active.key inact.key del.key unpub.key standby.key rev.key -rm -f nopriv.key vanishing.key +rm -f nopriv.key vanishing.key del1.key del2.key rm -f nsupdate.out rm -f */core rm -f */example.bk diff --git a/bin/tests/system/autosign/ns3/keygen.sh b/bin/tests/system/autosign/ns3/keygen.sh index 16e8bf05ae2..6a26180e094 100644 --- a/bin/tests/system/autosign/ns3/keygen.sh +++ b/bin/tests/system/autosign/ns3/keygen.sh @@ -14,7 +14,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: keygen.sh,v 1.3.6.3 2010/01/18 23:48:01 tbox Exp $ +# $Id: keygen.sh,v 1.3.6.4 2010/05/19 07:47:11 marka Exp $ SYSTEMTESTTOP=../.. . $SYSTEMTESTTOP/conf.sh @@ -174,7 +174,8 @@ $KEYGEN -q -a RSASHA512 -b 1024 -r $RANDFILE $zone > /dev/null $SIGNER -S -3 beef -A -o $zone -f $zonefile $infile > /dev/null 2>&1 # -# secure-to-insecure transition test zone. +# secure-to-insecure transition test zone; used to test removal of +# keys via nsupdate # zone=secure-to-insecure.example zonefile="${zone}.db" @@ -182,3 +183,16 @@ infile="${zonefile}.in" ksk=`$KEYGEN -q -r $RANDFILE -fk $zone` $KEYGEN -q -r $RANDFILE $zone > /dev/null $SIGNER -S -o $zone -f $zonefile $infile > /dev/null 2>&1 + +# +# another secure-to-insecure transition test zone; used to test +# removal of keys on schedule. +# +zone=secure-to-insecure2.example +zonefile="${zone}.db" +infile="${zonefile}.in" +ksk=`$KEYGEN -q -3 -r $RANDFILE -fk $zone` +echo $ksk > ../del1.key +zsk=`$KEYGEN -q -3 -r $RANDFILE $zone` +echo $zsk > ../del2.key +$SIGNER -S -3 beef -o $zone -f $zonefile $infile > /dev/null 2>&1 diff --git a/bin/tests/system/autosign/ns3/named.conf b/bin/tests/system/autosign/ns3/named.conf index b37fcc610ec..aa32e71a7ae 100644 --- a/bin/tests/system/autosign/ns3/named.conf +++ b/bin/tests/system/autosign/ns3/named.conf @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named.conf,v 1.3.6.2 2010/01/18 23:48:01 tbox Exp $ */ +/* $Id: named.conf,v 1.3.6.3 2010/05/19 07:47:11 marka Exp $ */ // NS3 @@ -163,6 +163,14 @@ zone "secure-to-insecure.example" { dnssec-secure-to-insecure yes; }; +zone "secure-to-insecure2.example" { + type master; + file "secure-to-insecure2.example.db"; + allow-update { any; }; + auto-dnssec maintain; + dnssec-secure-to-insecure yes; +}; + zone "oldsigs.example" { type master; file "oldsigs.example.db"; diff --git a/bin/tests/system/autosign/tests.sh b/bin/tests/system/autosign/tests.sh index e3f98dad46d..84ff5850dec 100644 --- a/bin/tests/system/autosign/tests.sh +++ b/bin/tests/system/autosign/tests.sh @@ -14,7 +14,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.4.6.4 2010/05/14 04:41:12 marka Exp $ +# $Id: tests.sh,v 1.4.6.5 2010/05/19 07:47:11 marka Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -614,7 +614,7 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -echo "I:checking secure-to-insecure transition ($n)" +echo "I:checking secure-to-insecure transition, nsupdate ($n)" $NSUPDATE > /dev/null 2>&1 < /dev/null +file="ns3/`cat del2.key`.key" +$SETTIME -I now -D now $file > /dev/null +$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 sign secure-to-insecure2.example. 2>&1 | sed 's/^/I:ns3 /' +sleep 2 +$DIG $DIGOPTS axfr secure-to-insecure2.example @10.53.0.3 > dig.out.ns3.test$n || ret=1 +egrep 'RRSIG.*'" $newid "'\. ' dig.out.ns3.test$n > /dev/null && ret=1 +egrep '(DNSKEY|NSEC3)' dig.out.ns3.test$n > /dev/null && ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + echo "I:preparing to test key change corner cases" echo "I:removing a private key file" file="ns1/`cat vanishing.key`.private"