]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
DNSSEC rrsig_expiration calculation (#977)
authorShaft Inc <141560544+ShaftInc@users.noreply.github.com>
Sun, 6 Aug 2023 17:33:32 +0000 (19:33 +0200)
committerGitHub <noreply@github.com>
Sun, 6 Aug 2023 17:33:32 +0000 (10:33 -0700)
The 'rrsig_expiration' calculation did not take into account inception date when using 'lifetime' in the '_sign()' function

dns/dnssec.py

index d63fc5a97e2eb489097a9eab82b7f2d5a6f387b8..2949f61977db17937e0a1895bb7a446f3d6a0af2 100644 (file)
@@ -549,7 +549,7 @@ def _sign(
     if expiration is not None:
         rrsig_expiration = to_timestamp(expiration)
     elif lifetime is not None:
-        rrsig_expiration = int(time.time()) + lifetime
+        rrsig_expiration = rrsig_inception + lifetime
     else:
         raise ValueError("expiration or lifetime must be specified")