@@ -711,9 +711,9 @@ repo](https://github.com/theupdateframework/specification/issues).
711711* ** 4.4. File formats: snapshot.json**
712712
713713 The snapshot.json file is signed by the snapshot role. It lists the version
714- numbers of all metadata on the repository, excluding timestamp.json and
715- mirrors.json. For the root role, the hash(es), size, and version number
716- are listed .
714+ numbers of only the top-level targets and all delegated targets role metadata.
715+ The metadata length and hashes are OPTIONAL for the top-level targets and
716+ all delegated targets roles .
717717
718718 The "signed" portion of snapshot.json is as follows:
719719
@@ -727,43 +727,58 @@ repo](https://github.com/theupdateframework/specification/issues).
727727 METAFILES is an object whose format is the following:
728728
729729 { METAPATH : {
730- "version" : VERSION }
730+ "version" : VERSION,
731+ ("length" : LENGTH, |
732+ "hashes" : HASHES) }
731733 , ...
732734 }
733735
734736 METAPATH is the metadata file's path on the repository relative to the
735737 metadata base URL.
736738
737- VERSION is listed for the root file
738- and all other roles available on the repository.
739+ VERSION is listed for the top-level targets and all delegated targets roles
740+ available on the repository.
741+
742+ LENGTH is the integer length in bytes of the metadata file. It is
743+ OPTIONAL for all roles.
744+
745+ HASHES is the dictionary that specifies one or more hashes, including
746+ the cryptographic hash function. For example: { "sha256": HASH, ... }. It is
747+ OPTIONAL for all roles.
739748
740749 A snapshot.json example file:
741750
742- {
743- "signatures": [
744- {
745- "keyid": "66676daa73bdfb4804b56070c8927ae491e2a6c2314f05b854dea94de8ff6bfc",
746- "sig": "f7f03b13e3f4a78a23561419fc0dd741a637e49ee671251be9f8f3fceedfc112e4
747- 4ee3aaff2278fad9164ab039118d4dc53f22f94900dae9a147aa4d35dcfc0f"
748- }
749- ],
750- "signed": {
751- "_type": "snapshot",
752- "spec_version": "1.0.0",
753- "expires": "2030-01-01T00:00:00Z",
754- "meta": {
755- "root.json": {
756- "version": 1
757- },
758- "targets.json": {
759- "version": 1
760- },
761- "project.json": {
762- "version": 1
763- },
751+ { "signatures": [
752+ {
753+ "keyid": "66676daa73bdfb4804b56070c8927ae491e2a6c2314f05b854dea94de8ff6bfc",
754+ "sig": "f7f03b13e3f4a78a23561419fc0dd741a637e49ee671251be9f8f3fceedfc112e4
755+ 4ee3aaff2278fad9164ab039118d4dc53f22f94900dae9a147aa4d35dcfc0f"
764756 }
765- "version": 1
766- },
757+ ],
758+ "signed": {
759+ "_type": "snapshot",
760+ "spec_version": "1.0.0",
761+ "expires": "2030-01-01T00:00:00Z",
762+ "meta": {
763+ "targets.json": {
764+ "version": 1
765+ },
766+ "project1.json": {
767+ "version": 1,
768+ "hashes": {
769+ "sha256": "f592d072e1193688a686267e8e10d7257b4ebfcf28133350dae88362d82a0c8a"
770+ }
771+ },
772+ "project2.json": {
773+ "version": 1,
774+ "length": 604,
775+ "hashes": {
776+ "sha256": "1f812e378264c3085bb69ec5f6663ed21e5882bbece3c3f8a0e8479f205ffb91"
777+ }
778+ }
779+ },
780+ "version": 1
781+ }
767782 }
768783
769784* ** 4.5. File formats: targets.json and delegated target roles**
0 commit comments