]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Upgrade uses of hmac-sha1 to DEFAULT_HMAC
authorMark Andrews <marka@isc.org>
Tue, 5 Jul 2022 08:53:53 +0000 (18:53 +1000)
committerMark Andrews <marka@isc.org>
Thu, 7 Jul 2022 00:11:42 +0000 (10:11 +1000)
where the test is not hmac-sha1 specific

17 files changed:
bin/tests/system/checkconf/bad-kasp-keydir1.conf.in [moved from bin/tests/system/checkconf/bad-kasp-keydir1.conf with 95% similarity]
bin/tests/system/checkconf/bad-kasp-keydir2.conf.in [moved from bin/tests/system/checkconf/bad-kasp-keydir2.conf with 94% similarity]
bin/tests/system/checkconf/bad-kasp-keydir3.conf.in [moved from bin/tests/system/checkconf/bad-kasp-keydir3.conf with 95% similarity]
bin/tests/system/checkconf/bad-kasp-keydir4.conf.in [moved from bin/tests/system/checkconf/bad-kasp-keydir4.conf with 95% similarity]
bin/tests/system/checkconf/bad-kasp-keydir5.conf.in [moved from bin/tests/system/checkconf/bad-kasp-keydir5.conf with 95% similarity]
bin/tests/system/checkconf/clean.sh
bin/tests/system/checkconf/setup.sh
bin/tests/system/checkzone/clean.sh
bin/tests/system/checkzone/setup.sh
bin/tests/system/checkzone/zones/bad-tsig.db.in [moved from bin/tests/system/checkzone/zones/bad-tsig.db with 84% similarity]
bin/tests/system/kasp/ns4/named.conf.in
bin/tests/system/kasp/tests.sh
bin/tests/system/keymgr2kasp/ns4/named.conf.in
bin/tests/system/keymgr2kasp/ns4/named2.conf.in
bin/tests/system/keymgr2kasp/tests.sh
bin/tests/system/rndc/ns7/named.conf.in
bin/tests/system/rndc/tests.sh

similarity index 95%
rename from bin/tests/system/checkconf/bad-kasp-keydir1.conf
rename to bin/tests/system/checkconf/bad-kasp-keydir1.conf.in
index eea10308b0d042668a7c6a92b069cdb4f5e451dc..b0deaeae336d66641f5f1a60cea8c1cbb35ed1c5 100644 (file)
 
 
 key "keyforview1" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "keyforview2" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
similarity index 94%
rename from bin/tests/system/checkconf/bad-kasp-keydir2.conf
rename to bin/tests/system/checkconf/bad-kasp-keydir2.conf.in
index 2ccf4397d76949ed62d64a21f73078134e5e8a62..699c193aaa0f288dd9b758ad9ba738265f653849 100644 (file)
  */
 
 key "keyforview1" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "keyforview2" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
similarity index 95%
rename from bin/tests/system/checkconf/bad-kasp-keydir3.conf
rename to bin/tests/system/checkconf/bad-kasp-keydir3.conf.in
index e0578774383c722bffac1234313d9416e2731395..0dbd7e2265170a3b5bf65c725cf0ff0fe4e9ba25 100644 (file)
  */
 
 key "keyforview1" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "keyforview2" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
similarity index 95%
rename from bin/tests/system/checkconf/bad-kasp-keydir4.conf
rename to bin/tests/system/checkconf/bad-kasp-keydir4.conf.in
index 44f867f33e67867b7e7c0ae13d0c61df97709614..af4a8f907b20b0f35d0aaa6a3275aadf881b43b9 100644 (file)
  */
 
 key "keyforview1" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "keyforview2" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
similarity index 95%
rename from bin/tests/system/checkconf/bad-kasp-keydir5.conf
rename to bin/tests/system/checkconf/bad-kasp-keydir5.conf.in
index 9373a079c76c4fdb8f42855b62d802a4d3680ae8..1cca6083263a297579c80266934c16d7bbea3e39 100644 (file)
  */
 
 key "keyforview1" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "keyforview2" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
index 5bdcb6e8e1a1c30c925d03659ee9258bc7293cd5..0d6001da767045791f3fa235e80cd3ea0682c439 100644 (file)
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-rm -f good.conf.in good.conf.out badzero.conf *.out
-rm -f good-kasp.conf.in
-rm -rf test.keydir
+rm -f bad-kasp-keydir1.conf
+rm -f bad-kasp-keydir2.conf
+rm -f bad-kasp-keydir3.conf
+rm -f bad-kasp-keydir4.conf
+rm -f bad-kasp-keydir5.conf
 rm -f checkconf.out*
 rm -f diff.out*
-rm -f ns*/named.lock
+rm -f good-kasp.conf.in
 rm -f good-server-christmas-tree.conf
