Skip to content

Commit 1c63fb0

Browse files
sechkovaMVrachev
authored andcommitted
Document fast-forward attack recovery
Document why deleting the timestamp and snapshot files is not needed to recover from a fast-forward attack. Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
1 parent 18d776f commit 1c63fb0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tuf/ngclient/_internal/metadata_bundle.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ def root_update_finished(self):
240240
if self.root.signed.is_expired(self.reference_time):
241241
raise exceptions.ExpiredMetadataError("New root.json is expired")
242242

243+
# No need to recover from fast-forward attack here since
244+
# timestamp and snapshot are not loaded at this point and
245+
# when loaded later will be verified with the new rotated
246+
# keys.
247+
243248
self._root_update_finished = True
244249
logger.debug("Verified final root.json")
245250

0 commit comments

Comments
 (0)