4838. [bug] zone.c:add_sigs was not properly determining
if there were active KSK and ZSK keys for
a algorithm when update-check-ksk is true
(default) leaving records unsigned with one or
more DNSKEY algorithms. [RT #46754]
This commit is contained in:
@@ -28,6 +28,7 @@ rm -f ns2/private.secure.example.db ns2/bar.db
|
||||
rm -f ns3/*.nzd ns3/*.nzd-lock ns3/*.nzf
|
||||
rm -f ns3/*.nzf
|
||||
rm -f ns3/autonsec3.example.db
|
||||
rm -f ns3/inaczsk2.example.db
|
||||
rm -f ns3/kg.out ns3/s.out ns3/st.out
|
||||
rm -f ns3/kskonly.example.db
|
||||
rm -f ns3/nozsk.example.db ns3/inaczsk.example.db
|
||||
|
||||
21
bin/tests/system/autosign/ns3/inaczsk2.example.db.in
Normal file
21
bin/tests/system/autosign/ns3/inaczsk2.example.db.in
Normal file
@@ -0,0 +1,21 @@
|
||||
; Copyright (C) 2017 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/.
|
||||
|
||||
$TTL 300 ; 5 minutes
|
||||
@ IN SOA mname1. . (
|
||||
1 ; 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
|
||||
x CNAME a
|
||||
@@ -273,3 +273,12 @@ cp $infile $zonefile
|
||||
ksk=`$KEYGEN -a RSASHA1 -3 -q -r $RANDFILE -fk -P sync now $zone 2> kg.out` || dumpit kg.out
|
||||
$KEYGEN -a RSASHA1 -3 -q -r $RANDFILE $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$DSFROMKEY $ksk.key > dsset-${zone}$TP
|
||||
|
||||
#
|
||||
# A zone that has a published inactive key that is autosigned.
|
||||
#
|
||||
setup inaczsk2.example
|
||||
cp $infile $zonefile
|
||||
ksk=`$KEYGEN -a RSASHA1 -3 -q -r $RANDFILE -fk $zone 2> kg.out` || dumpit kg.out
|
||||
$KEYGEN -a RSASHA1 -3 -q -r $RANDFILE -P now -A now+3600 $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$DSFROMKEY $ksk.key > dsset-${zone}$TP
|
||||
|
||||
@@ -249,4 +249,11 @@ zone "kskonly.example" {
|
||||
auto-dnssec maintain;
|
||||
};
|
||||
|
||||
zone "inaczsk2.example" {
|
||||
type master;
|
||||
file "inaczsk2.example.db";
|
||||
allow-update { any; };
|
||||
auto-dnssec maintain;
|
||||
};
|
||||
|
||||
include "trusted.conf";
|
||||
|
||||
@@ -72,7 +72,7 @@ do
|
||||
$DIG $DIGOPTS $z @10.53.0.2 nsec > dig.out.ns2.test$n || ret=1
|
||||
grep "NS SOA" dig.out.ns2.test$n > /dev/null || ret=1
|
||||
done
|
||||
for z in bar. example.
|
||||
for z in bar. example. inaczsk2.example.
|
||||
do
|
||||
$DIG $DIGOPTS $z @10.53.0.3 nsec > dig.out.ns3.test$n || ret=1
|
||||
grep "NS SOA" dig.out.ns3.test$n > /dev/null || ret=1
|
||||
@@ -1231,5 +1231,13 @@ if [ "$lret" != 0 ]; then ret=$lret; fi
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:check that zone with inactive zsk is properly autosigned ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS @10.53.0.3 axfr inaczsk2.example > dig.out.ns3.out
|
||||
grep "SOA 7 2" dig.out.ns3.out > /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"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
Reference in New Issue
Block a user