diff --git a/README.md b/README.md index aefbe316..9a2e7537 100644 --- a/README.md +++ b/README.md @@ -1,513 +1,7 @@ -# go-tuf -[![build](https://github.com/theupdateframework/go-tuf/workflows/build/badge.svg)](https://github.com/theupdateframework/go-tuf/actions?query=workflow%3Abuild) [![Coverage Status](https://coveralls.io/repos/github/theupdateframework/go-tuf/badge.svg)](https://coveralls.io/github/theupdateframework/go-tuf) [![PkgGoDev](https://pkg.go.dev/badge/github.com/theupdateframework/go-tuf)](https://pkg.go.dev/github.com/theupdateframework/go-tuf) [![Go Report Card](https://goreportcard.com/badge/github.com/theupdateframework/go-tuf)](https://goreportcard.com/report/github.com/theupdateframework/go-tuf) +--- -This is a Go implementation of [The Update Framework (TUF)](http://theupdateframework.com/), -a framework for securing software update systems. +# :warning: IMPORTANT NOTE :warning: -## Directory layout +This repository is used at Datadog for testing and development purposes only. -A TUF repository has the following directory layout: - -``` -. -├── keys -├── repository -│   └── targets -└── staged -    └── targets -``` - -The directories contain the following files: - -* `keys/` - signing keys (optionally encrypted) with filename pattern `ROLE.json` -* `repository/` - signed manifests -* `repository/targets/` - hashed target files -* `staged/` - either signed, unsigned or partially signed manifests -* `staged/targets/` - unhashed target files - -## CLI - -`go-tuf` provides a CLI for managing a local TUF repository. - -### Install - -``` -go get github.com/theupdateframework/go-tuf/cmd/tuf -``` - -### Commands - -#### `tuf init [--consistent-snapshot=false]` - -Initializes a new repository. - -This is only required if the repository should not generate consistent -snapshots (i.e. by passing `--consistent-snapshot=false`). If consistent -snapshots should be generated, the repository will be implicitly -initialized to do so when generating keys. - -#### `tuf gen-key [--expires=] ` - -Prompts the user for an encryption passphrase (unless the -`--insecure-plaintext` flag is set), then generates a new signing key and -writes it to the relevant key file in the `keys` directory. It also stages -the addition of the new key to the `root` manifest. - -#### `tuf set-threshold ` - -Sets the `role` threshold, the required number of keys for signing, to -`threshold`. - -#### `tuf add [...]` - -Hashes files in the `staged/targets` directory at the given path(s), then -updates and stages the `targets` manifest. Specifying no paths hashes all -files in the `staged/targets` directory. - -#### `tuf remove [...]` - -Stages the removal of files with the given path(s) from the `targets` manifest -(they get removed from the filesystem when the change is committed). Specifying -no paths removes all files from the `targets` manifest. - -#### `tuf snapshot [--compression=]` - -Expects a staged, fully signed `targets` manifest and stages an appropriate -`snapshot` manifest. It optionally compresses the staged `targets` manifest. - -#### `tuf timestamp` - -Stages an appropriate `timestamp` manifest. If a `snapshot` manifest is staged, -it must be fully signed. - -#### `tuf sign ROLE` - -Signs the given role's staged manifest with all keys present in the `keys` -directory for that role. - -#### `tuf commit` - -Verifies that all staged changes contain the correct information and are signed -to the correct threshold, then moves the staged files into the `repository` -directory. It also removes any target files which are not in the `targets` -manifest. - -#### `tuf regenerate [--consistent-snapshot=false]` - -Recreates the `targets` manifest based on the files in `repository/targets`. - -#### `tuf clean` - -Removes all staged manifests and targets. - -#### `tuf root-keys` - -Outputs a JSON serialized array of root keys to STDOUT. The resulting JSON -should be distributed to clients for performing initial updates. - -For a list of supported commands, run `tuf help` from the command line. - -### Examples - -The following are example workflows for managing a TUF repository with the CLI. - -The `tree` commands do not need to be run, but their output serve as an -illustration of what files should exist after performing certain commands. - -Although only two machines are referenced (i.e. the "root" and "repo" boxes), -the workflows can be trivially extended to many signing machines by copying -staged changes and signing on each machine in turn before finally committing. - -Some key IDs are truncated for illustrative purposes. - -#### Create signed root manifest - -Generate a root key on the root box: - -``` -$ tuf gen-key root -Enter root keys passphrase: -Repeat root keys passphrase: -Generated root key with ID 184b133f - -$ tree . -. -├── keys -│   └── root.json -├── repository -└── staged - ├── root.json - └── targets -``` - -Copy `staged/root.json` from the root box to the repo box and generate targets, -snapshot and timestamp keys: - -``` -$ tree . -. -├── keys -├── repository -└── staged - ├── root.json - └── targets - -$ tuf gen-key targets -Enter targets keys passphrase: -Repeat targets keys passphrase: -Generated targets key with ID 8cf4810c - -$ tuf gen-key snapshot -Enter snapshot keys passphrase: -Repeat snapshot keys passphrase: -Generated snapshot key with ID 3e070e53 - -$ tuf gen-key timestamp -Enter timestamp keys passphrase: -Repeat timestamp keys passphrase: -Generated timestamp key with ID a3768063 - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -└── staged - ├── root.json - └── targets -``` - -Copy `staged/root.json` from the repo box back to the root box and sign it: - -``` -$ tree . -. -├── keys -│   ├── root.json -├── repository -└── staged - ├── root.json - └── targets - -$ tuf sign root.json -Enter root keys passphrase: -``` - -The staged `root.json` can now be copied back to the repo box ready to be -committed alongside other manifests. - -#### Add a target file - -Assuming a staged, signed `root` manifest and the file to add exists at -`staged/targets/foo/bar/baz.txt`: - -``` -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -└── staged -    ├── root.json - └── targets - └── foo - └── bar - └── baz.txt - -$ tuf add foo/bar/baz.txt -Enter targets keys passphrase: - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -└── staged -    ├── root.json - ├── targets - │   └── foo - │   └── bar - │   └── baz.txt - └── targets.json - -$ tuf snapshot -Enter snapshot keys passphrase: - -$ tuf timestamp -Enter timestamp keys passphrase: - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -└── staged -    ├── root.json -    ├── snapshot.json - ├── targets - │   └── foo - │   └── bar - │   └── baz.txt -    ├── targets.json -    └── timestamp.json - -$ tuf commit - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged -``` - -#### Remove a target file - -Assuming the file to remove is at `repository/targets/foo/bar/baz.txt`: - -``` -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged - -$ tuf remove foo/bar/baz.txt -Enter targets keys passphrase: - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged - └── targets.json - -$ tuf snapshot -Enter snapshot keys passphrase: - -$ tuf timestamp -Enter timestamp keys passphrase: - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged -    ├── snapshot.json -    ├── targets.json -    └── timestamp.json - -$ tuf commit - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -└── staged -``` - -#### Regenerate manifests based on targets tree - -``` -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged - -$ tuf regenerate -Enter targets keys passphrase: - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged - └── targets.json - -$ tuf snapshot -Enter snapshot keys passphrase: - -$ tuf timestamp -Enter timestamp keys passphrase: - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged -    ├── snapshot.json -    ├── targets.json -    └── timestamp.json - -$ tuf commit - -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged -``` - -#### Update timestamp.json - -``` -$ tree . -. -├── keys -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged - -$ tuf timestamp -Enter timestamp keys passphrase: - -$ tree . -. -├── keys -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged - └── timestamp.json - -$ tuf commit - -$ tree . -. -├── keys -│   └── timestamp.json -├── repository -│   ├── root.json -│   ├── snapshot.json -│   ├── targets -│   │   └── foo -│   │   └── bar -│   │   └── baz.txt -│   ├── targets.json -│   └── timestamp.json -└── staged -``` - -## Client - -For the client package, see https://godoc.org/github.com/theupdateframework/go-tuf/client. - -For the client CLI, see https://github.com/theupdateframework/go-tuf/tree/master/cmd/tuf-client. +Please use the upstream repository [theupdateframework/go-tuf](https://github.com/theupdateframework/go-tuf). diff --git a/client/client.go b/client/client.go index 129ec31b..0b34b13d 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" @@ -18,6 +20,8 @@ const ( // big it is. defaultRootDownloadLimit = 512000 defaultTimestampDownloadLimit = 16384 + defaultMaxDelegations = 32 + defaultMaxRootRotations = 1e3 ) // LocalStore is local storage for downloaded top-level metadata. @@ -81,12 +85,21 @@ type Client struct { // consistentSnapshot indicates whether the remote storage is using // consistent snapshots (as specified in root.json) consistentSnapshot bool + + // MaxDelegations limits by default the number of delegations visited for any + // target + MaxDelegations int + + // MaxRootRotations limits the number of downloaded roots in 1.0.19 root updater + MaxRootRotations int } func NewClient(local LocalStore, remote RemoteStore) *Client { return &Client{ - local: local, - remote: remote, + local: local, + remote: remote, + MaxDelegations: defaultMaxDelegations, + MaxRootRotations: defaultMaxRootRotations, } } @@ -142,27 +155,13 @@ func (c *Client) Update() (data.TargetFiles, error) { } func (c *Client) update(latestRoot bool) (data.TargetFiles, error) { - // Always start the update using local metadata - if err := c.getLocalMeta(); err != nil { + if err := c.updateRoots(); err != nil { if _, ok := err.(verify.ErrExpired); ok { - if !latestRoot { - return c.updateWithLatestRoot(nil) - } - // this should not be reached as if the latest root has - // been downloaded and it is expired, updateWithLatestRoot - // should not have continued the update - return nil, err - } - if latestRoot && isErrRoleThreshold(err) { - // Root was updated with new keys, so our local metadata is no - // longer validating. Read only the versions from the local metadata - // and re-download everything. - if err := c.getRootAndLocalVersionsUnsafe(); err != nil { - return nil, err - } - } else { - return nil, err + // For backward compatibility, we wrap the ErrExpired inside + // ErrDecodeFailed. + return nil, ErrDecodeFailed{"root.json", err} } + return nil, err } // Get timestamp.json, extract snapshot.json file meta and save the @@ -173,50 +172,32 @@ func (c *Client) update(latestRoot bool) (data.TargetFiles, error) { } snapshotMeta, err := c.decodeTimestamp(timestampJSON) if err != nil { - // ErrRoleThreshold could indicate timestamp keys have been - // revoked, so retry with the latest root.json - if isDecodeFailedWithErrRoleThreshold(err) && !latestRoot { - return c.updateWithLatestRoot(nil) - } return nil, err } if err := c.local.SetMeta("timestamp.json", timestampJSON); err != nil { return nil, err } - // Return ErrLatestSnapshot if we already have the latest snapshot.json - if c.hasMetaFromTimestamp("snapshot.json", snapshotMeta) { - return nil, ErrLatestSnapshot{c.snapshotVer} - } - - // Get snapshot.json, then extract root.json and targets.json file meta. + // Get snapshot.json, then extract file metas. // - // The snapshot.json is only saved locally after checking root.json and + // The snapshot.json is only saved locally after checking // targets.json so that it will be re-downloaded on subsequent updates // if this update fails. + // root.json meta should not be stored in the snapshot, if it is, + // the root will be checked, re-downloaded snapshotJSON, err := c.downloadMetaFromTimestamp("snapshot.json", snapshotMeta) if err != nil { return nil, err } - rootMeta, targetsMeta, err := c.decodeSnapshot(snapshotJSON) + snapshotMetas, err := c.decodeSnapshot(snapshotJSON) if err != nil { - // ErrRoleThreshold could indicate snapshot keys have been - // revoked, so retry with the latest root.json - if isDecodeFailedWithErrRoleThreshold(err) && !latestRoot { - return c.updateWithLatestRoot(nil) - } return nil, err } - // If we don't have the root.json, download it, save it in local - // storage and restart the update - if !c.hasMetaFromSnapshot("root.json", rootMeta) { - return c.updateWithLatestRoot(&rootMeta) - } - // If we don't have the targets.json, download it, determine updated // targets and save targets.json in local storage var updatedTargets data.TargetFiles + targetsMeta := snapshotMetas["targets.json"] if !c.hasMetaFromSnapshot("targets.json", targetsMeta) { targetsJSON, err := c.downloadMetaFromSnapshot("targets.json", targetsMeta) if err != nil { @@ -235,76 +216,154 @@ func (c *Client) update(latestRoot bool) (data.TargetFiles, error) { if err := c.local.SetMeta("snapshot.json", snapshotJSON); err != nil { return nil, err } - return updatedTargets, nil } -func (c *Client) updateWithLatestRoot(m *data.SnapshotFileMeta) (data.TargetFiles, error) { - var rootJSON json.RawMessage - var err error - if m == nil { - rootJSON, err = c.downloadMetaUnsafe("root.json", defaultRootDownloadLimit) - } else { - rootJSON, err = c.downloadMetaFromSnapshot("root.json", *m) +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.loadAndVerifyLocalRootMeta(); err != nil { + if _, ok := err.(verify.ErrExpired); !ok { + return err + } } + m, err := c.local.GetMeta() if err != nil { - return nil, err + return err } - if err := c.decodeRoot(rootJSON); err != nil { - return nil, err + nRootMetadata := m["root.json"] + + // 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(role).KeyIDs)) + for k := range c.db.GetRole(role).KeyIDs { + keyIDs = append(keyIDs, k) + } + sort.Strings(keyIDs) + return keyIDs + } + + // The manifest looks like this: + // { + // "timestamp": ["KEYID1", "KEYID2"], + // "snapshot": ["KEYID3"], + // "targets": ["KEYID4", "KEYID5", "KEYID6"] + // } + nonRootManifests := map[string][]string{"timestamp": {}, "snapshot": {}, "targets": {}} + for k := range nonRootManifests { + nonRootManifests[k] = getKeyIDs(k) + } + + // 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.MaxRootRotations; 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) + + 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. + // 5.3.4.1 Check that N signed N+1 + nPlusOneRootMetadataSigned, err := c.verifyRoot(nRootMetadata, nPlusOneRootMetadata) + if err != nil { + return err + } + + // 5.3.4.2 check that N+1 signed itself. + if _, err := c.verifyRoot(nPlusOneRootMetadata, nPlusOneRootMetadata); 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. + return err + } + + // 5.3.5 Check for a rollback attack. Here, we check 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 + } + nRootMetadata = nPlusOneRootMetadata + // 5.3.9 Repeat steps 5.3.2 to 5.3.9 + + } // End of the for loop. + + // 5.3.10 Check for a freeze attack. + // NOTE: this will check for any, including freeze, attack. + if err := c.loadAndVerifyLocalRootMeta(); err != nil { + return err } - if err := c.local.SetMeta("root.json", rootJSON); err != nil { - return nil, err + + // 5.3.11 If the timestamp and / or snapshot keys have been rotated, + // then delete the trusted timestamp and snapshot metadata files. + for topLevelRolename := range nonRootManifests { + if !reflect.DeepEqual( + nonRootManifests[topLevelRolename], + getKeyIDs(topLevelRolename)) { + c.local.SetMeta(topLevelRolename, json.RawMessage{}) + } } - return c.update(true) + + // 5.3.12 Set whether consistent snapshots are used as per the trusted root metadata file. + c.consistentSnapshot = consistentSnapshot + return nil } // getLocalMeta decodes and verifies metadata from local storage. -// // The verification of local files is purely for consistency, if an attacker // has compromised the local storage, there is no guarantee it can be trusted. func (c *Client) getLocalMeta() error { - meta, err := c.local.GetMeta() - if err != nil { + if err := c.loadAndVerifyLocalRootMeta(); err != nil { return err } - if rootJSON, ok := meta["root.json"]; ok { - // unmarshal root.json without verifying as we need the root - // keys first - s := &data.Signed{} - if err := json.Unmarshal(rootJSON, s); err != nil { - return err - } - root := &data.Root{} - if err := json.Unmarshal(s.Signed, root); err != nil { - return err - } - c.db = verify.NewDB() - for id, k := range root.Keys { - if err := c.db.AddKey(id, k); err != nil { - // TUF is considering in TAP-12 removing the - // requirement that the keyid hash algorithm be derived - // from the public key. So to be forwards compatible, - // we ignore `ErrWrongID` errors. - // - // TAP-12: https://github.com/theupdateframework/taps/blob/master/tap12.md - if _, ok := err.(verify.ErrWrongID); !ok { - return err - } - } - } - for name, role := range root.Roles { - if err := c.db.AddRole(name, role); err != nil { - return err - } - } - if err := c.db.Verify(s, "root", 0); err != nil { - return err - } - c.consistentSnapshot = root.ConsistentSnapshot - } else { - return ErrNoRootKeys + meta, err := c.local.GetMeta() + if err != nil { + return nil } if snapshotJSON, ok := meta["snapshot.json"]; ok { @@ -338,6 +397,102 @@ func (c *Client) getLocalMeta() error { return nil } +// loadAndVerifyLocalRootMeta decodes and verifies root metadata from +// local storage and loads the top-level keys. This method first clears +// the DB for top-level keys and then loads the new keys. +func (c *Client) loadAndVerifyLocalRootMeta() error { + meta, err := c.local.GetMeta() + if err != nil { + return err + } + rootJSON, ok := meta["root.json"] + if !ok { + return ErrNoRootKeys + } + // unmarshal root.json without verifying as we need the root + // keys first + s := &data.Signed{} + if err := json.Unmarshal(rootJSON, s); err != nil { + return err + } + root := &data.Root{} + if err := json.Unmarshal(s.Signed, root); err != nil { + return err + } + c.db = verify.NewDB() + for id, k := range root.Keys { + if err := c.db.AddKey(id, k); err != nil { + // TUF is considering in TAP-12 removing the + // requirement that the keyid hash algorithm be derived + // from the public key. So to be forwards compatible, + // we ignore `ErrWrongID` errors. + // + // TAP-12: https://github.com/theupdateframework/taps/blob/master/tap12.md + if _, ok := err.(verify.ErrWrongID); !ok { + return err + } + } + } + for name, role := range root.Roles { + if err := c.db.AddRole(name, role); err != nil { + return err + } + } + // Any trusted local root metadata version must be greater than 0. + if err := c.db.Verify(s, "root", 0); err != nil { + return err + } + c.consistentSnapshot = root.ConsistentSnapshot + return nil +} + +// verifyRoot verifies Signed section of the bJSON +// using verification keys in aJSON. +func (c *Client) verifyRoot(aJSON []byte, bJSON []byte) (*data.Root, error) { + aSigned := &data.Signed{} + if err := json.Unmarshal(aJSON, aSigned); err != nil { + return nil, err + } + aRoot := &data.Root{} + if err := json.Unmarshal(aSigned.Signed, aRoot); err != nil { + return nil, err + } + + bSigned := &data.Signed{} + if err := json.Unmarshal(bJSON, bSigned); err != nil { + return nil, err + } + bRoot := &data.Root{} + if err := json.Unmarshal(bSigned.Signed, bRoot); err != nil { + return nil, err + } + + ndb := verify.NewDB() + for id, k := range aRoot.Keys { + if err := ndb.AddKey(id, k); err != nil { + // TUF is considering in TAP-12 removing the + // requirement that the keyid hash algorithm be derived + // from the public key. So to be forwards compatible, + // we ignore `ErrWrongID` errors. + // + // TAP-12: https://github.com/theupdateframework/taps/blob/master/tap12.md + if _, ok := err.(verify.ErrWrongID); !ok { + return nil, err + } + } + } + for name, role := range aRoot.Roles { + if err := ndb.AddRole(name, role); err != nil { + return nil, err + } + } + + if err := ndb.VerifySignatures(bSigned, "root"); err != nil { + return nil, err + } + return bRoot, nil +} + // FIXME(TUF-0.9) TUF is considering removing support for target files starting // with a leading path separator. In order to be backwards compatible, we'll // just remove leading separators for now. @@ -539,13 +694,13 @@ func (c *Client) decodeRoot(b json.RawMessage) error { // decodeSnapshot decodes and verifies snapshot metadata, and returns the new // root and targets file meta. -func (c *Client) decodeSnapshot(b json.RawMessage) (data.SnapshotFileMeta, data.SnapshotFileMeta, error) { +func (c *Client) decodeSnapshot(b json.RawMessage) (data.SnapshotFiles, error) { snapshot := &data.Snapshot{} if err := c.db.Unmarshal(b, snapshot, "snapshot", c.snapshotVer); err != nil { - return data.SnapshotFileMeta{}, data.SnapshotFileMeta{}, ErrDecodeFailed{"snapshot.json", err} + return data.SnapshotFiles{}, ErrDecodeFailed{"snapshot.json", err} } c.snapshotVer = snapshot.Version - return snapshot.Meta["root.json"], snapshot.Meta["targets.json"], nil + return snapshot.Meta, nil } // decodeTargets decodes and verifies targets metadata, sets c.targets and @@ -582,18 +737,24 @@ func (c *Client) decodeTimestamp(b json.RawMessage) (data.TimestampFileMeta, err return timestamp.Meta["snapshot.json"], nil } -// hasSnapshotMeta checks whether local metadata has the given meta +// hasMetaFromSnapshot checks whether local metadata has the given meta func (c *Client) hasMetaFromSnapshot(name string, m data.SnapshotFileMeta) bool { + _, ok := c.localMetaFromSnapshot(name, m) + return ok +} + +// localMetaFromSnapshot returns localmetadata if it matches the snapshot +func (c *Client) localMetaFromSnapshot(name string, m data.SnapshotFileMeta) (json.RawMessage, bool) { b, ok := c.localMeta[name] if !ok { - return false + return nil, false } meta, err := util.GenerateSnapshotFileMeta(bytes.NewReader(b), m.HashAlgorithms()...) if err != nil { - return false + return nil, false } err = util.SnapshotFileMetaEqual(meta, m) - return err == nil + return b, err == nil } // hasTargetsMeta checks whether local metadata has the given snapshot meta @@ -634,7 +795,8 @@ type Destination interface { // dest will be deleted and an error returned in the following situations: // // * The target does not exist in the local targets.json -// * The target does not exist in remote storage +// * Failed to fetch the chain of delegations accessible from local snapshot.json +// * The target does not exist in any targets // * Metadata cannot be generated for the downloaded data // * Generated metadata does not match local metadata for the given file func (c *Client) Download(name string, dest Destination) (err error) { @@ -652,11 +814,14 @@ func (c *Client) Download(name string, dest Destination) (err error) { } } - // return ErrUnknownTarget if the file is not in the local targets.json normalizedName := util.NormalizeTarget(name) localMeta, ok := c.targets[normalizedName] if !ok { - return ErrUnknownTarget{name} + // search in delegations + localMeta, err = c.getTargetFileMeta(normalizedName) + if err != nil { + return err + } } // get the data from remote storage @@ -717,3 +882,11 @@ func (c *Client) Targets() (data.TargetFiles, error) { } return c.targets, nil } + +func (c *Client) RootVersion() int { + return c.rootVer +} + +func (c *Client) TargetsVersion() int { + return c.targetsVer +} diff --git a/client/client_test.go b/client/client_test.go index 39bb019c..315aeed3 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -3,14 +3,18 @@ package client import ( "bytes" "encoding/json" + "errors" "fmt" "io" "io/ioutil" + "net" + "net/http" "os" "path/filepath" "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" @@ -298,7 +302,7 @@ func (s *ClientSuite) TestNoChangeUpdate(c *C) { _, err := client.Update() c.Assert(err, IsNil) _, err = client.Update() - c.Assert(IsLatestSnapshot(err), Equals, true) + c.Assert(err, IsNil) } func (s *ClientSuite) TestNewTimestamp(c *C) { @@ -308,7 +312,7 @@ func (s *ClientSuite) TestNewTimestamp(c *C) { c.Assert(s.repo.Timestamp(), IsNil) s.syncRemote(c) _, err := client.Update() - c.Assert(IsLatestSnapshot(err), Equals, true) + c.Assert(err, IsNil) c.Assert(client.timestampVer > version, Equals, true) } @@ -360,6 +364,113 @@ func (s *ClientSuite) TestNewRoot(c *C) { } } +// startTUFRepoServer starts a HTTP server to serve a TUF Repo. +func startTUFRepoServer(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 +} + +// newClientWithMeta creates new client and sets the root metadata for it. +func newClientWithMeta(baseDir string, relPath string, serverAddr string, initWithLocalMetadata bool) (*Client, error) { + initialStateDir := filepath.Join(baseDir, relPath) + opts := &HTTPRemoteOptions{ + MetadataPath: "metadata", + TargetsPath: "targets", + } + + remote, err := HTTPRemoteStore(fmt.Sprintf("http://%s/", serverAddr), opts, nil) + if err != nil { + return nil, err + } + c := NewClient(MemoryLocalStore(), remote) + for _, m := range []string{"root.json", "snapshot.json", "timestamp.json", "targets.json"} { + metadataJSON, err := ioutil.ReadFile(initialStateDir + "/" + m) + if err != nil { + return nil, err + } + c.local.SetMeta(m, metadataJSON) + } + return c, nil +} + +func initRootTest(c *C, baseDir string, initWithLocalMetadata bool, ignoreExpired bool) (*Client, func() error) { + l, err := startTUFRepoServer(baseDir, "server") + c.Assert(err, IsNil) + e := verify.IsExpired + if ignoreExpired { + verify.IsExpired = func(t time.Time) bool { return false } + } + tufClient, err := newClientWithMeta(baseDir, "client/metadata/current", l.Addr().String(), initWithLocalMetadata) + verify.IsExpired = e + c.Assert(err, IsNil) + return tufClient, l.Close +} + +func (s *ClientSuite) TestUpdateRoots(c *C) { + var tests = []struct { + fixturePath string + isExpired bool // Value retuned by verify.IsExpired. + expectedError error + expectedVersions map[string]int + }{ + // New root version update (no key update) succeeds. + {"testdata/PublishedTwice", false, nil, map[string]int{"root": 2, "timestamp": 1, "snapshot": 1, "targets": 1}}, + // New root update (root role key rotation) succeeds. + {"testdata/PublishedTwiceWithRotatedKeys_root", false, nil, map[string]int{"root": 2, "timestamp": 1, "snapshot": 1, "targets": 1}}, + // New root update (snapshot role key rotation) succeeds. + {"testdata/PublishedTwiceWithRotatedKeys_snapshot", false, nil, map[string]int{"root": 2, "timestamp": 2, "snapshot": 2, "targets": 1}}, + // New root update (targets role key rotation) succeeds. + {"testdata/PublishedTwiceWithRotatedKeys_targets", false, nil, map[string]int{"root": 2, "timestamp": 2, "snapshot": 2, "targets": 2}}, + // New root update (timestamp role key rotation) succeeds. + {"testdata/PublishedTwiceWithRotatedKeys_timestamp", false, nil, map[string]int{"root": 2, "timestamp": 2, "snapshot": 1, "targets": 1}}, + // New expired root update fails. + {"testdata/PublishedTwiceWithRotatedKeys_root", true, ErrDecodeFailed{File: "root.json", Err: verify.ErrExpired{}}, map[string]int{}}, + // New root update with a rollback attack fails. + {"testdata/PublishedTwiceWithStaleVersion_root", false, verify.ErrWrongVersion(verify.ErrWrongVersion{Given: 1, Expected: 2}), map[string]int{}}, + // New root update with fast forward attack fails. + {"testdata/PublishedTwiceForwardVersionWithRotatedKeys_root", false, verify.ErrWrongVersion(verify.ErrWrongVersion{Given: 3, Expected: 2}), map[string]int{}}, + // New root with invalid new root signature fails (n+1th root didn't sign off n+1). + {"testdata/PublishedTwiceInvalidNewRootSignatureWithRotatedKeys_root", false, errors.New("tuf: signature verification failed"), map[string]int{}}, + // New root with invalid old root signature fails (nth root didn't sign off n+1). + {"testdata/PublishedTwiceInvalidOldRootSignatureWithRotatedKeys_root", false, errors.New("tuf: signature verification failed"), map[string]int{}}, + } + + for _, test := range tests { + e := verify.IsExpired + verify.IsExpired = func(t time.Time) bool { return test.isExpired } + tufClient, closer := initRootTest(c, test.fixturePath /* initWithLocalMetadata = */, true /* ignoreExpired = */, true) + _, err := tufClient.Update() + if test.expectedError == nil { + c.Assert(err, IsNil) + // Check if the root.json is being saved in non-volatile storage. + tufClient.getLocalMeta() + versionMethods := map[string]int{"root": tufClient.rootVer, + "timestamp": tufClient.timestampVer, + "snapshot": tufClient.snapshotVer, + "targets": tufClient.targetsVer} + for m, v := range test.expectedVersions { + assert.Equal(c, v, versionMethods[m]) + } + } else { + // For backward compatibility, the update root returns + // ErrDecodeFailed that wraps the verify.ErrExpired. + if _, ok := test.expectedError.(ErrDecodeFailed); ok { + decodeErr, ok := err.(ErrDecodeFailed) + c.Assert(ok, Equals, true) + c.Assert(decodeErr.File, Equals, "root.json") + _, ok = decodeErr.Err.(verify.ErrExpired) + c.Assert(ok, Equals, true) + } else { + assert.Equal(c, test.expectedError, err) + } + } + closer() + verify.IsExpired = e + } +} + func (s *ClientSuite) TestNewTargets(c *C) { client := s.newClient(c) files, err := client.Update() @@ -560,6 +671,8 @@ func (s *ClientSuite) TestUpdateLocalRootExpired(c *C) { s.addRemoteTarget(c, "bar.txt") s.syncRemote(c) + const expectedRootVersion = 2 + // check the update downloads the non expired remote root.json and // restarts itself, thus successfully updating s.withMetaExpired(func() { @@ -567,10 +680,9 @@ func (s *ClientSuite) TestUpdateLocalRootExpired(c *C) { if _, ok := err.(verify.ErrExpired); !ok { c.Fatalf("expected err to have type signed.ErrExpired, got %T", err) } - - client := NewClient(s.local, s.remote) _, err = client.Update() c.Assert(err, IsNil) + c.Assert(client.rootVer, Equals, expectedRootVersion) }) } @@ -704,7 +816,6 @@ func (s *ClientSuite) TestUpdateReplayAttack(c *C) { c.Assert(s.repo.Timestamp(), IsNil) s.syncRemote(c) _, err := client.Update() - c.Assert(IsLatestSnapshot(err), Equals, true) c.Assert(client.timestampVer > version, Equals, true) // replace remote timestamp.json with the old one @@ -804,7 +915,7 @@ func (t *testDestination) Delete() error { func (s *ClientSuite) TestDownloadUnknownTarget(c *C) { client := s.updatedClient(c) var dest testDestination - c.Assert(client.Download("nonexistent", &dest), Equals, ErrUnknownTarget{"nonexistent"}) + c.Assert(client.Download("nonexistent", &dest), Equals, ErrUnknownTarget{Name: "nonexistent", SnapshotVersion: 1}) c.Assert(dest.deleted, Equals, true) } diff --git a/client/delegations.go b/client/delegations.go new file mode 100644 index 00000000..156f1a40 --- /dev/null +++ b/client/delegations.go @@ -0,0 +1,198 @@ +package client + +import ( + "github.com/theupdateframework/go-tuf/data" + "github.com/theupdateframework/go-tuf/verify" +) + +// getTargetFileMeta searches for a verified TargetFileMeta matching a target +// Requires a local snapshot to be loaded and is locked to the snapshot versions. +// Searches through delegated targets following TUF spec 1.0.19 section 5.6. +func (c *Client) getTargetFileMeta(target string) (data.TargetFileMeta, error) { + snapshot, err := c.loadLocalSnapshot() + if err != nil { + return data.TargetFileMeta{}, err + } + + // delegationsIterator covers 5.6.7 + // - pre-order depth-first search starting with the top targets + // - filter delegations with paths or path_hash_prefixes matching searched target + // - 5.6.7.1 cycles protection + // - 5.6.7.2 terminations + delegations := newDelegationsIterator(target) + for i := 0; i < c.MaxDelegations; i++ { + d, ok := delegations.next() + if !ok { + return data.TargetFileMeta{}, ErrUnknownTarget{target, snapshot.Version} + } + + // covers 5.6.{1,2,3,4,5,6} + targets, err := c.loadDelegatedTargets(snapshot, d.delegatee.Name, d.verifier) + if err != nil { + return data.TargetFileMeta{}, err + } + + // stop when the searched TargetFileMeta is found + if m, ok := targets.Targets[target]; ok { + return m, nil + } + + if targets.Delegations != nil { + delegationsVerifier, err := verify.NewDelegationsVerifier(targets.Delegations) + if err != nil { + return data.TargetFileMeta{}, err + } + err = delegations.add(targets.Delegations.Roles, d.delegatee.Name, delegationsVerifier) + if err != nil { + return data.TargetFileMeta{}, err + } + } + } + + return data.TargetFileMeta{}, ErrMaxDelegations{ + Target: target, + MaxDelegations: c.MaxDelegations, + SnapshotVersion: snapshot.Version, + } +} + +func (c *Client) loadLocalSnapshot() (*data.Snapshot, error) { + if err := c.getLocalMeta(); err != nil { + return nil, err + } + + rawS, ok := c.localMeta["snapshot.json"] + if !ok { + return nil, ErrNoLocalSnapshot + } + + snapshot := &data.Snapshot{} + if err := c.db.Unmarshal(rawS, snapshot, "snapshot", c.snapshotVer); err != nil { + return nil, ErrDecodeFailed{"snapshot.json", err} + } + return snapshot, nil +} + +// loadDelegatedTargets downloads, decodes, verifies and stores targets +func (c *Client) loadDelegatedTargets(snapshot *data.Snapshot, role string, verifier verify.DelegationsVerifier) (*data.Targets, error) { + var err error + fileName := role + ".json" + fileMeta, ok := snapshot.Meta[fileName] + if !ok { + return nil, ErrRoleNotInSnapshot{role, snapshot.Version} + } + + // 5.6.1 download target if not in the local store + // 5.6.2 check against snapshot hash + raw, alreadyStored := c.localMetaFromSnapshot(fileName, fileMeta) + if !alreadyStored { + raw, err = c.downloadMetaFromSnapshot(fileName, fileMeta) + if err != nil { + return nil, err + } + } + + targets := &data.Targets{} + // 5.6.3 verify signature with parent public keys + // 5.6.5 verify that the targets is not expired + // role "targets" is a top role verified by root keys loaded in the client db + if role == "targets" { + err = c.db.Unmarshal(raw, targets, role, fileMeta.Version) + } else { + err = verifier.Unmarshal(raw, targets, role, fileMeta.Version) + } + if err != nil { + return nil, ErrDecodeFailed{fileName, err} + } + + // 5.6.4 check against snapshot version + if targets.Version != fileMeta.Version { + return nil, ErrTargetsSnapshotVersionMismatch{ + Role: fileName, + DownloadedTargetsVersion: fileMeta.Version, + TargetsSnapshotVersion: targets.Version, + SnapshotVersion: snapshot.Version, + } + } + // 5.6.6 persist + if !alreadyStored { + if err := c.local.SetMeta(fileName, raw); err != nil { + return nil, err + } + } + return targets, nil +} + +type delegation struct { + delegator string + verifier verify.DelegationsVerifier + delegatee data.DelegatedRole +} + +type delegationsIterator struct { + stack []delegation + target string + visitedRoles map[string]struct{} +} + +// newDelegationsIterator initialises an iterator with a first step +// on top level targets +func newDelegationsIterator(target string) *delegationsIterator { + i := &delegationsIterator{ + target: target, + stack: []delegation{ + { + delegatee: data.DelegatedRole{Name: "targets"}, + }, + }, + visitedRoles: make(map[string]struct{}), + } + return i +} + +func (d *delegationsIterator) next() (value delegation, ok bool) { + if len(d.stack) == 0 { + return delegation{}, false + } + delegation := d.stack[len(d.stack)-1] + d.stack = d.stack[:len(d.stack)-1] + + // 5.6.7.1: If this role has been visited before, then skip this role (so + // that cycles in the delegation graph are avoided). + roleName := delegation.delegatee.Name + if _, ok := d.visitedRoles[roleName]; ok { + return d.next() + } + d.visitedRoles[roleName] = struct{}{} + + // 5.6.7.2 trim delegations to visit, only the current role and its delegations + // will be considered + // https://github.com/theupdateframework/specification/issues/168 + if delegation.delegatee.Terminating { + // Empty the stack. + d.stack = d.stack[0:0] + } + return delegation, true +} + +func (d *delegationsIterator) add(roles []data.DelegatedRole, delegator string, verifier verify.DelegationsVerifier) error { + for i := len(roles) - 1; i >= 0; i-- { + // Push the roles onto the stack in reverse so we get an preorder traversal + // of the delegations graph. + r := roles[i] + matchesPath, err := r.MatchesPath(d.target) + if err != nil { + return err + } + if matchesPath { + delegation := delegation{ + delegator: delegator, + delegatee: r, + verifier: verifier, + } + d.stack = append(d.stack, delegation) + } + } + + return nil +} diff --git a/client/delegations_test.go b/client/delegations_test.go new file mode 100644 index 00000000..1ed3cf3b --- /dev/null +++ b/client/delegations_test.go @@ -0,0 +1,471 @@ +package client + +import ( + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/theupdateframework/go-tuf/data" + "github.com/theupdateframework/go-tuf/verify" +) + +var ( + defaultPathPatterns = []string{"tmp", "*"} + noMatchPathPatterns = []string{"vars", "null"} +) + +func TestDelegationsIterator(t *testing.T) { + var iteratorTests = []struct { + testName string + roles map[string][]data.DelegatedRole + file string + resultOrder []string + err error + }{ + { + testName: "no termination", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "b", Paths: defaultPathPatterns}, + {Name: "e", Paths: defaultPathPatterns}, + }, + "b": { + {Name: "c", Paths: defaultPathPatterns}, + }, + "c": { + {Name: "d", Paths: defaultPathPatterns}, + }, + "e": { + {Name: "f", Paths: defaultPathPatterns}, + {Name: "g", Paths: defaultPathPatterns}, + }, + "g": { + {Name: "h", Paths: defaultPathPatterns}, + {Name: "i", Paths: defaultPathPatterns}, + {Name: "j", Paths: defaultPathPatterns}, + }, + }, + file: "", + resultOrder: []string{"targets", "b", "c", "d", "e", "f", "g", "h", "i", "j"}, + }, + { + testName: "terminated in b", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "b", Paths: defaultPathPatterns, Terminating: true}, + {Name: "e", Paths: defaultPathPatterns}, + }, + "b": { + {Name: "c", Paths: defaultPathPatterns}, + {Name: "d", Paths: defaultPathPatterns}, + }, + }, + file: "", + resultOrder: []string{"targets", "b", "c", "d"}, + }, + { + testName: "path does not match b", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "b", Paths: noMatchPathPatterns}, + {Name: "e", Paths: defaultPathPatterns}, + }, + "b": { + {Name: "c", Paths: defaultPathPatterns}, + {Name: "d", Paths: defaultPathPatterns}, + }, + }, + file: "", + resultOrder: []string{"targets", "e"}, + }, + { + testName: "path does not match b - path prefixes", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "b", PathHashPrefixes: []string{"33472a4909"}}, + {Name: "c", PathHashPrefixes: []string{"34c85d1ee84f61f10d7dc633"}}, + }, + "c": { + {Name: "d", PathHashPrefixes: []string{"8baf"}}, + {Name: "e", PathHashPrefixes: []string{"34c85d1ee84f61f10d7dc633472a49096ed87f8f764bd597831eac371f40ac39"}}, + }, + }, + file: "/e/f/g.txt", + resultOrder: []string{"targets", "c", "e"}, + }, + { + testName: "err paths and pathHashPrefixes are set", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "b", Paths: defaultPathPatterns, PathHashPrefixes: defaultPathPatterns}, + }, + "b": {}, + }, + file: "", + resultOrder: []string{"targets"}, + err: data.ErrPathsAndPathHashesSet, + }, + { + testName: "cycle avoided 1", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "b", Paths: defaultPathPatterns}, + {Name: "e", Paths: defaultPathPatterns}, + }, + "b": { + {Name: "targets", Paths: defaultPathPatterns}, + {Name: "d", Paths: defaultPathPatterns}, + }, + }, + file: "", + resultOrder: []string{"targets", "b", "d", "e"}, + }, + { + testName: "cycle avoided 2", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "targets", Paths: defaultPathPatterns}, + {Name: "b", Paths: defaultPathPatterns}, + }, + "b": { + {Name: "targets", Paths: defaultPathPatterns}, + {Name: "b", Paths: defaultPathPatterns}, + {Name: "c", Paths: defaultPathPatterns}, + }, + "c": { + {Name: "c", Paths: defaultPathPatterns}, + }, + }, + file: "", + resultOrder: []string{"targets", "b", "c"}, + }, + { + testName: "diamond delegation", + roles: map[string][]data.DelegatedRole{ + "targets": { + {Name: "b", Paths: defaultPathPatterns}, + {Name: "c", Paths: defaultPathPatterns}, + }, + "b": { + {Name: "d", Paths: defaultPathPatterns}, + }, + "c": { + {Name: "d", Paths: defaultPathPatterns}, + }, + }, + file: "", + resultOrder: []string{"targets", "b", "d", "c"}, + }, + } + + for _, tt := range iteratorTests { + t.Run(tt.testName, func(t *testing.T) { + d := newDelegationsIterator(tt.file) + var iterationOrder []string + for { + r, ok := d.next() + if !ok { + break + } + iterationOrder = append(iterationOrder, r.delegatee.Name) + delegations, ok := tt.roles[r.delegatee.Name] + if !ok { + continue + } + err := d.add(delegations, r.delegatee.Name, verify.DelegationsVerifier{}) + assert.Equal(t, tt.err, err) + } + assert.Equal(t, tt.resultOrder, iterationOrder) + }) + } +} + +func TestGetTargetMeta(t *testing.T) { + verify.IsExpired = func(t time.Time) bool { return false } + c, closer := initTestDelegationClient(t, "testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation") + defer func() { assert.Nil(t, closer()) }() + _, err := c.Update() + assert.Nil(t, err) + + f, err := c.getTargetFileMeta("f.txt") + assert.Nil(t, err) + assert.Equal(t, int64(15), f.Length) + + assert.Equal(t, c.RootVersion(), 2) + assert.Equal(t, c.TargetsVersion(), 2) +} + +func TestMaxDelegations(t *testing.T) { + verify.IsExpired = func(t time.Time) bool { return false } + c, closer := initTestDelegationClient(t, "testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation") + defer func() { assert.Nil(t, closer()) }() + _, err := c.Update() + assert.Nil(t, err) + c.MaxDelegations = 2 + _, err = c.getTargetFileMeta("c.txt") + assert.Equal(t, ErrMaxDelegations{Target: "c.txt", MaxDelegations: 2, SnapshotVersion: 2}, err) +} + +func TestMetaNotFound(t *testing.T) { + verify.IsExpired = func(t time.Time) bool { return false } + c, closer := initTestDelegationClient(t, "testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation") + defer func() { assert.Nil(t, closer()) }() + _, err := c.Update() + assert.Nil(t, err) + _, err = c.getTargetFileMeta("unknown.txt") + assert.Equal(t, ErrUnknownTarget{Name: "unknown.txt", SnapshotVersion: 2}, err) +} + +type fakeRemote struct { + getMeta func(name string) (stream io.ReadCloser, size int64, err error) + getTarget func(path string) (stream io.ReadCloser, size int64, err error) +} + +func (f fakeRemote) GetMeta(name string) (stream io.ReadCloser, size int64, err error) { + return f.getMeta(name) +} + +func (f fakeRemote) GetTarget(name string) (stream io.ReadCloser, size int64, err error) { + return f.getTarget(name) +} + +func TestTargetsNotFound(t *testing.T) { + verify.IsExpired = func(t time.Time) bool { return false } + c, closer := initTestDelegationClient(t, "testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation") + defer func() { assert.Nil(t, closer()) }() + _, err := c.Update() + assert.Nil(t, err) + + previousRemote := c.remote + newRemote := fakeRemote{ + getMeta: func(path string) (stream io.ReadCloser, size int64, err error) { + if path == "1.c.json" { + return nil, 0, ErrNotFound{} + } + return previousRemote.GetMeta(path) + }, + getTarget: previousRemote.GetTarget, + } + c.remote = newRemote + + _, err = c.getTargetFileMeta("c.txt") + assert.Equal(t, ErrMissingRemoteMetadata{Name: "c.json"}, err) +} + +func TestUnverifiedTargets(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) + + previousRemote := c.remote + newRemote := fakeRemote{ + getMeta: func(path string) (stream io.ReadCloser, size int64, err error) { + if path == "1.c.json" { + // returns a snapshot that does not match + return previousRemote.GetMeta("1.d.json") + } + return previousRemote.GetMeta(path) + }, + getTarget: previousRemote.GetTarget, + } + c.remote = newRemote + + _, err = c.getTargetFileMeta("c.txt") + assert.Equal(t, ErrDecodeFailed{File: "c.json", Err: verify.ErrRoleThreshold{Expected: 1, Actual: 0}}, err) +} + +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) + + _, 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: "", + }, + { + 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", + }, + { + 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", + }, + } + + 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) + assert.Nil(t, err) + delete(persisted, targets.name) + } + assert.Empty(t, persisted) + }) + } +} + +func versionOfStoredTargets(name string, store map[string]json.RawMessage) (int, error) { + rawTargets, ok := store[name] + if !ok { + return 0, nil + } + s := &data.Signed{} + if err := json.Unmarshal(rawTargets, s); err != nil { + return 0, err + } + targets := &data.Targets{} + if err := json.Unmarshal(s.Signed, targets); err != nil { + return 0, err + } + 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") + 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) + 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 +} + +func copyStore(store map[string]json.RawMessage) map[string]json.RawMessage { + new := make(map[string]json.RawMessage, len(store)) + for k, raw := range store { + newRaw := make([]byte, len(raw)) + copy(newRaw, []byte(raw)) + new[k] = json.RawMessage(newRaw) + } + return new +} diff --git a/client/errors.go b/client/errors.go index e9997f57..3d39e6b2 100644 --- a/client/errors.go +++ b/client/errors.go @@ -10,6 +10,7 @@ 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") ) type ErrMissingRemoteMetadata struct { @@ -38,6 +39,16 @@ func (e ErrDecodeFailed) Error() string { return fmt.Sprintf("tuf: failed to decode %s: %s", e.File, e.Err) } +type ErrMaxDelegations struct { + Target string + MaxDelegations int + SnapshotVersion int +} + +func (e ErrMaxDelegations) Error() string { + return fmt.Sprintf("tuf: max delegation of %d reached searching for %s with snapshot version %d", e.MaxDelegations, e.Target, e.SnapshotVersion) +} + func isDecodeFailedWithErrRoleThreshold(err error) bool { e, ok := err.(ErrDecodeFailed) if !ok { @@ -88,11 +99,12 @@ func IsLatestSnapshot(err error) bool { } type ErrUnknownTarget struct { - Name string + Name string + SnapshotVersion int } func (e ErrUnknownTarget) Error() string { - return fmt.Sprintf("tuf: unknown target file: %s", e.Name) + return fmt.Sprintf("tuf: unknown target file: %s with snapshot version %d", e.Name, e.SnapshotVersion) } type ErrMetaTooLarge struct { @@ -112,3 +124,23 @@ type ErrInvalidURL struct { func (e ErrInvalidURL) Error() string { return fmt.Sprintf("tuf: invalid repository URL %s", e.URL) } + +type ErrRoleNotInSnapshot struct { + Role string + SnapshotVersion int +} + +func (e ErrRoleNotInSnapshot) Error() string { + return fmt.Sprintf("tuf: role %s not in snapshot version %d", e.Role, e.SnapshotVersion) +} + +type ErrTargetsSnapshotVersionMismatch struct { + Role string + DownloadedTargetsVersion int + TargetsSnapshotVersion int + SnapshotVersion int +} + +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) +} diff --git a/client/interop_test.go b/client/interop_test.go index 712ca5fe..04c4e5fd 100644 --- a/client/interop_test.go +++ b/client/interop_test.go @@ -9,6 +9,7 @@ import ( "net/http" "os" "path/filepath" + "strconv" "github.com/theupdateframework/go-tuf/data" "github.com/theupdateframework/go-tuf/util" @@ -130,14 +131,12 @@ func newTestCase(c *C, name string, consistentSnapshot bool, options *HTTPRemote func (t *testCase) run(c *C) { c.Logf("test case: %s consistent-snapshot: %t", t.name, t.consistentSnapshot) - init := true for _, stepName := range t.testSteps { - t.runStep(c, stepName, init) - init = false + t.runStep(c, stepName) } } -func (t *testCase) runStep(c *C, stepName string, init bool) { +func (t *testCase) runStep(c *C, stepName string) { c.Logf("step: %s", stepName) addr, cleanup := startFileServer(c, t.testDir) @@ -147,17 +146,15 @@ func (t *testCase) runStep(c *C, stepName string, init bool) { c.Assert(err, IsNil) client := NewClient(t.local, remote) - // initiate a client with the root keys - if init { - keys := getKeys(c, remote) - c.Assert(client.Init(keys, 1), IsNil) - } + keys := getKeys(c, remote) + c.Assert(client.Init(keys, 1), IsNil) // check update returns the correct updated targets files, err := client.Update() c.Assert(err, IsNil) - c.Assert(files, HasLen, 1) + l, _ := strconv.Atoi(stepName) + c.Assert(files, HasLen, l+1) targetName := stepName t.targets[targetName] = []byte(targetName) diff --git a/client/testdata/PublishedTwice/client/metadata/current/1.root.json b/client/testdata/PublishedTwice/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwice/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/current/1.targets.json b/client/testdata/PublishedTwice/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwice/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/current/root.json b/client/testdata/PublishedTwice/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/current/snapshot.json b/client/testdata/PublishedTwice/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/current/targets.json b/client/testdata/PublishedTwice/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/current/timestamp.json b/client/testdata/PublishedTwice/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/1.root.json b/client/testdata/PublishedTwice/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwice/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwice/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwice/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/root.json b/client/testdata/PublishedTwice/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwice/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/targets.json b/client/testdata/PublishedTwice/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwice/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/hash.txt b/client/testdata/PublishedTwice/hash.txt new file mode 100644 index 00000000..e4eb9e24 --- /dev/null +++ b/client/testdata/PublishedTwice/hash.txt @@ -0,0 +1 @@ +0a19d7f133953616c12ba70bde510813b1ff45d53fd7435328b5daca5b43e2ea \ No newline at end of file diff --git a/client/testdata/PublishedTwice/server/metadata.staged/1.root.json b/client/testdata/PublishedTwice/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwice/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwice/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwice/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata.staged/2.root.json b/client/testdata/PublishedTwice/server/metadata.staged/2.root.json new file mode 100644 index 00000000..2d5222c3 --- /dev/null +++ b/client/testdata/PublishedTwice/server/metadata.staged/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "e911db300e8eb378a2cabc48979e4c8f72beca30335db0579a7a1d81ae90c8bc63c27d92ce5a17846e3b1adb63a45a411bb4308e018e0d3cc4c9908311b5f208" + } + ], + "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": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwice/server/metadata.staged/root.json b/client/testdata/PublishedTwice/server/metadata.staged/root.json new file mode 100644 index 00000000..2d5222c3 --- /dev/null +++ b/client/testdata/PublishedTwice/server/metadata.staged/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "e911db300e8eb378a2cabc48979e4c8f72beca30335db0579a7a1d81ae90c8bc63c27d92ce5a17846e3b1adb63a45a411bb4308e018e0d3cc4c9908311b5f208" + } + ], + "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": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwice/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwice/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata.staged/targets.json b/client/testdata/PublishedTwice/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwice/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata/1.root.json b/client/testdata/PublishedTwice/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata/1.snapshot.json b/client/testdata/PublishedTwice/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata/1.targets.json b/client/testdata/PublishedTwice/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata/1.timestamp.json b/client/testdata/PublishedTwice/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata/2.root.json b/client/testdata/PublishedTwice/server/metadata/2.root.json new file mode 100644 index 00000000..2d5222c3 --- /dev/null +++ b/client/testdata/PublishedTwice/server/metadata/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "e911db300e8eb378a2cabc48979e4c8f72beca30335db0579a7a1d81ae90c8bc63c27d92ce5a17846e3b1adb63a45a411bb4308e018e0d3cc4c9908311b5f208" + } + ], + "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": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwice/server/metadata/root.json b/client/testdata/PublishedTwice/server/metadata/root.json new file mode 100644 index 00000000..2d5222c3 --- /dev/null +++ b/client/testdata/PublishedTwice/server/metadata/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "e911db300e8eb378a2cabc48979e4c8f72beca30335db0579a7a1d81ae90c8bc63c27d92ce5a17846e3b1adb63a45a411bb4308e018e0d3cc4c9908311b5f208" + } + ], + "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": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwice/server/metadata/snapshot.json b/client/testdata/PublishedTwice/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata/targets.json b/client/testdata/PublishedTwice/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwice/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/PublishedTwice/server/metadata/timestamp.json b/client/testdata/PublishedTwice/server/metadata/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwice/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/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/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/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/current/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/current/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/hash.txt b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/hash.txt new file mode 100644 index 00000000..cea852b2 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/hash.txt @@ -0,0 +1 @@ +8f100720df9fd967f17743e06ecb66ce2c917e9ec004e6c3d4e5f8060ddb461c \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/2.root.json new file mode 100644 index 00000000..92785255 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "87ed3dec115ca01750e0aaa9168ddcacafecd3df074b17b01978ad1c7f2b74318039036e6b937144324861018f7da637a46e498d5c2cebe2a7c0b549be59f409" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_snapshot/server/metadata.staged/2.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/2.snapshot.json new file mode 100644 index 00000000..70b717a7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/2.snapshot.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "aa6a3424329cce785614abe832b77ef1ce79af9e700a244493eebc45704851acc4e0765ceb1be0c8def0987fac4f66d6d9ee510db1927680da16dd2c44ca3a09" + }, + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "b6861a7c55290b559dc2e988a12705d958856c3c1b5c839eb642cd8f51ddc47982eb97598d4300796c9b5fe1ced9f8fabb3695d50c63bf7f92f321644102610e" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/2.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/2.timestamp.json new file mode 100644 index 00000000..46f7fcd2 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/2.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "3cfd6b91dd8b2cd33bb0da5db05eb8f089e1f315307f20963dcaa44ce7ca26d53a446eb637fcaaa1c3b1bac57e3465eb9073c15a3fb92e37bcc63e086685360a" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "8a86bbbf1db36fd58de7b375cee27dbde576ef72186dd2ee0a63be911af3206f", + "sha512": "8382d3d60e0e1d35f1fc2c4dcf527e7430dcbf9f0bdd7da90abb66ca2f6e605be2477f3d6931af1e2345cca3aea179d8c94ef3420baae979bd77895d4a3c298e" + }, + "length": 661, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/root.json new file mode 100644 index 00000000..92785255 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "87ed3dec115ca01750e0aaa9168ddcacafecd3df074b17b01978ad1c7f2b74318039036e6b937144324861018f7da637a46e498d5c2cebe2a7c0b549be59f409" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_snapshot/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..70b717a7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/snapshot.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "aa6a3424329cce785614abe832b77ef1ce79af9e700a244493eebc45704851acc4e0765ceb1be0c8def0987fac4f66d6d9ee510db1927680da16dd2c44ca3a09" + }, + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "b6861a7c55290b559dc2e988a12705d958856c3c1b5c839eb642cd8f51ddc47982eb97598d4300796c9b5fe1ced9f8fabb3695d50c63bf7f92f321644102610e" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..46f7fcd2 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata.staged/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "3cfd6b91dd8b2cd33bb0da5db05eb8f089e1f315307f20963dcaa44ce7ca26d53a446eb637fcaaa1c3b1bac57e3465eb9073c15a3fb92e37bcc63e086685360a" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "8a86bbbf1db36fd58de7b375cee27dbde576ef72186dd2ee0a63be911af3206f", + "sha512": "8382d3d60e0e1d35f1fc2c4dcf527e7430dcbf9f0bdd7da90abb66ca2f6e605be2477f3d6931af1e2345cca3aea179d8c94ef3420baae979bd77895d4a3c298e" + }, + "length": 661, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/2.root.json new file mode 100644 index 00000000..92785255 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "87ed3dec115ca01750e0aaa9168ddcacafecd3df074b17b01978ad1c7f2b74318039036e6b937144324861018f7da637a46e498d5c2cebe2a7c0b549be59f409" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_snapshot/server/metadata/2.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/2.snapshot.json new file mode 100644 index 00000000..70b717a7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/2.snapshot.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "aa6a3424329cce785614abe832b77ef1ce79af9e700a244493eebc45704851acc4e0765ceb1be0c8def0987fac4f66d6d9ee510db1927680da16dd2c44ca3a09" + }, + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "b6861a7c55290b559dc2e988a12705d958856c3c1b5c839eb642cd8f51ddc47982eb97598d4300796c9b5fe1ced9f8fabb3695d50c63bf7f92f321644102610e" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/2.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/2.timestamp.json new file mode 100644 index 00000000..46f7fcd2 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/2.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "3cfd6b91dd8b2cd33bb0da5db05eb8f089e1f315307f20963dcaa44ce7ca26d53a446eb637fcaaa1c3b1bac57e3465eb9073c15a3fb92e37bcc63e086685360a" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "8a86bbbf1db36fd58de7b375cee27dbde576ef72186dd2ee0a63be911af3206f", + "sha512": "8382d3d60e0e1d35f1fc2c4dcf527e7430dcbf9f0bdd7da90abb66ca2f6e605be2477f3d6931af1e2345cca3aea179d8c94ef3420baae979bd77895d4a3c298e" + }, + "length": 661, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/root.json new file mode 100644 index 00000000..92785255 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "87ed3dec115ca01750e0aaa9168ddcacafecd3df074b17b01978ad1c7f2b74318039036e6b937144324861018f7da637a46e498d5c2cebe2a7c0b549be59f409" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_snapshot/server/metadata/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/snapshot.json new file mode 100644 index 00000000..70b717a7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/snapshot.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "aa6a3424329cce785614abe832b77ef1ce79af9e700a244493eebc45704851acc4e0765ceb1be0c8def0987fac4f66d6d9ee510db1927680da16dd2c44ca3a09" + }, + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "b6861a7c55290b559dc2e988a12705d958856c3c1b5c839eb642cd8f51ddc47982eb97598d4300796c9b5fe1ced9f8fabb3695d50c63bf7f92f321644102610e" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/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_snapshot/server/metadata/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/timestamp.json new file mode 100644 index 00000000..46f7fcd2 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_snapshot/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "3cfd6b91dd8b2cd33bb0da5db05eb8f089e1f315307f20963dcaa44ce7ca26d53a446eb637fcaaa1c3b1bac57e3465eb9073c15a3fb92e37bcc63e086685360a" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "8a86bbbf1db36fd58de7b375cee27dbde576ef72186dd2ee0a63be911af3206f", + "sha512": "8382d3d60e0e1d35f1fc2c4dcf527e7430dcbf9f0bdd7da90abb66ca2f6e605be2477f3d6931af1e2345cca3aea179d8c94ef3420baae979bd77895d4a3c298e" + }, + "length": 661, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/current/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/current/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/hash.txt b/client/testdata/PublishedTwiceWithRotatedKeys_targets/hash.txt new file mode 100644 index 00000000..b372bf79 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/hash.txt @@ -0,0 +1 @@ +f177d060bbbfa7ed43fd359bf2d884092d20dc35a8bd13d78008075d9e4715cc \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.root.json new file mode 100644 index 00000000..7d0fd136 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0a7b73ee7d7e6a63bc30b16df1cdf4d05a73191b81e540fa11baf5ce94a0659d882042a290bb7db443fdc1336a94042538d79f40f134b825dd963b229f305c04" + } + ], + "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" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_targets/server/metadata.staged/2.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.snapshot.json new file mode 100644 index 00000000..f9f4afc4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "d4ad7c68f0d471d0edc2895270908eb39ab60dd32174ca372bcca6eba97eebf7d2f0916cdcae884facb98500a83852dd0cb0de8645996d5f2a00f077f68ca801" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.targets.json new file mode 100644 index 00000000..e4f6f5f6 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.targets.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "8c4c67870314d7b0fc006d3b867f19dde6eb089c6f9f13af713680f0aa639c59f39826d6b74caeb18dc55105b5e6bcd154c538643f2624f4e7808e4dd9d8460f" + }, + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "e30433454d04537cf78d2e2217ab0abf04b7c928704d3e47698ba8a26a05160424ee251530fd1e1ab57383ddf18891b937693358d0c3f1697ddc69e57d846d0d" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.timestamp.json new file mode 100644 index 00000000..493c2d1a --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/2.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "d4782228149933a43d54a4c0036d876335fb14289195a1183d67e9c4b8a7e9d2c51dd7fd222d7bebcbe8d7158c197bebc9190928a40f45407c52bc6d31d89401" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "4bbd15caf73960e46f11a1dace6fc518d89bb0218592ce9da01b76249ab7b738", + "sha512": "0b4957bc8adcb717d31eb7c0fb6f849ddbc9c4f98a86f27c1e9fe667c990b699be0675521216f127786bc27b6f47f16143fe269b5606169855b319e8a8c4c6d2" + }, + "length": 431, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/root.json new file mode 100644 index 00000000..7d0fd136 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0a7b73ee7d7e6a63bc30b16df1cdf4d05a73191b81e540fa11baf5ce94a0659d882042a290bb7db443fdc1336a94042538d79f40f134b825dd963b229f305c04" + } + ], + "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" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_targets/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..f9f4afc4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "d4ad7c68f0d471d0edc2895270908eb39ab60dd32174ca372bcca6eba97eebf7d2f0916cdcae884facb98500a83852dd0cb0de8645996d5f2a00f077f68ca801" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/targets.json new file mode 100644 index 00000000..e4f6f5f6 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/targets.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "8c4c67870314d7b0fc006d3b867f19dde6eb089c6f9f13af713680f0aa639c59f39826d6b74caeb18dc55105b5e6bcd154c538643f2624f4e7808e4dd9d8460f" + }, + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "e30433454d04537cf78d2e2217ab0abf04b7c928704d3e47698ba8a26a05160424ee251530fd1e1ab57383ddf18891b937693358d0c3f1697ddc69e57d846d0d" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..493c2d1a --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata.staged/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "d4782228149933a43d54a4c0036d876335fb14289195a1183d67e9c4b8a7e9d2c51dd7fd222d7bebcbe8d7158c197bebc9190928a40f45407c52bc6d31d89401" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "4bbd15caf73960e46f11a1dace6fc518d89bb0218592ce9da01b76249ab7b738", + "sha512": "0b4957bc8adcb717d31eb7c0fb6f849ddbc9c4f98a86f27c1e9fe667c990b699be0675521216f127786bc27b6f47f16143fe269b5606169855b319e8a8c4c6d2" + }, + "length": 431, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/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_targets/server/metadata/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.root.json new file mode 100644 index 00000000..7d0fd136 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0a7b73ee7d7e6a63bc30b16df1cdf4d05a73191b81e540fa11baf5ce94a0659d882042a290bb7db443fdc1336a94042538d79f40f134b825dd963b229f305c04" + } + ], + "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" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_targets/server/metadata/2.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.snapshot.json new file mode 100644 index 00000000..f9f4afc4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "d4ad7c68f0d471d0edc2895270908eb39ab60dd32174ca372bcca6eba97eebf7d2f0916cdcae884facb98500a83852dd0cb0de8645996d5f2a00f077f68ca801" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.targets.json new file mode 100644 index 00000000..e4f6f5f6 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.targets.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "8c4c67870314d7b0fc006d3b867f19dde6eb089c6f9f13af713680f0aa639c59f39826d6b74caeb18dc55105b5e6bcd154c538643f2624f4e7808e4dd9d8460f" + }, + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "e30433454d04537cf78d2e2217ab0abf04b7c928704d3e47698ba8a26a05160424ee251530fd1e1ab57383ddf18891b937693358d0c3f1697ddc69e57d846d0d" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.timestamp.json new file mode 100644 index 00000000..493c2d1a --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/2.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "d4782228149933a43d54a4c0036d876335fb14289195a1183d67e9c4b8a7e9d2c51dd7fd222d7bebcbe8d7158c197bebc9190928a40f45407c52bc6d31d89401" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "4bbd15caf73960e46f11a1dace6fc518d89bb0218592ce9da01b76249ab7b738", + "sha512": "0b4957bc8adcb717d31eb7c0fb6f849ddbc9c4f98a86f27c1e9fe667c990b699be0675521216f127786bc27b6f47f16143fe269b5606169855b319e8a8c4c6d2" + }, + "length": 431, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/root.json new file mode 100644 index 00000000..7d0fd136 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "0a7b73ee7d7e6a63bc30b16df1cdf4d05a73191b81e540fa11baf5ce94a0659d882042a290bb7db443fdc1336a94042538d79f40f134b825dd963b229f305c04" + } + ], + "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" + }, + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "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_targets/server/metadata/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/snapshot.json new file mode 100644 index 00000000..f9f4afc4 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "d4ad7c68f0d471d0edc2895270908eb39ab60dd32174ca372bcca6eba97eebf7d2f0916cdcae884facb98500a83852dd0cb0de8645996d5f2a00f077f68ca801" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/targets.json new file mode 100644 index 00000000..e4f6f5f6 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/targets.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "8c4c67870314d7b0fc006d3b867f19dde6eb089c6f9f13af713680f0aa639c59f39826d6b74caeb18dc55105b5e6bcd154c538643f2624f4e7808e4dd9d8460f" + }, + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "e30433454d04537cf78d2e2217ab0abf04b7c928704d3e47698ba8a26a05160424ee251530fd1e1ab57383ddf18891b937693358d0c3f1697ddc69e57d846d0d" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/timestamp.json new file mode 100644 index 00000000..493c2d1a --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_targets/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "d4782228149933a43d54a4c0036d876335fb14289195a1183d67e9c4b8a7e9d2c51dd7fd222d7bebcbe8d7158c197bebc9190928a40f45407c52bc6d31d89401" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "4bbd15caf73960e46f11a1dace6fc518d89bb0218592ce9da01b76249ab7b738", + "sha512": "0b4957bc8adcb717d31eb7c0fb6f849ddbc9c4f98a86f27c1e9fe667c990b699be0675521216f127786bc27b6f47f16143fe269b5606169855b319e8a8c4c6d2" + }, + "length": 431, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/current/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/current/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/hash.txt b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/hash.txt new file mode 100644 index 00000000..dd4c7e18 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/hash.txt @@ -0,0 +1 @@ +4788f1ba52fa6688e08ed0d413e5b2882e5e1cf178afbecff3e5055366420fc1 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.root.json new file mode 100644 index 00000000..d2ad8ab7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "dd497975000aba25b65bc5c68df35af6f54cba8fd7d832b336086ff569af2f7fe6e53fc227a94f62882342a94c3d9dd0e98eba6405e016ca383ee57a554cad09" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.snapshot.json new file mode 100644 index 00000000..5efc43b6 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "b6861a7c55290b559dc2e988a12705d958856c3c1b5c839eb642cd8f51ddc47982eb97598d4300796c9b5fe1ced9f8fabb3695d50c63bf7f92f321644102610e" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.timestamp.json new file mode 100644 index 00000000..6650ea81 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/2.timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "156eb41be866cd12aedfd2d5b91d4f7ece94e81d6b8c6b4197050eb4f0792914cf0a5e5db13c38eeae151c6890286c92f97b474ea718adde481f95a8cd5b3e00" + }, + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + } + ], + "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_timestamp/server/metadata.staged/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/root.json new file mode 100644 index 00000000..d2ad8ab7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "dd497975000aba25b65bc5c68df35af6f54cba8fd7d832b336086ff569af2f7fe6e53fc227a94f62882342a94c3d9dd0e98eba6405e016ca383ee57a554cad09" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/timestamp.json new file mode 100644 index 00000000..6650ea81 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata.staged/timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "156eb41be866cd12aedfd2d5b91d4f7ece94e81d6b8c6b4197050eb4f0792914cf0a5e5db13c38eeae151c6890286c92f97b474ea718adde481f95a8cd5b3e00" + }, + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + } + ], + "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_timestamp/server/metadata/1.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata/1.targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata/2.root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.root.json new file mode 100644 index 00000000..d2ad8ab7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "dd497975000aba25b65bc5c68df35af6f54cba8fd7d832b336086ff569af2f7fe6e53fc227a94f62882342a94c3d9dd0e98eba6405e016ca383ee57a554cad09" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.snapshot.json new file mode 100644 index 00000000..5efc43b6 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "b6861a7c55290b559dc2e988a12705d958856c3c1b5c839eb642cd8f51ddc47982eb97598d4300796c9b5fe1ced9f8fabb3695d50c63bf7f92f321644102610e" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.timestamp.json new file mode 100644 index 00000000..6650ea81 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/2.timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "156eb41be866cd12aedfd2d5b91d4f7ece94e81d6b8c6b4197050eb4f0792914cf0a5e5db13c38eeae151c6890286c92f97b474ea718adde481f95a8cd5b3e00" + }, + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + } + ], + "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_timestamp/server/metadata/root.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/root.json new file mode 100644 index 00000000..d2ad8ab7 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "dd497975000aba25b65bc5c68df35af6f54cba8fd7d832b336086ff569af2f7fe6e53fc227a94f62882342a94c3d9dd0e98eba6405e016ca383ee57a554cad09" + } + ], + "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" + }, + "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": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/snapshot.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata/targets.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/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_timestamp/server/metadata/timestamp.json b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/timestamp.json new file mode 100644 index 00000000..6650ea81 --- /dev/null +++ b/client/testdata/PublishedTwiceWithRotatedKeys_timestamp/server/metadata/timestamp.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "156eb41be866cd12aedfd2d5b91d4f7ece94e81d6b8c6b4197050eb4f0792914cf0a5e5db13c38eeae151c6890286c92f97b474ea718adde481f95a8cd5b3e00" + }, + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "e26d60554d72cf2f96ac326f19ddfc1e5cbf2946205b17d080b67712f7e0e9c65e3634fa71aaffb77ef5af97349753626e7ab12adb59a6eae276257998a68e09" + } + ], + "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/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/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/__init__.py b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/__init__.py new file mode 100644 index 00000000..36285a68 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/__init__.py @@ -0,0 +1,35 @@ +# Delegation tree +# +# Targets +# / \ +# a f +# / \ +# b e +# / \ +# c d +# +# No terminating delegations. +# +# Roles should be evaluated in the order: +# Targets > a > b > c > d > e > f + +from fixtures.builder import FixtureBuilder + + +def build(): + FixtureBuilder('TUFTestFixture3LevelDelegation')\ + .publish(with_client=True)\ + .create_target('targets.txt')\ + .delegate('a', ['*.txt'])\ + .create_target('a.txt', signing_role='a')\ + .delegate('b', ['*.txt'], parent='a') \ + .create_target('b.txt', signing_role='b') \ + .delegate('c', ['*.txt'], parent='b') \ + .create_target('c.txt', signing_role='c') \ + .delegate('d', ['*.txt'], parent='b') \ + .create_target('d.txt', signing_role='d') \ + .delegate('e', ['*.txt'], parent='a') \ + .create_target('e.txt', signing_role='e') \ + .delegate('f', ['*.txt']) \ + .create_target('f.txt', signing_role='f') \ + .publish() diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.a.json new file mode 100644 index 00000000..90237d1e --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.a.json @@ -0,0 +1,74 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "35eae38d12b845e5e2fb89c957b1e4b16bccfb5717160e0c1a36924b3ae89972d78e0837639e266cf5957ddf9d1f7eb184148ef2d242d7ff99b844342b48020a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "name": "b", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + }, + { + "keyids": [ + "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586" + ], + "name": "e", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + } + ] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "a.txt": { + "custom": {}, + "hashes": { + "sha256": "3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985", + "sha512": "f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.b.json new file mode 100644 index 00000000..bee9490e --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.b.json @@ -0,0 +1,74 @@ +{ + "signatures": [ + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "a99aa2bd1aa6473f48fc9c3a93289de4efea45071906bc4deecd3a85ffe0e6bc2c1b1751a2b0975e8f28d1b8114ac964f6dc55e5e160f602d56eff51d25c7907" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" + }, + "scheme": "ed25519" + }, + "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" + ], + "name": "c", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + }, + { + "keyids": [ + "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62" + ], + "name": "d", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + } + ] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "b.txt": { + "custom": {}, + "hashes": { + "sha256": "949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e", + "sha512": "f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.c.json new file mode 100644 index 00000000..9305d64f --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.c.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", + "sig": "9f0c5ef7e0a11012256c4a47ed757f9e90e930238f6a6e5c758a014f1b768519acb2b7d9aa9bd0456d71ba09b032598086e42d832830391e307c926c16f5b303" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "c.txt": { + "custom": {}, + "hashes": { + "sha256": "946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd", + "sha512": "ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.d.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.d.json new file mode 100644 index 00000000..2c9f1117 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.d.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", + "sig": "04d8264dd6d75fad106d599603801842057de038803935cf9b043fff4d5ee2618675c85291822f18efff770fa89056ed960de35309356a24baef45d9f64c8c0f" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "d.txt": { + "custom": {}, + "hashes": { + "sha256": "b2ce56612fa7e840d56d263f75804f60baaad5d6e0a7d544e65e1791f2df5e55", + "sha512": "79b44a183eaa0025f3997b856537502ac1759de74263985ad1dd9ab0bb5cc8ce46b6c45c1bf37adb87c2839cca54ae784c3d3488e994d29f003decc81638d589" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.e.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.e.json new file mode 100644 index 00000000..a473d7dc --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.e.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", + "sig": "11ea2f743a5e5ec7f5bea84804c1fdc2e70f42a1f955668b0072fc6bed00e6535574c129270f97e8849e589a57f48a077903244250ab970eac45f7c46c43b003" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "e.txt": { + "custom": {}, + "hashes": { + "sha256": "027b3d1814dae8547aed3d7e7b99aa0d59d82cc18411037b0ef0318eb754ce86", + "sha512": "ffca8c347335e5e019deba8a15212297fe25afc734ac06fcd01b4d9dae12b16d750d7a44bdafcada254148990aa6611bc9ed2f2841da2c0dd70bb870be7275f6" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.f.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.f.json new file mode 100644 index 00000000..941ae66f --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.f.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", + "sig": "ff5f1d3bfc5d31f71997b1c020c06d7c1683e0f7e747cfdbdf6c718f608181b4c81f3212a93ff8e109b377a73af5883e1568257b050a5b6137058a10463f640e" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "f.txt": { + "custom": {}, + "hashes": { + "sha256": "f0b07df15d4a3e98ffc6ee6a4c00d04623b0171de458d94dbec4abb7646bc60e", + "sha512": "b8061c4c83d478aaadc6758a74861f749420e83dd6bf07e931738b0619404a75d12758429b12f8d047643d6d13047ec0b65bb253cf5f5b961515658864301207" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.root.json new file mode 100644 index 00000000..08986107 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.snapshot.json new file mode 100644 index 00000000..dcbd2f47 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.targets.json new file mode 100644 index 00000000..820691ec --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.timestamp.json new file mode 100644 index 00000000..aae05fba --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/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/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.root.json new file mode 100644 index 00000000..2d5222c3 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "e911db300e8eb378a2cabc48979e4c8f72beca30335db0579a7a1d81ae90c8bc63c27d92ce5a17846e3b1adb63a45a411bb4308e018e0d3cc4c9908311b5f208" + } + ], + "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": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.snapshot.json new file mode 100644 index 00000000..11e7e071 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.snapshot.json @@ -0,0 +1,37 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "a12c5320e165f6a674b5d030c1c2f6a1716ad413ad6bda8942febab0af19f510958998d36c76bb47274fe20d3531f67f99f6f6dde8bc3bc0bca7098d8042510c" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "a.json": { + "version": 1 + }, + "b.json": { + "version": 1 + }, + "c.json": { + "version": 1 + }, + "d.json": { + "version": 1 + }, + "e.json": { + "version": 1 + }, + "f.json": { + "version": 1 + }, + "targets.json": { + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.targets.json new file mode 100644 index 00000000..bece42a9 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.targets.json @@ -0,0 +1,73 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "91abfb44e844a293837d1e081953acc4a7d179ff695353ea0472eb71846f8aee9903b352fa595084243218bec93336defc184ed0b4a1bc50e497878ed7f03c0c" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "name": "a", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + }, + { + "keyids": [ + "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be" + ], + "name": "f", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + } + ] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "targets.txt": { + "hashes": { + "sha256": "6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6", + "sha512": "0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a" + }, + "length": 21 + } + }, + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.timestamp.json new file mode 100644 index 00000000..218e6de7 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "c48177d304312637216cfa3e424e1f7a214dfbd2121597e2b6ef10b40c000d48720078742503d68d19e50dd39da093e5d25d72ff6a634e7e8880bd9992fc110b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "b5a9218242238080aa294948c18f9d48022b1c3ca68ebdde92fed68bbc0c3c09", + "sha512": "ffb8446b2517a5db4a0ca7b59f4800bcd00f807e918b884af53c7c82b941df242d790e64feaba08ae33edd92902c494f85c9f7c25e8b7071ab0f0b8a1e61206d" + }, + "length": 659, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/a.json new file mode 100644 index 00000000..90237d1e --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/a.json @@ -0,0 +1,74 @@ +{ + "signatures": [ + { + "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", + "sig": "35eae38d12b845e5e2fb89c957b1e4b16bccfb5717160e0c1a36924b3ae89972d78e0837639e266cf5957ddf9d1f7eb184148ef2d242d7ff99b844342b48020a" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" + }, + "scheme": "ed25519" + }, + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" + ], + "name": "b", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + }, + { + "keyids": [ + "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586" + ], + "name": "e", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + } + ] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "a.txt": { + "custom": {}, + "hashes": { + "sha256": "3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985", + "sha512": "f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/b.json new file mode 100644 index 00000000..bee9490e --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/b.json @@ -0,0 +1,74 @@ +{ + "signatures": [ + { + "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", + "sig": "a99aa2bd1aa6473f48fc9c3a93289de4efea45071906bc4deecd3a85ffe0e6bc2c1b1751a2b0975e8f28d1b8114ac964f6dc55e5e160f602d56eff51d25c7907" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" + }, + "scheme": "ed25519" + }, + "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" + ], + "name": "c", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + }, + { + "keyids": [ + "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62" + ], + "name": "d", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + } + ] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "b.txt": { + "custom": {}, + "hashes": { + "sha256": "949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e", + "sha512": "f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/c.json new file mode 100644 index 00000000..9305d64f --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/c.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", + "sig": "9f0c5ef7e0a11012256c4a47ed757f9e90e930238f6a6e5c758a014f1b768519acb2b7d9aa9bd0456d71ba09b032598086e42d832830391e307c926c16f5b303" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "c.txt": { + "custom": {}, + "hashes": { + "sha256": "946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd", + "sha512": "ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/d.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/d.json new file mode 100644 index 00000000..2c9f1117 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/d.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", + "sig": "04d8264dd6d75fad106d599603801842057de038803935cf9b043fff4d5ee2618675c85291822f18efff770fa89056ed960de35309356a24baef45d9f64c8c0f" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "d.txt": { + "custom": {}, + "hashes": { + "sha256": "b2ce56612fa7e840d56d263f75804f60baaad5d6e0a7d544e65e1791f2df5e55", + "sha512": "79b44a183eaa0025f3997b856537502ac1759de74263985ad1dd9ab0bb5cc8ce46b6c45c1bf37adb87c2839cca54ae784c3d3488e994d29f003decc81638d589" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/e.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/e.json new file mode 100644 index 00000000..a473d7dc --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/e.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", + "sig": "11ea2f743a5e5ec7f5bea84804c1fdc2e70f42a1f955668b0072fc6bed00e6535574c129270f97e8849e589a57f48a077903244250ab970eac45f7c46c43b003" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "e.txt": { + "custom": {}, + "hashes": { + "sha256": "027b3d1814dae8547aed3d7e7b99aa0d59d82cc18411037b0ef0318eb754ce86", + "sha512": "ffca8c347335e5e019deba8a15212297fe25afc734ac06fcd01b4d9dae12b16d750d7a44bdafcada254148990aa6611bc9ed2f2841da2c0dd70bb870be7275f6" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/f.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/f.json new file mode 100644 index 00000000..941ae66f --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/f.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", + "sig": "ff5f1d3bfc5d31f71997b1c020c06d7c1683e0f7e747cfdbdf6c718f608181b4c81f3212a93ff8e109b377a73af5883e1568257b050a5b6137058a10463f640e" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": {}, + "roles": [] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "f.txt": { + "custom": {}, + "hashes": { + "sha256": "f0b07df15d4a3e98ffc6ee6a4c00d04623b0171de458d94dbec4abb7646bc60e", + "sha512": "b8061c4c83d478aaadc6758a74861f749420e83dd6bf07e931738b0619404a75d12758429b12f8d047643d6d13047ec0b65bb253cf5f5b961515658864301207" + }, + "length": 15 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/root.json new file mode 100644 index 00000000..2d5222c3 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", + "sig": "e911db300e8eb378a2cabc48979e4c8f72beca30335db0579a7a1d81ae90c8bc63c27d92ce5a17846e3b1adb63a45a411bb4308e018e0d3cc4c9908311b5f208" + } + ], + "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": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/snapshot.json new file mode 100644 index 00000000..11e7e071 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/snapshot.json @@ -0,0 +1,37 @@ +{ + "signatures": [ + { + "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", + "sig": "a12c5320e165f6a674b5d030c1c2f6a1716ad413ad6bda8942febab0af19f510958998d36c76bb47274fe20d3531f67f99f6f6dde8bc3bc0bca7098d8042510c" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2020-01-08T00:00:00Z", + "meta": { + "a.json": { + "version": 1 + }, + "b.json": { + "version": 1 + }, + "c.json": { + "version": 1 + }, + "d.json": { + "version": 1 + }, + "e.json": { + "version": 1 + }, + "f.json": { + "version": 1 + }, + "targets.json": { + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/targets.json new file mode 100644 index 00000000..bece42a9 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/targets.json @@ -0,0 +1,73 @@ +{ + "signatures": [ + { + "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", + "sig": "91abfb44e844a293837d1e081953acc4a7d179ff695353ea0472eb71846f8aee9903b352fa595084243218bec93336defc184ed0b4a1bc50e497878ed7f03c0c" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" + }, + "scheme": "ed25519" + }, + "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" + ], + "name": "a", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + }, + { + "keyids": [ + "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be" + ], + "name": "f", + "paths": [ + "*.txt" + ], + "terminating": false, + "threshold": 1 + } + ] + }, + "expires": "2020-04-01T07:27:10Z", + "spec_version": "1.0.0", + "targets": { + "targets.txt": { + "hashes": { + "sha256": "6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6", + "sha512": "0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a" + }, + "length": 21 + } + }, + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/timestamp.json new file mode 100644 index 00000000..218e6de7 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/timestamp.json @@ -0,0 +1,24 @@ +{ + "signatures": [ + { + "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", + "sig": "c48177d304312637216cfa3e424e1f7a214dfbd2121597e2b6ef10b40c000d48720078742503d68d19e50dd39da093e5d25d72ff6a634e7e8880bd9992fc110b" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2020-01-02T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "b5a9218242238080aa294948c18f9d48022b1c3ca68ebdde92fed68bbc0c3c09", + "sha512": "ffb8446b2517a5db4a0ca7b59f4800bcd00f807e918b884af53c7c82b941df242d790e64feaba08ae33edd92902c494f85c9f7c25e8b7071ab0f0b8a1e61206d" + }, + "length": 659, + "version": 2 + } + }, + "spec_version": "1.0.0", + "version": 2 + } +} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/027b3d1814dae8547aed3d7e7b99aa0d59d82cc18411037b0ef0318eb754ce86.e.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/027b3d1814dae8547aed3d7e7b99aa0d59d82cc18411037b0ef0318eb754ce86.e.txt new file mode 100644 index 00000000..7bece393 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/027b3d1814dae8547aed3d7e7b99aa0d59d82cc18411037b0ef0318eb754ce86.e.txt @@ -0,0 +1 @@ +Contents: e.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt new file mode 100644 index 00000000..5f1e6033 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt @@ -0,0 +1 @@ +Contents: targets.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt new file mode 100644 index 00000000..3c405619 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt @@ -0,0 +1 @@ +Contents: a.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt new file mode 100644 index 00000000..5f1e6033 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt @@ -0,0 +1 @@ +Contents: targets.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/79b44a183eaa0025f3997b856537502ac1759de74263985ad1dd9ab0bb5cc8ce46b6c45c1bf37adb87c2839cca54ae784c3d3488e994d29f003decc81638d589.d.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/79b44a183eaa0025f3997b856537502ac1759de74263985ad1dd9ab0bb5cc8ce46b6c45c1bf37adb87c2839cca54ae784c3d3488e994d29f003decc81638d589.d.txt new file mode 100644 index 00000000..36ce6ad4 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/79b44a183eaa0025f3997b856537502ac1759de74263985ad1dd9ab0bb5cc8ce46b6c45c1bf37adb87c2839cca54ae784c3d3488e994d29f003decc81638d589.d.txt @@ -0,0 +1 @@ +Contents: d.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt new file mode 100644 index 00000000..924df500 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt @@ -0,0 +1 @@ +Contents: c.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt new file mode 100644 index 00000000..976e178d --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt @@ -0,0 +1 @@ +Contents: b.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/a.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/a.txt new file mode 100644 index 00000000..3c405619 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/a.txt @@ -0,0 +1 @@ +Contents: a.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b.txt new file mode 100644 index 00000000..976e178d --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b.txt @@ -0,0 +1 @@ +Contents: b.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b2ce56612fa7e840d56d263f75804f60baaad5d6e0a7d544e65e1791f2df5e55.d.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b2ce56612fa7e840d56d263f75804f60baaad5d6e0a7d544e65e1791f2df5e55.d.txt new file mode 100644 index 00000000..36ce6ad4 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b2ce56612fa7e840d56d263f75804f60baaad5d6e0a7d544e65e1791f2df5e55.d.txt @@ -0,0 +1 @@ +Contents: d.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b8061c4c83d478aaadc6758a74861f749420e83dd6bf07e931738b0619404a75d12758429b12f8d047643d6d13047ec0b65bb253cf5f5b961515658864301207.f.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b8061c4c83d478aaadc6758a74861f749420e83dd6bf07e931738b0619404a75d12758429b12f8d047643d6d13047ec0b65bb253cf5f5b961515658864301207.f.txt new file mode 100644 index 00000000..f7c5df53 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b8061c4c83d478aaadc6758a74861f749420e83dd6bf07e931738b0619404a75d12758429b12f8d047643d6d13047ec0b65bb253cf5f5b961515658864301207.f.txt @@ -0,0 +1 @@ +Contents: f.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/c.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/c.txt new file mode 100644 index 00000000..924df500 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/c.txt @@ -0,0 +1 @@ +Contents: c.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/d.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/d.txt new file mode 100644 index 00000000..36ce6ad4 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/d.txt @@ -0,0 +1 @@ +Contents: d.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt new file mode 100644 index 00000000..924df500 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt @@ -0,0 +1 @@ +Contents: c.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/e.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/e.txt new file mode 100644 index 00000000..7bece393 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/e.txt @@ -0,0 +1 @@ +Contents: e.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f.txt new file mode 100644 index 00000000..f7c5df53 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f.txt @@ -0,0 +1 @@ +Contents: f.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f0b07df15d4a3e98ffc6ee6a4c00d04623b0171de458d94dbec4abb7646bc60e.f.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f0b07df15d4a3e98ffc6ee6a4c00d04623b0171de458d94dbec4abb7646bc60e.f.txt new file mode 100644 index 00000000..f7c5df53 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f0b07df15d4a3e98ffc6ee6a4c00d04623b0171de458d94dbec4abb7646bc60e.f.txt @@ -0,0 +1 @@ +Contents: f.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt new file mode 100644 index 00000000..3c405619 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt @@ -0,0 +1 @@ +Contents: a.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt new file mode 100644 index 00000000..976e178d --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt @@ -0,0 +1 @@ +Contents: b.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ffca8c347335e5e019deba8a15212297fe25afc734ac06fcd01b4d9dae12b16d750d7a44bdafcada254148990aa6611bc9ed2f2841da2c0dd70bb870be7275f6.e.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ffca8c347335e5e019deba8a15212297fe25afc734ac06fcd01b4d9dae12b16d750d7a44bdafcada254148990aa6611bc9ed2f2841da2c0dd70bb870be7275f6.e.txt new file mode 100644 index 00000000..7bece393 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ffca8c347335e5e019deba8a15212297fe25afc734ac06fcd01b4d9dae12b16d750d7a44bdafcada254148990aa6611bc9ed2f2841da2c0dd70bb870be7275f6.e.txt @@ -0,0 +1 @@ +Contents: e.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/targets.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/targets.txt new file mode 100644 index 00000000..5f1e6033 --- /dev/null +++ b/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/targets.txt @@ -0,0 +1 @@ +Contents: targets.txt \ No newline at end of file diff --git a/data/hex_bytes.go b/data/hex_bytes.go index 5dee51cc..ec200412 100644 --- a/data/hex_bytes.go +++ b/data/hex_bytes.go @@ -1,6 +1,7 @@ package data import ( + "crypto/sha256" "encoding/hex" "errors" ) @@ -31,3 +32,11 @@ func (b HexBytes) MarshalJSON() ([]byte, error) { func (b HexBytes) String() string { return hex.EncodeToString(b) } + +// 4.5. File formats: targets.json and delegated target roles: +// ...each target path, when hashed with the SHA-256 hash function to produce +// a 64-byte hexadecimal digest (HEX_DIGEST)... +func PathHexDigest(s string) string { + b := sha256.Sum256([]byte(s)) + return hex.EncodeToString(b[:]) +} diff --git a/data/types.go b/data/types.go index 27519f54..ff231e80 100644 --- a/data/types.go +++ b/data/types.go @@ -4,6 +4,9 @@ import ( "crypto/sha256" "encoding/hex" "encoding/json" + "errors" + "path/filepath" + "strings" "sync" "time" @@ -19,7 +22,8 @@ const ( ) var ( - KeyAlgorithms = []string{"sha256", "sha512"} + KeyAlgorithms = []string{"sha256", "sha512"} + ErrPathsAndPathHashesSet = errors.New("tuf: failed validation of delegated target: paths and path_hash_prefixes are both set") ) type Signed struct { @@ -208,11 +212,93 @@ func (f TargetFileMeta) HashAlgorithms() []string { } type Targets struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int `json:"version"` - Expires time.Time `json:"expires"` - Targets TargetFiles `json:"targets"` + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int `json:"version"` + Expires time.Time `json:"expires"` + Targets TargetFiles `json:"targets"` + Delegations *Delegations `json:"delegations,omitempty"` +} + +// Delegations represents the edges from a parent Targets role to one or more +// delegated target roles. See spec v1.0.19 section 4.5. +type Delegations struct { + Keys map[string]*Key `json:"keys"` + Roles []DelegatedRole `json:"roles"` +} + +// DelegatedRole describes a delegated role, including what paths it is +// reponsible for. See spec v1.0.19 section 4.5. +type DelegatedRole struct { + Name string `json:"name"` + KeyIDs []string `json:"keyids"` + Threshold int `json:"threshold"` + Terminating bool `json:"terminating"` + PathHashPrefixes []string `json:"path_hash_prefixes,omitempty"` + Paths []string `json:"paths"` +} + +// MatchesPath evaluates whether the path patterns or path hash prefixes match +// a given file. This determines whether a delegated role is responsible for +// signing and verifying the file. +func (d *DelegatedRole) MatchesPath(file string) (bool, error) { + if err := d.validatePaths(); err != nil { + return false, err + } + + for _, pattern := range d.Paths { + if matched, _ := filepath.Match(pattern, file); matched { + return true, nil + } + } + + pathHash := PathHexDigest(file) + for _, hashPrefix := range d.PathHashPrefixes { + if strings.HasPrefix(pathHash, hashPrefix) { + return true, nil + } + } + + return false, nil +} + +// validatePaths enforces the spec +// https://theupdateframework.github.io/specification/v1.0.19/index.html#file-formats-targets +// 'role MUST specify only one of the "path_hash_prefixes" or "paths"' +// Marshalling and unmarshalling JSON will fail and return +// ErrPathsAndPathHashesSet if both fields are set and not empty. +func (d *DelegatedRole) validatePaths() error { + if len(d.PathHashPrefixes) > 0 && len(d.Paths) > 0 { + return ErrPathsAndPathHashesSet + } + + return nil +} + +// MarshalJSON is called when writing the struct to JSON. We validate prior to +// marshalling to ensure that an invalid delegated role can not be serialized +// to JSON. +func (d *DelegatedRole) MarshalJSON() ([]byte, error) { + type delegatedRoleAlias DelegatedRole + + if err := d.validatePaths(); err != nil { + return nil, err + } + + return json.Marshal((*delegatedRoleAlias)(d)) +} + +// UnmarshalJSON is called when reading the struct from JSON. We validate once +// unmarshalled to ensure that an error is thrown if an invalid delegated role +// is read. +func (d *DelegatedRole) UnmarshalJSON(b []byte) error { + type delegatedRoleAlias DelegatedRole + + if err := json.Unmarshal(b, (*delegatedRoleAlias)(d)); err != nil { + return err + } + + return d.validatePaths() } func NewTargets() *Targets { diff --git a/data/types_test.go b/data/types_test.go index d5b00f2e..4b64cec8 100644 --- a/data/types_test.go +++ b/data/types_test.go @@ -2,7 +2,10 @@ package data import ( "encoding/json" + "testing" + "github.com/stretchr/testify/assert" + cjson "github.com/tent/canonical-json-go" . "gopkg.in/check.v1" ) @@ -91,3 +94,138 @@ func (TypesSuite) TestRoleAddKeyIDs(c *C) { c.Assert(role.AddKeyIDs(key.IDs()), Equals, true) c.Assert(role.KeyIDs, DeepEquals, []string{keyid10, keyid10algos}) } + +func TestDelegatedRolePathMatch(t *testing.T) { + var tts = []struct { + testName string + pathPatterns []string + pathHashPrefixes []string + file string + shouldMatch bool + }{ + { + testName: "no path", + file: "licence.txt", + }, + { + testName: "match path *", + pathPatterns: []string{"null", "targets/*.tgz"}, + file: "targets/foo.tgz", + shouldMatch: true, + }, + { + testName: "does not match path *", + pathPatterns: []string{"null", "targets/*.tgz"}, + file: "targets/foo.txt", + shouldMatch: false, + }, + { + testName: "match path ?", + pathPatterns: []string{"foo-version-?.tgz"}, + file: "foo-version-a.tgz", + shouldMatch: true, + }, + { + testName: "does not match ?", + pathPatterns: []string{"foo-version-?.tgz"}, + file: "foo-version-alpha.tgz", + shouldMatch: false, + }, + // picked from https://github.com/theupdateframework/tuf/blob/30ba6e9f9ab25e0370e29ce574dada2d8809afa0/tests/test_updater.py#L1726-L1734 + { + testName: "match hash prefix", + pathHashPrefixes: []string{"badd", "8baf"}, + file: "/file3.txt", + shouldMatch: true, + }, + { + testName: "does not match hash prefix", + pathHashPrefixes: []string{"badd"}, + file: "/file3.txt", + shouldMatch: false, + }, + { + testName: "hash prefix first char", + pathHashPrefixes: []string{"2"}, + file: "/a/b/c/file_d.txt", + shouldMatch: true, + }, + { + testName: "full hash prefix", + pathHashPrefixes: []string{"34c85d1ee84f61f10d7dc633472a49096ed87f8f764bd597831eac371f40ac39"}, + file: "/e/f/g.txt", + shouldMatch: true, + }, + } + for _, tt := range tts { + t.Run(tt.testName, func(t *testing.T) { + d := DelegatedRole{ + Paths: tt.pathPatterns, + PathHashPrefixes: tt.pathHashPrefixes, + } + assert.NoError(t, d.validatePaths()) + + matchesPath, err := d.MatchesPath(tt.file) + assert.NoError(t, err) + assert.Equal(t, tt.shouldMatch, matchesPath) + }) + + } +} + +func TestDelegatedRoleJSON(t *testing.T) { + var tts = []struct { + testName string + d *DelegatedRole + rawCJSON string + }{{ + testName: "all fields with hashes", + d: &DelegatedRole{ + Name: "n1", + KeyIDs: []string{"k1"}, + Threshold: 5, + Terminating: true, + PathHashPrefixes: []string{"8f"}, + }, + rawCJSON: `{"keyids":["k1"],"name":"n1","path_hash_prefixes":["8f"],"paths":null,"terminating":true,"threshold":5}`, + }, + { + testName: "paths only", + d: &DelegatedRole{ + Name: "n2", + KeyIDs: []string{"k1", "k3"}, + Threshold: 12, + Paths: []string{"*.txt"}, + }, + rawCJSON: `{"keyids":["k1","k3"],"name":"n2","paths":["*.txt"],"terminating":false,"threshold":12}`, + }, + { + testName: "default", + d: &DelegatedRole{}, + rawCJSON: `{"keyids":null,"name":"","paths":null,"terminating":false,"threshold":0}`, + }, + } + + for _, tt := range tts { + t.Run(tt.testName, func(t *testing.T) { + b, err := cjson.Marshal(tt.d) + assert.NoError(t, err) + assert.Equal(t, tt.rawCJSON, string(b)) + + newD := &DelegatedRole{} + err = json.Unmarshal(b, newD) + assert.NoError(t, err) + assert.Equal(t, tt.d, newD) + }) + } +} + +func TestDelegatedRoleUnmarshalErr(t *testing.T) { + targetsWithBothMatchers := []byte(`{"keyids":null,"name":"","paths":["*.txt"],"path_hash_prefixes":["8f"],"terminating":false,"threshold":0}`) + var d DelegatedRole + assert.Equal(t, ErrPathsAndPathHashesSet, json.Unmarshal(targetsWithBothMatchers, &d)) + + // test for type errors + err := json.Unmarshal([]byte(`{"keyids":"a"}`), &d) + assert.Equal(t, "keyids", err.(*json.UnmarshalTypeError).Field) +} diff --git a/go.mod b/go.mod index a3539921..076376f4 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,17 @@ -module github.com/theupdateframework/go-tuf +module github.com/DataDog/go-tuf -go 1.14 +go 1.16 require ( github.com/dustin/go-humanize v1.0.0 github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/stretchr/testify v1.7.0 // indirect github.com/syndtr/goleveldb v1.0.0 github.com/tent/canonical-json-go v0.0.0-20130607151641-96e4ba3a7613 + github.com/theupdateframework/go-tuf v0.0.0-local golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f ) + +replace github.com/theupdateframework/go-tuf => ./ diff --git a/go.sum b/go.sum index 9a22576e..5bf50902 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e h1:Ss/B3/5wWRh8+emnK0++g5zQzwDTi30W10pKxKc4JXI= @@ -6,6 +8,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= @@ -13,8 +16,15 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tent/canonical-json-go v0.0.0-20130607151641-96e4ba3a7613 h1:iGnD/q9160NWqKZZ5vY4p0dMiYMRknzctfSkqA4nBDw= @@ -23,16 +33,23 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d h1:adrbvkTDn9rGnXg2IJDKozEpXXLZN89pdIA+Syt4/u0= golang.org/x/crypto v0.0.0-20190424203555-c05e17bb3b2d/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/verify/db.go b/verify/db.go index 8bc80a3c..1565f99b 100644 --- a/verify/db.go +++ b/verify/db.go @@ -26,6 +26,36 @@ func NewDB() *DB { } } +type DelegationsVerifier struct { + DB *DB +} + +func (d *DelegationsVerifier) Unmarshal(b []byte, v interface{}, role string, minVersion int) error { + return d.DB.Unmarshal(b, v, role, minVersion) +} + +// NewDelegationsVerifier returns a DelegationsVerifier that verifies delegations +// of a given Targets. It reuses the DB struct to leverage verified keys, roles +// unmarshals. +func NewDelegationsVerifier(d *data.Delegations) (DelegationsVerifier, error) { + db := &DB{ + roles: make(map[string]*Role, len(d.Roles)), + keys: make(map[string]*data.Key, len(d.Keys)), + } + for _, r := range d.Roles { + role := &data.Role{Threshold: r.Threshold, KeyIDs: r.KeyIDs} + if err := db.addRole(r.Name, role); err != nil { + return DelegationsVerifier{}, err + } + } + for id, k := range d.Keys { + if err := db.AddKey(id, k); err != nil { + return DelegationsVerifier{}, err + } + } + return DelegationsVerifier{db}, nil +} + func (db *DB) AddKey(id string, k *data.Key) error { v, ok := Verifiers[k.Type] if !ok { @@ -43,22 +73,31 @@ func (db *DB) AddKey(id string, k *data.Key) error { return nil } -var validRoles = map[string]struct{}{ +var topLevelRoles = map[string]struct{}{ "root": {}, "targets": {}, "snapshot": {}, "timestamp": {}, } +// ValidRole checks if a role is a top level role. func ValidRole(name string) bool { - _, ok := validRoles[name] + return isTopLevelRole(name) +} + +func isTopLevelRole(name string) bool { + _, ok := topLevelRoles[name] return ok } func (db *DB) AddRole(name string, r *data.Role) error { - if !ValidRole(name) { + if !isTopLevelRole(name) { return ErrInvalidRole } + return db.addRole(name, r) +} + +func (db *DB) addRole(name string, r *data.Role) error { if r.Threshold < 1 { return ErrInvalidThreshold } diff --git a/verify/errors.go b/verify/errors.go index 6e4587be..af3784b8 100644 --- a/verify/errors.go +++ b/verify/errors.go @@ -58,3 +58,12 @@ type ErrRoleThreshold struct { func (e ErrRoleThreshold) Error() string { return "tuf: valid signatures did not meet threshold" } + +type ErrWrongVersion struct { + Given int + Expected int +} + +func (e ErrWrongVersion) Error() string { + return fmt.Sprintf("version %d does not match the expected version %d", e.Given, e.Expected) +} diff --git a/verify/verify.go b/verify/verify.go index eb618ae0..b6d4162d 100644 --- a/verify/verify.go +++ b/verify/verify.go @@ -24,12 +24,24 @@ func (db *DB) Verify(s *data.Signed, role string, minVersion int) error { if err := json.Unmarshal(s.Signed, sm); err != nil { return err } - if strings.ToLower(sm.Type) != strings.ToLower(role) { - return ErrWrongMetaType + + if isTopLevelRole(role) { + // Top-level roles can only sign metadata of the same type (e.g. snapshot + // metadata must be signed by the snapshot role). + if strings.ToLower(sm.Type) != strings.ToLower(role) { + return ErrWrongMetaType + } + } else { + // Delegated (non-top-level) roles may only sign targets metadata. + if strings.ToLower(sm.Type) != "targets" { + return ErrWrongMetaType + } } + if IsExpired(sm.Expires) { return ErrExpired{sm.Expires} } + if sm.Version < minVersion { return ErrLowVersion{sm.Version, minVersion} }