]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that delv supports deprecated trusted-keys
authorMark Andrews <marka@isc.org>
Wed, 20 May 2020 04:20:29 +0000 (14:20 +1000)
committerMark Andrews <marka@isc.org>
Mon, 25 May 2020 21:48:19 +0000 (07:48 +1000)
bin/tests/system/conf.sh.common
bin/tests/system/dnssec/ns1/sign.sh
bin/tests/system/dnssec/tests.sh

index f6596deb0ea8e22ccc5d1ef36df291f5e804c603..5970f8e8daa654dea394215277ff6af04e56e883 100644 (file)
@@ -292,6 +292,13 @@ keyfile_to_dskeys() {
     echo "};"
 }
 
+# keyfile_to_trusted_keys: convert key data contained in the keyfile(s)
+# provided to a "trust-keys" section suitable for including in a
+# resolver's configuration file
+keyfile_to_trusted_keys() {
+    keyfile_to_keys "trusted-keys" "" $*
+}
+
 # keyfile_to_static_keys: convert key data contained in the keyfile(s)
 # provided to a *static-key* "trust-anchors" section suitable for including in
 # a resolver's configuration file
index 66254b7cfe383509a23ccc3cac2dd4cf5dc3e5f8..588278950074d01d9de732fbb4b91a6a4143674d 100644 (file)
@@ -46,6 +46,8 @@ cp trusted.conf ../ns6/trusted.conf
 cp trusted.conf ../ns7/trusted.conf
 cp trusted.conf ../ns9/trusted.conf
 
+keyfile_to_trusted_keys "$ksk" > trusted.keys
+
 # ...or with an initializing key.
 keyfile_to_initial_ds "$ksk" > managed.conf
 cp managed.conf ../ns4/managed.conf
index 9d7597c8e2c34b31da56ec8282172f2e6814d36b..84e4ad627b54550e2f27945af7718618122d27c2 100644 (file)
@@ -205,6 +205,15 @@ if [ -x ${DELV} ] ; then
    n=$((n+1))
    test "$ret" -eq 0 || echo_i "failed"
    status=$((status+ret))
+
+   ret=0
+   echo_i "checking positive validation NSEC using dns_client (trusted-keys) ($n)"
+   "$DELV" -a ns1/trusted.keys -p "$PORT" @10.53.0.4 a a.example > delv.out$n || ret=1
+   grep "a.example..*10.0.0.1" delv.out$n > /dev/null || ret=1
+   grep "a.example..*.RRSIG.A [0-9][0-9]* 2 300 .*" delv.out$n > /dev/null || ret=1
+   n=$((n+1))
+   test "$ret" -eq 0 || echo_i "failed"
+   status=$((status+ret))
 fi
 
 echo_i "checking positive validation NSEC3 ($n)"