]> 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>
Thu, 2 Apr 2026 14:47:18 +0000 (14:47 +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.

bin/tests/system/ksr/tests_ksr.py

index 0d71fdae9c8f1cc7c04de9779c101c8b8c7bb4d5..75d36f94cdf183c67f48aaacd4860aefb5c665ff 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