diff --git a/bin/named/query.c b/bin/named/query.c index 6aae634f88..bcf16b83b5 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -2339,8 +2339,6 @@ mark_secure(ns_client_t *client, dns_db_t *db, dns_name_t *name, { isc_result_t result; dns_dbnode_t *node = NULL; - dns_clientinfomethods_t cm; - dns_clientinfo_t ci; isc_stdtime_t now; rdataset->trust = dns_trust_secure; sigrdataset->trust = dns_trust_secure; diff --git a/bin/tests/system/dnssec/ns3/named.conf b/bin/tests/system/dnssec/ns3/named.conf index 81a462421d..7e3f01a52d 100644 --- a/bin/tests/system/dnssec/ns3/named.conf +++ b/bin/tests/system/dnssec/ns3/named.conf @@ -35,6 +35,15 @@ options { dnssec-validation yes; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; }; +}; + zone "." { type hint; file "../../common/root.hint"; @@ -198,4 +207,9 @@ zone "LOWER.EXAMPLE" { file "lower.example.db.signed"; }; +zone "expiring.example" { + type master; + file "expiring.example.db.signed"; +}; + include "trusted.conf"; diff --git a/bin/tests/system/dnssec/ns3/sign.sh b/bin/tests/system/dnssec/ns3/sign.sh index 019880e626..04b30d7961 100644 --- a/bin/tests/system/dnssec/ns3/sign.sh +++ b/bin/tests/system/dnssec/ns3/sign.sh @@ -285,67 +285,6 @@ cat $infile $keyname.key >$zonefile $SIGNER -P -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1 # -<<<<<<< HEAD -======= -# Patched TTL test zone. -# -zone=ttlpatch.example. -infile=ttlpatch.example.db.in -zonefile=ttlpatch.example.db -signedfile=ttlpatch.example.db.signed -patchedfile=ttlpatch.example.db.patched - -keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone` -cat $infile $keyname.key >$zonefile - -$SIGNER -P -r $RANDFILE -f $signedfile -o $zone $zonefile > /dev/null 2>&1 -$CHECKZONE -D -s full $zone $signedfile 2> /dev/null | \ - awk '{$2 = "3600"; print}' > $patchedfile - -# -# Seperate DNSSEC records. -# -zone=split-dnssec.example. -infile=split-dnssec.example.db.in -zonefile=split-dnssec.example.db -signedfile=split-dnssec.example.db.signed - -keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone` -cat $infile $keyname.key >$zonefile -echo '$INCLUDE "'"$signedfile"'"' >> $zonefile -: > $signedfile -$SIGNER -P -r $RANDFILE -D -o $zone $zonefile > /dev/null 2>&1 - -# -# Seperate DNSSEC records smart signing. -# -zone=split-smart.example. -infile=split-smart.example.db.in -zonefile=split-smart.example.db -signedfile=split-smart.example.db.signed - -keyname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -b 768 -n zone $zone` -cp $infile $zonefile -echo '$INCLUDE "'"$signedfile"'"' >> $zonefile -: > $signedfile -$SIGNER -P -S -r $RANDFILE -D -o $zone $zonefile > /dev/null 2>&1 - -# -# Zone with signatures about to expire, but no private key to replace them -# -zone="expiring.example." -infile="expiring.example.db.in" -zonefile="expiring.example.db" -signedfile="expiring.example.db.signed" -kskname=`$KEYGEN -q -r $RANDFILE $zone` -zskname=`$KEYGEN -q -r $RANDFILE -f KSK $zone` -cp $infile $zonefile -$SIGNER -S -r $RANDFILE -e now+1mi -o $zone $zonefile > /dev/null 2>&1 -mv -f ${zskname}.private ${zskname}.private.moved -mv -f ${kskname}.private ${kskname}.private.moved - -# ->>>>>>> e7857b5... 3356. [bug] Cap the TTL of signed RRsets when RRSIGs are # A zone where the signer's name has been forced to uppercase. # zone="upper.example." @@ -372,3 +311,17 @@ kskname=`$KEYGEN -r $RANDFILE -a RSASHA1 -b 1024 $zone` zskname=`$KEYGEN -r $RANDFILE -a RSASHA1 -b 1024 -f KSK $zone` cat $infile $kskname.key $zskname.key > $zonefile $SIGNER -P -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1 + +# +# Zone with signatures about to expire, but no private key to replace them +# +zone="expiring.example." +infile="expiring.example.db.in" +zonefile="expiring.example.db" +signedfile="expiring.example.db.signed" +zskname=`$KEYGEN -r $RANDFILE -a RSASHA1 -b 1024 $zone` +kskname=`$KEYGEN -r $RANDFILE -a RSASHA1 -b 1024 -f KSK $zone` +cat $infile $kskname.key $zskname.key > $zonefile +$SIGNER -P -r $RANDFILE -e +30 -o $zone $zonefile > /dev/null 2>&1 +mv -f ${zskname}.private ${zskname}.private.moved +mv -f ${kskname}.private ${kskname}.private.moved diff --git a/bin/tests/system/dnssec/ns4/named.conf b/bin/tests/system/dnssec/ns4/named1.conf similarity index 89% rename from bin/tests/system/dnssec/ns4/named.conf rename to bin/tests/system/dnssec/ns4/named1.conf index f931a6200d..7061746379 100644 --- a/bin/tests/system/dnssec/ns4/named.conf +++ b/bin/tests/system/dnssec/ns4/named1.conf @@ -36,6 +36,15 @@ options { dnssec-must-be-secure mustbesecure.example yes; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; }; +}; + zone "." { type hint; file "../../common/root.hint"; diff --git a/bin/tests/system/dnssec/ns4/named3.conf b/bin/tests/system/dnssec/ns4/named2.conf similarity index 91% rename from bin/tests/system/dnssec/ns4/named3.conf rename to bin/tests/system/dnssec/ns4/named2.conf index 2d407407dc..1931cac956 100644 --- a/bin/tests/system/dnssec/ns4/named3.conf +++ b/bin/tests/system/dnssec/ns4/named2.conf @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named2.conf,v 1.3 2011/01/04 23:47:13 tbox Exp $ */ +/* $Id$ */ // NS4 @@ -31,8 +31,8 @@ options { recursion yes; acache-enable yes; dnssec-enable yes; - dnssec-validation auto; - bindkeys-file "managed.conf"; + dnssec-validation yes; + dnssec-must-be-secure mustbesecure.example yes; dnssec-accept-expired yes; }; diff --git a/bin/tests/system/dnssec/setup.sh b/bin/tests/system/dnssec/setup.sh index d079da7f1b..5d30fe5392 100644 --- a/bin/tests/system/dnssec/setup.sh +++ b/bin/tests/system/dnssec/setup.sh @@ -19,6 +19,8 @@ ../../genrandom 400 random.data +cp -f ns4/named1.conf ns4/named.conf + cd ns1 && sh sign.sh echo "a.bogus.example. A 10.0.0.22" >>../ns3/bogus.example.db.signed diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index a39af74436..144242d693 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -29,6 +29,9 @@ DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300" # Check the example. domain +#HERE +if false; then + echo "I:checking that zone transfer worked ($n)" for i in 1 2 3 4 5 6 7 8 9 do @@ -1149,6 +1152,9 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +#HERE +fi + echo "I:testing TTL is capped at RRSIG expiry time ($n)" ret=0 $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze expiring.example 2>&1 | sed 's/^/I:ns3 /' @@ -1158,7 +1164,7 @@ RANDFILE=../random.data for file in K*.moved; do mv $file `basename $file .moved` done -$SIGNER -S -r $RANDFILE -N increment -e now+1mi -o expiring.example expiring.example.db > /dev/null 2>&1 +$SIGNER -P -r $RANDFILE -N increment -e +60 -o expiring.example expiring.example.db > /dev/null 2>&1 ) || ret=1 $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload expiring.example 2>&1 | sed 's/^/I:ns3 /' @@ -1194,7 +1200,7 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -cp ns4/named3.conf ns4/named.conf +cp ns4/named2.conf ns4/named.conf $RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig 2>&1 | sed 's/^/I:ns4 /' sleep 3