]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Regression check for missing RRSIGs
authorMark Andrews <marka@isc.org>
Mon, 18 Dec 2023 00:23:21 +0000 (11:23 +1100)
committerMark Andrews <marka@isc.org>
Tue, 19 Dec 2023 01:56:57 +0000 (12:56 +1100)
When transitioning from NSEC3 to NSEC the added records where not
being signed because the wrong time was being used to determine if
a key should be used or not.  Check that these records are actually
signed.

(cherry picked from commit bdb42d383887cb931ff543a231bc6b5b882a95b4)

bin/tests/system/autosign/ns3/named.conf.in
bin/tests/system/autosign/tests.sh

index a1f1f0d1703621a9a790eb869be8bc7d2407f976..65d18c605fd2968d04bbfff8f22505402254446a 100644 (file)
@@ -167,6 +167,7 @@ zone "nsec3-to-nsec.example" {
        type primary;
        file "nsec3-to-nsec.example.db";
        allow-update { any; };
+       max-journal-size 10M;
        auto-dnssec maintain;
 };
 
index 7da0cb078a2b522c80444f545aa96c8462edf302..de7c6caa2f0df7bc636ad685fd7985014b915b2a 100755 (executable)
@@ -1772,5 +1772,16 @@ n=$((n + 1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
+echo_i "check that the startup change from NSEC3 to NSEC is properly signed ($n)"
+ret=0
+$JOURNALPRINT ns3/nsec3-to-nsec.example.db.jnl \
+  | awk 'BEGIN { count=0; ok=0 }
+$1 == "del" && $5 == "SOA" { count++; if (count == 2) { if (ok) { exit(0); } else { exit(1); } } }
+$1 == "add" && $5 == "RRSIG" && $6 == "TYPE65534" { ok=1 }
+' || 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