From e13f7c1c803b0ea753a8b34a44f2c12018d79d06 Mon Sep 17 00:00:00 2001 From: Matthias Valvekens Date: Fri, 6 Oct 2023 23:47:38 +0200 Subject: [PATCH] PoE processing tweak in LTA time machine Ensure that PoEs are asserted at the reference time for all local knowledge. --- pyhanko/sign/validation/ades.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyhanko/sign/validation/ades.py b/pyhanko/sign/validation/ades.py index ec786f30..8f9c7258 100644 --- a/pyhanko/sign/validation/ades.py +++ b/pyhanko/sign/validation/ades.py @@ -1859,8 +1859,7 @@ def _poes(): # at the current time, including all the prima facie ones gathered from # the file. This simulates perfect record keeping without having to # introduce extra timestamp tokens into the validation process. - for poe in orig_local_knowledge.known_poes: - yield dataclasses.replace(poe, poe_time=min(poe.poe_time, now)) + yield from orig_local_knowledge.assert_existence_known_at(now) yield from dss_knowledge.assert_existence_known_at(now) for prima_facie_poe in prima_facie_poes: for digest in prima_facie_poe.digests_covered: