mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Check that dnssec-keygen honours key tag ranges
This commit is contained in:
@@ -4468,5 +4468,24 @@ n=$((n + 1))
|
||||
if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "check that dnssec-keygen honours key tag ranges ($n)"
|
||||
ret=0
|
||||
zone=settagrange
|
||||
ksk=$("$KEYGEN" -f KSK -q -a $DEFAULT_ALGORITHM -n zone -M 0:32767 "$zone")
|
||||
zsk=$("$KEYGEN" -q -a $DEFAULT_ALGORITHM -n zone -M 32768:65535 "$zone")
|
||||
kid=$(keyfile_to_key_id "$ksk")
|
||||
zid=$(keyfile_to_key_id "$zsk")
|
||||
[ $kid -ge 0 -a $kid -le 32767 ] || ret=1
|
||||
[ $zid -ge 32768 -a $zid -le 65535 ] || ret=1
|
||||
rksk=$($REVOKE -R $ksk)
|
||||
rzsk=$($REVOKE -R $zsk)
|
||||
krid=$(keyfile_to_key_id "$rksk")
|
||||
zrid=$(keyfile_to_key_id "$rzsk")
|
||||
[ $krid -ge 0 -a $krid -le 32767 ] || ret=1
|
||||
[ $zrid -ge 32768 -a $zrid -le 65535 ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
Reference in New Issue
Block a user