Skip to content

Commit 74fd891

Browse files
committed
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 <[email protected]>
1 parent 28a66c3 commit 74fd891

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
@@ -243,6 +243,11 @@ def root_update_finished(self):
243243
if self.root.signed.is_expired(self.reference_time):
244244
raise exceptions.ExpiredMetadataError("New root.json is expired")
245245

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

0 commit comments

Comments
 (0)