Skip to content

Commit af91a93

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 af91a93

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

tuf-spec.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,30 @@ 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 snapshot metadata file.
998+
999+
HASHES is the dictionary that specifies one or more hashes of the snapshot
1000+
metadata file, including the cryptographic hash function. For example:
1001+
{ "sha256": HASH, ... }.
1002+
1003+
Note: METAFILES is the same as is described for the snapshot.json file, only
1004+
the LENGTH and HASHES are not optional and in the case of the timestamp.json
1005+
file, this MUST only include a description of the snapshot.json file.
9851006

9861007
A signed timestamp.json example file:
9871008

0 commit comments

Comments
 (0)