+rm -f good.conf.in good.conf.out badzero.conf *.out
+rm -f ns*/named.lock
+rm -rf test.keydir
index 85eca861b14a1bbc4a6faceb3a768eef53ff26f0..7d83eb546332b027dedf4fa5bff96124107710d5 100644 (file)
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
+. ../conf.sh
+
+copy_setports bad-kasp-keydir1.conf.in bad-kasp-keydir1.conf
+copy_setports bad-kasp-keydir2.conf.in bad-kasp-keydir2.conf
+copy_setports bad-kasp-keydir3.conf.in bad-kasp-keydir3.conf
+copy_setports bad-kasp-keydir4.conf.in bad-kasp-keydir4.conf
+copy_setports bad-kasp-keydir5.conf.in bad-kasp-keydir5.conf
 cp -f good-server-christmas-tree.conf.in good-server-christmas-tree.conf
index 08c016cb40cf1768114eb0560dd7746459d81944..9a9cde8a9fa937e9b61e2940c46d701ea1e4b192 100644 (file)
@@ -11,4 +11,5 @@
 
 rm -f test.* good1.db.raw named-compilezone
 rm -f ns*/named.lock
+rm -f zones/bad-tsig.db
 rm -f zones/zone1_*.txt
index f143347c89ef59b159aa4579a7ddb64028f11604..cc2aa996fc187709204749d215c8c3c5e93ba80f 100644 (file)
@@ -15,3 +15,5 @@ ln -s $CHECKZONE named-compilezone
 
 ./named-compilezone -D -F raw -o good1.db.raw example \
         zones/good1.db > /dev/null 2>&1
+
+copy_setports zones/bad-tsig.db.in zones/bad-tsig.db
similarity index 84%
rename from bin/tests/system/checkzone/zones/bad-tsig.db
rename to bin/tests/system/checkzone/zones/bad-tsig.db.in
index 53c2f8c114717243a1c5c8a6623994e860a20af4..daef06c3943ea562ce340a38e638c7cd6fa7320d 100644 (file)
@@ -14,4 +14,4 @@ $TTL 600
                NS      ns
 ns             A       192.0.2.1
 
-tsig           TSIG    hmac-sha1. 1516135665 300 20 thBt8DheAD7qpqSFTiGK999sxGg= 54994 NOERROR 0
+tsig           TSIG    @DEFAULT_HMAC@ 1516135665 300 20 thBt8DheAD7qpqSFTiGK999sxGg= 54994 NOERROR 0
index bea7ef67afded1cdab364a6a6cde69acc49ec370..c3f19a93962e81c3da8e658ac572969e43bfb7ca 100644 (file)
@@ -38,17 +38,17 @@ key "sha256" {
 };
 
 key "keyforview1" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "keyforview2" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
 key "keyforview3" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "C1Azf+gGPMmxrUg/WQINP6eV9Y0=";
 };
 
index 8856e2db7da6a9dd7bd620b3259df9e35c8f0565..6d63c5d70dc7cc405a5f907596b8dc16c5361fba 100644 (file)
@@ -1872,7 +1872,7 @@ dnssec_verify
 # Test with views.
 set_zone "example.net"
 set_server "ns4" "10.53.0.4"
-TSIG="hmac-sha1:keyforview1:$VIEW1"
+TSIG="$DEFAULT_HMAC:keyforview1:$VIEW1"
 wait_for_nsec
 check_keys
 check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" "example1"
@@ -1891,7 +1891,7 @@ check_signatures TXT "dig.out.$DIR.test$n.txt" "ZSK"
 test "$ret" -eq 0 || echo_i "failed"
 status=$((status+ret))
 
-TSIG="hmac-sha1:keyforview2:$VIEW2"
+TSIG="$DEFAULT_HMAC:keyforview2:$VIEW2"
 wait_for_nsec
 check_keys
 check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" "example2"
@@ -1908,7 +1908,7 @@ check_signatures TXT "dig.out.$DIR.test$n.txt" "ZSK"
 test "$ret" -eq 0 || echo_i "failed"
 status=$((status+ret))
 
-TSIG="hmac-sha1:keyforview3:$VIEW3"
+TSIG="$DEFAULT_HMAC:keyforview3:$VIEW3"
 wait_for_nsec
 check_keys
 check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" "example2"
index 3b0f9cb932d6f20188fc2a2bdbd9a4b247508dda..fda402ca316da6d5d2848f1818054e9c1c81604e 100644 (file)
@@ -36,12 +36,12 @@ controls {
 };
 
 key "external" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "internal" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
index e9b0ed8f7cefb5f85774169ba1c49367f669bed4..09cc032de2db5e1e03d5c7f3a3c4eff983f0d5b5 100644 (file)
@@ -57,12 +57,12 @@ dnssec-policy "rsasha256" {
 };
 
 key "external" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "YPfMoAk6h+3iN8MDRQC004iSNHY=";
 };
 
 key "internal" {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "4xILSZQnuO1UKubXHkYUsvBRPu8=";
 };
 
index a75dd806390854e5a7258217f9594a74453cb97a..705054f542712257960d3ef1b266a32558dedb23 100644 (file)
@@ -957,7 +957,7 @@ set_server "ns4" "10.53.0.4"
 init_view_migration
 set_keyalgorithm "KEY1" "8" "RSASHA256" "2048"
 set_keyalgorithm "KEY2" "8" "RSASHA256" "1024"
