diff --git a/bin/tests/system/checkds/ns2/setup.sh b/bin/tests/system/checkds/ns2/setup.sh index 7fb586afee..d3f178408a 100644 --- a/bin/tests/system/checkds/ns2/setup.sh +++ b/bin/tests/system/checkds/ns2/setup.sh @@ -22,16 +22,6 @@ do cp "../ns9/dsset-$subdomain.checkds$TP" . done -private_type_record() { - _zone=$1 - _algorithm=$2 - _keyfile=$3 - - _id=$(keyfile_to_key_id "$_keyfile") - - printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" -} - zone="checkds" infile="checkds.db.infile" zonefile="checkds.db" diff --git a/bin/tests/system/checkds/ns5/setup.sh b/bin/tests/system/checkds/ns5/setup.sh index 100cd5dbec..8759366780 100644 --- a/bin/tests/system/checkds/ns5/setup.sh +++ b/bin/tests/system/checkds/ns5/setup.sh @@ -14,16 +14,6 @@ echo_i "ns5/setup.sh" -private_type_record() { - _zone=$1 - _algorithm=$2 - _keyfile=$3 - - _id=$(keyfile_to_key_id "$_keyfile") - - printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" -} - zone="checkds" infile="checkds.db.infile" zonefile="checkds.db" diff --git a/bin/tests/system/checkds/ns9/setup.sh b/bin/tests/system/checkds/ns9/setup.sh index efb4a1e2c2..57554d3dd3 100644 --- a/bin/tests/system/checkds/ns9/setup.sh +++ b/bin/tests/system/checkds/ns9/setup.sh @@ -22,16 +22,6 @@ setup() { echo "$zone" >> zones } -private_type_record() { - _zone=$1 - _algorithm=$2 - _keyfile=$3 - - _id=$(keyfile_to_key_id "$_keyfile") - - printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" -} - # Short environment variable names for key states and times. H="HIDDEN" R="RUMOURED" diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index b68c93dd93..bbc6ade2ea 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -397,6 +397,22 @@ keyfile_to_key_id() { echo "$1" | sed "s/.*+0\{0,4\}//" } +# private_type_record: write a private type record recording the state of the +# signing process +# +# For a given zone ($1), algorithm number ($2) and key file ($3), print the +# private type record with default type value of 65534, indicating that the +# signing process for this key is completed. +private_type_record() { + _zone=$1 + _algorithm=$2 + _keyfile=$3 + + _id=$(keyfile_to_key_id "$_keyfile") + + printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" +} + # nextpart*() - functions for reading files incrementally # # These functions aim to facilitate looking for (or waiting for) diff --git a/bin/tests/system/kasp/ns3/setup.sh b/bin/tests/system/kasp/ns3/setup.sh index d487619f3b..a25bc619fb 100644 --- a/bin/tests/system/kasp/ns3/setup.sh +++ b/bin/tests/system/kasp/ns3/setup.sh @@ -22,16 +22,6 @@ setup() { echo "$zone" >> zones } -private_type_record() { - _zone=$1 - _algorithm=$2 - _keyfile=$3 - - _id=$(keyfile_to_key_id "$_keyfile") - - printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" -} - # Set in the key state files the Predecessor/Successor fields. # Key $1 is the predecessor of key $2. key_successor() { diff --git a/bin/tests/system/kasp/ns6/setup.sh b/bin/tests/system/kasp/ns6/setup.sh index e8a3c21af1..6f1d07bf43 100644 --- a/bin/tests/system/kasp/ns6/setup.sh +++ b/bin/tests/system/kasp/ns6/setup.sh @@ -21,17 +21,6 @@ setup() { infile="${zone}.db.infile" } -private_type_record() { - _zone=$1 - _algorithm=$2 - _keyfile=$3 - - _id=$(keyfile_to_key_id "$_keyfile") - - printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" -} - - # Make lines shorter by storing key states in environment variables. H="HIDDEN" R="RUMOURED" diff --git a/bin/tests/system/keymgr2kasp/ns3/setup.sh b/bin/tests/system/keymgr2kasp/ns3/setup.sh index 1bb89ad37b..f2d8c3bab6 100644 --- a/bin/tests/system/keymgr2kasp/ns3/setup.sh +++ b/bin/tests/system/keymgr2kasp/ns3/setup.sh @@ -21,17 +21,6 @@ setup() { infile="${zone}.db.infile" } -private_type_record() { - _zone=$1 - _algorithm=$2 - _keyfile=$3 - - _id=$(keyfile_to_key_id "$_keyfile") - - printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" -} - - # Make lines shorter by storing key states in environment variables. H="HIDDEN" R="RUMOURED" diff --git a/bin/tests/system/keymgr2kasp/ns4/setup.sh b/bin/tests/system/keymgr2kasp/ns4/setup.sh index 148de97570..18f6f322de 100644 --- a/bin/tests/system/keymgr2kasp/ns4/setup.sh +++ b/bin/tests/system/keymgr2kasp/ns4/setup.sh @@ -14,16 +14,6 @@ echo_i "ns4/setup.sh" -private_type_record() { - _zone=$1 - _algorithm=$2 - _keyfile=$3 - - _id=$(keyfile_to_key_id "$_keyfile") - - printf "%s. 0 IN TYPE65534 %s 5 %02x%04x0000\n" "$_zone" "\\#" "$_algorithm" "$_id" -} - # Make lines shorter by storing key states in environment variables. H="HIDDEN" R="RUMOURED"