]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Also fix off by one error in system test
authorMatthijs Mekking <matthijs@isc.org>
Thu, 2 Apr 2026 08:54:53 +0000 (10:54 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 7 Apr 2026 08:32:58 +0000 (08:32 +0000)
The system test was also subject to the same off by one bug that also
existed in the code. That is: if the inception time of the signature
is exactly equal to the inactive time of the key, we still have to
expect the signature.

(cherry picked from commit d9b6036e0f3b6a407e0035edbe6da613660219f4)

bin/tests/system/ksr/tests_ksr.py

index b9e7972fd43ada17ed20a26e2b6fa3a5b67eb621..206bf2fba2929c93235fa02e3211494f4f196015 100644 (file)
@@ -338,7 +338,7 @@ def check_keysigningrequest(path, zsks, start, end):
     line_no = 0
 
     inception = start
-    while inception < end:
+    while inception <= end:
         next_bundle = end + 1
         # expect bundle header
         assert f";; KeySigningRequest 1.0 {inception}" in lines[line_no]
@@ -402,7 +402,7 @@ def check_signedkeyresponse(
     dnskey_ttl = int(config["dnskey-ttl"].total_seconds())
 
     inception = start
-    while inception < end:
+    while inception <= end:
         # A single signed key response may consist of:
         # ;; SignedKeyResponse (header)
         # ;; DNSKEY 257 (one per published key in ksks)
@@ -487,7 +487,7 @@ def check_signedkeyresponse(
             inactive = key.get_timing("Inactive", must_exist=False)
             if active > inception:
                 continue
-            if inactive is not None and inception >= inactive:
+            if inactive is not None and inception > inactive:
                 continue
 
             # collect keys that should be in this bundle
@@ -537,7 +537,7 @@ def check_signedkeyresponse(
                 inactive = key.get_timing("Inactive", must_exist=False)
                 if active > inception:
                     continue
-                if inactive is not None and inception >= inactive:
+                if inactive is not None and inception > inactive:
                     continue
 
                 # collect keys that should be in this bundle
@@ -595,7 +595,7 @@ def check_signedkeyresponse(
                 inactive = key.get_timing("Inactive", must_exist=False)
                 if active > inception:
                     continue
-                if inactive is not None and inception >= inactive:
+                if inactive is not None and inception > inactive:
                     continue
 
                 # collect keys that should be in this bundle