3020. [bug] auto-dnssec failed to correctly update the zone when
changing the DNSKEY RRset. [RT #23232]
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
; PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
; $Id: example.db.in,v 1.24.162.1 2011/02/14 23:59:33 marka Exp $
|
||||
; $Id: example.db.in,v 1.24.162.2 2011/02/15 22:06:27 marka Exp $
|
||||
|
||||
$TTL 300 ; 5 minutes
|
||||
@ IN SOA mname1. . (
|
||||
@@ -110,3 +110,9 @@ ns.kskonly A 10.53.0.3
|
||||
|
||||
update-nsec3 NS ns.update-nsec3
|
||||
ns.update-nsec3 A 10.53.0.3
|
||||
|
||||
auto-nsec NS ns.auto-nsec
|
||||
ns.auto-nsec A 10.53.0.3
|
||||
|
||||
auto-nsec3 NS ns.auto-nsec3
|
||||
ns.auto-nsec3 A 10.53.0.3
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: sign.sh,v 1.41.40.1 2011/02/14 23:59:33 marka Exp $
|
||||
# $Id: sign.sh,v 1.41.40.2 2011/02/15 22:06:27 marka Exp $
|
||||
|
||||
SYSTEMTESTTOP=../..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
@@ -31,7 +31,8 @@ zonefile=example.db
|
||||
( cd ../ns3 && sh sign.sh )
|
||||
|
||||
for subdomain in secure bogus dynamic keyless nsec3 optout nsec3-unknown \
|
||||
optout-unknown multiple rsasha256 rsasha512 kskonly update-nsec3
|
||||
optout-unknown multiple rsasha256 rsasha512 kskonly update-nsec3 \
|
||||
auto-nsec auto-nsec3
|
||||
do
|
||||
cp ../ns3/dsset-$subdomain.example. .
|
||||
done
|
||||
|
||||
45
bin/tests/system/dnssec/ns3/auto-nsec.example.db.in
Normal file
45
bin/tests/system/dnssec/ns3/auto-nsec.example.db.in
Normal file
@@ -0,0 +1,45 @@
|
||||
; Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; Permission to use, copy, modify, and/or distribute this software for any
|
||||
; purpose with or without fee is hereby granted, provided that the above
|
||||
; copyright notice and this permission notice appear in all copies.
|
||||
;
|
||||
; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
; PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
; $Id: auto-nsec.example.db.in,v 1.2.2.2 2011/02/15 22:06:27 marka Exp $
|
||||
|
||||
$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 ns
|
||||
ns A 10.53.0.3
|
||||
|
||||
a A 10.0.0.1
|
||||
b A 10.0.0.2
|
||||
d A 10.0.0.4
|
||||
z A 10.0.0.26
|
||||
a.a.a.a.a.a.a.a.a.a.e A 10.0.0.27
|
||||
x CNAME a
|
||||
|
||||
private NS ns.private
|
||||
ns.private A 10.53.0.2
|
||||
|
||||
insecure NS ns.insecure
|
||||
ns.insecure A 10.53.0.2
|
||||
|
||||
nosoa NS ns.nosoa
|
||||
ns.nosoa A 10.53.0.7
|
||||
|
||||
normalthenrrsig A 10.0.0.28
|
||||
rrsigonly A 10.0.0.29
|
||||
45
bin/tests/system/dnssec/ns3/auto-nsec3.example.db.in
Normal file
45
bin/tests/system/dnssec/ns3/auto-nsec3.example.db.in
Normal file
@@ -0,0 +1,45 @@
|
||||
; Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; Permission to use, copy, modify, and/or distribute this software for any
|
||||
; purpose with or without fee is hereby granted, provided that the above
|
||||
; copyright notice and this permission notice appear in all copies.
|
||||
;
|
||||
; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
; PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
; $Id: auto-nsec3.example.db.in,v 1.2.2.2 2011/02/15 22:06:27 marka Exp $
|
||||
|
||||
$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 ns
|
||||
ns A 10.53.0.3
|
||||
|
||||
a A 10.0.0.1
|
||||
b A 10.0.0.2
|
||||
d A 10.0.0.4
|
||||
z A 10.0.0.26
|
||||
a.a.a.a.a.a.a.a.a.a.e A 10.0.0.27
|
||||
x CNAME a
|
||||
|
||||
private NS ns.private
|
||||
ns.private A 10.53.0.2
|
||||
|
||||
insecure NS ns.insecure
|
||||
ns.insecure A 10.53.0.2
|
||||
|
||||
nosoa NS ns.nosoa
|
||||
ns.nosoa A 10.53.0.7
|
||||
|
||||
normalthenrrsig A 10.0.0.28
|
||||
rrsigonly A 10.0.0.29
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: named.conf,v 1.38.86.2 2011/02/14 23:59:33 marka Exp $ */
|
||||
/* $Id: named.conf,v 1.38.86.3 2011/02/15 22:06:27 marka Exp $ */
|
||||
|
||||
// NS3
|
||||
|
||||
@@ -178,4 +178,18 @@ zone "update-nsec3.example" {
|
||||
file "update-nsec3.example.db.signed";
|
||||
};
|
||||
|
||||
zone "auto-nsec.example" {
|
||||
type master;
|
||||
auto-dnssec maintain;
|
||||
allow-update { !0.0.0.0; };
|
||||
file "auto-nsec.example.db.signed";
|
||||
};
|
||||
|
||||
zone "auto-nsec3.example" {
|
||||
type master;
|
||||
auto-dnssec maintain;
|
||||
allow-update { !0.0.0.0; };
|
||||
file "auto-nsec3.example.db.signed";
|
||||
};
|
||||
|
||||
include "trusted.conf";
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: sign.sh,v 1.32.162.2 2011/02/14 23:59:33 marka Exp $
|
||||
# $Id: sign.sh,v 1.32.162.3 2011/02/15 22:06:27 marka Exp $
|
||||
|
||||
SYSTEMTESTTOP=../..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
@@ -285,3 +285,33 @@ kskname=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
|
||||
zskname=`$KEYGEN -q -3 -r $RANDFILE $zone`
|
||||
cat $infile $kskname.key $zskname.key >$zonefile
|
||||
$SIGNER -P -3 - -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1
|
||||
|
||||
#
|
||||
# A NSEC signed zone that will have auto-dnssec enabled and
|
||||
# extra keys not in the initial signed zone.
|
||||
#
|
||||
zone=auto-nsec.example.
|
||||
infile=auto-nsec.example.db.in
|
||||
zonefile=auto-nsec.example.db
|
||||
|
||||
kskname=`$KEYGEN -q -r $RANDFILE -fk $zone`
|
||||
zskname=`$KEYGEN -q -r $RANDFILE $zone`
|
||||
kskname=`$KEYGEN -q -r $RANDFILE -fk $zone`
|
||||
zskname=`$KEYGEN -q -r $RANDFILE $zone`
|
||||
cat $infile $kskname.key $zskname.key >$zonefile
|
||||
$SIGNER -P -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1
|
||||
|
||||
#
|
||||
# A NSEC3 signed zone that will have auto-dnssec enabled and
|
||||
# extra keys not in the initial signed zone.
|
||||
#
|
||||
zone=auto-nsec3.example.
|
||||
infile=auto-nsec3.example.db.in
|
||||
zonefile=auto-nsec3.example.db
|
||||
|
||||
kskname=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
|
||||
zskname=`$KEYGEN -q -3 -r $RANDFILE $zone`
|
||||
kskname=`$KEYGEN -q -3 -r $RANDFILE -fk $zone`
|
||||
zskname=`$KEYGEN -q -3 -r $RANDFILE $zone`
|
||||
cat $infile $kskname.key $zskname.key >$zonefile
|
||||
$SIGNER -P -3 - -r $RANDFILE -o $zone $zonefile > /dev/null 2>&1
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: setup.sh,v 1.19 2011/01/04 23:47:13 tbox Exp $
|
||||
# $Id: setup.sh,v 1.19.14.1 2011/02/15 22:06:27 marka Exp $
|
||||
|
||||
sh clean.sh
|
||||
|
||||
../../../tools/genrandom 400 random.data
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: tests.sh,v 1.73.14.2 2011/02/14 23:59:33 marka Exp $
|
||||
# $Id: tests.sh,v 1.73.14.3 2011/02/15 22:06:27 marka Exp $
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
status=0
|
||||
n=0
|
||||
n=1
|
||||
|
||||
rm -f dig.out.*
|
||||
|
||||
@@ -1135,5 +1135,25 @@ n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:checking that the NSEC record is properly generated when DNSKEY are added via auto-dnssec ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +dnssec a auto-nsec.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
|
||||
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
||||
grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
|
||||
grep "IN.NSEC[^3].* TYPE65534" dig.out.ns4.test$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:checking that the NSEC3 record is properly generated when DNSKEY are added via auto-dnssec ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +dnssec a auto-nsec3.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
|
||||
grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
|
||||
grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
|
||||
grep "IN.NSEC3 .* TYPE65534" dig.out.ns4.test$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:exit status: $status"
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user