Skip to content

Commit 3048ac6

Browse files
ericktlukpueh
authored andcommitted
hashes are optional for all roles, addressed comments
1 parent faf80ac commit 3048ac6

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

tuf-spec.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,10 @@ repo](https://github.com/theupdateframework/specification/issues).
710710

711711
* **4.4. File formats: snapshot.json**
712712

713-
The snapshot.json file is signed by the snapshot role. It lists the version
714-
numbers, and optionally the size, of all metadata on the repository,
715-
excluding root.json, timestamp.json and mirrors.json. For delegated roles,
716-
the hash(es) are also listed.
713+
The snapshot.json file is signed by the snapshot role. It lists the version
714+
numbers of all metadata on the repository, excluding root.json, timestamp.json and
715+
mirrors.json. The metadata length and hashes are OPTIONAL for the top-level and
716+
all delegated targets roles.
717717

718718
The "signed" portion of snapshot.json is as follows:
719719

@@ -728,9 +728,8 @@ repo](https://github.com/theupdateframework/specification/issues).
728728

729729
{ METAPATH : {
730730
"version" : VERSION,
731-
"length" : LENGTH,
732-
"hashes" : HASHES,
733-
("custom" : { ... }) }
731+
("length" : LENGTH, |
732+
"hashes" : HASHES) }
734733
, ...
735734
}
736735

@@ -739,12 +738,12 @@ repo](https://github.com/theupdateframework/specification/issues).
739738

740739
VERSION is listed for all roles available on the repository.
741740

742-
LENGTH is the optional integer length in bytes of the file. It is optional
743-
for all roles.
741+
LENGTH is the integer length in bytes of the metadata file. It is
742+
OPTIONAL for all roles.
744743

745-
HASHES is a dictionary that specifies one or more hashes, including
746-
the cryptographic hash function. For example: { "sha256": HASH, ... }. It
747-
is required for delegated roles, and optional for all others.
744+
HASHES is the dictionary that specifies one or more hashes, including
745+
the cryptographic hash function. For example: { "sha256": HASH, ... }. It is
746+
OPTIONAL for all roles.
748747

749748
A snapshot.json example file:
750749

0 commit comments

Comments
 (0)