mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 03:50:00 -04:00
Fix some system test cases
Some test cases were working but for the wrong reasons. These started to fail when I implemented the first approach for #4763, where the existence of a DNSKEY together with an empty keyring is suspicious and would prevent the keymgr from running. These are: 1. kasp: The multisigner-model2.kasp zone has ZSKs from other providers in the zone, but not yet its own keys. Pregenerate signing keys and add them to the unsigned zone as well. 2. kasp: The dynamic-signed-inline-signing.kasp zone has a key generated and added in the raw version of the zone. But the key file is stored outside the key-directory for the given zone. Add '-K keys' to the dnssec-keygen command.
This commit is contained in:
parent
5fdad05a8a
commit
d1e263ef13
1 changed files with 14 additions and 9 deletions
|
|
@ -129,15 +129,19 @@ $KEYGEN -G -k rsasha256 -l policies/kasp.conf $zone >keygen.out.$zone.2 2>&1
|
|||
|
||||
zone="multisigner-model2.kasp"
|
||||
echo_i "setting up zone: $zone"
|
||||
KSK=$($KEYGEN -a $DEFAULT_ALGORITHM -f KSK -L 3600 -M 32768:65535 $zone 2>keygen.out.$zone.1)
|
||||
ZSK=$($KEYGEN -a $DEFAULT_ALGORITHM -L 3600 $zone -M 32768:65535 2>keygen.out.$zone.2)
|
||||
cat "${KSK}.key" | grep -v ";.*" >>"${zone}.db"
|
||||
cat "${ZSK}.key" | grep -v ";.*" >>"${zone}.db"
|
||||
# Import the ZSK sets of the other providers into their DNSKEY RRset.
|
||||
ZSK1=$($KEYGEN -K ../ -a $DEFAULT_ALGORITHM -L 3600 -M 0:32767 $zone 2>keygen.out.$zone.1)
|
||||
ZSK2=$($KEYGEN -K ../ -a $DEFAULT_ALGORITHM -L 3600 -M 0:32767 $zone 2>keygen.out.$zone.2)
|
||||
# ZSK1 will be added to the unsigned zonefile.
|
||||
# ZSK1 is from a different provider and is added to the unsigned zonefile.
|
||||
# ZSK2 is also from a different provider and is added with a Dynamic Update.
|
||||
ZSK1=$($KEYGEN -K ../ -a $DEFAULT_ALGORITHM -L 3600 -M 0:32767 $zone 2>keygen.out.$zone.3)
|
||||
ZSK2=$($KEYGEN -K ../ -a $DEFAULT_ALGORITHM -L 3600 -M 0:32767 $zone 2>keygen.out.$zone.4)
|
||||
cat "../${ZSK1}.key" | grep -v ";.*" >>"${zone}.db"
|
||||
cat "../${ZSK1}.key" | grep -v ";.*" >"${zone}.zsk1"
|
||||
rm -f "../${ZSK1}.*"
|
||||
# ZSK2 will be used with a Dynamic Update.
|
||||
cat "../${ZSK2}.key" | grep -v ";.*" >"${zone}.zsk2"
|
||||
rm -f "../${ZSK1}.*"
|
||||
rm -f "../${ZSK2}.*"
|
||||
|
||||
zone="rumoured.kasp"
|
||||
|
|
@ -178,11 +182,12 @@ $SIGNER -PS -x -o $zone -O raw -f "${zonefile}.signed" $infile >signer.out.$zone
|
|||
setup dynamic-signed-inline-signing.kasp
|
||||
T="now-1d"
|
||||
csktimes="-P $T -A $T -P sync $T"
|
||||
CSK=$($KEYGEN -a $DEFAULT_ALGORITHM -L 3600 -f KSK $csktimes $zone 2>keygen.out.$zone.1)
|
||||
$SETTIME -s -g $O -d $O $T -k $O $T -z $O $T -r $O $T "$CSK" >settime.out.$zone.1 2>&1
|
||||
cat template.db.in "${CSK}.key" >"$infile"
|
||||
CSK=$($KEYGEN -K keys -a $DEFAULT_ALGORITHM -L 3600 -f KSK $csktimes $zone 2>keygen.out.$zone.1)
|
||||
$SETTIME -s -g $O -d $O $T -k $O $T -z $O $T -r $O $T "keys/$CSK" >settime.out.$zone.1 2>&1
|
||||
cat template.db.in "keys/${CSK}.key" >"$infile"
|
||||
private_type_record $zone $DEFAULT_ALGORITHM_NUMBER "keys/$CSK" >>"$infile"
|
||||
cp $infile $zonefile
|
||||
$SIGNER -PS -z -x -s now-2w -e now-1mi -o $zone -f "${zonefile}.signed" $infile >signer.out.$zone.1 2>&1
|
||||
$SIGNER -PS -K keys -z -x -s now-2w -e now-1mi -o $zone -f "${zonefile}.signed" $infile >signer.out.$zone.1 2>&1
|
||||
|
||||
# We are changing an existing single-signed zone to multi-signed
|
||||
# zone where the key tags do not match the dnssec-policy key tag range
|
||||
|
|
|
|||
Loading…
Reference in a new issue