-TSIG="hmac-sha1:external:$VIEW1"
+TSIG="$DEFAULT_HMAC:external:$VIEW1"
 wait_for_nsec
 # Make sure the zone is signed with legacy keys.
 check_keys
@@ -987,7 +987,7 @@ set_server "ns4" "10.53.0.4"
 init_view_migration
 set_keyalgorithm "KEY1" "8" "RSASHA256" "2048"
 set_keyalgorithm "KEY2" "8" "RSASHA256" "1024"
-TSIG="hmac-sha1:internal:$VIEW2"
+TSIG="$DEFAULT_HMAC:internal:$VIEW2"
 wait_for_nsec
 # Make sure the zone is signed with legacy keys.
 check_keys
@@ -1052,7 +1052,7 @@ set_keystate     "KEY3" "STATE_DNSKEY" "rumoured"
 set_keystate     "KEY3" "STATE_ZRRSIG" "hidden"
 
 # Various signing policy checks (external).
-TSIG="hmac-sha1:external:$VIEW1"
+TSIG="$DEFAULT_HMAC:external:$VIEW1"
 check_keys
 wait_for_done_signing
 check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" "ext"
@@ -1113,7 +1113,7 @@ check_apex
 dnssec_verify
 
 # Various signing policy checks (internal).
-TSIG="hmac-sha1:internal:$VIEW2"
+TSIG="$DEFAULT_HMAC:internal:$VIEW2"
 check_keys
 wait_for_done_signing
 check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" "int"
index ce8ea75c927477a1c748507ff11adfa5ad21ca8a..af3e6fbdd52c3d7679fb76b7b2a3c9ae894bbdef 100644 (file)
@@ -24,12 +24,12 @@ key rndc_key {
 };
 
 key int {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "FrSt77yPTFx6hTs4i2tKLB9LmE0=";
 };
 
 key ext {
-       algorithm "hmac-sha1";
+       algorithm @DEFAULT_HMAC@;
        secret "FrSt77yPTFx6hTs4i2tKLB9LmE0=";
 };
 
index 17b007e850ffb2454f3fbc4e5dc2b11b1b32bc01..b6475bd4ff00ae733054214018efb6d92ef83c60 100644 (file)
@@ -739,10 +739,10 @@ status=$((status+ret))
 n=$((n+1))
 echo_i "checking initial in-view zone file is loaded ($n)"
 ret=0
-TSIG="hmac-sha1:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
+TSIG="$DEFAULT_HMAC:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
 $DIGCMD @10.53.0.7 -y "$TSIG" text1.test. TXT > dig.out.1.test$n
 grep 'include 1' dig.out.1.test$n >/dev/null || ret=1
-TSIG="hmac-sha1:ext:FrSt77yPTFx6hTs4i2tKLB9LmE0="
+TSIG="$DEFAULT_HMAC:ext:FrSt77yPTFx6hTs4i2tKLB9LmE0="
 $DIGCMD @10.53.0.7 -y "$TSIG" text1.test. TXT > dig.out.2.test$n
 grep 'include 1' dig.out.2.test$n >/dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -750,7 +750,7 @@ status=$((status+ret))
 
 echo_i "update in-view zone ($n)"
 ret=0
-TSIG="hmac-sha1:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
+TSIG="$DEFAULT_HMAC:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
 $NSUPDATE -p ${PORT} -y "$TSIG" > /dev/null 2>&1 <<END || ret=1
 server 10.53.0.7
 zone test.
@@ -765,7 +765,7 @@ status=$((status+ret))
 
 echo_i "checking update ($n)"
 ret=0
-TSIG="hmac-sha1:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
+TSIG="$DEFAULT_HMAC:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
 $DIGCMD @10.53.0.7 -y "$TSIG" text2.test. TXT > dig.out.1.test$n
 grep 'addition 1' dig.out.1.test$n >/dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -795,10 +795,10 @@ wait_for_log 3 "all zones loaded" ns7/named.run
 n=$((n+1))
 echo_i "checking zone file edits are loaded ($n)"
 ret=0
-TSIG="hmac-sha1:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
+TSIG="$DEFAULT_HMAC:int:FrSt77yPTFx6hTs4i2tKLB9LmE0="
 $DIGCMD @10.53.0.7 -y "$TSIG" text1.test. TXT > dig.out.1.test$n
 grep 'include 2' dig.out.1.test$n >/dev/null || ret=1
-TSIG="hmac-sha1:ext:FrSt77yPTFx6hTs4i2tKLB9LmE0="
+TSIG="$DEFAULT_HMAC:ext:FrSt77yPTFx6hTs4i2tKLB9LmE0="
 $DIGCMD @10.53.0.7 -y "$TSIG" text1.test. TXT > dig.out.2.test$n
 grep 'include 2' dig.out.2.test$n >/dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi