Skip to content

Commit 17e6516

Browse files
committed
Clarify timestamp.json METAFILES format
The listing for snapshot.json in timestamp.json REQUIRES both the length and the hashes field, unlike snapshot.json where these are OPTIONAL. Fixes #38 Signed-off-by: Joshua Lock <jlock@vmware.com>
1 parent d97da38 commit 17e6516

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

tuf-spec.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,29 @@ repo](https://github.com/theupdateframework/specification/issues).
979979
"meta" : METAFILES
980980
}
981981

982-
METAFILES is the same as is described for the snapshot.json file. In the
983-
case of the timestamp.json file, this MUST only include a description of the
984-
snapshot.json file and the LENGTH of the snapshot.json file is REQUIRED.
982+
METAFILES is an object whose format is the following:
983+
984+
{ METAPATH : {
985+
"version" : VERSION,
986+
("length" : LENGTH, |
987+
"hashes" : HASHES) }
988+
, ...
989+
}
990+
991+
METAPATH is the snapshot.json file's path on the repository relative to the
992+
metadata base URL.
993+
994+
VERSION is the version the snapshot target as listed in the snapshot.json
995+
file.
996+
997+
LENGTH is the integer length in bytes of the metadata file.
998+
999+
HASHES is the dictionary that specifies one or more hashes, including
1000+
the cryptographic hash function. For example: { "sha256": HASH, ... }.
1001+
1002+
Note: METAFILES is the same as is described for the snapshot.json file, only
1003+
the LENGTH and HASHES are not optional and in the case of the timestamp.json
1004+
file, this MUST only include a description of the snapshot.json file.
9851005

9861006
A signed timestamp.json example file:
9871007

0 commit comments

Comments
 (0)