From 0ff07186a968139553cbf149fe17072c6fbdb8a1 Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Mon, 28 Aug 2017 17:31:25 -0400 Subject: [PATCH] Add spec_version to tuf-spec.md --- docs/tuf-spec.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/tuf-spec.md b/docs/tuf-spec.md index 8bdb295f..6fd722a5 100644 --- a/docs/tuf-spec.md +++ b/docs/tuf-spec.md @@ -534,6 +534,7 @@ Version: **1.0 (Draft)** The "signed" portion of root.json is as follows: { "_type" : "root", + "spec_version" : SPEC_VERSION, "consistent_snapshot": CONSISTENT_SNAPSHOT, "version" : VERSION, "expires" : EXPIRES, @@ -547,6 +548,13 @@ Version: **1.0 (Draft)** , ... } } + SPEC_VERSION is the version number of the specification. Metadata is + written according to version "spec_version" of the specification, and + clients MUST verify that "spec_version" matches the expected version number. + Adopters are free to determine what is considered a match (e.g., the version + number must exactly exactly, or perhaps only the major version number + (major.minor.fix). + CONSISTENT_SNAPSHOT is a boolean indicating whether the repository supports consistent snapshots. Section 7 goes into more detail on the consequences of enabling this setting on a repository. @@ -585,6 +593,7 @@ Version: **1.0 (Draft)** ], "signed": { "_type": "root", + "spec_version": "1", "consistent_snapshot": false, "expires": "2030-01-01T00:00:00Z", "keys": { @@ -657,6 +666,7 @@ Version: **1.0 (Draft)** The "signed" portion of snapshot.json is as follows: { "_type" : "snapshot", + "spec_version" : SPEC_VERSION, "version" : VERSION, "expires" : EXPIRES, "meta" : METAFILES @@ -687,6 +697,7 @@ Version: **1.0 (Draft)** ], "signed": { "_type": "snapshot", + "spec_version": "1", "expires": "2030-01-01T00:00:00Z", "meta": { "root.json": { @@ -708,6 +719,7 @@ Version: **1.0 (Draft)** The "signed" portion of targets.json is as follows: { "_type" : "targets", + "spec_version" : SPEC_VERSION, "version" : VERSION, "expires" : EXPIRES, "targets" : TARGETS, @@ -816,6 +828,7 @@ Version: **1.0 (Draft)** ], "signed": { "_type": "targets", + "spec_version": "1", "delegations": { "keys": { "ce3e02e72980b09ca6f5efa68197130b381921e5d0675e2e0c8f3c47e0626bba": { @@ -871,6 +884,7 @@ Version: **1.0 (Draft)** The "signed" portion of timestamp.json is as follows: { "_type" : "timestamp", + "spec_version" : SPEC_VERSION, "version" : VERSION, "expires" : EXPIRES, "meta" : METAFILES @@ -892,6 +906,7 @@ Version: **1.0 (Draft)** ], "signed": { "_type": "timestamp", + "spec_version": "1", "expires": "2030-01-01T00:00:00Z", "meta": { "snapshot.json": { @@ -916,6 +931,7 @@ Version: **1.0 (Draft)** { "_type" : "mirrors", + "spec_version" : SPEC_VERSION, "version" : VERSION, "expires" : EXPIRES, "mirrors" : [