diff --git a/client/client.go b/client/client.go index a6e88f72..807629ea 100644 --- a/client/client.go +++ b/client/client.go @@ -6,6 +6,8 @@ import ( "errors" "io" "io/ioutil" + "reflect" + "sort" "github.com/theupdateframework/go-tuf/data" "github.com/theupdateframework/go-tuf/util" @@ -14,11 +16,11 @@ import ( const ( // This is the upper limit in bytes we will use to limit the download - // size of the root/timestamp roles, since we might not don't know how - // big it is. + // size of the root/timestamp roles, since the size is unknown. defaultRootDownloadLimit = 512000 defaultTimestampDownloadLimit = 16384 defaultMaxDelegations = 32 + defaultMaxRoots = 10000 ) // LocalStore is local storage for downloaded top-level metadata. @@ -86,13 +88,19 @@ type Client struct { // MaxDelegations limits by default the number of delegations visited for any // target MaxDelegations int + + // ChainedRootUpdater enables https://theupdateframework.github.io/specification/v1.0.19/index.html#update-root + ChainedRootUpdater bool + // UpdaterMaxRoots limits the number of downloaded roots in 1.0.19 root updater + UpdaterMaxRoots int } func NewClient(local LocalStore, remote RemoteStore) *Client { return &Client{ - local: local, - remote: remote, - MaxDelegations: defaultMaxDelegations, + local: local, + remote: remote, + MaxDelegations: defaultMaxDelegations, + UpdaterMaxRoots: defaultMaxRoots, } } @@ -144,6 +152,13 @@ func (c *Client) Init(rootKeys []*data.Key, threshold int) error { // // https://github.com/theupdateframework/tuf/blob/v0.9.9/docs/tuf-spec.txt#L714 func (c *Client) Update() (data.TargetFiles, error) { + if c.ChainedRootUpdater { + if err := c.updateRoots(); err != nil { + return data.TargetFiles{}, err + } + return c.update(true) + } + return c.update(false) } @@ -249,6 +264,138 @@ func (c *Client) update(latestRoot bool) (data.TargetFiles, error) { return updatedTargets, nil } +func (c *Client) updateRoots() error { + // https://theupdateframework.github.io/specification/v1.0.19/index.html#load-trusted-root + + // 5.2 Load the trusted root metadata file. We assume that a good, + // trusted copy of this file was shipped with the package manager + // or software updater using an out-of-band process. Note that + // the expiration of the trusted root metadata file does not + // matter, because we will attempt to update it in the next step. + if err := c.getLocalMeta(); err != nil { + if _, ok := err.(verify.ErrExpired); !ok { + return err + } + } + + // Prepare for 5.3.11: If the timestamp and / or snapshot keys have been rotated, + // then delete the trusted timestamp and snapshot metadata files. + getKeyIDs := func(role string) []string { + keyIDs := make([]string, 0, len(c.db.GetRole("timestamp").KeyIDs)) + for k := range c.db.GetRole(role).KeyIDs { + keyIDs = append(keyIDs, k) + } + sort.Strings(keyIDs) + return keyIDs + } + startTimestampKeyIDs := getKeyIDs("timestamp") + startSnapshotKeyIDs := getKeyIDs("snapshot") + + // 5.3.1 Temorarily turn on the consistent snapshots in order to download + // versioned root metadata files as described next. + consistentSnapshot := c.consistentSnapshot + c.consistentSnapshot = true + + // https://theupdateframework.github.io/specification/v1.0.19/index.html#update-root + + // 5.3.1 Since it may now be signed using entirely different keys, + // the client MUST somehow be able to establish a trusted line of + // continuity to the latest set of keys (see § 6.1 Key + // management and migration). To do so, the client MUST + // download intermediate root metadata files, until the + // latest available one is reached. Therefore, it MUST + // temporarily turn on consistent snapshots in order to + // download versioned root metadata files as described next. + + // This loop returns on error or breaks after downloading the lastest root metadata. + // 5.3.2 Let N denote the version number of the trusted root metadata file. + for i := 0; i < c.UpdaterMaxRoots; i++ { + // 5.3.3 Try downloading version nPlusOne of the root metadata file. + // NOTE: as a side effect, we do update c.rootVer to nPlusOne between iterations. + nPlusOne := c.rootVer + 1 + nPlusOneRootPath := util.VersionedPath("root.json", nPlusOne) + nPlusOneRootMetadata, err := c.downloadMetaUnsafe(nPlusOneRootPath, defaultRootDownloadLimit) + //fmt.Println(string(nPlusOneRootMetadata[:])) + if err != nil { + if _, ok := err.(ErrMissingRemoteMetadata); ok { + // stop when the next root can't be downloaded + break + } else { + return err + } + } + + // 5.3.4 Check for an arbitrary software attack. + nPlusOneRootMetadataSigned := &data.Root{} + // 5.3.4.1 Check that N signed N+1 + // 5.3.5 Check for a rollback attack. Here, we check that nPlusOneRootMetadataSigned.version >= nPlusOne. + if err := c.db.UnmarshalExpired(nPlusOneRootMetadata, nPlusOneRootMetadataSigned, "root", nPlusOne); err != nil { + // 5.3.6 Note that the expiration of the new (intermediate) root + // metadata file does not matter yet, because we will check for + // it in step 5.3.10. + if _, ok := err.(verify.ErrExpired); !ok { + return err + } + } + + // 5.3.5 Following up, we check for a fast-forward attack: here, we check for that nPlusOneRootMetadataSigned.version >= nPlusOne. + if nPlusOneRootMetadataSigned.Version != nPlusOne { + return verify.ErrWrongVersion{ + Given: nPlusOneRootMetadataSigned.Version, + Expected: nPlusOne, + } + } + + // 5.3.7 Set the trusted root metadata file to the new root metadata file. + c.rootVer = nPlusOneRootMetadataSigned.Version + // NOTE: following up on 5.3.1, we want to always have consistent snapshots on for the duration + // of root rotation. AFTER the rotation is over, we will set it to the value of the last root. + consistentSnapshot = nPlusOneRootMetadataSigned.ConsistentSnapshot + // 5.3.8 Persist root metadata. The client MUST write the file to non-volatile storage as FILENAME.EXT (e.g. root.json). + // NOTE: Internally, setMeta stores metadata in LevelDB in a persistent manner. + if err := c.local.SetMeta("root.json", nPlusOneRootMetadata); err != nil { + return err + } + + // 5.3.4.2 check that N+1 signed itself. + if err := c.getLocalMeta(); err != nil { + // 5.3.6 Note that the expiration of the new (intermediate) root + // metadata file does not matter yet, because we will check for + // it in step 5.3.10. + if _, ok := err.(verify.ErrExpired); !ok { + return err + } + } + + // 5.3.9 Repeat steps 5.3.2 to 5.3.9 + } + + // 5.3.10 Check for a freeze attack. + // NOTE: this will check for any, including freeze, attack. + if err := c.getLocalMeta(); err != nil { + return err + } + + // 5.3.11 If the timestamp and / or snapshot keys have been rotated, + // then delete the trusted timestamp and snapshot metadata files. + // To figure out if the keys are rotated, compare the timestamp/snapshot keys + // of start root and end root. + //endTimestampKeyIDs := someFunc(c.db.GetRole("timestamp").KeyIDs) + endTimestampKeyIDs := getKeyIDs("timestamp") + endSnapshotKeyIDs := getKeyIDs("snapshot") + + if !reflect.DeepEqual(startTimestampKeyIDs, endTimestampKeyIDs) || + !reflect.DeepEqual(startSnapshotKeyIDs, endSnapshotKeyIDs) { + c.local.SetMeta("snapshot", json.RawMessage{}) + c.local.SetMeta("timestamp", json.RawMessage{}) + return ErrEmptyTimestampOrSnapshot + } + + // 5.3.12 Set whether consistent snapshots are used as per the trusted root metadata file. + c.consistentSnapshot = consistentSnapshot + return nil +} + func (c *Client) updateWithLatestRoot(m *data.SnapshotFileMeta) (data.TargetFiles, error) { var rootJSON json.RawMessage var err error diff --git a/client/client_test.go b/client/client_test.go index a8ca536f..eb1a0d67 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -3,6 +3,7 @@ package client import ( "bytes" "encoding/json" + "errors" "fmt" "io" "io/ioutil" @@ -11,6 +12,7 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" cjson "github.com/tent/canonical-json-go" tuf "github.com/theupdateframework/go-tuf" "github.com/theupdateframework/go-tuf/data" @@ -360,6 +362,83 @@ func (s *ClientSuite) TestNewRoot(c *C) { } } +// Test helper +func initTestClient(c *C, baseDir string, initWithLocalMetadata bool, ignoreExpired bool) (*Client, func() error) { + l, err := initTestTUFRepoServer(baseDir, "server") + c.Assert(err, IsNil) + e := verify.IsExpired + if ignoreExpired { + verify.IsExpired = func(t time.Time) bool { return false } + } + tufClient, err := initTestTUFClient(baseDir, "client/metadata/current", l.Addr().String(), initWithLocalMetadata) + verify.IsExpired = e + c.Assert(err, IsNil) + return tufClient, l.Close +} + +// Tests updateRoots method. +func (s *ClientSuite) TestUpdateRoot(c *C) { + var tests = []struct { + fixturePath string + rootUpdater bool + isExpired bool // Value retuned by verify.IsExpired. + extpectedError error + expectedRootVersion int // -1 means no check is performed on this. + expectNonRootMetadataDeletion bool + }{ + // Good new root update succeeds (the timestamp check disabled). + {"testdata/PublishedTwiceWithRotatedKeys_root", true, false, nil, 2, false}, + // Good new root update with a new key for timestamp succeeds (the timestamp check disabled), and timestamp and snapshot metadata deleted. + {"testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root", true, false, ErrEmptyTimestampOrSnapshot, 2, true}, + // Good update but with an expired root fails. + {"testdata/PublishedTwiceWithRotatedKeys_root", true, true, verify.ErrExpired{}, -1, false}, + // Bad update does not happen with rootUpdater set to false. + {"testdata/PublishedTwiceWithStaleVersion_root", false, false, nil, 1, false}, + // Bad root update with a rollback attack fails. + {"testdata/PublishedTwiceWithStaleVersion_root", true, false, verify.ErrLowVersion{Actual: 1, Current: 2}, -1, false}, + //Bad root update with fast forward attack fails. + {"testdata/PublishedTwiceForwardVersionWithRotatedKeys_root", true, false, verify.ErrWrongVersion(verify.ErrWrongVersion{Given: 3, Expected: 2}), -1, false}, + // Bad root with invalid new root signature fails. + {"testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root", true, false, errors.New("tuf: signature verification failed"), -1, false}, + // Bad root with invalid old root signature fails. + {"testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root", true, false, errors.New("tuf: signature verification failed"), -1, false}, + } + + for _, test := range tests { + fmt.Println(test.fixturePath) + e := verify.IsExpired + verify.IsExpired = func(t time.Time) bool { return test.isExpired } + + tufClient, closer := initTestClient(c, test.fixturePath /* initWithLocalMetadata = */, true /* ignoreExpired = */, true) + tufClient.ChainedRootUpdater = test.rootUpdater + _, err := tufClient.Update() + if test.extpectedError == nil { + c.Assert(err, IsNil) + // Check if the root.json is being saved in non-volatile storage. + tufClient.getLocalMeta() + assert.Equal(c, test.expectedRootVersion, tufClient.RootVersion()) + // Check the timestamp and metadata deletion. + if test.expectNonRootMetadataDeletion { + if m, err := tufClient.local.GetMeta(); err == nil { + assert.Equal(c, m["timestamp"], json.RawMessage{}) + assert.Equal(c, m["snapshot"], json.RawMessage{}) + } + } + + } else { + if _, ok := err.(verify.ErrExpired); ok { + _, ok := test.extpectedError.(verify.ErrExpired) + assert.True(c, ok) + } else { + assert.Equal(c, test.extpectedError, err) + } + } + closer() + verify.IsExpired = e + } + +} + func (s *ClientSuite) TestNewTargets(c *C) { client := s.newClient(c) files, err := client.Update() diff --git a/client/clienttest.go b/client/clienttest.go new file mode 100644 index 00000000..0b2e283f --- /dev/null +++ b/client/clienttest.go @@ -0,0 +1,126 @@ +package client + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net" + "net/http" + "path/filepath" + "strings" + + "github.com/theupdateframework/go-tuf/data" + "github.com/theupdateframework/go-tuf/verify" +) + +//Initializes a local HTTP server and serves TUF Repo. +func initTestTUFRepoServer(baseDir string, relPath string) (net.Listener, error) { + serverDir := filepath.Join(baseDir, relPath) + l, err := net.Listen("tcp", "127.0.0.1:0") + go http.Serve(l, http.FileServer(http.Dir(serverDir))) + return l, err +} + +// Initializes the client object with local files without fetching +// the latest version from the server. +func (c *Client) initWithLocal(rootKeys []*data.Key, threshold int, localrootpath string) error { + if len(rootKeys) < threshold { + return ErrInsufficientKeys + } + rootJSON, err := ioutil.ReadFile(localrootpath) //c.downloadMetaUnsafe("root.json", defaultRootDownloadLimit) + if err != nil { + return err + } + // create a new key database, and add all the public `rootKeys` to it. + c.db = verify.NewDB() + rootKeyIDs := make([]string, 0, len(rootKeys)) + for _, key := range rootKeys { + for _, id := range key.IDs() { + rootKeyIDs = append(rootKeyIDs, id) + if err := c.db.AddKey(id, key); err != nil { + return err + } + } + } + + // add a mock "root" role that trusts the passed in key ids. These keys + // will be used to verify the `root.json` we just fetched. + role := &data.Role{Threshold: threshold, KeyIDs: rootKeyIDs} + if err := c.db.AddRole("root", role); err != nil { + return err + } + + // verify that the new root is valid. + if err := c.decodeRoot(rootJSON); err != nil { + return err + } + + return c.local.SetMeta("root.json", rootJSON) +} + +//Initializes a TUF Client based on metadata in a given path. +func initTestTUFClient(baseDir string, relPath string, serverAddr string, initWithLocalMetadata bool) (*Client, error) { + initialStateDir := filepath.Join(baseDir, relPath) + opts := &HTTPRemoteOptions{ + MetadataPath: "metadata", + TargetsPath: "targets", + } + rawFile, err := ioutil.ReadFile(initialStateDir + "/" + "root.json") + if err != nil { + return nil, err + } + s := &data.Signed{} + root := &data.Root{} + if err := json.Unmarshal(rawFile, s); err != nil { + return nil, err + } + if err := json.Unmarshal(s.Signed, root); err != nil { + return nil, err + } + var keys []*data.Key + for _, sig := range s.Signatures { + k, ok := root.Keys[sig.KeyID] + if ok { + keys = append(keys, k) + } + } + + remote, err := HTTPRemoteStore(fmt.Sprintf("http://%s/", serverAddr), opts, nil) + if err != nil { + return nil, err + } + c := NewClient(MemoryLocalStore(), remote) + + if initWithLocalMetadata { + if err := c.initWithLocal(keys, 1, initialStateDir+"/"+"root.json"); err != nil { + return nil, err + } + } else { + if err := c.Init(keys, 1); err != nil { + return nil, err + } + } + files, err := ioutil.ReadDir(initialStateDir) + if err != nil { + return nil, err + } + + // load local files + for _, f := range files { + if f.IsDir() { + continue + } + name := f.Name() + // ignoring consistent snapshot when loading initial state + if len(strings.Split(name, ".")) == 1 && strings.HasSuffix(name, ".json") { + rawFile, err := ioutil.ReadFile(initialStateDir + "/" + name) + if err != nil { + return nil, err + } + if err := c.local.SetMeta(name, rawFile); err != nil { + return nil, err + } + } + } + return c, nil +} diff --git a/client/delegations_test.go b/client/delegations_test.go index 1ed3cf3b..cf32d0b5 100644 --- a/client/delegations_test.go +++ b/client/delegations_test.go @@ -2,12 +2,7 @@ package client import ( "encoding/json" - "fmt" "io" - "io/ioutil" - "net" - "net/http" - "strings" "testing" "time" @@ -285,113 +280,117 @@ func TestUnverifiedTargets(t *testing.T) { func TestPersistedMeta(t *testing.T) { verify.IsExpired = func(t time.Time) bool { return false } - c, closer := initTestDelegationClient(t, "testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation") - defer closer() - _, err := c.Update() - assert.Nil(t, err) + for _, rootUpdater := range []bool{false, true} { + c, closer := initTestDelegationClient(t, "testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation") + defer closer() + c.ChainedRootUpdater = rootUpdater - _, err = c.local.GetMeta() - assert.Nil(t, err) + _, err := c.Update() + assert.Nil(t, err) - type expectedTargets struct { - name string - version int - } - var persistedTests = []struct { - file string - targets []expectedTargets - downloadError error - fileContent string - }{ - { - file: "unknown", - targets: []expectedTargets{ - { - name: "targets.json", - version: 2, + _, err = c.local.GetMeta() + assert.Nil(t, err) + + type expectedTargets struct { + name string + version int + } + var persistedTests = []struct { + file string + targets []expectedTargets + downloadError error + fileContent string + }{ + { + file: "unknown", + targets: []expectedTargets{ + { + name: "targets.json", + version: 2, + }, }, + downloadError: ErrUnknownTarget{Name: "unknown", SnapshotVersion: 2}, + fileContent: "", }, - downloadError: ErrUnknownTarget{Name: "unknown", SnapshotVersion: 2}, - fileContent: "", - }, - { - file: "b.txt", - targets: []expectedTargets{ - { - name: "targets.json", - version: 2, - }, - { - name: "a.json", - version: 1, - }, - { - name: "b.json", - version: 1, + { + file: "b.txt", + targets: []expectedTargets{ + { + name: "targets.json", + version: 2, + }, + { + name: "a.json", + version: 1, + }, + { + name: "b.json", + version: 1, + }, }, + downloadError: nil, + fileContent: "Contents: b.txt", }, - downloadError: nil, - fileContent: "Contents: b.txt", - }, - { - file: "f.txt", - targets: []expectedTargets{ - { - name: "targets.json", - version: 2, - }, - { - name: "a.json", - version: 1, - }, - { - name: "b.json", - version: 1, - }, - { - name: "c.json", - version: 1, - }, - { - name: "d.json", - version: 1, - }, - { - name: "e.json", - version: 1, - }, - { - name: "f.json", - version: 1, + { + file: "f.txt", + targets: []expectedTargets{ + { + name: "targets.json", + version: 2, + }, + { + name: "a.json", + version: 1, + }, + { + name: "b.json", + version: 1, + }, + { + name: "c.json", + version: 1, + }, + { + name: "d.json", + version: 1, + }, + { + name: "e.json", + version: 1, + }, + { + name: "f.json", + version: 1, + }, }, + downloadError: nil, + fileContent: "Contents: f.txt", }, - downloadError: nil, - fileContent: "Contents: f.txt", - }, - } + } - for _, tt := range persistedTests { - t.Run("search "+tt.file, func(t *testing.T) { - var dest testDestination - err = c.Download(tt.file, &dest) - assert.Equal(t, tt.downloadError, err) - assert.Equal(t, tt.fileContent, dest.String()) + for _, tt := range persistedTests { + t.Run("search "+tt.file, func(t *testing.T) { + var dest testDestination + err = c.Download(tt.file, &dest) + assert.Equal(t, tt.downloadError, err) + assert.Equal(t, tt.fileContent, dest.String()) - p, err := c.local.GetMeta() - assert.Nil(t, err) - persisted := copyStore(p) - // trim non targets metas - for _, notTargets := range []string{"root.json", "snapshot.json", "timestamp.json"} { - delete(persisted, notTargets) - } - for _, targets := range tt.targets { - storedVersion, err := versionOfStoredTargets(targets.name, persisted) - assert.Equal(t, targets.version, storedVersion) + p, err := c.local.GetMeta() assert.Nil(t, err) - delete(persisted, targets.name) - } - assert.Empty(t, persisted) - }) + persisted := copyStore(p) + // trim non targets metas + for _, notTargets := range []string{"root.json", "snapshot.json", "timestamp.json"} { + delete(persisted, notTargets) + } + for _, targets := range tt.targets { + storedVersion, err := versionOfStoredTargets(targets.name, persisted) + assert.Equal(t, targets.version, storedVersion) + assert.Nil(t, err) + delete(persisted, targets.name) + } + assert.Empty(t, persisted) + }) + } } } @@ -411,52 +410,11 @@ func versionOfStoredTargets(name string, store map[string]json.RawMessage) (int, return targets.Version, nil } -func initTestDelegationClient(t *testing.T, dirPrefix string) (*Client, func() error) { - serverDir := dirPrefix + "/server" - initialStateDir := dirPrefix + "/client/metadata/current" - l, err := net.Listen("tcp", "127.0.0.1:0") +func initTestDelegationClient(t *testing.T, baseDir string) (*Client, func() error) { + l, err := initTestTUFRepoServer(baseDir, "server") assert.Nil(t, err) - addr := l.Addr().String() - go http.Serve(l, http.FileServer(http.Dir(serverDir))) - - opts := &HTTPRemoteOptions{ - MetadataPath: "metadata", - TargetsPath: "targets", - } - remote, err := HTTPRemoteStore(fmt.Sprintf("http://%s/", addr), opts, nil) - - c := NewClient(MemoryLocalStore(), remote) - rawFile, err := ioutil.ReadFile(initialStateDir + "/" + "root.json") - assert.Nil(t, err) - s := &data.Signed{} - root := &data.Root{} - assert.Nil(t, json.Unmarshal(rawFile, s)) - assert.Nil(t, json.Unmarshal(s.Signed, root)) - var keys []*data.Key - for _, sig := range s.Signatures { - k, ok := root.Keys[sig.KeyID] - if ok { - keys = append(keys, k) - } - } - - assert.Nil(t, c.Init(keys, 1)) - files, err := ioutil.ReadDir(initialStateDir) + c, err := initTestTUFClient(baseDir, "client/metadata/current", l.Addr().String(), false) assert.Nil(t, err) - - // load local files - for _, f := range files { - if f.IsDir() { - continue - } - name := f.Name() - // ignoring consistent snapshot when loading initial state - if len(strings.Split(name, ".")) == 1 && strings.HasSuffix(name, ".json") { - rawFile, err := ioutil.ReadFile(initialStateDir + "/" + name) - assert.Nil(t, err) - assert.Nil(t, c.local.SetMeta(name, rawFile)) - } - } return c, l.Close } diff --git a/client/errors.go b/client/errors.go index 3d39e6b2..d68ef091 100644 --- a/client/errors.go +++ b/client/errors.go @@ -8,9 +8,10 @@ import ( ) var ( - ErrNoRootKeys = errors.New("tuf: no root keys found in local meta store") - ErrInsufficientKeys = errors.New("tuf: insufficient keys to meet threshold") - ErrNoLocalSnapshot = errors.New("tuf: no snapshot stored locally") + ErrNoRootKeys = errors.New("tuf: no root keys found in local meta store") + ErrInsufficientKeys = errors.New("tuf: insufficient keys to meet threshold") + ErrNoLocalSnapshot = errors.New("tuf: no snapshot stored locally") + ErrEmptyTimestampOrSnapshot = errors.New("tuf: Timestamp or snapshot is empty") ) type ErrMissingRemoteMetadata struct { @@ -144,3 +145,12 @@ type ErrTargetsSnapshotVersionMismatch struct { func (e ErrTargetsSnapshotVersionMismatch) Error() string { return fmt.Sprintf("tuf: downloaded %s version %d expected %d in snapshot v%d ", e.Role, e.DownloadedTargetsVersion, e.TargetsSnapshotVersion, e.SnapshotVersion) } + +type ErrWrongRootVersion struct { + DownloadedVersion int + ExpectedVersion int +} + +func (e ErrWrongRootVersion) Error() string { + return fmt.Sprintf("tuf: wrong root version downloaded expected %d got %d", e.ExpectedVersion, e.DownloadedVersion) +} diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/current/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/client/metadata/previous/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/hash.txt b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/hash.txt new file mode 100644 index 00000000..2344c64a --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/hash.txt @@ -0,0 +1 @@ +6f48551422eae31c39076399d189fdfa8b20204820d3c884c13cdc025e250e53 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/2.root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/2.root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/3.root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/3.root.json new file mode 100644 index 00000000..b6800bb5 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/3.root.json @@ -0,0 +1,95 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "15156589fe9283fddeecb7195e7bdc13cf0e002b4746d10d47f9c98db74e5e10b4092f26b29a1df9eea93fb60648eaf8c6b5f1002621d843bff065dc9d51940a" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "54a8394b644d5bf8444bf6eef070e0f03b0336a451be671da1dc31b13e241bc618f9ead0f4477c622cee928f970c0754fe00bc354c9ba687305933c75de94306" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "b7231c68eb4fa0b13f175b2feb0dbaf27cb14fd8c3c88c52362f33e383752fa158ceca86fd92b5327dcfe5cfbcf30c479aaf60afa9a871dde4197868642e4008" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 3 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/root.json new file mode 100644 index 00000000..b6800bb5 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/root.json @@ -0,0 +1,95 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "15156589fe9283fddeecb7195e7bdc13cf0e002b4746d10d47f9c98db74e5e10b4092f26b29a1df9eea93fb60648eaf8c6b5f1002621d843bff065dc9d51940a" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "54a8394b644d5bf8444bf6eef070e0f03b0336a451be671da1dc31b13e241bc618f9ead0f4477c622cee928f970c0754fe00bc354c9ba687305933c75de94306" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "b7231c68eb4fa0b13f175b2feb0dbaf27cb14fd8c3c88c52362f33e383752fa158ceca86fd92b5327dcfe5cfbcf30c479aaf60afa9a871dde4197868642e4008" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 3 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata.staged/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/2.root.json new file mode 100644 index 00000000..b6800bb5 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/2.root.json @@ -0,0 +1,95 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "15156589fe9283fddeecb7195e7bdc13cf0e002b4746d10d47f9c98db74e5e10b4092f26b29a1df9eea93fb60648eaf8c6b5f1002621d843bff065dc9d51940a" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "54a8394b644d5bf8444bf6eef070e0f03b0336a451be671da1dc31b13e241bc618f9ead0f4477c622cee928f970c0754fe00bc354c9ba687305933c75de94306" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "b7231c68eb4fa0b13f175b2feb0dbaf27cb14fd8c3c88c52362f33e383752fa158ceca86fd92b5327dcfe5cfbcf30c479aaf60afa9a871dde4197868642e4008" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 3 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/root.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/root.json new file mode 100644 index 00000000..b6800bb5 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/root.json @@ -0,0 +1,95 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "15156589fe9283fddeecb7195e7bdc13cf0e002b4746d10d47f9c98db74e5e10b4092f26b29a1df9eea93fb60648eaf8c6b5f1002621d843bff065dc9d51940a" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "54a8394b644d5bf8444bf6eef070e0f03b0336a451be671da1dc31b13e241bc618f9ead0f4477c622cee928f970c0754fe00bc354c9ba687305933c75de94306" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "b7231c68eb4fa0b13f175b2feb0dbaf27cb14fd8c3c88c52362f33e383752fa158ceca86fd92b5327dcfe5cfbcf30c479aaf60afa9a871dde4197868642e4008" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 3 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/targets.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceForwardVersionWithRotatedKeys_root/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/current/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/client/metadata/previous/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/hash.txt b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/hash.txt new file mode 100644 index 00000000..5fd89358 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/hash.txt @@ -0,0 +1 @@ +008c20ceb275a7c650b65e865412a9da3b8face9b888a5f11d1b8ed9f55c60e2 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/2.root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/2.root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata.staged/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/2.root.json new file mode 100644 index 00000000..931ad3af --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/2.root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "000000" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/root.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/targets.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/current/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/client/metadata/previous/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/hash.txt b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/hash.txt new file mode 100644 index 00000000..edc69014 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/hash.txt @@ -0,0 +1 @@ +9b144ffe6848a231771baa3518301cc78ab496802d259977b11051162d748423 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/2.root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/2.root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata.staged/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/2.root.json new file mode 100644 index 00000000..898f11ba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/2.root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "000000" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/root.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/targets.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/current/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/client/metadata/previous/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/hash.txt b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/hash.txt new file mode 100644 index 00000000..1c923e38 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/hash.txt @@ -0,0 +1 @@ +4f14421dd7556a52afaf1e2593dc843654a6606640ada0564ec94b42d9340fc3 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/2.root.json new file mode 100644 index 00000000..32220da7 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/2.root.json @@ -0,0 +1,103 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "37cb1e3f3a5c8093b68bc7cb449d104a1cc71dc98bcb6cceeb94d3f70710616a5e27ec83130d43b22c653cc91ccb0e6545ff3ba0293015663268524e05253c05" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0baa29873d41760ff2bd410dcfada466de6132f2c0aeca18cc0f424887b8de298ea5691524aebd6ea1f5632396d6399154563c32c5cfca11f76892b2c2fc640f" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/2.timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/2.timestamp.json new file mode 100644 index 00000000..e4ae39b5 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/2.timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "6f8c5001fb8282d8452f64504d748f83516b80074840aaa9c354767ccf0ba784a1259998dcf6002b6135cc3db40f520e78eb262967aaec9cd32f3dd935c6960b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/root.json new file mode 100644 index 00000000..32220da7 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/root.json @@ -0,0 +1,103 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "37cb1e3f3a5c8093b68bc7cb449d104a1cc71dc98bcb6cceeb94d3f70710616a5e27ec83130d43b22c653cc91ccb0e6545ff3ba0293015663268524e05253c05" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0baa29873d41760ff2bd410dcfada466de6132f2c0aeca18cc0f424887b8de298ea5691524aebd6ea1f5632396d6399154563c32c5cfca11f76892b2c2fc640f" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..e4ae39b5 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata.staged/timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "6f8c5001fb8282d8452f64504d748f83516b80074840aaa9c354767ccf0ba784a1259998dcf6002b6135cc3db40f520e78eb262967aaec9cd32f3dd935c6960b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/2.root.json new file mode 100644 index 00000000..32220da7 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/2.root.json @@ -0,0 +1,103 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "37cb1e3f3a5c8093b68bc7cb449d104a1cc71dc98bcb6cceeb94d3f70710616a5e27ec83130d43b22c653cc91ccb0e6545ff3ba0293015663268524e05253c05" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0baa29873d41760ff2bd410dcfada466de6132f2c0aeca18cc0f424887b8de298ea5691524aebd6ea1f5632396d6399154563c32c5cfca11f76892b2c2fc640f" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/2.timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/2.timestamp.json new file mode 100644 index 00000000..e4ae39b5 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/2.timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "6f8c5001fb8282d8452f64504d748f83516b80074840aaa9c354767ccf0ba784a1259998dcf6002b6135cc3db40f520e78eb262967aaec9cd32f3dd935c6960b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/root.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/root.json new file mode 100644 index 00000000..32220da7 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/root.json @@ -0,0 +1,103 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "37cb1e3f3a5c8093b68bc7cb449d104a1cc71dc98bcb6cceeb94d3f70710616a5e27ec83130d43b22c653cc91ccb0e6545ff3ba0293015663268524e05253c05" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0baa29873d41760ff2bd410dcfada466de6132f2c0aeca18cc0f424887b8de298ea5691524aebd6ea1f5632396d6399154563c32c5cfca11f76892b2c2fc640f" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/targets.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/timestamp.json new file mode 100644 index 00000000..e4ae39b5 --- /dev/null +++ b/client/testdata/PublishedTwiceRotateTimestampKeysWithRotatedKeys_root/server/metadata/timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + }, + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "6f8c5001fb8282d8452f64504d748f83516b80074840aaa9c354767ccf0ba784a1259998dcf6002b6135cc3db40f520e78eb262967aaec9cd32f3dd935c6960b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/current/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/client/metadata/previous/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/hash.txt b/client/testdata/PublishedTwiceWithRotatedKeys_root/hash.txt new file mode 100644 index 00000000..72d6246a --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/hash.txt @@ -0,0 +1 @@ +f6790e7990e7a5862561d1128322042274a51e8e57c2471e6514ac1d4e605062 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/2.root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/2.root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata.staged/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/2.root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/2.root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/root.json new file mode 100644 index 00000000..6ba80ef4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/root.json @@ -0,0 +1,91 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "309302515543a5b06579cc0cf15cdbaa7eae486e5ae9c2d335926826d069138fcebd21062667eb4a950ccf289824d2de3a221b8f8875f6d29a856f5657542003" + }, + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "81cb58f9fa43cb41931d1608d980d935b5a6ed34d7240a6987c787cc0c34889f7e019aea47656f2792d5b0868844303b3d205441b79daa94f52c0855db511804" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_root/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/current/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/client/metadata/previous/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/hash.txt b/client/testdata/PublishedTwiceWithStaleVersion_root/hash.txt new file mode 100644 index 00000000..c4204ced --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/hash.txt @@ -0,0 +1 @@ +ce6dd7ea549940ed3eef235d48bb0cdaa28fa5ec57f0e3dc9f8eadfe6812ecfb \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata.staged/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/1.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/2.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/root.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "d0bf76a5cfc0aee1b8a1b1bf0ed8ca646a1a6d5f205945c515e8546bfd3c1e6b5e07cc0b93836bd030dd05ba68f177aecb05f6bf90c6702fd178e53310022506" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2020-12-31T05:48:20Z", + "keys": { + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" + }, + "scheme": "ed25519" + }, + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" + }, + "scheme": "ed25519" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + }, + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "61db8765350398f7f750853337d9a55c5d6e790812d29146b5b45d5fd43d2a42c474a7a9fab263c3a50a28114a82f79dbf24ff1f99ae737a8d06f332f9f7d103" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/targets.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/targets.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "c150e8ed5d352f366a979f4c4b9d556350c414c2da7ef1279045aaed3438c60872142d0dfe5ddbb627fec2d8fb7c5d8e692e04a87230b78d74714c5db035620a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithStaleVersion_root/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "1d668531c7a0960cf90825faa684106a8aef0799c1b47e72301bac45d87f2dd42c14f1a3ac7db862323ca5177dd4fd686573ea92aea99638f17414dde561c00b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "f4ca389c2c9fbc592d91d4e693c31113b8803a11bcb5ecd973581fa0e3d34ce0", + "sha512": "92a0989e44c0e9f16d3e56268a3b8dd4e4416ee2ac91a4c871a405f1e426062651ec4effa0078fc4409c8b0422ccad9b1aa197db58f178406f398562b2e98195" + }, + "length": 431, + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 1 + } +} \ No newline at end of file diff --git a/verify/errors.go b/verify/errors.go index 6e4587be..376f4219 100644 --- a/verify/errors.go +++ b/verify/errors.go @@ -50,6 +50,15 @@ func (e ErrLowVersion) Error() string { return fmt.Sprintf("version %d is lower than current version %d", e.Actual, e.Current) } +type ErrWrongVersion struct { + Given int + Expected int +} + +func (e ErrWrongVersion) Error() string { + return fmt.Sprintf("version %d does not match the extepcted version %d", e.Given, e.Expected) +} + type ErrRoleThreshold struct { Expected int Actual int diff --git a/verify/verify.go b/verify/verify.go index b6d4162d..9560a69c 100644 --- a/verify/verify.go +++ b/verify/verify.go @@ -118,6 +118,29 @@ func (db *DB) Unmarshal(b []byte, v interface{}, role string, minVersion int) er return json.Unmarshal(s.Signed, v) } +// UnmarshalExpired is exactly like Unmarshal except ignores expired timestamp. +func (db *DB) UnmarshalExpired(b []byte, v interface{}, role string, minVersion int) error { + s := &data.Signed{} + if err := json.Unmarshal(b, s); err != nil { + return err + } + // Note: If verification fails, then we wont attemp to unmarshal + // unless when verification error is errExpired. + verifyErr := db.Verify(s, role, minVersion) + if verifyErr != nil { + if _, ok := verifyErr.(ErrExpired); !ok { + return verifyErr + } + } + if err := json.Unmarshal(s.Signed, v); err != nil { + return err + } + if verifyErr != nil { + return verifyErr + } + return nil +} + func (db *DB) UnmarshalTrusted(b []byte, v interface{}, role string) error { s := &data.Signed{} if err := json.Unmarshal(b, s); err != nil {