Skip to content

Commit 7573eb9

Browse files
AdamKorczcbgbt
authored andcommitted
store root.json in the datastore to comply with TUF spec
Signed-off-by: Adam Korczynski <[email protected]>
1 parent 4849410 commit 7573eb9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tough/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ async fn load_root<R: AsRef<[u8]>>(
796796
}
797797
}
798798

799+
datastore.remove("root.json");
800+
datastore.create("root.json", &root).await?;
801+
799802
// TUF v1.0.16, 5.2.9. Check for a freeze attack. The expiration timestamp in the trusted root
800803
// metadata file MUST be higher than the fixed update start time. If the trusted root metadata
801804
// file has expired, abort the update cycle, report the potential freeze attack. On the next

0 commit comments

Comments
 (0)