From b76646f1fe16dd133466c050616ec06c481d06b1 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 24 Jan 2024 14:42:19 +0200 Subject: [PATCH 001/208] Remove legacy go-tuf code Signed-off-by: Radoslav Dimitrov --- .gitattributes | 5 - .github/PULL_REQUEST_TEMPLATE.md | 18 - .github/dependabot.yml | 47 - .github/workflows/auto-merge.yml | 26 - .github/workflows/changelog.yml | 18 - .github/workflows/ci.yml | 25 - .github/workflows/codeql-analysis.yml | 70 - .github/workflows/release.yml | 32 - .../workflows/specification-version-check.yml | 14 - .github/workflows/tests.yml | 74 - .gitignore | 5 - .gitpod.yml | 7 - .golangci.yml | 10 - .goreleaser/tuf-client.yml | 40 - .goreleaser/tuf.yml | 40 - LICENSE | 27 - README.md | 683 ---- client/client.go | 1005 ------ client/client_test.go | 1668 ---------- client/delegations.go | 152 - client/delegations_test.go | 340 -- client/errors.go | 107 - client/file_store.go | 90 - client/file_store_test.go | 197 -- client/filejsonstore/filejsonstore.go | 148 - client/filejsonstore/filejsonstore_test.go | 194 -- client/filejsonstore/perm_test.go | 54 - client/interop_test.go | 201 -- client/leveldbstore/leveldbstore.go | 60 - client/leveldbstore/leveldbstore_test.go | 123 - client/local_store.go | 29 - client/local_store_test.go | 29 - client/python_interop/python_interop_test.go | 236 -- client/python_interop/testdata/LICENSE.txt | 66 - client/python_interop/testdata/Makefile | 10 - client/python_interop/testdata/README.md | 47 - .../testdata/python-tuf-v3.0.0/Dockerfile | 7 - .../testdata/python-tuf-v3.0.0/client.py | 68 - .../testdata/python-tuf-v3.0.0/generate.py | 138 - .../testdata/python-tuf-v3.0.0/generate.sh | 40 - .../repository/metadata/1.root.json | 71 - .../repository/metadata/1.snapshot.json | 19 - .../repository/metadata/1.targets.json | 28 - .../repository/metadata/timestamp.json | 19 - ...ce9c420da5db6203afab700b27e10cf9.file1.txt | 1 - ...7d7615dc3e9515c782c49d2075658701.file2.txt | 1 - .../repository/metadata/1.root.json | 71 - .../repository/metadata/snapshot.json | 19 - .../repository/metadata/targets.json | 28 - .../repository/metadata/timestamp.json | 19 - .../repository/targets/dir/file2.txt | 1 - .../repository/targets/file1.txt | 1 - client/remote_store.go | 109 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - client/testdata/Published1Time/hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/root.json | 87 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../Published1Time/server/metadata/root.json | 87 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/root.json | 87 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 87 - .../server/metadata/root.json | 87 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../Published1Time_client_no_root/hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/root.json | 87 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/root.json | 87 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../Published1Time_client_root_only/hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/root.json | 87 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/root.json | 87 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../Published2Times_keyrotated/hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/root.json | 103 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 103 - .../server/metadata/root.json | 103 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/root.json | 103 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 103 - .../server/metadata/root.json | 103 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/root.json | 103 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 103 - .../server/metadata/root.json | 103 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/root.json | 103 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 103 - .../server/metadata/root.json | 103 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../Published2Times_roottoolarge/hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/root.json | 103 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | Bin 512001 -> 0 bytes .../server/metadata/root.json | 103 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 99 - .../server/metadata.staged/2.snapshot.json | 23 - .../server/metadata.staged/2.timestamp.json | 24 - .../server/metadata.staged/root.json | 99 - .../server/metadata.staged/snapshot.json | 23 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 99 - .../server/metadata/2.snapshot.json | 23 - .../server/metadata/2.timestamp.json | 24 - .../server/metadata/root.json | 99 - .../server/metadata/snapshot.json | 23 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 99 - .../server/metadata.staged/2.snapshot.json | 19 - .../server/metadata.staged/2.targets.json | 23 - .../server/metadata.staged/2.timestamp.json | 24 - .../server/metadata.staged/root.json | 99 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 23 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 99 - .../server/metadata/2.snapshot.json | 19 - .../server/metadata/2.targets.json | 23 - .../server/metadata/2.timestamp.json | 24 - .../server/metadata/root.json | 99 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 23 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 99 - .../server/metadata.staged/2.timestamp.json | 28 - .../server/metadata.staged/root.json | 99 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 28 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 99 - .../server/metadata/2.timestamp.json | 28 - .../server/metadata/root.json | 99 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 28 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/3.root.json | 119 - .../server/metadata.staged/root.json | 119 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 119 - .../server/metadata/root.json | 119 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/3.root.json | 119 - .../server/metadata.staged/root.json | 119 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 103 - .../server/metadata/3.root.json | 119 - .../server/metadata/root.json | 119 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/2.root.json | 103 - .../client/metadata/current/root.json | 103 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/2.root.json | 103 - .../client/metadata/previous/root.json | 103 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/3.root.json | 119 - .../server/metadata.staged/root.json | 119 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 103 - .../server/metadata/3.root.json | 119 - .../server/metadata/root.json | 119 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 103 - .../server/metadata.staged/3.root.json | 119 - .../server/metadata.staged/root.json | 119 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 103 - .../server/metadata/3.root.json | 119 - .../server/metadata/root.json | 119 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 215 -- .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 215 -- .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 215 -- .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 215 -- .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 215 -- .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 191 -- .../server/metadata.staged/root.json | 191 -- .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 215 -- .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 191 -- .../server/metadata/root.json | 191 -- .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 183 -- .../client/metadata/current/1.snapshot.json | 51 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 183 -- .../client/metadata/current/snapshot.json | 51 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 183 -- .../client/metadata/previous/1.snapshot.json | 51 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 183 -- .../client/metadata/previous/snapshot.json | 51 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 183 -- .../server/metadata.staged/1.snapshot.json | 51 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 159 - .../server/metadata.staged/2.snapshot.json | 51 - .../server/metadata.staged/root.json | 159 - .../server/metadata.staged/snapshot.json | 51 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 183 -- .../server/metadata/1.snapshot.json | 51 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 159 - .../server/metadata/2.snapshot.json | 51 - .../server/metadata/root.json | 159 - .../server/metadata/snapshot.json | 51 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 183 -- .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 51 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 183 -- .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 51 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 183 -- .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 51 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 183 -- .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 51 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 183 -- .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 51 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 159 - .../server/metadata.staged/2.targets.json | 51 - .../server/metadata.staged/root.json | 159 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 51 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 183 -- .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 51 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 159 - .../server/metadata/2.targets.json | 51 - .../server/metadata/root.json | 159 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 51 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 183 -- .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 56 - .../client/metadata/current/root.json | 183 -- .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 56 - .../client/metadata/previous/1.root.json | 183 -- .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 56 - .../client/metadata/previous/root.json | 183 -- .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 56 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 183 -- .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 56 - .../server/metadata.staged/2.root.json | 159 - .../server/metadata.staged/2.timestamp.json | 56 - .../server/metadata.staged/root.json | 159 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 56 - .../server/metadata/1.root.json | 183 -- .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 56 - .../server/metadata/2.root.json | 159 - .../server/metadata/2.timestamp.json | 56 - .../server/metadata/root.json | 159 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 56 - .../client/metadata/current/1.root.json | 215 -- .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 215 -- .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 215 -- .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 215 -- .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 215 -- .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 167 - .../server/metadata.staged/root.json | 167 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 215 -- .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 167 - .../server/metadata/root.json | 167 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 183 -- .../client/metadata/current/1.snapshot.json | 51 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 183 -- .../client/metadata/current/snapshot.json | 51 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 183 -- .../client/metadata/previous/1.snapshot.json | 51 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 183 -- .../client/metadata/previous/snapshot.json | 51 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 183 -- .../server/metadata.staged/1.snapshot.json | 51 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 135 - .../server/metadata.staged/2.snapshot.json | 51 - .../server/metadata.staged/root.json | 135 - .../server/metadata.staged/snapshot.json | 51 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 183 -- .../server/metadata/1.snapshot.json | 51 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 135 - .../server/metadata/2.snapshot.json | 51 - .../server/metadata/root.json | 135 - .../server/metadata/snapshot.json | 51 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 183 -- .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 51 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 183 -- .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 51 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 183 -- .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 51 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 183 -- .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 51 - .../client/metadata/previous/timestamp.json | 24 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 183 -- .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 51 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.root.json | 135 - .../server/metadata.staged/2.targets.json | 51 - .../server/metadata.staged/root.json | 135 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 51 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.root.json | 183 -- .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 51 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 135 - .../server/metadata/2.targets.json | 51 - .../server/metadata/root.json | 135 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 51 - .../server/metadata/timestamp.json | 24 - .../client/metadata/current/1.root.json | 183 -- .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 56 - .../client/metadata/current/root.json | 183 -- .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 56 - .../client/metadata/previous/1.root.json | 183 -- .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 56 - .../client/metadata/previous/root.json | 183 -- .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 56 - .../hash.txt | 1 - .../server/metadata.staged/1.root.json | 183 -- .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 56 - .../server/metadata.staged/2.root.json | 135 - .../server/metadata.staged/2.timestamp.json | 56 - .../server/metadata.staged/root.json | 135 - .../server/metadata.staged/snapshot.json | 19 - .../server/metadata.staged/targets.json | 19 - .../server/metadata.staged/timestamp.json | 56 - .../server/metadata/1.root.json | 183 -- .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 56 - .../server/metadata/2.root.json | 135 - .../server/metadata/2.timestamp.json | 56 - .../server/metadata/root.json | 135 - .../server/metadata/snapshot.json | 19 - .../server/metadata/targets.json | 19 - .../server/metadata/timestamp.json | 56 - .../0/repository/1.root.json | 133 - .../0/repository/root.json | 133 - .../0/repository/snapshot.json | 36 - .../0/repository/targets.json | 28 - .../0/repository/targets/0 | 1 - .../0/repository/timestamp.json | 29 - .../1/repository/1.root.json | 1 - .../1/repository/2.root.json | 143 - .../1/repository/root.json | 143 - .../1/repository/snapshot.json | 36 - .../1/repository/targets.json | 34 - .../1/repository/targets/0 | 1 - .../1/repository/targets/1 | 1 - .../1/repository/timestamp.json | 29 - .../2/repository/1.root.json | 1 - .../2/repository/2.root.json | 1 - .../2/repository/3.root.json | 133 - .../2/repository/root.json | 133 - .../2/repository/snapshot.json | 36 - .../2/repository/targets.json | 40 - .../2/repository/targets/0 | 1 - .../2/repository/targets/1 | 1 - .../2/repository/targets/2 | 1 - .../2/repository/timestamp.json | 29 - .../3/repository/1.root.json | 1 - .../3/repository/2.root.json | 1 - .../3/repository/3.root.json | 1 - .../3/repository/4.root.json | 133 - .../3/repository/root.json | 133 - .../3/repository/snapshot.json | 36 - .../3/repository/targets.json | 46 - .../3/repository/targets/0 | 1 - .../3/repository/targets/1 | 1 - .../3/repository/targets/2 | 1 - .../3/repository/targets/3 | 1 - .../3/repository/timestamp.json | 29 - .../4/repository/1.root.json | 1 - .../4/repository/2.root.json | 1 - .../4/repository/3.root.json | 1 - .../4/repository/4.root.json | 1 - .../4/repository/5.root.json | 133 - .../4/repository/root.json | 133 - .../4/repository/snapshot.json | 36 - .../4/repository/targets.json | 52 - .../4/repository/targets/0 | 1 - .../4/repository/targets/1 | 1 - .../4/repository/targets/2 | 1 - .../4/repository/targets/3 | 1 - .../4/repository/targets/4 | 1 - .../4/repository/timestamp.json | 29 - .../5/repository/1.root.json | 1 - .../5/repository/2.root.json | 1 - .../5/repository/3.root.json | 1 - .../5/repository/4.root.json | 1 - .../5/repository/5.root.json | 1 - .../5/repository/root.json | 1 - .../5/repository/snapshot.json | 36 - .../5/repository/targets.json | 58 - .../5/repository/targets/0 | 1 - .../5/repository/targets/1 | 1 - .../5/repository/targets/2 | 1 - .../5/repository/targets/3 | 1 - .../5/repository/targets/4 | 1 - .../5/repository/targets/5 | 1 - .../5/repository/timestamp.json | 29 - .../0/repository/1.root.json | 133 - .../0/repository/1.snapshot.json | 36 - .../0/repository/1.targets.json | 28 - ...e5723fd67c63d4aaa81dd966c5a4.snapshot.json | 36 - ...973589285dfbcfbb6c423c559ff4e.targets.json | 28 - ...5d03c5e6d72295414ac6bbcc3d1957c3.root.json | 133 - .../0/repository/root.json | 133 - .../0/repository/snapshot.json | 36 - .../0/repository/targets.json | 28 - .../0/repository/targets/0.0 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - .../0/repository/timestamp.json | 29 - .../1/repository/1.root.json | 1 - .../1/repository/1.snapshot.json | 1 - .../1/repository/1.targets.json | 1 - ...0a8299183fd7228e1049f6920ce22.targets.json | 34 - .../1/repository/2.root.json | 143 - .../1/repository/2.snapshot.json | 36 - .../1/repository/2.targets.json | 34 - ...5ba65fb468f7a5e60b870cbe26e9.snapshot.json | 36 - ...e5723fd67c63d4aaa81dd966c5a4.snapshot.json | 1 - ...973589285dfbcfbb6c423c559ff4e.targets.json | 1 - ...a6e49d780d8687dd6c304fae9b6fe098.root.json | 143 - ...5d03c5e6d72295414ac6bbcc3d1957c3.root.json | 1 - .../1/repository/root.json | 143 - .../1/repository/snapshot.json | 36 - .../1/repository/targets.json | 34 - .../1/repository/targets/0.0 | 1 - .../1/repository/targets/0.1 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../1/repository/timestamp.json | 29 - .../2/repository/1.root.json | 1 - .../2/repository/1.snapshot.json | 1 - .../2/repository/1.targets.json | 1 - ...0a8299183fd7228e1049f6920ce22.targets.json | 1 - ...65bae688b48db1b8aa8de944e432.snapshot.json | 36 - .../2/repository/2.root.json | 1 - .../2/repository/2.snapshot.json | 1 - .../2/repository/2.targets.json | 1 - ...5ba65fb468f7a5e60b870cbe26e9.snapshot.json | 1 - .../2/repository/3.root.json | 133 - .../2/repository/3.snapshot.json | 36 - .../2/repository/3.targets.json | 40 - ...e5723fd67c63d4aaa81dd966c5a4.snapshot.json | 1 - ...8b6691fcf21c1edfcc7a88a48d4b7b94.root.json | 133 - ...973589285dfbcfbb6c423c559ff4e.targets.json | 1 - ...a6e49d780d8687dd6c304fae9b6fe098.root.json | 1 - ...0b4454a976feb0c9f29b64e338ee4.targets.json | 40 - ...5d03c5e6d72295414ac6bbcc3d1957c3.root.json | 1 - .../2/repository/root.json | 133 - .../2/repository/snapshot.json | 36 - .../2/repository/targets.json | 40 - .../2/repository/targets/0.0 | 1 - .../2/repository/targets/0.1 | 1 - .../2/repository/targets/0.2 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../2/repository/timestamp.json | 29 - .../3/repository/1.root.json | 1 - .../3/repository/1.snapshot.json | 1 - .../3/repository/1.targets.json | 1 - ...0a8299183fd7228e1049f6920ce22.targets.json | 1 - ...8a1af3e858c8d004682a3393f3a7.snapshot.json | 36 - ...65bae688b48db1b8aa8de944e432.snapshot.json | 1 - .../3/repository/2.root.json | 1 - .../3/repository/2.snapshot.json | 1 - .../3/repository/2.targets.json | 1 - ...5ba65fb468f7a5e60b870cbe26e9.snapshot.json | 1 - .../3/repository/3.root.json | 1 - .../3/repository/3.snapshot.json | 1 - .../3/repository/3.targets.json | 1 - ...e5723fd67c63d4aaa81dd966c5a4.snapshot.json | 1 - .../3/repository/4.root.json | 133 - .../3/repository/4.snapshot.json | 36 - .../3/repository/4.targets.json | 46 - ...8b6691fcf21c1edfcc7a88a48d4b7b94.root.json | 1 - ...973589285dfbcfbb6c423c559ff4e.targets.json | 1 - ...0bc7be32d684077be5aae06495f57cfa.root.json | 133 - ...72c99f6df0c57a2bece6435a3e461.targets.json | 46 - ...a6e49d780d8687dd6c304fae9b6fe098.root.json | 1 - ...0b4454a976feb0c9f29b64e338ee4.targets.json | 1 - ...5d03c5e6d72295414ac6bbcc3d1957c3.root.json | 1 - .../3/repository/root.json | 133 - .../3/repository/snapshot.json | 36 - .../3/repository/targets.json | 46 - .../3/repository/targets/0.0 | 1 - .../3/repository/targets/0.1 | 1 - .../3/repository/targets/0.2 | 1 - .../3/repository/targets/0.3 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../3/repository/timestamp.json | 29 - .../4/repository/1.root.json | 1 - .../4/repository/1.snapshot.json | 1 - .../4/repository/1.targets.json | 1 - ...0a8299183fd7228e1049f6920ce22.targets.json | 1 - ...8a1af3e858c8d004682a3393f3a7.snapshot.json | 1 - ...65bae688b48db1b8aa8de944e432.snapshot.json | 1 - .../4/repository/2.root.json | 1 - .../4/repository/2.snapshot.json | 1 - .../4/repository/2.targets.json | 1 - ...5ba65fb468f7a5e60b870cbe26e9.snapshot.json | 1 - .../4/repository/3.root.json | 1 - .../4/repository/3.snapshot.json | 1 - .../4/repository/3.targets.json | 1 - ...e5723fd67c63d4aaa81dd966c5a4.snapshot.json | 1 - .../4/repository/4.root.json | 1 - .../4/repository/4.snapshot.json | 1 - .../4/repository/4.targets.json | 1 - .../4/repository/5.root.json | 133 - .../4/repository/5.snapshot.json | 36 - .../4/repository/5.targets.json | 52 - ...8b6691fcf21c1edfcc7a88a48d4b7b94.root.json | 1 - ...973589285dfbcfbb6c423c559ff4e.targets.json | 1 - ...0bc7be32d684077be5aae06495f57cfa.root.json | 1 - ...72c99f6df0c57a2bece6435a3e461.targets.json | 1 - ...f4ae7ca71a066894042b1d24983fc0fd.root.json | 133 - ...a6e49d780d8687dd6c304fae9b6fe098.root.json | 1 - ...0b4454a976feb0c9f29b64e338ee4.targets.json | 1 - ...5d03c5e6d72295414ac6bbcc3d1957c3.root.json | 1 - ...dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json | 52 - ...1562b0496127fcb44ca6b08c294c.snapshot.json | 36 - .../4/repository/root.json | 133 - .../4/repository/snapshot.json | 36 - .../4/repository/targets.json | 52 - .../4/repository/targets/0.0 | 1 - .../4/repository/targets/0.1 | 1 - .../4/repository/targets/0.2 | 1 - .../4/repository/targets/0.3 | 1 - .../4/repository/targets/0.4 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - ...0848c1633ce81b675286ea8fb53db240d831c568.4 | 1 - .../4/repository/timestamp.json | 29 - .../5/repository/1.root.json | 1 - .../5/repository/1.snapshot.json | 1 - .../5/repository/1.targets.json | 1 - ...0a8299183fd7228e1049f6920ce22.targets.json | 1 - ...8a1af3e858c8d004682a3393f3a7.snapshot.json | 1 - ...65bae688b48db1b8aa8de944e432.snapshot.json | 1 - .../5/repository/2.root.json | 1 - .../5/repository/2.snapshot.json | 1 - .../5/repository/2.targets.json | 1 - ...5ba65fb468f7a5e60b870cbe26e9.snapshot.json | 1 - .../5/repository/3.root.json | 1 - .../5/repository/3.snapshot.json | 1 - .../5/repository/3.targets.json | 1 - ...e5723fd67c63d4aaa81dd966c5a4.snapshot.json | 1 - .../5/repository/4.root.json | 1 - .../5/repository/4.snapshot.json | 1 - .../5/repository/4.targets.json | 1 - .../5/repository/5.root.json | 1 - .../5/repository/5.snapshot.json | 1 - .../5/repository/5.targets.json | 1 - ...8b6691fcf21c1edfcc7a88a48d4b7b94.root.json | 1 - .../5/repository/6.snapshot.json | 36 - .../5/repository/6.targets.json | 58 - ...7c21db78f487e1b046d9968173c8.snapshot.json | 36 - ...973589285dfbcfbb6c423c559ff4e.targets.json | 1 - ...0bc7be32d684077be5aae06495f57cfa.root.json | 1 - ...72c99f6df0c57a2bece6435a3e461.targets.json | 1 - ...f4ae7ca71a066894042b1d24983fc0fd.root.json | 1 - ...a365665c6e918d4137b83cb7e2262.targets.json | 58 - ...a6e49d780d8687dd6c304fae9b6fe098.root.json | 1 - ...0b4454a976feb0c9f29b64e338ee4.targets.json | 1 - ...5d03c5e6d72295414ac6bbcc3d1957c3.root.json | 1 - ...dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json | 1 - ...1562b0496127fcb44ca6b08c294c.snapshot.json | 1 - .../5/repository/root.json | 1 - .../5/repository/snapshot.json | 36 - .../5/repository/targets.json | 58 - .../5/repository/targets/0.0 | 1 - .../5/repository/targets/0.1 | 1 - .../5/repository/targets/0.2 | 1 - .../5/repository/targets/0.3 | 1 - .../5/repository/targets/0.4 | 1 - .../5/repository/targets/0.5 | 1 - ...db543b4653df28f5d09dab86f92ffb9b86d01e25.5 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - ...0848c1633ce81b675286ea8fb53db240d831c568.4 | 1 - .../5/repository/timestamp.json | 29 - .../testdata/go-tuf-transition-M3/generate.go | 150 - .../0/repository/1.root.json | 83 - .../0/repository/root.json | 83 - .../0/repository/snapshot.json | 30 - .../0/repository/targets.json | 22 - .../0/repository/targets/0 | 1 - .../0/repository/timestamp.json | 23 - .../1/repository/1.root.json | 1 - .../1/repository/2.root.json | 87 - .../1/repository/root.json | 87 - .../1/repository/snapshot.json | 30 - .../1/repository/targets.json | 28 - .../1/repository/targets/0 | 1 - .../1/repository/targets/1 | 1 - .../1/repository/timestamp.json | 23 - .../2/repository/1.root.json | 1 - .../2/repository/2.root.json | 1 - .../2/repository/3.root.json | 83 - .../2/repository/root.json | 83 - .../2/repository/snapshot.json | 30 - .../2/repository/targets.json | 34 - .../2/repository/targets/0 | 1 - .../2/repository/targets/1 | 1 - .../2/repository/targets/2 | 1 - .../2/repository/timestamp.json | 23 - .../3/repository/1.root.json | 1 - .../3/repository/2.root.json | 1 - .../3/repository/3.root.json | 1 - .../3/repository/4.root.json | 83 - .../3/repository/root.json | 83 - .../3/repository/snapshot.json | 30 - .../3/repository/targets.json | 40 - .../3/repository/targets/0 | 1 - .../3/repository/targets/1 | 1 - .../3/repository/targets/2 | 1 - .../3/repository/targets/3 | 1 - .../3/repository/timestamp.json | 23 - .../4/repository/1.root.json | 1 - .../4/repository/2.root.json | 1 - .../4/repository/3.root.json | 1 - .../4/repository/4.root.json | 1 - .../4/repository/5.root.json | 83 - .../4/repository/root.json | 83 - .../4/repository/snapshot.json | 30 - .../4/repository/targets.json | 46 - .../4/repository/targets/0 | 1 - .../4/repository/targets/1 | 1 - .../4/repository/targets/2 | 1 - .../4/repository/targets/3 | 1 - .../4/repository/targets/4 | 1 - .../4/repository/timestamp.json | 23 - .../5/repository/1.root.json | 1 - .../5/repository/2.root.json | 1 - .../5/repository/3.root.json | 1 - .../5/repository/4.root.json | 1 - .../5/repository/5.root.json | 1 - .../5/repository/root.json | 1 - .../5/repository/snapshot.json | 30 - .../5/repository/targets.json | 52 - .../5/repository/targets/0 | 1 - .../5/repository/targets/1 | 1 - .../5/repository/targets/2 | 1 - .../5/repository/targets/3 | 1 - .../5/repository/targets/4 | 1 - .../5/repository/targets/5 | 1 - .../5/repository/timestamp.json | 23 - .../0/repository/1.root.json | 83 - .../0/repository/1.snapshot.json | 30 - .../0/repository/1.targets.json | 22 - .../0/repository/root.json | 83 - .../0/repository/snapshot.json | 30 - .../0/repository/targets.json | 22 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - .../0/repository/timestamp.json | 23 - .../1/repository/1.root.json | 1 - .../1/repository/1.snapshot.json | 1 - .../1/repository/1.targets.json | 1 - .../1/repository/2.root.json | 87 - .../1/repository/2.snapshot.json | 30 - .../1/repository/2.targets.json | 28 - .../1/repository/root.json | 87 - .../1/repository/snapshot.json | 30 - .../1/repository/targets.json | 28 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../1/repository/timestamp.json | 23 - .../2/repository/1.root.json | 1 - .../2/repository/1.snapshot.json | 1 - .../2/repository/1.targets.json | 1 - .../2/repository/2.root.json | 1 - .../2/repository/2.snapshot.json | 1 - .../2/repository/2.targets.json | 1 - .../2/repository/3.root.json | 83 - .../2/repository/3.snapshot.json | 30 - .../2/repository/3.targets.json | 34 - .../2/repository/root.json | 83 - .../2/repository/snapshot.json | 30 - .../2/repository/targets.json | 34 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../2/repository/timestamp.json | 23 - .../3/repository/1.root.json | 1 - .../3/repository/1.snapshot.json | 1 - .../3/repository/1.targets.json | 1 - .../3/repository/2.root.json | 1 - .../3/repository/2.snapshot.json | 1 - .../3/repository/2.targets.json | 1 - .../3/repository/3.root.json | 1 - .../3/repository/3.snapshot.json | 1 - .../3/repository/3.targets.json | 1 - .../3/repository/4.root.json | 83 - .../3/repository/4.snapshot.json | 30 - .../3/repository/4.targets.json | 40 - .../3/repository/root.json | 83 - .../3/repository/snapshot.json | 30 - .../3/repository/targets.json | 40 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../3/repository/timestamp.json | 23 - .../4/repository/1.root.json | 1 - .../4/repository/1.snapshot.json | 1 - .../4/repository/1.targets.json | 1 - .../4/repository/2.root.json | 1 - .../4/repository/2.snapshot.json | 1 - .../4/repository/2.targets.json | 1 - .../4/repository/3.root.json | 1 - .../4/repository/3.snapshot.json | 1 - .../4/repository/3.targets.json | 1 - .../4/repository/4.root.json | 1 - .../4/repository/4.snapshot.json | 1 - .../4/repository/4.targets.json | 1 - .../4/repository/5.root.json | 83 - .../4/repository/5.snapshot.json | 30 - .../4/repository/5.targets.json | 46 - .../4/repository/root.json | 83 - .../4/repository/snapshot.json | 30 - .../4/repository/targets.json | 46 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - ...0848c1633ce81b675286ea8fb53db240d831c568.4 | 1 - .../4/repository/timestamp.json | 23 - .../5/repository/1.root.json | 1 - .../5/repository/1.snapshot.json | 1 - .../5/repository/1.targets.json | 1 - .../5/repository/2.root.json | 1 - .../5/repository/2.snapshot.json | 1 - .../5/repository/2.targets.json | 1 - .../5/repository/3.root.json | 1 - .../5/repository/3.snapshot.json | 1 - .../5/repository/3.targets.json | 1 - .../5/repository/4.root.json | 1 - .../5/repository/4.snapshot.json | 1 - .../5/repository/4.targets.json | 1 - .../5/repository/5.root.json | 1 - .../5/repository/5.snapshot.json | 1 - .../5/repository/5.targets.json | 1 - .../5/repository/6.snapshot.json | 30 - .../5/repository/6.targets.json | 52 - .../5/repository/root.json | 1 - .../5/repository/snapshot.json | 30 - .../5/repository/targets.json | 52 - ...db543b4653df28f5d09dab86f92ffb9b86d01e25.5 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - ...0848c1633ce81b675286ea8fb53db240d831c568.4 | 1 - .../5/repository/timestamp.json | 23 - .../testdata/go-tuf-transition-M4/generate.go | 148 - .../0/repository/1.root.json | 87 - .../0/repository/root.json | 87 - .../0/repository/snapshot.json | 23 - .../0/repository/targets.json | 22 - .../0/repository/targets/0 | 1 - .../0/repository/timestamp.json | 23 - .../1/repository/1.root.json | 1 - .../1/repository/2.root.json | 91 - .../1/repository/root.json | 91 - .../1/repository/snapshot.json | 23 - .../1/repository/targets.json | 28 - .../1/repository/targets/0 | 1 - .../1/repository/targets/1 | 1 - .../1/repository/timestamp.json | 23 - .../2/repository/1.root.json | 1 - .../2/repository/2.root.json | 1 - .../2/repository/3.root.json | 87 - .../2/repository/root.json | 87 - .../2/repository/snapshot.json | 23 - .../2/repository/targets.json | 34 - .../2/repository/targets/0 | 1 - .../2/repository/targets/1 | 1 - .../2/repository/targets/2 | 1 - .../2/repository/timestamp.json | 23 - .../3/repository/1.root.json | 1 - .../3/repository/2.root.json | 1 - .../3/repository/3.root.json | 1 - .../3/repository/4.root.json | 87 - .../3/repository/root.json | 87 - .../3/repository/snapshot.json | 23 - .../3/repository/targets.json | 40 - .../3/repository/targets/0 | 1 - .../3/repository/targets/1 | 1 - .../3/repository/targets/2 | 1 - .../3/repository/targets/3 | 1 - .../3/repository/timestamp.json | 23 - .../4/repository/1.root.json | 1 - .../4/repository/2.root.json | 1 - .../4/repository/3.root.json | 1 - .../4/repository/4.root.json | 1 - .../4/repository/5.root.json | 87 - .../4/repository/root.json | 87 - .../4/repository/snapshot.json | 23 - .../4/repository/targets.json | 46 - .../4/repository/targets/0 | 1 - .../4/repository/targets/1 | 1 - .../4/repository/targets/2 | 1 - .../4/repository/targets/3 | 1 - .../4/repository/targets/4 | 1 - .../4/repository/timestamp.json | 23 - .../5/repository/1.root.json | 1 - .../5/repository/2.root.json | 1 - .../5/repository/3.root.json | 1 - .../5/repository/4.root.json | 1 - .../5/repository/5.root.json | 1 - .../5/repository/root.json | 1 - .../5/repository/snapshot.json | 23 - .../5/repository/targets.json | 52 - .../5/repository/targets/0 | 1 - .../5/repository/targets/1 | 1 - .../5/repository/targets/2 | 1 - .../5/repository/targets/3 | 1 - .../5/repository/targets/4 | 1 - .../5/repository/targets/5 | 1 - .../5/repository/timestamp.json | 23 - .../0/repository/1.root.json | 87 - .../0/repository/1.snapshot.json | 23 - .../0/repository/1.targets.json | 22 - .../0/repository/root.json | 87 - .../0/repository/snapshot.json | 23 - .../0/repository/targets.json | 22 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - .../0/repository/timestamp.json | 23 - .../1/repository/1.root.json | 1 - .../1/repository/1.snapshot.json | 1 - .../1/repository/1.targets.json | 1 - .../1/repository/2.root.json | 91 - .../1/repository/2.snapshot.json | 23 - .../1/repository/2.targets.json | 28 - .../1/repository/root.json | 91 - .../1/repository/snapshot.json | 23 - .../1/repository/targets.json | 28 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../1/repository/timestamp.json | 23 - .../2/repository/1.root.json | 1 - .../2/repository/1.snapshot.json | 1 - .../2/repository/1.targets.json | 1 - .../2/repository/2.root.json | 1 - .../2/repository/2.snapshot.json | 1 - .../2/repository/2.targets.json | 1 - .../2/repository/3.root.json | 87 - .../2/repository/3.snapshot.json | 23 - .../2/repository/3.targets.json | 34 - .../2/repository/root.json | 87 - .../2/repository/snapshot.json | 23 - .../2/repository/targets.json | 34 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../2/repository/timestamp.json | 23 - .../3/repository/1.root.json | 1 - .../3/repository/1.snapshot.json | 1 - .../3/repository/1.targets.json | 1 - .../3/repository/2.root.json | 1 - .../3/repository/2.snapshot.json | 1 - .../3/repository/2.targets.json | 1 - .../3/repository/3.root.json | 1 - .../3/repository/3.snapshot.json | 1 - .../3/repository/3.targets.json | 1 - .../3/repository/4.root.json | 87 - .../3/repository/4.snapshot.json | 23 - .../3/repository/4.targets.json | 40 - .../3/repository/root.json | 87 - .../3/repository/snapshot.json | 23 - .../3/repository/targets.json | 40 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - .../3/repository/timestamp.json | 23 - .../4/repository/1.root.json | 1 - .../4/repository/1.snapshot.json | 1 - .../4/repository/1.targets.json | 1 - .../4/repository/2.root.json | 1 - .../4/repository/2.snapshot.json | 1 - .../4/repository/2.targets.json | 1 - .../4/repository/3.root.json | 1 - .../4/repository/3.snapshot.json | 1 - .../4/repository/3.targets.json | 1 - .../4/repository/4.root.json | 1 - .../4/repository/4.snapshot.json | 1 - .../4/repository/4.targets.json | 1 - .../4/repository/5.root.json | 87 - .../4/repository/5.snapshot.json | 23 - .../4/repository/5.targets.json | 46 - .../4/repository/root.json | 87 - .../4/repository/snapshot.json | 23 - .../4/repository/targets.json | 46 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - ...0848c1633ce81b675286ea8fb53db240d831c568.4 | 1 - .../4/repository/timestamp.json | 23 - .../5/repository/1.root.json | 1 - .../5/repository/1.snapshot.json | 1 - .../5/repository/1.targets.json | 1 - .../5/repository/2.root.json | 1 - .../5/repository/2.snapshot.json | 1 - .../5/repository/2.targets.json | 1 - .../5/repository/3.root.json | 1 - .../5/repository/3.snapshot.json | 1 - .../5/repository/3.targets.json | 1 - .../5/repository/4.root.json | 1 - .../5/repository/4.snapshot.json | 1 - .../5/repository/4.targets.json | 1 - .../5/repository/5.root.json | 1 - .../5/repository/5.snapshot.json | 1 - .../5/repository/5.targets.json | 1 - .../5/repository/6.snapshot.json | 23 - .../5/repository/6.targets.json | 52 - .../5/repository/root.json | 1 - .../5/repository/snapshot.json | 23 - .../5/repository/targets.json | 52 - ...db543b4653df28f5d09dab86f92ffb9b86d01e25.5 | 1 - ...3b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 | 1 - ...c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 | 1 - ...f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 | 1 - ...6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 | 1 - ...0848c1633ce81b675286ea8fb53db240d831c568.4 | 1 - .../5/repository/timestamp.json | 23 - client/testdata/go-tuf/generate.go | 19 - client/testdata/go-tuf/generator/generator.go | 177 -- client/testdata/go-tuf/regenerate-metadata.sh | 14 - client/testdata/keys.json | 122 - .../client/metadata/current/1.a.json | 74 - .../client/metadata/current/1.b.json | 28 - .../client/metadata/current/1.c.json | 28 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/2.root.json | 87 - .../client/metadata/current/2.snapshot.json | 28 - .../client/metadata/current/2.targets.json | 51 - .../client/metadata/current/2.timestamp.json | 24 - .../client/metadata/current/a.json | 74 - .../client/metadata/current/b.json | 28 - .../client/metadata/current/c.json | 28 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 28 - .../client/metadata/current/targets.json | 51 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../TUFTestFixture2LevelDelegation/hash.txt | 1 - .../server/metadata.staged/1.a.json | 74 - .../server/metadata.staged/1.b.json | 28 - .../server/metadata.staged/1.c.json | 28 - .../server/metadata.staged/1.root.json | 87 - .../server/metadata.staged/1.snapshot.json | 19 - .../server/metadata.staged/1.targets.json | 19 - .../server/metadata.staged/1.timestamp.json | 24 - .../server/metadata.staged/2.c.json | 19 - .../server/metadata.staged/2.root.json | 87 - .../server/metadata.staged/2.snapshot.json | 28 - .../server/metadata.staged/2.targets.json | 51 - .../server/metadata.staged/2.timestamp.json | 24 - .../server/metadata.staged/3.root.json | 87 - .../server/metadata.staged/3.snapshot.json | 28 - .../server/metadata.staged/3.targets.json | 51 - .../server/metadata.staged/3.timestamp.json | 24 - .../server/metadata.staged/a.json | 74 - .../server/metadata.staged/b.json | 28 - .../server/metadata.staged/c.json | 19 - .../server/metadata.staged/root.json | 87 - .../server/metadata.staged/snapshot.json | 28 - .../server/metadata.staged/targets.json | 51 - .../server/metadata.staged/timestamp.json | 24 - .../server/metadata/1.a.json | 74 - .../server/metadata/1.b.json | 28 - .../server/metadata/1.c.json | 28 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.c.json | 19 - .../server/metadata/2.root.json | 87 - .../server/metadata/2.snapshot.json | 28 - .../server/metadata/2.targets.json | 51 - .../server/metadata/2.timestamp.json | 24 - .../server/metadata/3.root.json | 87 - .../server/metadata/3.snapshot.json | 28 - .../server/metadata/3.targets.json | 51 - .../server/metadata/3.timestamp.json | 24 - .../server/metadata/a.json | 74 - .../server/metadata/b.json | 28 - .../server/metadata/c.json | 19 - .../server/metadata/root.json | 87 - .../server/metadata/snapshot.json | 28 - .../server/metadata/targets.json | 51 - .../server/metadata/timestamp.json | 24 - ...4d3a52221c0cf81ef7b68ce312476a.targets.txt | 1 - ...18daf93b4c0083306cef17df547b42e4e985.a.txt | 1 - ...bf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt | 1 - ...fb207966bc32bd6324ebdad2c50c82075ffd.c.txt | 1 - ...669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt | 1 - .../server/targets/a.txt | 1 - .../server/targets/b.txt | 1 - .../server/targets/c.txt | 1 - ...f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt | 1 - ...0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt | 1 - ...acbf1af8393fdbfed899cecb995c87a11e3c.b.txt | 1 - .../server/targets/targets.txt | 1 - .../__init__.py | 35 - .../client/metadata/current/1.root.json | 87 - .../client/metadata/current/1.snapshot.json | 19 - .../client/metadata/current/1.targets.json | 19 - .../client/metadata/current/1.timestamp.json | 24 - .../client/metadata/current/root.json | 87 - .../client/metadata/current/snapshot.json | 19 - .../client/metadata/current/targets.json | 19 - .../client/metadata/current/timestamp.json | 24 - .../client/metadata/previous/1.root.json | 87 - .../client/metadata/previous/1.snapshot.json | 19 - .../client/metadata/previous/1.targets.json | 19 - .../client/metadata/previous/1.timestamp.json | 24 - .../client/metadata/previous/root.json | 87 - .../client/metadata/previous/snapshot.json | 19 - .../client/metadata/previous/targets.json | 19 - .../client/metadata/previous/timestamp.json | 24 - .../server/metadata/1.a.json | 74 - .../server/metadata/1.b.json | 74 - .../server/metadata/1.c.json | 28 - .../server/metadata/1.d.json | 28 - .../server/metadata/1.e.json | 28 - .../server/metadata/1.f.json | 28 - .../server/metadata/1.root.json | 87 - .../server/metadata/1.snapshot.json | 19 - .../server/metadata/1.targets.json | 19 - .../server/metadata/1.timestamp.json | 24 - .../server/metadata/2.root.json | 87 - .../server/metadata/2.snapshot.json | 37 - .../server/metadata/2.targets.json | 73 - .../server/metadata/2.timestamp.json | 24 - .../server/metadata/a.json | 74 - .../server/metadata/b.json | 74 - .../server/metadata/c.json | 28 - .../server/metadata/d.json | 28 - .../server/metadata/e.json | 28 - .../server/metadata/f.json | 28 - .../server/metadata/root.json | 87 - .../server/metadata/snapshot.json | 37 - .../server/metadata/targets.json | 73 - .../server/metadata/timestamp.json | 24 - ...aa0d59d82cc18411037b0ef0318eb754ce86.e.txt | 1 - ...4d3a52221c0cf81ef7b68ce312476a.targets.txt | 1 - ...18daf93b4c0083306cef17df547b42e4e985.a.txt | 1 - ...bf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt | 1 - ...ae784c3d3488e994d29f003decc81638d589.d.txt | 1 - ...fb207966bc32bd6324ebdad2c50c82075ffd.c.txt | 1 - ...669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt | 1 - .../server/targets/a.txt | 1 - .../server/targets/b.txt | 1 - ...4f60baaad5d6e0a7d544e65e1791f2df5e55.d.txt | 1 - ...7ec0b65bb253cf5f5b961515658864301207.f.txt | 1 - .../server/targets/c.txt | 1 - .../server/targets/d.txt | 1 - ...f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt | 1 - .../server/targets/e.txt | 1 - .../server/targets/f.txt | 1 - ...d04623b0171de458d94dbec4abb7646bc60e.f.txt | 1 - ...0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt | 1 - ...acbf1af8393fdbfed899cecb995c87a11e3c.b.txt | 1 - ...611bc9ed2f2841da2c0dd70bb870be7275f6.e.txt | 1 - .../server/targets/targets.txt | 1 - client/testdata/tools/gen-keys.go | 50 - client/testdata/tools/linkify-metadata.go | 112 - cmd/tuf-client/README.md | 48 - cmd/tuf-client/get.go | 51 - cmd/tuf-client/init.go | 39 - cmd/tuf-client/list.go | 39 - cmd/tuf-client/main.go | 98 - cmd/tuf/add.go | 39 - cmd/tuf/add_key.go | 77 - cmd/tuf/add_signatures.go | 75 - cmd/tuf/change_passphrase.go | 22 - cmd/tuf/clean.go | 26 - cmd/tuf/commit.go | 18 - cmd/tuf/gen_key.go | 64 - cmd/tuf/get_threshold.go | 29 - cmd/tuf/init.go | 23 - cmd/tuf/main.go | 176 -- cmd/tuf/payload.go | 26 - cmd/tuf/regenerate.go | 25 - cmd/tuf/remove.go | 38 - cmd/tuf/revoke_key.go | 31 - cmd/tuf/root_keys.go | 33 - cmd/tuf/set_threshold.go | 34 - cmd/tuf/sign.go | 21 - cmd/tuf/sign_payload.go | 41 - cmd/tuf/snapshot.go | 31 - cmd/tuf/status.go | 47 - cmd/tuf/timestamp.go | 31 - data/hex_bytes.go | 51 - data/hex_bytes_test.go | 44 - data/types.go | 348 --- data/types_test.go | 287 -- docs/ALUMNI | 4 - docs/CODE_OF_CONDUCT.md | 4 - docs/CONTRIBUTING.md | 62 - docs/MAINTAINERS | 7 - docs/MAINTAINERS.md | 57 - docs/SECURITY.md | 21 - docs/TESTING.md | 18 - ...-go-tuf-Audit-2023-Final-Report-PUBLIC.pdf | Bin 319663 -> 0 bytes docs/audit/blog-post.md | 33 - encrypted/encrypted.go | 294 -- encrypted/encrypted_test.go | 158 - errors.go | 98 - go.mod | 25 - go.sum | 140 - internal/fsutil/fsutil.go | 23 - internal/fsutil/perm.go | 30 - internal/fsutil/perm_test.go | 69 - internal/fsutil/perm_windows.go | 17 - internal/roles/roles.go | 48 - internal/roles/roles_test.go | 54 - internal/sets/strings.go | 24 - internal/sets/strings_test.go | 35 - internal/signer/sort.go | 49 - internal/signer/sort_test.go | 73 - local_store.go | 741 ----- local_store_test.go | 70 - pkg/deprecated/deprecated_repo_test.go | 107 - pkg/deprecated/set_ecdsa/set_ecdsa.go | 26 - pkg/keys/deprecated_ecdsa.go | 101 - pkg/keys/deprecated_ecdsa_test.go | 129 - pkg/keys/ecdsa.go | 173 -- pkg/keys/ecdsa_test.go | 163 - pkg/keys/ed25519.go | 161 - pkg/keys/ed25519_test.go | 99 - pkg/keys/keys.go | 82 - pkg/keys/keys_test.go | 39 - pkg/keys/pkix.go | 56 - pkg/keys/pkix_test.go | 62 - pkg/keys/rsa.go | 162 - pkg/keys/rsa_test.go | 125 - pkg/targets/delegation.go | 102 - pkg/targets/delegation_test.go | 252 -- pkg/targets/hash_bins.go | 113 - pkg/targets/hash_bins_test.go | 119 - repo.go | 1738 ----------- repo_test.go | 2752 ----------------- requirements-test.txt | 5 - sign/sign.go | 80 - util/util.go | 332 -- util/util_test.go | 282 -- verify/db.go | 104 - verify/db_test.go | 131 - verify/errors.go | 73 - verify/verify.go | 187 -- verify/verify_test.go | 302 -- 1748 files changed, 79761 deletions(-) delete mode 100644 .gitattributes delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/auto-merge.yml delete mode 100644 .github/workflows/changelog.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/specification-version-check.yml delete mode 100644 .github/workflows/tests.yml delete mode 100644 .gitignore delete mode 100644 .gitpod.yml delete mode 100644 .golangci.yml delete mode 100644 .goreleaser/tuf-client.yml delete mode 100644 .goreleaser/tuf.yml delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 client/client.go delete mode 100644 client/client_test.go delete mode 100644 client/delegations.go delete mode 100644 client/delegations_test.go delete mode 100644 client/errors.go delete mode 100644 client/file_store.go delete mode 100644 client/file_store_test.go delete mode 100644 client/filejsonstore/filejsonstore.go delete mode 100644 client/filejsonstore/filejsonstore_test.go delete mode 100644 client/filejsonstore/perm_test.go delete mode 100644 client/interop_test.go delete mode 100644 client/leveldbstore/leveldbstore.go delete mode 100644 client/leveldbstore/leveldbstore_test.go delete mode 100644 client/local_store.go delete mode 100644 client/local_store_test.go delete mode 100644 client/python_interop/python_interop_test.go delete mode 100644 client/python_interop/testdata/LICENSE.txt delete mode 100644 client/python_interop/testdata/Makefile delete mode 100644 client/python_interop/testdata/README.md delete mode 100644 client/python_interop/testdata/python-tuf-v3.0.0/Dockerfile delete mode 100644 client/python_interop/testdata/python-tuf-v3.0.0/client.py delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/generate.py delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/generate.sh delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.root.json delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.targets.json delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/timestamp.json delete mode 100644 client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt delete mode 100644 client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/1.root.json delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/snapshot.json delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/targets.json delete mode 100755 client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/timestamp.json delete mode 100644 client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt delete mode 100644 client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/file1.txt delete mode 100644 client/remote_store.go delete mode 100644 client/testdata/Published1Time/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published1Time/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published1Time/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published1Time/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published1Time/client/metadata/current/root.json delete mode 100644 client/testdata/Published1Time/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published1Time/client/metadata/current/targets.json delete mode 100644 client/testdata/Published1Time/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/root.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published1Time/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published1Time/hash.txt delete mode 100644 client/testdata/Published1Time/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published1Time/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published1Time/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published1Time/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published1Time/server/metadata.staged/root.json delete mode 100644 client/testdata/Published1Time/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published1Time/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published1Time/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published1Time/server/metadata/1.root.json delete mode 100644 client/testdata/Published1Time/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published1Time/server/metadata/1.targets.json delete mode 100644 client/testdata/Published1Time/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published1Time/server/metadata/root.json delete mode 100644 client/testdata/Published1Time/server/metadata/snapshot.json delete mode 100644 client/testdata/Published1Time/server/metadata/targets.json delete mode 100644 client/testdata/Published1Time/server/metadata/timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/hash.txt delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/1.targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/2.root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/root.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/snapshot.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/targets.json delete mode 100644 client/testdata/Published1Time_backwardRootVersion/server/metadata/timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/current/targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/root.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/hash.txt delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/root.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/1.root.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/1.targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/root.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/snapshot.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/targets.json delete mode 100644 client/testdata/Published1Time_client_no_root/server/metadata/timestamp.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/current/root.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/root.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published1Time_client_root_only/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published1Time_client_root_only/hash.txt delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/root.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/1.root.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/1.targets.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/root.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/snapshot.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/targets.json delete mode 100644 client/testdata/Published1Time_client_root_only/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/hash.txt delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/hash.txt delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/hash.txt delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/hash.txt delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/hash.txt delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_roottoolarge/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/hash.txt delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.timestamp.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_snapshot_keyrotated/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/hash.txt delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/2.snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/2.targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/2.timestamp.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_targets_keyrotated/server/metadata/timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/hash.txt delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.timestamp.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/root.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/snapshot.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/targets.json delete mode 100644 client/testdata/Published2Times_timestamp_keyrotated/server/metadata/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/hash.txt delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/3.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/hash.txt delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/3.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/3.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/hash.txt delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/3.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/3.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/hash.txt delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/3.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.timestamp.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/2.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/3.root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/root.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/snapshot.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/targets.json delete mode 100644 client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/hash.txt delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.timestamp.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/root.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/snapshot.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/targets.json delete mode 100644 client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/timestamp.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/1.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets/0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/1.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/2.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/1 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/2.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/1 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/2 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/4.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/2 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/3 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/4.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/5.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/3 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/4 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/4.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/5.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/3 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/4 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/5 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/timestamp.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/0.0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.1 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.2 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.3 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.3 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.4 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.targets.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/63c16cc2225e77b7c94ec3b143271e02d97a1bfba828e11820392b9108412ef22f09732694673331f386b6f8a281103e20d07c21db78f487e1b046d9968173c8.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.3 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.4 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.5 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 120000 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 delete mode 100644 client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/timestamp.json delete mode 100644 client/testdata/go-tuf-transition-M3/generate.go delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/1.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets/0 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/1.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/2.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/0 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/1 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/2.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/3.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/1 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/2 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/3.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/4.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/1 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/2 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/3 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/4.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/5.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/1 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/2 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/3 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/4 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/4.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/5.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/0 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/1 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/2 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/3 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/4 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/5 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/timestamp.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/timestamp.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.root.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.snapshot.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.targets.json delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/root.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/snapshot.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets.json delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 120000 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 delete mode 100644 client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/timestamp.json delete mode 100644 client/testdata/go-tuf-transition-M4/generate.go delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/0/repository/1.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/0/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/0/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets/0 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/0/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/1/repository/1.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/1/repository/2.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/1/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/1/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/0 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/1 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/1/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/2/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/2/repository/2.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/2/repository/3.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/2/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/2/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/0 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/1 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/2 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/2/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/3/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/3/repository/2.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/3/repository/3.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/3/repository/4.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/3/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/3/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/0 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/1 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/2 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/3 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/3/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/2.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/3.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/4.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/4/repository/5.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/4/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/4/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/0 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/1 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/2 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/3 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/4 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/4/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/2.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/3.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/4.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/5.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/5/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/0 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/1 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/2 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/3 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/4 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/5 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-false/5/repository/timestamp.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/0/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/1/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/2/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/3/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/4/repository/timestamp.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.root.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.snapshot.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.targets.json delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/root.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/5/repository/snapshot.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets.json delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 delete mode 120000 client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 delete mode 100644 client/testdata/go-tuf/consistent-snapshot-true/5/repository/timestamp.json delete mode 100644 client/testdata/go-tuf/generate.go delete mode 100644 client/testdata/go-tuf/generator/generator.go delete mode 100755 client/testdata/go-tuf/regenerate-metadata.sh delete mode 100644 client/testdata/keys.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.a.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.b.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/a.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/b.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/hash.txt delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.a.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.b.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/a.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/b.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.a.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.b.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.timestamp.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/a.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/b.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/c.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/root.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/snapshot.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/targets.json delete mode 100755 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/a.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/b.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/c.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/targets.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/__init__.py delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.root.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.snapshot.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.targets.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/root.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/snapshot.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/targets.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.root.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.snapshot.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.targets.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/root.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/snapshot.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/targets.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.a.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.b.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.c.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.d.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.e.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.f.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.root.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.snapshot.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.targets.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.root.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.snapshot.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.targets.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/a.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/b.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/c.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/d.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/e.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/f.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/root.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/snapshot.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/targets.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/timestamp.json delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/027b3d1814dae8547aed3d7e7b99aa0d59d82cc18411037b0ef0318eb754ce86.e.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/79b44a183eaa0025f3997b856537502ac1759de74263985ad1dd9ab0bb5cc8ce46b6c45c1bf37adb87c2839cca54ae784c3d3488e994d29f003decc81638d589.d.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/a.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b2ce56612fa7e840d56d263f75804f60baaad5d6e0a7d544e65e1791f2df5e55.d.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b8061c4c83d478aaadc6758a74861f749420e83dd6bf07e931738b0619404a75d12758429b12f8d047643d6d13047ec0b65bb253cf5f5b961515658864301207.f.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/c.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/d.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/e.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f0b07df15d4a3e98ffc6ee6a4c00d04623b0171de458d94dbec4abb7646bc60e.f.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ffca8c347335e5e019deba8a15212297fe25afc734ac06fcd01b4d9dae12b16d750d7a44bdafcada254148990aa6611bc9ed2f2841da2c0dd70bb870be7275f6.e.txt delete mode 100644 client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/targets.txt delete mode 100644 client/testdata/tools/gen-keys.go delete mode 100644 client/testdata/tools/linkify-metadata.go delete mode 100644 cmd/tuf-client/README.md delete mode 100644 cmd/tuf-client/get.go delete mode 100644 cmd/tuf-client/init.go delete mode 100644 cmd/tuf-client/list.go delete mode 100644 cmd/tuf-client/main.go delete mode 100644 cmd/tuf/add.go delete mode 100644 cmd/tuf/add_key.go delete mode 100644 cmd/tuf/add_signatures.go delete mode 100644 cmd/tuf/change_passphrase.go delete mode 100644 cmd/tuf/clean.go delete mode 100644 cmd/tuf/commit.go delete mode 100644 cmd/tuf/gen_key.go delete mode 100644 cmd/tuf/get_threshold.go delete mode 100644 cmd/tuf/init.go delete mode 100644 cmd/tuf/main.go delete mode 100644 cmd/tuf/payload.go delete mode 100644 cmd/tuf/regenerate.go delete mode 100644 cmd/tuf/remove.go delete mode 100644 cmd/tuf/revoke_key.go delete mode 100644 cmd/tuf/root_keys.go delete mode 100644 cmd/tuf/set_threshold.go delete mode 100644 cmd/tuf/sign.go delete mode 100644 cmd/tuf/sign_payload.go delete mode 100644 cmd/tuf/snapshot.go delete mode 100644 cmd/tuf/status.go delete mode 100644 cmd/tuf/timestamp.go delete mode 100644 data/hex_bytes.go delete mode 100644 data/hex_bytes_test.go delete mode 100644 data/types.go delete mode 100644 data/types_test.go delete mode 100644 docs/ALUMNI delete mode 100644 docs/CODE_OF_CONDUCT.md delete mode 100644 docs/CONTRIBUTING.md delete mode 100644 docs/MAINTAINERS delete mode 100644 docs/MAINTAINERS.md delete mode 100644 docs/SECURITY.md delete mode 100644 docs/TESTING.md delete mode 100644 docs/audit/X41-go-tuf-Audit-2023-Final-Report-PUBLIC.pdf delete mode 100644 docs/audit/blog-post.md delete mode 100644 encrypted/encrypted.go delete mode 100644 encrypted/encrypted_test.go delete mode 100644 errors.go delete mode 100644 go.mod delete mode 100644 go.sum delete mode 100644 internal/fsutil/fsutil.go delete mode 100644 internal/fsutil/perm.go delete mode 100644 internal/fsutil/perm_test.go delete mode 100644 internal/fsutil/perm_windows.go delete mode 100644 internal/roles/roles.go delete mode 100644 internal/roles/roles_test.go delete mode 100644 internal/sets/strings.go delete mode 100644 internal/sets/strings_test.go delete mode 100644 internal/signer/sort.go delete mode 100644 internal/signer/sort_test.go delete mode 100644 local_store.go delete mode 100644 local_store_test.go delete mode 100644 pkg/deprecated/deprecated_repo_test.go delete mode 100644 pkg/deprecated/set_ecdsa/set_ecdsa.go delete mode 100644 pkg/keys/deprecated_ecdsa.go delete mode 100644 pkg/keys/deprecated_ecdsa_test.go delete mode 100644 pkg/keys/ecdsa.go delete mode 100644 pkg/keys/ecdsa_test.go delete mode 100644 pkg/keys/ed25519.go delete mode 100644 pkg/keys/ed25519_test.go delete mode 100644 pkg/keys/keys.go delete mode 100644 pkg/keys/keys_test.go delete mode 100644 pkg/keys/pkix.go delete mode 100644 pkg/keys/pkix_test.go delete mode 100644 pkg/keys/rsa.go delete mode 100644 pkg/keys/rsa_test.go delete mode 100644 pkg/targets/delegation.go delete mode 100644 pkg/targets/delegation_test.go delete mode 100644 pkg/targets/hash_bins.go delete mode 100644 pkg/targets/hash_bins_test.go delete mode 100644 repo.go delete mode 100644 repo_test.go delete mode 100644 requirements-test.txt delete mode 100644 sign/sign.go delete mode 100644 util/util.go delete mode 100644 util/util_test.go delete mode 100644 verify/db.go delete mode 100644 verify/db_test.go delete mode 100644 verify/errors.go delete mode 100644 verify/verify.go delete mode 100644 verify/verify_test.go diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 2fad43c9..00000000 --- a/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# go enforces lf line endings -*.go eol=lf - -# testdata should not be mangled by git -*.json binary diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 56186b3f..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,18 +0,0 @@ -Please fill in the fields below to submit a pull request. The more information that is provided, the better. - -Fixes # - -Release Notes: - -**Types of changes**: - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). **Please ensure that your PR title** is a [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) breaking change (with a `!`, as in `feat!: change foo`). - -**Description of the changes being introduced by the pull request**: - -**Please verify and check that the pull request fulfills the following requirements**: - -- [ ] Tests have been added for the bug fix or new feature -- [ ] Docs have been added for the bug fix or new feature diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 309a9f75..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,47 +0,0 @@ -version: 2 -updates: - # Monitor Go dependencies - - package-ecosystem: "gomod" - directory: "/" - schedule: - interval: "weekly" - time: "10:00" - groups: - minor-patch: - update-types: - - "minor" - - "patch" - commit-message: - prefix: "chore" - include: "scope" - open-pull-requests-limit: 10 - # Monitor Github Actions - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - time: "10:00" - groups: - minor-patch: - update-types: - - "minor" - - "patch" - commit-message: - prefix: "chore" - include: "scope" - open-pull-requests-limit: 10 - # Monitor Python test dependencies - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" - time: "10:00" - groups: - minor-patch: - update-types: - - "minor" - - "patch" - commit-message: - prefix: "chore" - include: "scope" - open-pull-requests-limit: 10 diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index 3bec14b1..00000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Dependabot auto-merge - -on: - pull_request: - -permissions: read-all - -jobs: - dependabot: - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # v1.6.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Enable auto-merge for Dependabot PRs - if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }} - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index 2910bd8a..00000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Changelog checks" - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -jobs: - conventional-commits-lint-check: - name: "Lint PR title" - runs-on: "ubuntu-latest" - steps: - - name: - uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 295923ec..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,25 +0,0 @@ -on: - pull_request: - push: - branches: - - "master" - tags: - - "v*" -name: CI -permissions: - contents: write -jobs: - tests: - uses: ./.github/workflows/tests.yml - tuf: - needs: tests - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - uses: ./.github/workflows/release.yml - with: - cli-name: tuf - tuf-client: - needs: tests - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - uses: ./.github/workflows/release.yml - with: - cli-name: tuf-client diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index ee51d0a8..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '25 14 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'go' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c3dee679..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - workflow_call: - inputs: - cli-name: - required: true - type: string -name: Release -jobs: - release: - permissions: - contents: write - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Get Go version - uses: arnested/go-version-action@f3c61952b5f4cc7c74fb216df044634f6a59770f - id: go-version - - name: Set up Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 - with: - go-version: ${{ steps.go-version.outputs.minimal }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 - with: - distribution: goreleaser - version: "v1.7.0" - args: release --config ./.goreleaser/${{ inputs.cli-name }}.yml --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/specification-version-check.yml b/.github/workflows/specification-version-check.yml deleted file mode 100644 index 523e455c..00000000 --- a/.github/workflows/specification-version-check.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: - schedule: - - cron: "0 13 * * *" - workflow_dispatch: -name: Specification version check -jobs: - # Get the latest TUF specification release and open an issue (if needed) - specification-bump-check: - permissions: - contents: read - issues: write - uses: theupdateframework/specification/.github/workflows/check-latest-spec-version.yml@master - with: - tuf-version: "v1.0.32" # Should be updated to the according version either manually or extracted automatically as how it's done in python-tuf diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 95509035..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,74 +0,0 @@ -on: - workflow_call: -name: Tests -jobs: - get-go-versions: - name: Collect available Go versions - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.versions.outputs.matrix }} - steps: - - uses: actions/checkout@v4 - - uses: arnested/go-version-action@f3c61952b5f4cc7c74fb216df044634f6a59770f - id: versions - - run: - strategy: - fail-fast: false # Keep running if one leg fails. - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} - runs-on: ${{ matrix.os }} - needs: get-go-versions - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup - Go ${{ matrix.go-version }} - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 - with: - go-version: ${{ matrix.go-version }} - - - name: Setup - Python - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c - with: - python-version: "3.10" - cache: "pip" - cache-dependency-path: "requirements-test.txt" - - - name: Install Python dependencies - run: | - python3 -m pip install --upgrade pip - python3 -m pip install --upgrade -r requirements-test.txt - - - name: Run tests - run: go test -race -covermode atomic -coverprofile='profile.cov' ./... - - - name: Send coverage - uses: shogo82148/actions-goveralls@7b1bd2871942af030d707d6574e5f684f9891fb2 - with: - path-to-profile: profile.cov - flag-name: Go-${{ matrix.go-version }} - parallel: true - - checks: - strategy: - matrix: - go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} - runs-on: ubuntu-latest - needs: get-go-versions - steps: - - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 - with: - go-version: ${{ matrix.go-version }} - - uses: actions/checkout@v4 - - name: golangci-lint - uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc - with: - version: v1.55.2 # has to be pinned and thus manually updated due to https://github.com/golangci/golangci-lint-action/blob/6a290f7d5d488e1e423b0b37fe802c822ca2c08c/README.md?plain=1#L108 - args: --timeout 5m --verbose - - name: govulncheck - uses: golang/govulncheck-action@v1 - with: - go-version-input: ${{ matrix.go-version }} - go-package: -json ./... diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 39e7149c..00000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.DS_Store -cmd/tuf/tuf -cmd/tuf-client/tuf-client -.vscode -*~ diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 4e437c1d..00000000 --- a/.gitpod.yml +++ /dev/null @@ -1,7 +0,0 @@ -# This configuration file was automatically generated by Gitpod. -# and adjusted to meet the needs of this project - -# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart - -tasks: - - init: python -m pip install --upgrade -r requirements-test.txt && go get && go build ./... && go test ./... diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index 992c1190..00000000 --- a/.golangci.yml +++ /dev/null @@ -1,10 +0,0 @@ -linters: - disable-all: true - enable: - - staticcheck - - gofmt - - govet - - gosimple - - unused - - typecheck - - forbidigo diff --git a/.goreleaser/tuf-client.yml b/.goreleaser/tuf-client.yml deleted file mode 100644 index 66820049..00000000 --- a/.goreleaser/tuf-client.yml +++ /dev/null @@ -1,40 +0,0 @@ -project_name: tuf-client -builds: - - ldflags: - - "-s -w" - - "-extldflags=-zrelro" - - "-extldflags=-znow" - env: - - "CGO_ENABLED=0" - - "GO111MODULE=on" - flags: - - -mod=readonly - - -trimpath - goos: - - linux - - darwin - - windows - goarch: - - amd64 - - arm64 - main: ./cmd/tuf-client/ -source: - enabled: true -changelog: - use: github - groups: - - title: "Breaking changes" - regexp: "^.*BREAKING CHANGE[(\\w)]*:+.*$" - order: 0 - - title: Features - regexp: "^.*feat[(\\w)]*:+.*$" - order: 1 - - title: "Bug fixes" - regexp: "^.*fix[(\\w)]*:+.*$" - order: 2 - - title: Others - order: 999 -release: - # If set to auto, will mark the release as not ready for production - # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 - prerelease: auto diff --git a/.goreleaser/tuf.yml b/.goreleaser/tuf.yml deleted file mode 100644 index 394ebc82..00000000 --- a/.goreleaser/tuf.yml +++ /dev/null @@ -1,40 +0,0 @@ -project_name: tuf -builds: - - ldflags: - - "-s -w" - - "-extldflags=-zrelro" - - "-extldflags=-znow" - env: - - "CGO_ENABLED=0" - - "GO111MODULE=on" - flags: - - -mod=readonly - - -trimpath - goos: - - linux - - darwin - - windows - goarch: - - amd64 - - arm64 - main: ./cmd/tuf/ -source: - enabled: true -changelog: - use: github - groups: - - title: "Breaking changes" - regexp: "^.*(?:BREAKING CHANGE)|![(\\w)]*:+.*$" - order: 0 - - title: Features - regexp: "^.*feat[(\\w)]*:+.*$" - order: 1 - - title: "Bug fixes" - regexp: "^.*fix[(\\w)]*:+.*$" - order: 2 - - title: Others - order: 999 -release: - # If set to auto, will mark the release as not ready for production - # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 - prerelease: auto diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 38163dd4..00000000 --- a/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2020 Prime Directive, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Prime Directive, Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md deleted file mode 100644 index ff381e03..00000000 --- a/README.md +++ /dev/null @@ -1,683 +0,0 @@ -# go-tuf - -![ci](https://github.com/theupdateframework/go-tuf/actions/workflows/ci.yml/badge.svg) [![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. - -## API instability - -**Note**: go-tuf's API is in flux and backwards compatibility with version 0.7.0 and earlier will _**not**_ be maintained. - -We recommend production users of go-tuf pin their dependency so that changes in main do not cause disruptions. - -For more details on the changes, and the rationale for making them, see [issue #485](https://github.com/theupdateframework/go-tuf/issues/485) and the v0.7.0 [release notes](https://github.com/theupdateframework/go-tuf/releases/tag/v0.7.0) - -## Directory layout - -A TUF repository has the following directory layout: - -```bash -. -├── keys -├── repository -│   └── targets -└── staged -    └── targets -``` - -The directories contain the following files: - -- `keys/` - signing keys (optionally encrypted) with filename pattern `ROLE.json` -- `repository/` - signed metadata files -- `repository/targets/` - hashed target files -- `staged/` - either signed, unsigned or partially signed metadata files -- `staged/targets/` - unhashed target files - -## CLI - -`go-tuf` provides a CLI for managing a local TUF repository. - -### Install - -`go-tuf` is tested on Go versions 1.18. - -```bash -go install github.com/theupdateframework/go-tuf/cmd/tuf@latest -``` - -### 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 add-key [--scheme=] [--expires=] [--public-key=] ` - -Adds a new signing key for the given role. - -The root metadata file will be staged -with the addition of the key's ID to the role's list of key IDs. - -The public value can be specified as a path or passed in via stdin. - -#### `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` metadata file. Alternatively, passphrases -can be set via environment variables in the form of `TUF_{{ROLE}}_PASSPHRASE` - -#### `tuf revoke-key [--expires=] ` - -Revoke a signing key - -The key will be removed from the root metadata file, but the key will remain in the -"keys" directory if present. - -#### `tuf add [...]` - -Hashes files in the `staged/targets` directory at the given path(s), then -updates and stages the `targets` metadata file. 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` metadata file -(they get removed from the filesystem when the change is committed). Specifying -no paths removes all files from the `targets` metadata file. - -#### `tuf snapshot [--expires=]` - -Expects a staged, fully signed `targets` metadata file and stages an appropriate -`snapshot` metadata file. Optionally one can set number of days after which -the `snapshot` metadata will expire. - -#### `tuf timestamp [--expires=]` - -Stages an appropriate `timestamp` metadata file. If a `snapshot` metadata file is staged, -it must be fully signed. Optionally one can set number of days after which -the timestamp metadata will expire. - -#### `tuf sign ` - -Signs the given role's staged metadata file 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` -metadata file. - -#### `tuf regenerate [--consistent-snapshot=false]` - -Note: Not supported yet - -Recreates the `targets` metadata file based on the files in `repository/targets`. - -#### `tuf clean` - -Removes all staged metadata files 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. - -#### `tuf set-threshold ` - -Sets `role`'s threshold (required number of keys for signing) to -`threshold`. - -#### `tuf get-threshold ` - -Outputs `role`'s threshold (required number of keys for signing). - -#### `tuf change-passphrase ` - -Changes the passphrase for given role keys file. The CLI supports reading -both the existing and the new passphrase via the following environment -variables - `TUF_{{ROLE}}_PASSPHRASE` and respectively `TUF_NEW_{{ROLE}}_PASSPHRASE` - -#### `tuf payload ` - -Outputs the metadata file for a role in a ready-to-sign (canonicalized) format. - -See also `tuf sign-payload` and `tuf add-signatures`. - -#### `tuf sign-payload --role= ` - -Sign a file (outside of the TUF repo) using keys (in the TUF keys database, -typically produced by `tuf gen-key`) for the given `role` (from the TUF repo). - -Typically, `path` will be a file containing the output of `tuf payload`. - -See also `tuf add-signatures`. - -#### `tuf add-signatures [--signatures ] [--format=] [--key-id=] ` - -Adds signatures (the output of `tuf sign-payload`) to the given role metadata file. - -If the signature does not verify, it will not be added. Signature can be a json file -or json passed in via `stdin`. - -#### `tuf status --valid-at ` - -Check if the role's metadata will be expired on the given date. - -#### Usage of environment variables - -The `tuf` CLI supports receiving passphrases via environment variables in -the form of `TUF_{{ROLE}}_PASSPHRASE` for existing ones and -`TUF_NEW_{{ROLE}}_PASSPHRASE` for setting new ones. - -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 metadata file - -Generate a root key on the root box: - -```bash -$ 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: - -```bash -$ 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: - -```bash -$ 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 metadata files. - -#### Alternate signing flow - -Instead of manually copying `root.json` into the TUF repository on the root box, -you can use the `tuf payload`, `tuf sign-payload`, `tuf add-signatures` flow. - -On the repo box, get the `root.json` payload in a canonical format: - -``` bash -$ tuf payload root.json > root.json.payload -``` - -Copy `root.json.payload` to the root box and sign it: - - -``` bash -$ tuf sign-payload --role=root root.json.payload > root.json.sigs -Enter root keys passphrase: -``` - -Copy `root.json.sigs` back to the repo box and import the signatures: - -``` bash -$ tuf add-signatures --signatures root.json.sigs root.json -``` - -This achieves the same state as the above flow for the repo box: - -```bash -$ tree . -. -├── keys -│   ├── snapshot.json -│   ├── targets.json -│   └── timestamp.json -├── repository -└── staged - ├── root.json - └── targets -``` - -#### Add a target file - -Assuming a staged, signed `root` metadata file and the file to add exists at -`staged/targets/foo/bar/baz.txt`: - -```bash -$ 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`: - -```bash -$ 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 metadata files based on targets tree (Note: Not supported yet) - -```bash -$ 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 - -```bash -$ 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 -``` - -#### Adding a new root key - -Copy `staged/root.json` to the root box and generate a new root key on the root box: - -```bash -$ tuf gen-key root -$ tuf sign root.json -``` - -Copy `staged/root.json` from the root box and commit: - -```bash -$ tuf commit -``` - -#### Rotating root key(s) - -Copy `staged/root.json` to the root box to do the rotation, where `abcd` is the keyid of the key that is being replaced: - -```bash -$ tuf gen-key root -$ tuf revoke-key root abcd -$ tuf sign root.json -``` - -Note that `revoke-key` removes the old key from `root.json`, but the key remains in the `keys/` directory on the root box as it is needed to sign the next `root.json`. After this signing is done, the old key may be removed from `keys/`. Any number of keys may be added or revoked during this step, but ensure that at least a threshold of valid keys remain. - -Copy `staged/root.json` from the root box to commit: - -```bash -$ tuf commit -``` - -## 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. - -## Contributing and Development - -For local development, `go-tuf` requires Go version 1.18. - -The [Python interoperability tests](client/python_interop/) require Python 3 -(available as `python` on the `$PATH`) and the [`python-tuf` -package](https://github.com/theupdateframework/python-tuf) installed (`pip -install tuf`). To update the data for these tests requires Docker and make (see -test data [README.md](client/python_interop/testdata/README.md) for details). - -Please see [CONTRIBUTING.md](docs/CONTRIBUTING.md) for contribution guidelines before making your first contribution! - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/...) - -Users wishing to use remote IDEs can also make use of [Gitpod](https://www.gitpod.io/) to make changes to this project. - -## Comparison to other implementations - -There are TUF implementations in a variety of programming languages. Some other Go implementations of TUF include: - -* [Notary](https://github.com/notaryproject/notary): A version of TUF designed specifically for publishing and managing trusted collections of content. It was used by Docker Content Trust, and has since been superseded by the [Notation](https://github.com/notaryproject/notation) project. In contrast, go-tuf is a direct implementation of TUF and has been updated to conform to 1.0.0 of the TUF specification. - diff --git a/client/client.go b/client/client.go deleted file mode 100644 index 8e99176b..00000000 --- a/client/client.go +++ /dev/null @@ -1,1005 +0,0 @@ -package client - -import ( - "bytes" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/roles" - "github.com/theupdateframework/go-tuf/util" - "github.com/theupdateframework/go-tuf/verify" -) - -const ( - // This is the upper limit in bytes we will use to limit the download - // size of the root/timestamp roles, since we might not don't know how - // big it is. - defaultRootDownloadLimit = 512000 - defaultTimestampDownloadLimit = 16384 - defaultMaxDelegations = 32 - defaultMaxRootRotations = 1e3 -) - -// LocalStore is local storage for downloaded top-level metadata. -type LocalStore interface { - io.Closer - - // GetMeta returns top-level metadata from local storage. The keys are - // in the form `ROLE.json`, with ROLE being a valid top-level role. - GetMeta() (map[string]json.RawMessage, error) - - // SetMeta persists the given top-level metadata in local storage, the - // name taking the same format as the keys returned by GetMeta. - SetMeta(name string, meta json.RawMessage) error - - // DeleteMeta deletes a given metadata. - DeleteMeta(name string) error -} - -// RemoteStore downloads top-level metadata and target files from a remote -// repository. -type RemoteStore interface { - // GetMeta downloads the given metadata from remote storage. - // - // `name` is the filename of the metadata (e.g. "root.json") - // - // `err` is ErrNotFound if the given file does not exist. - // - // `size` is the size of the stream, -1 indicating an unknown length. - GetMeta(name string) (stream io.ReadCloser, size int64, err error) - - // GetTarget downloads the given target file from remote storage. - // - // `path` is the path of the file relative to the root of the remote - // targets directory (e.g. "/path/to/file.txt"). - // - // `err` is ErrNotFound if the given file does not exist. - // - // `size` is the size of the stream, -1 indicating an unknown length. - GetTarget(path string) (stream io.ReadCloser, size int64, err error) -} - -// Client provides methods for fetching updates from a remote repository and -// downloading remote target files. -type Client struct { - local LocalStore - remote RemoteStore - - // The following four fields represent the versions of metatdata either - // from local storage or from recently downloaded metadata - rootVer int64 - targetsVer int64 - snapshotVer int64 - timestampVer int64 - - // targets is the list of available targets, either from local storage - // or from recently downloaded targets metadata - targets data.TargetFiles - - // localMeta is the raw metadata from local storage and is used to - // check whether remote metadata is present locally - localMeta map[string]json.RawMessage - - // db is a key DB used for verifying metadata - db *verify.DB - - // 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, - MaxDelegations: defaultMaxDelegations, - MaxRootRotations: defaultMaxRootRotations, - } -} - -// Init initializes a local repository from root metadata. -// -// The root's keys are extracted from the root and saved in local storage. -// Root expiration is not checked. -// It is expected that rootJSON was securely distributed with the software -// being updated. -func (c *Client) Init(rootJSON []byte) error { - err := c.loadAndVerifyRootMeta(rootJSON, true /*ignoreExpiredCheck*/) - if err != nil { - return err - } - return c.local.SetMeta("root.json", rootJSON) -} - -// Update downloads and verifies remote metadata and returns updated targets. -// It always performs root update (5.2 and 5.3) section of the v1.0.19 spec. -// -// https://theupdateframework.github.io/specification/v1.0.19/index.html#load-trusted-root -func (c *Client) Update() (data.TargetFiles, error) { - if err := c.UpdateRoots(); err != nil { - if _, ok := err.(verify.ErrExpired); ok { - // For backward compatibility, we wrap the ErrExpired inside - // ErrDecodeFailed. - return nil, ErrDecodeFailed{"root.json", err} - } - return nil, err - } - - // Load trusted metadata files, if any, and verify them against the latest root - c.getLocalMeta() - - // 5.4.1 - Download the timestamp metadata - timestampJSON, err := c.downloadMetaUnsafe("timestamp.json", defaultTimestampDownloadLimit) - if err != nil { - return nil, err - } - // 5.4.(2,3 and 4) - Verify timestamp against various attacks - // Returns the extracted snapshot metadata - snapshotMeta, sameTimestampVersion, err := c.decodeTimestamp(timestampJSON) - if sameTimestampVersion { - // The new timestamp.json file had the same version; we don't need to - // update, so bail early. - return c.targets, nil - } - - if err != nil { - return nil, err - } - // 5.4.5 - Persist the timestamp metadata - if err := c.local.SetMeta("timestamp.json", timestampJSON); err != nil { - return nil, err - } - - // 5.5.1 - Download snapshot metadata - // 5.5.2 and 5.5.4 - Check against timestamp role's snapshot hash and version - snapshotJSON, err := c.downloadMetaFromTimestamp("snapshot.json", snapshotMeta) - if err != nil { - return nil, err - } - // 5.5.(3,5 and 6) - Verify snapshot against various attacks - // Returns the extracted metadata files - snapshotMetas, err := c.decodeSnapshot(snapshotJSON) - if err != nil { - return nil, err - } - // 5.5.7 - Persist snapshot metadata - if err := c.local.SetMeta("snapshot.json", snapshotJSON); err != nil { - return nil, err - } - - // 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) { - // 5.6.1 - Download the top-level targets metadata file - // 5.6.2 and 5.6.4 - Check against snapshot role's targets hash and version - targetsJSON, err := c.downloadMetaFromSnapshot("targets.json", targetsMeta) - if err != nil { - return nil, err - } - // 5.6.(3 and 5) - Verify signatures and check against freeze attack - updatedTargets, err = c.decodeTargets(targetsJSON) - if err != nil { - return nil, err - } - // 5.6.6 - Persist targets metadata - if err := c.local.SetMeta("targets.json", targetsJSON); err != nil { - return nil, err - } - } - - return updatedTargets, nil -} - -func (c *Client) UpdateRoots() error { - // https://theupdateframework.github.io/specification/v1.0.19/index.html#load-trusted-root - // 5.2 Load the trusted root metadata file. We assume that a good, - // trusted copy of this file was shipped with the package manager - // or software updater using an out-of-band process. - if err := c.loadAndVerifyLocalRootMeta( /*ignoreExpiredCheck=*/ true); err != nil { - return err - } - m, err := c.local.GetMeta() - if err != nil { - return err - } - - type KeyInfo struct { - KeyIDs map[string]bool - Threshold int - } - - // Prepare for 5.3.11: If the timestamp and / or snapshot keys have been rotated, - // then delete the trusted timestamp and snapshot metadata files. - getKeyInfo := func(role string) KeyInfo { - keyIDs := make(map[string]bool) - for k := range c.db.GetRole(role).KeyIDs { - keyIDs[k] = true - } - return KeyInfo{keyIDs, c.db.GetRole(role).Threshold} - } - - // The nonRootKeyInfo looks like this: - // { - // "timestamp": {KeyIDs={"KEYID1": true, "KEYID2": true}, Threshold=2}, - // "snapshot": {KeyIDs={"KEYID3": true}, Threshold=1}, - // "targets": {KeyIDs={"KEYID4": true, "KEYID5": true, "KEYID6": true}, Threshold=1} - // } - - nonRootKeyInfo := map[string]KeyInfo{"timestamp": {}, "snapshot": {}, "targets": {}} - for k := range nonRootKeyInfo { - nonRootKeyInfo[k] = getKeyInfo(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 - - nRootMetadata := m["root.json"] - - // 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 - } - 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( /*ignoreExpiredCheck=*/ false); err != nil { - return err - } - - countDeleted := func(s1 map[string]bool, s2 map[string]bool) int { - c := 0 - for k := range s1 { - if _, ok := s2[k]; !ok { - c++ - } - } - return c - } - - // 5.3.11 To recover from fast-forward attack, certain metadata files need - // to be deleted if a threshold of keys are revoked. - // List of metadata that should be deleted per role if a threshold of keys - // are revoked: - // (based on the ongoing PR: https://github.com/mnm678/specification/tree/e50151d9df632299ddea364c4f44fe8ca9c10184) - // timestamp -> delete timestamp.json - // snapshot -> delete timestamp.json and snapshot.json - // targets -> delete snapshot.json and targets.json - // - // nonRootKeyInfo contains the keys and thresholds from root.json - // that were on disk before the root update process begins. - for topLevelRolename := range nonRootKeyInfo { - // ki contains the keys and thresholds from the latest downloaded root.json. - ki := getKeyInfo(topLevelRolename) - if countDeleted(nonRootKeyInfo[topLevelRolename].KeyIDs, ki.KeyIDs) >= nonRootKeyInfo[topLevelRolename].Threshold { - deleteMeta := map[string][]string{ - "timestamp": {"timestamp.json"}, - "snapshot": {"timestamp.json", "snapshot.json"}, - "targets": {"snapshot.json", "targets.json"}, - } - - for _, r := range deleteMeta[topLevelRolename] { - c.local.DeleteMeta(r) - } - } - } - - // 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. -// Before trying to load the metadata files, it clears the in-memory copy of the local metadata. -// This is to insure that all of the loaded metadata files at the end are indeed verified by the latest root. -// If some of the metadata files fail to load it will proceed with trying to load the rest, -// but still return an error at the end, if such occurred. Otherwise returns nil. -func (c *Client) getLocalMeta() error { - var retErr error - loadFailed := false - // Clear the in-memory copy of the local metadata. The goal is to reload and take into account - // only the metadata files that are verified by the latest root. Otherwise, their content should - // be ignored. - c.localMeta = make(map[string]json.RawMessage) - - // Load the latest root meta - if err := c.loadAndVerifyLocalRootMeta( /*ignoreExpiredCheck=*/ false); err != nil { - return err - } - - // Load into memory the existing meta, if any, from the local storage - meta, err := c.local.GetMeta() - if err != nil { - return nil - } - - // Verify the top-level metadata (timestamp, snapshot and targets) against the latest root and load it, if okay - if timestampJSON, ok := meta["timestamp.json"]; ok { - timestamp := &data.Timestamp{} - if err := c.db.UnmarshalTrusted(timestampJSON, timestamp, "timestamp"); err != nil { - loadFailed = true - retErr = err - } else { - c.localMeta["timestamp.json"] = meta["timestamp.json"] - c.timestampVer = timestamp.Version - } - } - - snapshot := &data.Snapshot{} - if snapshotJSON, ok := meta["snapshot.json"]; ok { - if err := c.db.UnmarshalTrusted(snapshotJSON, snapshot, "snapshot"); err != nil { - loadFailed = true - retErr = err - } else { - c.localMeta["snapshot.json"] = meta["snapshot.json"] - c.snapshotVer = snapshot.Version - } - } - - if targetsJSON, ok := meta["targets.json"]; ok { - targets := &data.Targets{} - if err := c.db.UnmarshalTrusted(targetsJSON, targets, "targets"); err != nil { - loadFailed = true - retErr = err - } else { - c.localMeta["targets.json"] = meta["targets.json"] - c.targetsVer = targets.Version - // FIXME(TUF-0.9) temporarily support files with leading path separators. - // c.targets = targets.Targets - c.loadTargets(targets.Targets) - } - } - - if loadFailed { - // If any of the metadata failed to be verified, return the reason for that failure - // and fail fast before delegated targets - return retErr - } - - // verifiedDelegatedTargets is a set of verified delegated targets - verifiedDelegatedTargets := make(map[string]bool) - for fileName := range meta { - if !verifiedDelegatedTargets[fileName] && roles.IsDelegatedTargetsManifest(fileName) { - if delegationPath, err := c.getDelegationPathFromRaw(snapshot, meta[fileName]); err != nil { - loadFailed = true - retErr = err - } else { - // Every delegated targets in the path has been verified - // as a side effect of getDelegationPathFromRaw - for _, key := range delegationPath { - fileName := fmt.Sprintf("%s.json", key) - verifiedDelegatedTargets[fileName] = true - } - } - } - } - - for fileName := range verifiedDelegatedTargets { - c.localMeta[fileName] = meta[fileName] - } - - if loadFailed { - // If any of the metadata failed to be verified, return the reason for that failure - return retErr - } - return nil -} - -// getDelegationPathFromRaw verifies a delegated targets against -// a given snapshot and returns an error if it's invalid -// -// Delegation must have targets to get a path, else an empty list -// will be returned: this is because the delegation iterator is leveraged. -// -// Concrete example: -// targets -// └── a.json -//   └── b.json -//      └── c.json -//        └── target_file.txt -// -// If you try to use that function on "a.json" or "b.json", it'll return an empty list -// with no error, as neither of them declare a target file -// On the other hand, if you use that function on "c.json", it'll return & verify -// [c.json, b.json, a.json]. Running that function on every delegated targets -// guarantees that if a delegated targets is in the path of a target file, then it will -// appear at least once in the result -func (c *Client) getDelegationPathFromRaw(snapshot *data.Snapshot, delegatedTargetsJSON json.RawMessage) ([]string, error) { - // unmarshal the delegated targets first without verifying as - // we need at least one targets file name to leverage the - // getTargetFileMetaDelegationPath method - s := &data.Signed{} - if err := json.Unmarshal(delegatedTargetsJSON, s); err != nil { - return nil, err - } - targets := &data.Targets{} - if err := json.Unmarshal(s.Signed, targets); err != nil { - return nil, err - } - for targetPath := range targets.Targets { - // Gets target file from remote store - _, resp, err := c.getTargetFileMetaDelegationPath(targetPath, snapshot) - // We only need to test one targets file: - // - If it is valid, it means the delegated targets has been validated - // - If it is not, the delegated targets isn't valid - if errors.As(err, &ErrMissingRemoteMetadata{}) { - // As this function is used to fill the local store cache, the targets - // will be downloaded from the remote store as the local store cache is - // empty, meaning that the delegated targets may not exist anymore. In - // that case, we can't get the delegation path. Ignore the delegated targets. - return nil, nil - } - if errors.As(err, &ErrUnknownTarget{}) { - // As this function is used to fill the local store cache, the target file - // will be downloaded from the remote store as the local store cache is - // empty, meaning that the target file may not exist anymore. In - // that case, ignore the file and try another. - continue - } - return resp, err - } - return nil, 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(ignoreExpiredCheck bool) error { - meta, err := c.local.GetMeta() - if err != nil { - return err - } - rootJSON, ok := meta["root.json"] - if !ok { - return ErrNoRootKeys - } - return c.loadAndVerifyRootMeta(rootJSON, ignoreExpiredCheck) -} - -// loadAndVerifyRootMeta decodes and verifies root metadata 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) loadAndVerifyRootMeta(rootJSON []byte, ignoreExpiredCheck bool) error { - // 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 - } - ndb := verify.NewDB() - for id, k := range root.Keys { - if err := ndb.AddKey(id, k); err != nil { - return err - } - } - for name, role := range root.Roles { - if err := ndb.AddRole(name, role); err != nil { - return err - } - } - // Any trusted local root metadata version must be greater than 0. - if ignoreExpiredCheck { - if err := ndb.VerifyIgnoreExpiredCheck(s, "root", 0); err != nil { - return err - } - } else { - if err := ndb.Verify(s, "root", 0); err != nil { - return err - } - } - c.consistentSnapshot = root.ConsistentSnapshot - c.rootVer = root.Version - c.db = ndb - 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 { - 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. -func (c *Client) loadTargets(targets data.TargetFiles) { - c.targets = make(data.TargetFiles) - for name, meta := range targets { - c.targets[name] = meta - c.targets[util.NormalizeTarget(name)] = meta - } -} - -// downloadMetaUnsafe downloads top-level metadata from remote storage without -// verifying it's length and hashes (used for example to download timestamp.json -// which has unknown size). It will download at most maxMetaSize bytes. -func (c *Client) downloadMetaUnsafe(name string, maxMetaSize int64) ([]byte, error) { - r, size, err := c.remote.GetMeta(name) - if err != nil { - if IsNotFound(err) { - return nil, ErrMissingRemoteMetadata{name} - } - return nil, ErrDownloadFailed{name, err} - } - defer r.Close() - - // return ErrMetaTooLarge if the reported size is greater than maxMetaSize - if size > maxMetaSize { - return nil, ErrMetaTooLarge{name, size, maxMetaSize} - } - - // although the size has been checked above, use a LimitReader in case - // the reported size is inaccurate, or size is -1 which indicates an - // unknown length - return io.ReadAll(io.LimitReader(r, maxMetaSize)) -} - -// remoteGetFunc is the type of function the download method uses to download -// remote files -type remoteGetFunc func(string) (io.ReadCloser, int64, error) - -// downloadHashed tries to download the hashed prefixed version of the file. -func (c *Client) downloadHashed(file string, get remoteGetFunc, hashes data.Hashes) (io.ReadCloser, int64, error) { - // try each hashed path in turn, and either return the contents, - // try the next one if a 404 is returned, or return an error - for _, path := range util.HashedPaths(file, hashes) { - r, size, err := get(path) - if err != nil { - if IsNotFound(err) { - continue - } - return nil, 0, err - } - return r, size, nil - } - return nil, 0, ErrNotFound{file} -} - -// download downloads the given target file from remote storage using the get -// function, adding hashes to the path if consistent snapshots are in use -func (c *Client) downloadTarget(file string, get remoteGetFunc, hashes data.Hashes) (io.ReadCloser, int64, error) { - if c.consistentSnapshot { - return c.downloadHashed(file, get, hashes) - } else { - return get(file) - } -} - -// downloadVersionedMeta downloads top-level metadata from remote storage and -// verifies it using the given file metadata. -func (c *Client) downloadMeta(name string, version int64, m data.FileMeta) ([]byte, error) { - r, size, err := func() (io.ReadCloser, int64, error) { - if c.consistentSnapshot { - path := util.VersionedPath(name, version) - r, size, err := c.remote.GetMeta(path) - if err == nil { - return r, size, nil - } - - return nil, 0, err - } else { - return c.remote.GetMeta(name) - } - }() - if err != nil { - if IsNotFound(err) { - return nil, ErrMissingRemoteMetadata{name} - } - return nil, err - } - defer r.Close() - - // return ErrWrongSize if the reported size is known and incorrect - var stream io.Reader - if m.Length != 0 { - if size >= 0 && size != m.Length { - return nil, ErrWrongSize{name, size, m.Length} - } - - // wrap the data in a LimitReader so we download at most m.Length bytes - stream = io.LimitReader(r, m.Length) - } else { - stream = r - } - - return io.ReadAll(stream) -} - -func (c *Client) downloadMetaFromSnapshot(name string, m data.SnapshotFileMeta) ([]byte, error) { - b, err := c.downloadMeta(name, m.Version, data.FileMeta{Length: m.Length, Hashes: m.Hashes}) - if err != nil { - return nil, err - } - - // 5.6.2 – Check length and hashes of fetched bytes *before* parsing metadata - if err := util.BytesMatchLenAndHashes(b, m.Length, m.Hashes); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - meta, err := util.GenerateSnapshotFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...) - if err != nil { - return nil, err - } - - // 5.6.4 - Check against snapshot role's version - if err := util.VersionEqual(meta.Version, m.Version); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - return b, nil -} - -func (c *Client) downloadMetaFromTimestamp(name string, m data.TimestampFileMeta) ([]byte, error) { - b, err := c.downloadMeta(name, m.Version, data.FileMeta{Length: m.Length, Hashes: m.Hashes}) - if err != nil { - return nil, err - } - - // 5.2.2. – Check length and hashes of fetched bytes *before* parsing metadata - if err := util.BytesMatchLenAndHashes(b, m.Length, m.Hashes); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - meta, err := util.GenerateTimestampFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...) - if err != nil { - return nil, err - } - - // 5.5.4 - Check against timestamp role's version - if err := util.VersionEqual(meta.Version, m.Version); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - return b, nil -} - -// decodeSnapshot decodes and verifies snapshot metadata, and returns the new -// root and targets file meta. -func (c *Client) decodeSnapshot(b json.RawMessage) (data.SnapshotFiles, error) { - snapshot := &data.Snapshot{} - // 5.5.(3 and 6) - Verify it's signed correctly and it's not expired - if err := c.db.Unmarshal(b, snapshot, "snapshot", c.snapshotVer); err != nil { - return data.SnapshotFiles{}, ErrDecodeFailed{"snapshot.json", err} - } - // 5.5.5 - Check for top-level targets rollback attack - // Verify explicitly that current targets meta version is less than or equal to the new one - if snapshot.Meta["targets.json"].Version < c.targetsVer { - return data.SnapshotFiles{}, verify.ErrLowVersion{Actual: snapshot.Meta["targets.json"].Version, Current: c.targetsVer} - } - - // 5.5.5 - Get the local/trusted snapshot metadata, if any, and check all target metafiles against rollback attack - // In case the local snapshot metadata was not verified by the keys in the latest root during getLocalMeta(), - // snapshot.json won't be present in c.localMeta and thus this check will not be processed. - if snapshotJSON, ok := c.localMeta["snapshot.json"]; ok { - currentSnapshot := &data.Snapshot{} - if err := c.db.UnmarshalTrusted(snapshotJSON, currentSnapshot, "snapshot"); err != nil { - return data.SnapshotFiles{}, err - } - // 5.5.5 - Check for rollback attacks in both top-level and delegated targets roles (note that the Meta object includes both) - for path, local := range currentSnapshot.Meta { - if newMeta, ok := snapshot.Meta[path]; ok { - // 5.5.5 - Check for rollback attack - if newMeta.Version < local.Version { - return data.SnapshotFiles{}, verify.ErrLowVersion{Actual: newMeta.Version, Current: local.Version} - } - } else { - // 5.5.5 - Abort the update if a target file has been removed from the new snapshot file - return data.SnapshotFiles{}, verify.ErrMissingTargetFile - } - } - } - // At this point we can trust the new snapshot, the top-level targets, and any delegated targets versions it refers to - // so we can update the client's trusted versions and proceed with persisting the new snapshot metadata - // c.snapshotVer was already set when we verified the timestamp metadata - c.targetsVer = snapshot.Meta["targets.json"].Version - return snapshot.Meta, nil -} - -// decodeTargets decodes and verifies targets metadata, sets c.targets and -// returns updated targets. -func (c *Client) decodeTargets(b json.RawMessage) (data.TargetFiles, error) { - targets := &data.Targets{} - // 5.6.(3 and 5) - Verify signatures and check against freeze attack - if err := c.db.Unmarshal(b, targets, "targets", c.targetsVer); err != nil { - return nil, ErrDecodeFailed{"targets.json", err} - } - // Generate a list with the updated targets - updatedTargets := make(data.TargetFiles) - for path, meta := range targets.Targets { - if local, ok := c.targets[path]; ok { - if err := util.TargetFileMetaEqual(local, meta); err == nil { - continue - } - } - updatedTargets[path] = meta - } - // c.targetsVer was already updated when we verified the snapshot metadata - // FIXME(TUF-0.9) temporarily support files with leading path separators. - // c.targets = targets.Targets - c.loadTargets(targets.Targets) - return updatedTargets, nil -} - -// decodeTimestamp decodes and verifies timestamp metadata, and returns the -// new snapshot file meta and signals whether the update should be aborted early -// (the new timestamp has the same version as the old one, so there's no need to -// complete the update). -func (c *Client) decodeTimestamp(b json.RawMessage) (data.TimestampFileMeta, bool, error) { - timestamp := &data.Timestamp{} - - if err := c.db.Unmarshal(b, timestamp, "timestamp", c.timestampVer); err != nil { - return data.TimestampFileMeta{}, false, ErrDecodeFailed{"timestamp.json", err} - } - // 5.4.3.1 - Check for timestamp rollback attack - // We already checked for timestamp.Version < c.timestampVer in the Unmarshal call above. - // Here, we're checking for version equality, which indicates that we can abandon this update. - if timestamp.Version == c.timestampVer { - return data.TimestampFileMeta{}, true, nil - } - // 5.4.3.2 - Check for snapshot rollback attack - // Verify that the current snapshot meta version is less than or equal to the new one - if timestamp.Meta["snapshot.json"].Version < c.snapshotVer { - return data.TimestampFileMeta{}, false, verify.ErrLowVersion{Actual: timestamp.Meta["snapshot.json"].Version, Current: c.snapshotVer} - } - // At this point we can trust the new timestamp and the snapshot version it refers to - // so we can update the client's trusted versions and proceed with persisting the new timestamp - c.timestampVer = timestamp.Version - c.snapshotVer = timestamp.Meta["snapshot.json"].Version - return timestamp.Meta["snapshot.json"], false, nil -} - -// 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 nil, false - } - meta, err := util.GenerateSnapshotFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...) - if err != nil { - return nil, false - } - err = util.SnapshotFileMetaEqual(meta, m) - return b, err == nil -} - -type Destination interface { - io.Writer - Delete() error -} - -// Download downloads the given target file from remote storage into dest. -// -// dest will be deleted and an error returned in the following situations: -// -// - The target does not exist in the local targets.json -// - 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 -// - Size of the download does not match if the reported size is known and -// incorrect -func (c *Client) Download(name string, dest Destination) (err error) { - // delete dest if there is an error - defer func() { - if err != nil { - dest.Delete() - } - }() - - // populate c.targets from local storage if not set - if c.targets == nil { - if err := c.getLocalMeta(); err != nil { - return err - } - } - - normalizedName := util.NormalizeTarget(name) - localMeta, ok := c.targets[normalizedName] - if !ok { - // search in delegations - localMeta, err = c.getTargetFileMeta(normalizedName) - if err != nil { - return err - } - } - - // get the data from remote storage - r, size, err := c.downloadTarget(normalizedName, c.remote.GetTarget, localMeta.Hashes) - if err != nil { - return err - } - defer r.Close() - - // return ErrWrongSize if the reported size is known and incorrect - if size >= 0 && size != localMeta.Length { - return ErrWrongSize{name, size, localMeta.Length} - } - - // wrap the data in a LimitReader so we download at most localMeta.Length bytes - stream := io.LimitReader(r, localMeta.Length) - - // read the data, simultaneously writing it to dest and generating metadata - actual, err := util.GenerateTargetFileMeta(io.TeeReader(stream, dest), localMeta.HashAlgorithms()...) - if err != nil { - return ErrDownloadFailed{name, err} - } - - // check the data has the correct length and hashes - if err := util.TargetFileMetaEqual(actual, localMeta); err != nil { - if e, ok := err.(util.ErrWrongLength); ok { - return ErrWrongSize{name, e.Actual, e.Expected} - } - return ErrDownloadFailed{name, err} - } - - return nil -} - -func (c *Client) VerifyDigest(digest string, digestAlg string, length int64, path string) error { - localMeta, ok := c.targets[path] - if !ok { - return ErrUnknownTarget{Name: path, SnapshotVersion: c.snapshotVer} - } - - actual := data.FileMeta{Length: length, Hashes: make(data.Hashes, 1)} - var err error - actual.Hashes[digestAlg], err = hex.DecodeString(digest) - if err != nil { - return err - } - - if err := util.TargetFileMetaEqual(data.TargetFileMeta{FileMeta: actual}, localMeta); err != nil { - if e, ok := err.(util.ErrWrongLength); ok { - return ErrWrongSize{path, e.Actual, e.Expected} - } - return ErrDownloadFailed{path, err} - } - - return nil -} - -// Target returns the target metadata for a specific target if it -// exists, searching from top-level level targets then through -// all delegations. If it does not, ErrNotFound will be returned. -func (c *Client) Target(name string) (data.TargetFileMeta, error) { - target, err := c.getTargetFileMeta(util.NormalizeTarget(name)) - if err == nil { - return target, nil - } - - if _, ok := err.(ErrUnknownTarget); ok { - return data.TargetFileMeta{}, ErrNotFound{name} - } - - return data.TargetFileMeta{}, err -} - -// Targets returns the complete list of available top-level targets. -func (c *Client) Targets() (data.TargetFiles, error) { - // populate c.targets from local storage if not set - if c.targets == nil { - if err := c.getLocalMeta(); err != nil { - return nil, err - } - } - return c.targets, nil -} diff --git a/client/client_test.go b/client/client_test.go deleted file mode 100644 index f4dbd885..00000000 --- a/client/client_test.go +++ /dev/null @@ -1,1668 +0,0 @@ -package client - -import ( - "bytes" - "crypto/ed25519" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - "net" - "net/http" - "os" - "path/filepath" - "testing" - "time" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" - "github.com/stretchr/testify/assert" - tuf "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/sets" - "github.com/theupdateframework/go-tuf/pkg/keys" - "github.com/theupdateframework/go-tuf/sign" - "github.com/theupdateframework/go-tuf/util" - "github.com/theupdateframework/go-tuf/verify" - . "gopkg.in/check.v1" -) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type ClientSuite struct { - store tuf.LocalStore - repo *tuf.Repo - local LocalStore - remote RemoteStore - expiredTime time.Time - keyIDs map[string][]string - useFileStore bool - // Only used with FileStore - tmpDir string -} - -var _ = Suite(&ClientSuite{useFileStore: false}) -var _ = Suite(&ClientSuite{useFileStore: true}) - -func newFakeRemoteStore() *fakeRemoteStore { - return &fakeRemoteStore{ - meta: make(map[string]*fakeFile), - targets: make(map[string]*fakeFile), - } -} - -type fakeRemoteStore struct { - meta map[string]*fakeFile - targets map[string]*fakeFile -} - -func (f *fakeRemoteStore) GetMeta(name string) (io.ReadCloser, int64, error) { - return f.get(name, f.meta) -} - -func (f *fakeRemoteStore) GetTarget(path string) (io.ReadCloser, int64, error) { - return f.get(path, f.targets) -} - -func (f *fakeRemoteStore) get(name string, store map[string]*fakeFile) (io.ReadCloser, int64, error) { - file, ok := store[name] - if !ok { - return nil, 0, ErrNotFound{name} - } - return file, file.size, nil -} - -// These are helper methods for manipulating the internals of the Stores -// because the set/delete methods are not part of the Interface, we need to -// switch on the underlying implementation. -// Also readMeta method is convenience for ease of testing. -func (s *ClientSuite) setRemoteMeta(path string, data []byte) error { - switch impl := s.remote.(type) { - case *fakeRemoteStore: - impl.meta[path] = newFakeFile(data) - return nil - case *FileRemoteStore: - return impl.addMeta(path, data) - default: - return fmt.Errorf("non-supoprted RemoteStore, got %+v", impl) - } -} - -func (s *ClientSuite) setRemoteTarget(path string, data []byte) error { - switch impl := s.remote.(type) { - case *fakeRemoteStore: - impl.targets[path] = newFakeFile(data) - return nil - case *FileRemoteStore: - return impl.addTarget(path, data) - default: - return fmt.Errorf("non-supoprted RemoteStore, got %+v", impl) - } -} - -func (s *ClientSuite) deleteMeta(path string) error { - switch impl := s.remote.(type) { - case *fakeRemoteStore: - delete(impl.meta, path) - return nil - case *FileRemoteStore: - return impl.deleteMeta(path) - default: - return fmt.Errorf("non-supported RemoteStore, got %+v", impl) - } -} - -func (s *ClientSuite) deleteTarget(path string) error { - switch impl := s.remote.(type) { - case *fakeRemoteStore: - delete(impl.targets, path) - return nil - case *FileRemoteStore: - return impl.deleteTarget(path) - default: - return fmt.Errorf("non-supported RemoteStore, got %+v", impl) - } -} - -func (s *ClientSuite) readMeta(name string) ([]byte, error) { - stream, _, err := s.remote.GetMeta(name) - if err != nil { - return nil, err - } - return io.ReadAll(stream) -} - -func newFakeFile(b []byte) *fakeFile { - return &fakeFile{buf: bytes.NewReader(b), size: int64(len(b))} -} - -type fakeFile struct { - buf *bytes.Reader - bytesRead int - size int64 -} - -func (f *fakeFile) Read(p []byte) (int, error) { - n, err := f.buf.Read(p) - f.bytesRead += n - return n, err -} - -func (f *fakeFile) Close() error { - f.buf.Seek(0, io.SeekStart) - return nil -} - -var targetFiles = map[string][]byte{ - "foo.txt": []byte("foo"), - "bar.txt": []byte("bar"), - "baz.txt": []byte("baz"), -} - -func (s *ClientSuite) SetUpTest(c *C) { - s.store = tuf.MemoryStore(nil, targetFiles) - - // create a valid repo containing foo.txt - var err error - s.repo, err = tuf.NewRepo(s.store) - c.Assert(err, IsNil) - // don't use consistent snapshots to make testing easier (consistent - // snapshots are tested explicitly elsewhere) - c.Assert(s.repo.Init(false), IsNil) - s.keyIDs = map[string][]string{ - "root": s.genKey(c, "root"), - "targets": s.genKey(c, "targets"), - "snapshot": s.genKey(c, "snapshot"), - "timestamp": s.genKey(c, "timestamp"), - } - c.Assert(s.repo.AddTarget("foo.txt", nil), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - - // create a remote store containing valid repo files - if s.useFileStore { - s.remote, s.tmpDir, err = newTestFileStoreFS() - if err != nil { - c.Fatalf("failed to create new FileStore: %v", err) - } - } else { - s.remote = newFakeRemoteStore() - } - s.syncRemote(c) - for path, data := range targetFiles { - s.setRemoteTarget(path, data) - } - - s.expiredTime = time.Now().Add(time.Hour) -} - -func (s *ClientSuite) TearDownTest(c *C) { - if s.tmpDir != "" { - rmrf(s.tmpDir, c.Logf) - } -} - -func (s *ClientSuite) genKey(c *C, role string) []string { - ids, err := s.repo.GenKey(role) - c.Assert(err, IsNil) - return ids -} - -func (s *ClientSuite) genKeyExpired(c *C, role string) []string { - ids, err := s.repo.GenKeyWithExpires(role, s.expiredTime) - c.Assert(err, IsNil) - return ids -} - -// withMetaExpired sets signed.IsExpired throughout the invocation of f so that -// any metadata marked to expire at s.expiredTime will be expired (this avoids -// the need to sleep in the tests). -func (s *ClientSuite) withMetaExpired(f func()) { - e := verify.IsExpired - defer func() { verify.IsExpired = e }() - verify.IsExpired = func(t time.Time) bool { - return t.Unix() == s.expiredTime.Round(time.Second).Unix() - } - f() -} - -func (s *ClientSuite) syncLocal(c *C) { - meta, err := s.store.GetMeta() - c.Assert(err, IsNil) - for k, v := range meta { - c.Assert(s.local.SetMeta(k, v), IsNil) - } -} - -func (s *ClientSuite) syncRemote(c *C) { - meta, err := s.store.GetMeta() - c.Assert(err, IsNil) - for name, data := range meta { - if err := s.setRemoteMeta(name, data); err != nil { - panic(fmt.Sprintf("setMetadata failed: %v", err)) - } - } -} - -func (s *ClientSuite) addRemoteTarget(c *C, name string) { - c.Assert(s.repo.AddTarget(name, nil), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) -} - -func (s *ClientSuite) rootMeta(c *C) []byte { - meta, err := s.repo.GetMeta() - c.Assert(err, IsNil) - rootMeta, ok := meta["root.json"] - c.Assert(ok, Equals, true) - return rootMeta -} - -func (s *ClientSuite) newClient(c *C) *Client { - s.local = MemoryLocalStore() - client := NewClient(s.local, s.remote) - c.Assert(client.Init(s.rootMeta(c)), IsNil) - return client -} - -func (s *ClientSuite) updatedClient(c *C) *Client { - client := s.newClient(c) - _, err := client.Update() - c.Assert(err, IsNil) - return client -} - -func assertFile(c *C, file data.TargetFileMeta, name string) { - target, ok := targetFiles[name] - if !ok { - c.Fatalf("unknown target %s", name) - } - - meta, err := util.GenerateTargetFileMeta(bytes.NewReader(target), file.HashAlgorithms()...) - c.Assert(err, IsNil) - c.Assert(util.TargetFileMetaEqual(file, meta), IsNil) -} - -func assertFiles(c *C, files data.TargetFiles, names []string) { - c.Assert(files, HasLen, len(names)) - for _, name := range names { - file, ok := files[name] - if !ok { - c.Fatalf("expected files to contain %s", name) - } - - assertFile(c, file, name) - } -} - -func assertWrongHash(c *C, err error) { - // just test the type of err rather using DeepEquals as it contains - // hashes we don't necessarily need to check. - e, ok := err.(ErrDownloadFailed) - if !ok { - c.Fatalf("expected err to have type ErrDownloadFailed, got %T", err) - } - if _, ok := e.Err.(util.ErrWrongHash); !ok { - c.Fatalf("expected err.Err to have type util.ErrWrongHash, got %T", err) - } -} - -func (s *ClientSuite) assertErrExpired(c *C, err error, file string) { - decodeErr, ok := err.(ErrDecodeFailed) - if !ok { - c.Fatalf("expected err to have type ErrDecodeFailed, got %T", err) - } - c.Assert(decodeErr.File, Equals, file) - expiredErr, ok := decodeErr.Err.(verify.ErrExpired) - if !ok { - c.Fatalf("expected err.Err to have type signed.ErrExpired, got %T", err) - } - c.Assert(expiredErr.Expired.Unix(), Equals, s.expiredTime.Round(time.Second).Unix()) -} - -func (s *ClientSuite) TestInitAllowsExpired(c *C) { - s.genKeyExpired(c, "targets") - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - client := NewClient(MemoryLocalStore(), s.remote) - bytes, err := s.readMeta("root.json") - c.Assert(err, IsNil) - s.withMetaExpired(func() { - c.Assert(client.Init(bytes), IsNil) - }) -} - -func (s *ClientSuite) TestInit(c *C) { - client := NewClient(MemoryLocalStore(), s.remote) - bytes, err := s.readMeta("root.json") - c.Assert(err, IsNil) - dataSigned := &data.Signed{} - c.Assert(json.Unmarshal(bytes, dataSigned), IsNil) - root := &data.Root{} - c.Assert(json.Unmarshal(dataSigned.Signed, root), IsNil) - - // check Update() returns ErrNoRootKeys when uninitialized - _, err = client.Update() - c.Assert(err, Equals, ErrNoRootKeys) - - // check Init() returns ErrRoleThreshold when the root's signature is - // invalid - // modify root and marshal without regenerating signatures - root.Version = root.Version + 1 - rootBytes, err := json.Marshal(root) - c.Assert(err, IsNil) - dataSigned.Signed = rootBytes - dataBytes, err := json.Marshal(dataSigned) - c.Assert(err, IsNil) - c.Assert(client.Init(dataBytes), Equals, verify.ErrRoleThreshold{ - Expected: 1, Actual: 0}) - - // check Update() does not return ErrNoRootKeys after initialization - c.Assert(client.Init(bytes), IsNil) - _, err = client.Update() - c.Assert(err, IsNil) -} - -// This is a regression test for https://github.com/theupdateframework/go-tuf/issues/370 -// where a single invalid signature resulted in an early return. -// Instead, the client should have continued and counted the number -// of valid signatures, ignoring the incorrect one. -func (s *ClientSuite) TestExtraRootSignaturesOnInit(c *C) { - client := NewClient(MemoryLocalStore(), s.remote) - bytes, err := s.readMeta("root.json") - c.Assert(err, IsNil) - dataSigned := &data.Signed{} - c.Assert(json.Unmarshal(bytes, dataSigned), IsNil) - - // check Init() succeeds when an extra invalid signature was - // added to the root. - dataSigned.Signatures = append(dataSigned.Signatures, - data.Signature{ - KeyID: dataSigned.Signatures[0].KeyID, - Signature: make([]byte, ed25519.SignatureSize), - }) - dataBytes, err := json.Marshal(dataSigned) - c.Assert(err, IsNil) - c.Assert(client.Init(dataBytes), IsNil) -} - -func (s *ClientSuite) TestFirstUpdate(c *C) { - files, err := s.newClient(c).Update() - c.Assert(err, IsNil) - c.Assert(files, HasLen, 1) - assertFiles(c, files, []string{"foo.txt"}) -} - -func (s *ClientSuite) TestMissingRemoteMetadata(c *C) { - client := s.newClient(c) - - s.deleteMeta("targets.json") - _, err := client.Update() - c.Assert(err, Equals, ErrMissingRemoteMetadata{"targets.json"}) - - s.deleteMeta("timestamp.json") - _, err = client.Update() - c.Assert(err, Equals, ErrMissingRemoteMetadata{"timestamp.json"}) -} - -func (s *ClientSuite) TestNoChangeUpdate(c *C) { - client := s.newClient(c) - _, err := client.Update() - c.Assert(err, IsNil) - _, err = client.Update() - c.Assert(err, IsNil) -} - -func (s *ClientSuite) TestNewTimestamp(c *C) { - client := s.updatedClient(c) - version := client.timestampVer - c.Assert(version > 0, Equals, true) - c.Assert(s.repo.Timestamp(), IsNil) - s.syncRemote(c) - _, err := client.Update() - c.Assert(err, IsNil) - c.Assert(client.timestampVer > version, Equals, true) -} - -func (s *ClientSuite) TestNewRoot(c *C) { - client := s.newClient(c) - - // replace all keys - newKeyIDs := make(map[string][]string) - for role, ids := range s.keyIDs { - c.Assert(len(ids) > 0, Equals, true) - c.Assert(s.repo.RevokeKey(role, ids[0]), IsNil) - newKeyIDs[role] = s.genKey(c, role) - } - - // update metadata - c.Assert(s.repo.Sign("targets.json"), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check update gets new root version - c.Assert(client.getLocalMeta(), IsNil) - version := client.rootVer - c.Assert(version > 0, Equals, true) - _, err := client.Update() - c.Assert(err, IsNil) - c.Assert(client.rootVer > version, Equals, true) - - // check old keys are not in db - for _, ids := range s.keyIDs { - c.Assert(len(ids) > 0, Equals, true) - for _, id := range ids { - _, err := client.db.GetVerifier(id) - c.Assert(err, NotNil) - } - } - - // check new keys are in db - for name, ids := range newKeyIDs { - c.Assert(len(ids) > 0, Equals, true) - for _, id := range ids { - verifier, err := client.db.GetVerifier(id) - c.Assert(err, IsNil) - c.Assert(verifier.MarshalPublicKey().IDs(), DeepEquals, ids) - } - role := client.db.GetRole(name) - c.Assert(role, NotNil) - c.Assert(role.KeyIDs, DeepEquals, sets.StringSliceToSet(ids)) - } -} - -// This is a regression test for https://github.com/theupdateframework/go-tuf/issues/370 -// where a single invalid signature resulted in an early return. -// Instead, the client should have continued and counted the number -// of valid signatures, ignoring the incorrect one. -func (s *ClientSuite) TestExtraSignaturesOnRootUpdate(c *C) { - client := s.newClient(c) - - // Add an extra root key to update the root to a new version. - s.genKey(c, "root") - // update metadata - c.Assert(s.repo.Sign("targets.json"), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // Add an extra signature to the new remote root. - bytes, err := s.readMeta("root.json") - c.Assert(err, IsNil) - dataSigned := &data.Signed{} - c.Assert(json.Unmarshal(bytes, dataSigned), IsNil) - dataSigned.Signatures = append(dataSigned.Signatures, - data.Signature{ - KeyID: dataSigned.Signatures[0].KeyID, - Signature: make([]byte, ed25519.SignatureSize), - }) - dataBytes, err := json.Marshal(dataSigned) - c.Assert(err, IsNil) - s.setRemoteMeta("root.json", dataBytes) - s.setRemoteMeta("2.root.json", dataBytes) - - // check Update() succeeds when an extra invalid signature was - // added to the root. - _, err = client.Update() - c.Assert(err, IsNil) - c.Assert(client.rootVer, Equals, int64(2)) -} - -// 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) (*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"} { - if _, err := os.Stat(initialStateDir + "/" + m); err == nil { - metadataJSON, err := os.ReadFile(initialStateDir + "/" + m) - if err != nil { - return nil, err - } - c.local.SetMeta(m, metadataJSON) - } - } - return c, nil -} - -func initRootTest(c *C, baseDir string) (*Client, func() error) { - l, err := startTUFRepoServer(baseDir, "server") - c.Assert(err, IsNil) - tufClient, err := newClientWithMeta(baseDir, "client/metadata/current", l.Addr().String()) - c.Assert(err, IsNil) - return tufClient, l.Close -} - -func (s *ClientSuite) TestUpdateRoots(c *C) { - var tests = []struct { - fixturePath string - expectedError error - expectedVersions map[string]int64 - }{ - // Succeeds when there is no root update. - {"testdata/Published1Time", nil, map[string]int64{"root": 1, "timestamp": 1, "snapshot": 1, "targets": 1}}, - // Succeeds when client only has root.json - {"testdata/Published1Time_client_root_only", nil, map[string]int64{"root": 1, "timestamp": 1, "snapshot": 1, "targets": 1}}, - // Succeeds updating root from version 1 to version 2. - {"testdata/Published2Times_keyrotated", nil, map[string]int64{"root": 2, "timestamp": 1, "snapshot": 1, "targets": 1}}, - // Succeeds updating root from version 1 to version 2 when the client's initial root version is expired. - {"testdata/Published2Times_keyrotated_initialrootexpired", nil, map[string]int64{"root": 2, "timestamp": 1, "snapshot": 1, "targets": 1}}, - // Succeeds updating root from version 1 to version 3 when versions 1 and 2 are expired. - {"testdata/Published3Times_keyrotated_initialrootsexpired", nil, map[string]int64{"root": 3, "timestamp": 1, "snapshot": 1, "targets": 1}}, - // Succeeds updating root from version 2 to version 3. - {"testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2", nil, map[string]int64{"root": 3, "timestamp": 1, "snapshot": 1, "targets": 1}}, - // Fails updating root from version 1 to version 3 when versions 1 and 3 are expired but version 2 is not expired. - {"testdata/Published3Times_keyrotated_latestrootexpired", ErrDecodeFailed{File: "root.json", Err: verify.ErrExpired{}}, map[string]int64{"root": 2, "timestamp": 1, "snapshot": 1, "targets": 1}}, - // Fails updating root from version 1 to version 2 when old root 1 did not sign off on it (nth root didn't sign off n+1). - // TODO(asraa): This testcase should have revoked the old key! - // https://github.com/theupdateframework/go-tuf/issues/417 - {"testdata/Published2Times_keyrotated_invalidOldRootSignature", nil, map[string]int64{}}, - // Fails updating root from version 1 to version 2 when the new root 2 did not sign itself (n+1th root didn't sign off n+1) - {"testdata/Published2Times_keyrotated_invalidNewRootSignature", verify.ErrRoleThreshold{Expected: 1, Actual: 0}, map[string]int64{}}, - // Fails updating root to 2.root.json when the value of the version field inside it is 1 (rollback attack prevention). - {"testdata/Published1Time_backwardRootVersion", verify.ErrWrongVersion(verify.ErrWrongVersion{Given: 1, Expected: 2}), map[string]int64{}}, - // Fails updating root to 2.root.json when the value of the version field inside it is 3 (rollforward attack prevention). - {"testdata/Published3Times_keyrotated_forwardRootVersion", verify.ErrWrongVersion(verify.ErrWrongVersion{Given: 3, Expected: 2}), map[string]int64{}}, - // Fails updating when there is no local trusted root. - {"testdata/Published1Time_client_no_root", errors.New("tuf: no root keys found in local meta store"), map[string]int64{}}, - - // snapshot role key rotation increase the snapshot and timestamp. - {"testdata/Published2Times_snapshot_keyrotated", nil, map[string]int64{"root": 2, "timestamp": 2, "snapshot": 2, "targets": 1}}, - // targets role key rotation increase the snapshot, timestamp, and targets. - {"testdata/Published2Times_targets_keyrotated", nil, map[string]int64{"root": 2, "timestamp": 2, "snapshot": 2, "targets": 2}}, - // timestamp role key rotation increase the timestamp. - {"testdata/Published2Times_timestamp_keyrotated", nil, map[string]int64{"root": 2, "timestamp": 2, "snapshot": 1, "targets": 1}}, - //root file size > defaultRootDownloadLimit - {"testdata/Published2Times_roottoolarge", ErrMetaTooLarge{Name: "2.root.json", Size: defaultRootDownloadLimit + 1, MaxSize: defaultRootDownloadLimit}, map[string]int64{}}, - } - - for _, test := range tests { - tufClient, closer := initRootTest(c, test.fixturePath) - _, 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]int64{"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() - } -} - -func (s *ClientSuite) TestFastForwardAttackRecovery(c *C) { - var tests = []struct { - fixturePath string - expectMetaDeleted map[string]bool - }{ - // Each of the following test cases each has a two sets of TUF metadata: - // (1) client's initial, and (2) server's current. - // The naming format is PublishedTwiceMultiKeysadd_X_revoke_Y_threshold_Z_ROLE - // The client includes TUF metadata before key rotation for TUF ROLE with X keys. - // The server includes updated TUF metadata after key rotation. The - // rotation involves revoking Y keys from the initial keys. - // For each test, the TUF client's will be initialized to the client files. - // The test checks whether the client is able to update itself properly. - - // Fast-forward recovery is not needed if less than threshold keys are revoked. - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root", - map[string]bool{"root.json": false, "timestamp.json": false, "snapshot.json": false, "targets.json": false}}, - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot", - map[string]bool{"root.json": false, "timestamp.json": false, "snapshot.json": false, "targets.json": false}}, - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets", - map[string]bool{"root.json": false, "timestamp.json": false, "snapshot.json": false, "targets.json": false}}, - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp", - map[string]bool{"root.json": false, "timestamp.json": false, "snapshot.json": false, "targets.json": false}}, - - // Fast-forward recovery not needed if root keys are revoked, even when the threshold number of root keys are revoked. - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root", - map[string]bool{"root.json": false, "timestamp.json": false, "snapshot.json": false, "targets.json": false}}, - - // Delete snapshot and timestamp metadata if a threshold number of snapshot keys are revoked. - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot", - map[string]bool{"root.json": false, "timestamp.json": true, "snapshot.json": true, "targets.json": false}}, - // Delete targets and snapshot metadata if a threshold number of targets keys are revoked. - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets", - map[string]bool{"root.json": false, "timestamp.json": false, "snapshot.json": true, "targets.json": true}}, - // Delete timestamp metadata if a threshold number of timestamp keys are revoked. - {"testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp", - map[string]bool{"root.json": false, "timestamp.json": true, "snapshot.json": false, "targets.json": false}}, - } - for _, test := range tests { - tufClient, closer := initRootTest(c, test.fixturePath) - c.Assert(tufClient.UpdateRoots(), IsNil) - m, err := tufClient.local.GetMeta() - c.Assert(err, IsNil) - for md, deleted := range test.expectMetaDeleted { - if deleted { - if _, ok := m[md]; ok { - c.Fatalf("Metadata %s is not deleted!", md) - } - } else { - if _, ok := m[md]; !ok { - c.Fatalf("Metadata %s deleted!", md) - } - } - } - closer() - } - -} - -func (s *ClientSuite) TestUpdateRace(c *C) { - // Tests race condition for the client update. You need to run the test with -race flag: - // go test -race - for i := 0; i < 2; i++ { - go func() { - c := NewClient(MemoryLocalStore(), newFakeRemoteStore()) - c.Update() - }() - } -} - -func (s *ClientSuite) TestNewTargets(c *C) { - client := s.newClient(c) - files, err := client.Update() - c.Assert(err, IsNil) - assertFiles(c, files, []string{"foo.txt"}) - - s.addRemoteTarget(c, "bar.txt") - s.addRemoteTarget(c, "baz.txt") - - files, err = client.Update() - c.Assert(err, IsNil) - assertFiles(c, files, []string{"bar.txt", "baz.txt"}) - - // Adding the same exact file should not lead to an update - s.addRemoteTarget(c, "bar.txt") - files, err = client.Update() - c.Assert(err, IsNil) - c.Assert(files, HasLen, 0) -} - -func (s *ClientSuite) TestNewTimestampKey(c *C) { - client := s.newClient(c) - - // replace key - oldIDs := s.keyIDs["timestamp"] - c.Assert(s.repo.RevokeKey("timestamp", oldIDs[0]), IsNil) - newIDs := s.genKey(c, "timestamp") - - // generate new snapshot (because root has changed) and timestamp - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check update gets new root and timestamp - c.Assert(client.getLocalMeta(), IsNil) - rootVer := client.rootVer - timestampVer := client.timestampVer - _, err := client.Update() - c.Assert(err, IsNil) - c.Assert(client.rootVer > rootVer, Equals, true) - c.Assert(client.timestampVer > timestampVer, Equals, true) - - // check key has been replaced in db - for _, oldID := range oldIDs { - _, err := client.db.GetVerifier(oldID) - c.Assert(err, NotNil) - } - for _, newID := range newIDs { - verifier, err := client.db.GetVerifier(newID) - c.Assert(err, IsNil) - c.Assert(verifier.MarshalPublicKey().IDs(), DeepEquals, newIDs) - } - role := client.db.GetRole("timestamp") - c.Assert(role, NotNil) - c.Assert(role.KeyIDs, DeepEquals, sets.StringSliceToSet(newIDs)) -} - -func (s *ClientSuite) TestNewSnapshotKey(c *C) { - client := s.newClient(c) - - // replace key - oldIDs := s.keyIDs["snapshot"] - c.Assert(s.repo.RevokeKey("snapshot", oldIDs[0]), IsNil) - newIDs := s.genKey(c, "snapshot") - - // generate new snapshot and timestamp - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check update gets new root, snapshot and timestamp - c.Assert(client.getLocalMeta(), IsNil) - rootVer := client.rootVer - snapshotVer := client.snapshotVer - timestampVer := client.timestampVer - _, err := client.Update() - c.Assert(err, IsNil) - c.Assert(client.rootVer > rootVer, Equals, true) - c.Assert(client.snapshotVer > snapshotVer, Equals, true) - c.Assert(client.timestampVer > timestampVer, Equals, true) - - // check key has been replaced in db - for _, oldID := range oldIDs { - _, err := client.db.GetVerifier(oldID) - c.Assert(err, NotNil) - } - for _, newID := range newIDs { - verifier, err := client.db.GetVerifier(newID) - c.Assert(err, IsNil) - c.Assert(verifier.MarshalPublicKey().IDs(), DeepEquals, newIDs) - } - role := client.db.GetRole("snapshot") - c.Assert(role, NotNil) - c.Assert(role.KeyIDs, DeepEquals, sets.StringSliceToSet(newIDs)) -} - -func (s *ClientSuite) TestNewTargetsKey(c *C) { - client := s.newClient(c) - - // replace key - oldIDs := s.keyIDs["targets"] - c.Assert(s.repo.RevokeKey("targets", oldIDs[0]), IsNil) - newIDs := s.genKey(c, "targets") - - // re-sign targets and generate new snapshot and timestamp - c.Assert(s.repo.Sign("targets.json"), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check update gets new metadata - c.Assert(client.getLocalMeta(), IsNil) - rootVer := client.rootVer - targetsVer := client.targetsVer - snapshotVer := client.snapshotVer - timestampVer := client.timestampVer - _, err := client.Update() - c.Assert(err, IsNil) - c.Assert(client.rootVer > rootVer, Equals, true) - c.Assert(client.targetsVer > targetsVer, Equals, true) - c.Assert(client.snapshotVer > snapshotVer, Equals, true) - c.Assert(client.timestampVer > timestampVer, Equals, true) - - // check key has been replaced in db - for _, oldID := range oldIDs { - _, err := client.db.GetVerifier(oldID) - c.Assert(err, NotNil) - } - for _, newID := range newIDs { - verifier, err := client.db.GetVerifier(newID) - c.Assert(err, IsNil) - c.Assert(verifier.MarshalPublicKey().IDs(), DeepEquals, newIDs) - } - role := client.db.GetRole("targets") - c.Assert(role, NotNil) - c.Assert(role.KeyIDs, DeepEquals, sets.StringSliceToSet(newIDs)) -} - -func (s *ClientSuite) TestOfflineSignatureFlow(c *C) { - client := s.newClient(c) - - // replace key - oldIDs := s.keyIDs["targets"] - c.Assert(s.repo.RevokeKey("targets", oldIDs[0]), IsNil) - _ = s.genKey(c, "targets") - - // re-sign targets using offline flow and generate new snapshot and timestamp - payload, err := s.repo.Payload("targets.json") - c.Assert(err, IsNil) - signed := data.Signed{Signed: payload} - _, err = s.repo.SignPayload("targets", &signed) - c.Assert(err, IsNil) - for _, sig := range signed.Signatures { - // This method checks that the signature verifies! - err = s.repo.AddOrUpdateSignature("targets.json", sig) - c.Assert(err, IsNil) - } - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check update gets new metadata - c.Assert(client.getLocalMeta(), IsNil) - _, err = client.Update() - c.Assert(err, IsNil) -} - -func (s *ClientSuite) TestLocalExpired(c *C) { - client := s.newClient(c) - - // locally expired timestamp.json is ok - version := client.timestampVer - c.Assert(s.repo.TimestampWithExpires(s.expiredTime), IsNil) - s.syncLocal(c) - s.withMetaExpired(func() { - c.Assert(client.getLocalMeta(), IsNil) - c.Assert(client.timestampVer > version, Equals, true) - }) - - // locally expired snapshot.json is ok - version = client.snapshotVer - c.Assert(s.repo.SnapshotWithExpires(s.expiredTime), IsNil) - s.syncLocal(c) - s.withMetaExpired(func() { - c.Assert(client.getLocalMeta(), IsNil) - c.Assert(client.snapshotVer > version, Equals, true) - }) - - // locally expired targets.json is ok - version = client.targetsVer - c.Assert(s.repo.AddTargetWithExpires("foo.txt", nil, s.expiredTime), IsNil) - s.syncLocal(c) - s.withMetaExpired(func() { - c.Assert(client.getLocalMeta(), IsNil) - c.Assert(client.targetsVer > version, Equals, true) - }) - - // locally expired root.json is not ok - version = client.rootVer - s.genKeyExpired(c, "targets") - s.syncLocal(c) - s.withMetaExpired(func() { - err := client.getLocalMeta() - if _, ok := err.(verify.ErrExpired); !ok { - c.Fatalf("expected err to have type signed.ErrExpired, got %T", err) - } - c.Assert(client.rootVer, Equals, version) - }) -} - -func (s *ClientSuite) TestTimestampTooLarge(c *C) { - s.setRemoteMeta("timestamp.json", make([]byte, defaultTimestampDownloadLimit+1)) - _, err := s.newClient(c).Update() - c.Assert(err, Equals, ErrMetaTooLarge{"timestamp.json", defaultTimestampDownloadLimit + 1, defaultTimestampDownloadLimit}) -} - -func (s *ClientSuite) TestUpdateLocalRootExpired(c *C) { - client := s.newClient(c) - - // add soon to expire root.json to local storage - s.genKeyExpired(c, "timestamp") - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncLocal(c) - - // add far expiring root.json to remote storage - s.genKey(c, "timestamp") - s.addRemoteTarget(c, "bar.txt") - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - const expectedRootVersion = int64(3) - - // check the update downloads the non expired remote root.json and - // restarts itself, thus successfully updating - s.withMetaExpired(func() { - err := client.getLocalMeta() - if _, ok := err.(verify.ErrExpired); !ok { - c.Fatalf("expected err to have type signed.ErrExpired, got %T", err) - } - _, err = client.Update() - c.Assert(err, IsNil) - c.Assert(client.rootVer, Equals, expectedRootVersion) - }) -} - -func (s *ClientSuite) TestUpdateRemoteExpired(c *C) { - client := s.updatedClient(c) - - // expired remote metadata should always be rejected - c.Assert(s.repo.TimestampWithExpires(s.expiredTime), IsNil) - s.syncRemote(c) - s.withMetaExpired(func() { - _, err := client.Update() - s.assertErrExpired(c, err, "timestamp.json") - }) - - c.Assert(s.repo.SnapshotWithExpires(s.expiredTime), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - s.withMetaExpired(func() { - _, err := client.Update() - s.assertErrExpired(c, err, "snapshot.json") - }) - - c.Assert(s.repo.AddTargetWithExpires("bar.txt", nil, s.expiredTime), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - s.syncRemote(c) - s.withMetaExpired(func() { - _, err := client.Update() - s.assertErrExpired(c, err, "targets.json") - }) - - s.genKeyExpired(c, "timestamp") - c.Assert(s.repo.RemoveTarget("bar.txt"), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - s.withMetaExpired(func() { - _, err := client.Update() - s.assertErrExpired(c, err, "root.json") - }) -} - -func (s *ClientSuite) TestUpdateLocalRootExpiredKeyChange(c *C) { - client := s.newClient(c) - - // add soon to expire root.json to local storage - s.genKeyExpired(c, "timestamp") - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncLocal(c) - - // replace all keys - newKeyIDs := make(map[string][]string) - for role, ids := range s.keyIDs { - if role != "snapshot" && role != "timestamp" && role != "targets" { - c.Assert(s.repo.RevokeKey(role, ids[0]), IsNil) - newKeyIDs[role] = s.genKey(c, role) - } - } - - // update metadata - c.Assert(s.repo.Sign("targets.json"), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check the update downloads the non expired remote root.json and - // restarts itself, thus successfully updating - s.withMetaExpired(func() { - err := client.getLocalMeta() - c.Assert(err, FitsTypeOf, verify.ErrExpired{}) - - _, err = client.Update() - c.Assert(err, IsNil) - }) -} - -func (s *ClientSuite) TestUpdateMixAndMatchAttack(c *C) { - // generate metadata with an explicit expires so we can make predictable changes - expires := time.Now().Add(time.Hour) - c.Assert(s.repo.AddTargetWithExpires("foo.txt", nil, expires), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - client := s.updatedClient(c) - - // grab the remote targets.json - oldTargets, err := s.readMeta("targets.json") - if err != nil { - c.Fatal("missing remote targets.json") - } - - // generate new remote metadata, but replace targets.json with the old one - c.Assert(s.repo.AddTargetWithExpires("bar.txt", nil, expires), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - newTargets, err := s.readMeta("targets.json") - if err != nil { - c.Fatal("missing remote targets.json") - } - s.setRemoteMeta("targets.json", oldTargets) - - // check update returns ErrWrongSize for targets.json - _, err = client.Update() - c.Assert(err, DeepEquals, ErrWrongSize{"targets.json", int64(len(oldTargets)), int64(len(newTargets))}) - - // do the same but keep the size the same - c.Assert(s.repo.RemoveTargetWithExpires("foo.txt", expires), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - s.syncRemote(c) - s.setRemoteMeta("targets.json", oldTargets) - - // check update returns ErrWrongHash - _, err = client.Update() - assertWrongHash(c, err) -} - -func (s *ClientSuite) TestUpdateReplayAttack(c *C) { - client := s.updatedClient(c) - - // grab the remote timestamp.json - oldTimestamp, err := s.readMeta("timestamp.json") - if err != nil { - c.Fatal("missing remote timestamp.json") - } - - // generate a new timestamp and sync with the client - version := client.timestampVer - c.Assert(version > 0, Equals, true) - c.Assert(s.repo.Timestamp(), IsNil) - s.syncRemote(c) - _, err = client.Update() - c.Assert(err, IsNil) - c.Assert(client.timestampVer > version, Equals, true) - - // replace remote timestamp.json with the old one - s.setRemoteMeta("timestamp.json", oldTimestamp) - - // check update returns ErrLowVersion - _, err = client.Update() - c.Assert(err, DeepEquals, ErrDecodeFailed{ - File: "timestamp.json", - Err: verify.ErrLowVersion{ - Actual: version, - Current: client.timestampVer, - }, - }) -} - -func (s *ClientSuite) TestUpdateForkTimestamp(c *C) { - client := s.updatedClient(c) - - // grab the remote timestamp.json - oldTimestamp, err := s.readMeta("timestamp.json") - if err != nil { - c.Fatal("missing remote timestamp.json") - } - - // generate a new timestamp and sync with the client - version := client.timestampVer - c.Assert(version > 0, Equals, true) - c.Assert(s.repo.Timestamp(), IsNil) - s.syncRemote(c) - _, err = client.Update() - c.Assert(err, IsNil) - newVersion := client.timestampVer - c.Assert(newVersion > version, Equals, true) - - // generate a new, different timestamp with the *same version* - s.setRemoteMeta("timestamp.json", oldTimestamp) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(client.timestampVer, Equals, newVersion) // double-check: same version? - s.syncRemote(c) - - oldMeta, err := client.local.GetMeta() - c.Assert(err, IsNil) - _, err = client.Update() - c.Assert(err, IsNil) // no error: the targets.json version didn't change, so there was no update! - // Client shouldn't update! - newMeta, err := client.local.GetMeta() - c.Assert(err, IsNil) - c.Assert(oldMeta, DeepEquals, newMeta) -} - -func (s *ClientSuite) TestUpdateTamperedTargets(c *C) { - client := s.newClient(c) - - // get local targets.json - meta, err := s.store.GetMeta() - c.Assert(err, IsNil) - targetsJSON, ok := meta["targets.json"] - if !ok { - c.Fatal("missing targets.json") - } - - type signedTargets struct { - Signed data.Targets `json:"signed"` - Signatures []data.Signature `json:"signatures"` - } - targets := &signedTargets{} - c.Assert(json.Unmarshal(targetsJSON, targets), IsNil) - - // update remote targets.json to have different content but same size - targets.Signed.Type = "xxxxxxx" - tamperedJSON, err := json.Marshal(targets) - c.Assert(err, IsNil) - s.store.SetMeta("targets.json", tamperedJSON) - s.store.Commit(false, nil, nil) - s.syncRemote(c) - _, err = client.Update() - assertWrongHash(c, err) - - // update remote targets.json to have the wrong size - targets.Signed.Type = "xxx" - tamperedJSON, err = json.Marshal(targets) - c.Assert(err, IsNil) - s.store.SetMeta("targets.json", tamperedJSON) - s.store.Commit(false, nil, nil) - c.Assert(s.repo.Timestamp(), IsNil) // unless timestamp changes, the client doesn't even look at "targets.json" - s.syncRemote(c) - _, err = client.Update() - c.Assert(err, DeepEquals, ErrWrongSize{"targets.json", int64(len(tamperedJSON)), int64(len(targetsJSON))}) -} - -func (s *ClientSuite) TestUpdateHTTP(c *C) { - tmp := c.MkDir() - - // start file server - addr, cleanup := startFileServer(c, tmp) - defer cleanup() - - for _, consistentSnapshot := range []bool{false, true} { - dir := fmt.Sprintf("consistent-snapshot-%t", consistentSnapshot) - - // generate repository - repo := generateRepoFS(c, filepath.Join(tmp, dir), targetFiles, consistentSnapshot) - - // initialize a client - remote, err := HTTPRemoteStore(fmt.Sprintf("http://%s/%s/repository", addr, dir), nil, nil) - c.Assert(err, IsNil) - client := NewClient(MemoryLocalStore(), remote) - rootMeta, err := repo.SignedMeta("root.json") - c.Assert(err, IsNil) - rootJsonBytes, err := json.Marshal(rootMeta) - c.Assert(err, IsNil) - c.Assert(client.Init(rootJsonBytes), IsNil) - - // check update is ok - targets, err := client.Update() - c.Assert(err, IsNil) - assertFiles(c, targets, []string{"foo.txt", "bar.txt", "baz.txt"}) - - // check can download files - for name, data := range targetFiles { - var dest testDestination - c.Assert(client.Download(name, &dest), IsNil) - c.Assert(dest.deleted, Equals, false) - c.Assert(dest.String(), Equals, string(data)) - } - } -} - -// TestRollbackSnapshot tests a rollback version of snapshot. -func (s *ClientSuite) TestRollbackSnapshot(c *C) { - client := s.updatedClient(c) - - // generate a new snapshot & timestamp v2 and sync with the client - version := client.snapshotVer - c.Assert(version > 0, Equals, true) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - _, err := client.Update() - c.Assert(err, IsNil) - c.Assert(client.snapshotVer > version, Equals, true) - - // replace remote snapshot.json with old version and timestamp again. - s.repo.SetSnapshotVersion(version) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check update returns ErrLowVersion - _, err = client.Update() - - c.Assert(err, DeepEquals, verify.ErrLowVersion{ - Actual: version, - Current: client.snapshotVer, - }) -} - -func (s *ClientSuite) TestRollbackTopLevelTargets(c *C) { - client := s.updatedClient(c) - - // generate a new targets and sync with the client - version := client.targetsVer - c.Assert(version > 0, Equals, true) - s.addRemoteTarget(c, "bar.txt") - _, err := client.Update() - c.Assert(err, IsNil) - c.Assert(client.targetsVer > version, Equals, true) - - // replace remote snapshot.json with old version and timestamp again. - s.repo.SetTargetsVersion(version) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // check update returns ErrLowVersion - _, err = client.Update() - c.Assert(err, DeepEquals, verify.ErrLowVersion{ - Actual: version, - Current: client.targetsVer, - }) -} - -func (s *ClientSuite) TestRollbackDelegatedTargets(c *C) { - client := s.updatedClient(c) - // add a delegation - signer, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - role := data.DelegatedRole{ - Name: "role", - KeyIDs: signer.PublicData().IDs(), - Paths: []string{"bar.txt", "baz.txt"}, - Threshold: 1, - } - s.store.SaveSigner("role", signer) - s.repo.AddDelegatedRole("targets", role, []*data.PublicKey{signer.PublicData()}) - s.repo.AddTargetToPreferredRole("bar.txt", nil, "role") - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // save v1 delegation - meta, err := s.store.GetMeta() - c.Assert(err, IsNil) - oldRole, ok := meta["role.json"] - if !ok { - c.Fatal("missing role.json") - } - // update client and verify download delegated target - _, err = client.Update() - c.Assert(err, IsNil) - var dest testDestination - c.Assert(client.Download("bar.txt", &dest), IsNil) - - // update delegation to v2 - s.repo.AddTargetToPreferredRole("baz.txt", nil, "role") - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - // update client and verify download v2 delegated target - _, err = client.Update() - c.Assert(err, IsNil) - c.Assert(dest.Delete(), IsNil) - c.Assert(client.Download("baz.txt", &dest), IsNil) - - // rollback role.json version. - c.Assert(s.store.SetMeta("role.json", oldRole), IsNil) - repo, err := tuf.NewRepo(s.store) - c.Assert(err, IsNil) - c.Assert(repo.Snapshot(), IsNil) - c.Assert(repo.Timestamp(), IsNil) - c.Assert(repo.Commit(), IsNil) - s.syncRemote(c) - - // check update returns ErrLowVersion - _, err = client.Update() - c.Assert(err, DeepEquals, verify.ErrLowVersion{ - Actual: 1, - Current: 2, - }) -} - -type testDestination struct { - bytes.Buffer - deleted bool -} - -func (t *testDestination) Delete() error { - t.deleted = true - return nil -} - -func (s *ClientSuite) TestDownloadUnknownTarget(c *C) { - client := s.updatedClient(c) - var dest testDestination - c.Assert(client.Download("nonexistent", &dest), Equals, ErrUnknownTarget{Name: "nonexistent", SnapshotVersion: 1}) - c.Assert(dest.deleted, Equals, true) -} - -func (s *ClientSuite) TestDownloadNoExist(c *C) { - client := s.updatedClient(c) - s.deleteTarget("foo.txt") - var dest testDestination - c.Assert(client.Download("foo.txt", &dest), Equals, ErrNotFound{"foo.txt"}) - c.Assert(dest.deleted, Equals, true) -} - -func (s *ClientSuite) TestDownloadOK(c *C) { - client := s.updatedClient(c) - // the filename is normalized if necessary - for _, name := range []string{"/foo.txt", "foo.txt"} { - var dest testDestination - c.Assert(client.Download(name, &dest), IsNil) - c.Assert(dest.deleted, Equals, false) - c.Assert(dest.String(), Equals, "foo") - } -} - -func (s *ClientSuite) TestDownloadWrongSize(c *C) { - client := s.updatedClient(c) - // Update with a file that's incorrect size. - s.setRemoteTarget("foo.txt", []byte("wrong-size")) - var dest testDestination - c.Assert(client.Download("foo.txt", &dest), DeepEquals, ErrWrongSize{"foo.txt", 10, 3}) - c.Assert(dest.deleted, Equals, true) -} - -func (s *ClientSuite) TestDownloadTargetTooLong(c *C) { - client := s.updatedClient(c) - s.setRemoteTarget("foo.txt", []byte("foo-ooo")) - var dest testDestination - c.Assert(client.Download("foo.txt", &dest), DeepEquals, ErrWrongSize{"foo.txt", 7, 3}) - c.Assert(dest.deleted, Equals, true) -} - -func (s *ClientSuite) TestDownloadTargetTooShort(c *C) { - client := s.updatedClient(c) - s.setRemoteTarget("foo.txt", []byte("fo")) - var dest testDestination - c.Assert(client.Download("foo.txt", &dest), DeepEquals, ErrWrongSize{"foo.txt", 2, 3}) - c.Assert(dest.deleted, Equals, true) -} - -func (s *ClientSuite) TestDownloadTargetCorruptData(c *C) { - client := s.updatedClient(c) - s.setRemoteTarget("foo.txt", []byte("ooo")) - var dest testDestination - assertWrongHash(c, client.Download("foo.txt", &dest)) - c.Assert(dest.deleted, Equals, true) -} - -func (s *ClientSuite) TestAvailableTargets(c *C) { - client := s.updatedClient(c) - files, err := client.Targets() - c.Assert(err, IsNil) - assertFiles(c, files, []string{"foo.txt"}) - - s.addRemoteTarget(c, "bar.txt") - s.addRemoteTarget(c, "baz.txt") - _, err = client.Update() - c.Assert(err, IsNil) - files, err = client.Targets() - c.Assert(err, IsNil) - assertFiles(c, files, []string{"foo.txt", "bar.txt", "baz.txt"}) -} - -func (s *ClientSuite) TestAvailableTarget(c *C) { - client := s.updatedClient(c) - - target, err := client.Target("foo.txt") - c.Assert(err, IsNil) - assertFile(c, target, "foo.txt") - - target, err = client.Target("/foo.txt") - c.Assert(err, IsNil) - assertFile(c, target, "foo.txt") - - _, err = client.Target("bar.txt") - c.Assert(err, Equals, ErrNotFound{"bar.txt"}) - - _, err = client.Target("/bar.txt") - c.Assert(err, Equals, ErrNotFound{"/bar.txt"}) -} - -func (s *ClientSuite) TestUnknownKeyIDs(c *C) { - // get local root.json - meta, err := s.store.GetMeta() - c.Assert(err, IsNil) - - rootJSON, ok := meta["root.json"] - c.Assert(ok, Equals, true) - - var root struct { - Signed data.Root `json:"signed"` - Signatures []data.Signature `json:"signatures"` - } - c.Assert(json.Unmarshal(rootJSON, &root), IsNil) - - // update remote root.json to add a new key with an unknown id - signer, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - - root.Signed.Keys["unknown-key-id"] = signer.PublicData() - - // re-sign the root metadata, then commit it back into the store. - signingKeys, err := s.store.GetSigners("root") - c.Assert(err, IsNil) - - signedRoot, err := sign.Marshal(root.Signed, signingKeys...) - c.Assert(err, IsNil) - - rootJSON, err = cjson.EncodeCanonical(signedRoot) - c.Assert(err, IsNil) - - s.store.SetMeta("root.json", rootJSON) - s.store.Commit(false, nil, nil) - s.syncRemote(c) - - // FIXME(TUF-0.9) We need this for now because the client still uses - // the TUF-0.9 update workflow, where we decide to update the root - // metadata when we observe a new root through the snapshot. - repo, err := tuf.NewRepo(s.store) - c.Assert(err, IsNil) - c.Assert(repo.Snapshot(), IsNil) - c.Assert(repo.Timestamp(), IsNil) - c.Assert(repo.Commit(), IsNil) - s.syncRemote(c) - - // Make sure the client can update with the unknown keyid. - client := s.newClient(c) - _, err = client.Update() - c.Assert(err, IsNil) -} - -func generateRepoFS(c *C, dir string, files map[string][]byte, consistentSnapshot bool) *tuf.Repo { - repo, err := tuf.NewRepo(tuf.FileSystemStore(dir, nil)) - c.Assert(err, IsNil) - if !consistentSnapshot { - c.Assert(repo.Init(false), IsNil) - } - for _, role := range []string{"root", "snapshot", "targets", "timestamp"} { - _, err := repo.GenKey(role) - c.Assert(err, IsNil) - } - for file, data := range files { - path := filepath.Join(dir, "staged", "targets", file) - c.Assert(os.MkdirAll(filepath.Dir(path), 0755), IsNil) - c.Assert(os.WriteFile(path, data, 0644), IsNil) - c.Assert(repo.AddTarget(file, nil), IsNil) - } - c.Assert(repo.Snapshot(), IsNil) - c.Assert(repo.Timestamp(), IsNil) - c.Assert(repo.Commit(), IsNil) - return repo -} - -func (s *ClientSuite) TestVerifyDigest(c *C) { - digest := "sha256:bc11b176a293bb341a0f2d0d226f52e7fcebd186a7c4dfca5fc64f305f06b94c" - hash := "bc11b176a293bb341a0f2d0d226f52e7fcebd186a7c4dfca5fc64f305f06b94c" - size := int64(42) - - c.Assert(s.repo.AddTargetsWithDigest(hash, "sha256", size, digest, nil), IsNil) - c.Assert(s.repo.Snapshot(), IsNil) - c.Assert(s.repo.Timestamp(), IsNil) - c.Assert(s.repo.Commit(), IsNil) - s.syncRemote(c) - - client := s.newClient(c) - _, err := client.Update() - c.Assert(err, IsNil) - - c.Assert(client.VerifyDigest(hash, "sha256", size, digest), IsNil) -} - -type StateLessSuite struct{} - -var _ = Suite(&StateLessSuite{}) - -func (s *StateLessSuite) TestRejectsMultiSignaturesSameKeyDifferentIDs(c *C) { - // In this test Alice and Bob want to create a TUF repo - // where a root key rotation would require both their signatures. - // Alice uses an old version of Go-TUF where each key gets assigned several IDs. - // Bob uses a modern version of Go-TUF that does not produce the same list of IDs for a same key. - // This test checks that the TUF client - // will not accept a root rotation - // signed twice with Alice's key with different key IDs each time. - // This test was failing with https://github.com/theupdateframework/go-tuf/tree/ac7b5d7bce18cca5a84a28b021bd6372f450b35b - // because the signature verification code was assuming that the key IDs used in the metadata - // were the same as the one the TUF library of the client would generate, - // breaking the security of threshold signatures. - - // The attack works just the same if Alice is malicious from the beginning - // and convinces Bob to sign an initial "root.json" - // with additional key IDs for her only key, - // but this scenario show that the vulnerability can even impact situations - // where Alice is not malicious at all, - // she was simply using an old client and an attacker stole her key. - // The purpose of threshold signatures in TUF is precisely - // to make sure that an attacker cannot forge signatures - // if they did not steal a large enough number of keys. - - alice, err := keys.GenerateEd25519Key() - if err != nil { - panic(err) - } - - root := data.NewRoot() - root.Version = 1 - root.Roles["root"] = &data.Role{ - KeyIDs: []string{}, - Threshold: 2, // Note the threshold - } - - // reproduces how IDs were computed in - // https://github.com/theupdateframework/go-tuf/blob/8e84384bebe3/data/types.go#L50 - oldTUFIDs := func(k *data.PublicKey) []string { - bytes, _ := cjson.EncodeCanonical(k) - digest := sha256.Sum256(bytes) - ids := []string{hex.EncodeToString(digest[:])} - - if k.Scheme != "" || len(k.Algorithms) != 0 { - bytes, _ = cjson.EncodeCanonical(&data.PublicKey{ - Type: k.Type, - Value: k.Value, - }) - digest = sha256.Sum256(bytes) - ids = append(ids, hex.EncodeToString(digest[:])) - } - - return ids - } - - // Alice adds her key using an old version of go-tuf - // which will use several IDs - for _, keyID := range oldTUFIDs(alice.PublicData()) { - root.Keys[keyID] = alice.PublicData() - root.Roles["root"].KeyIDs = append(root.Roles["root"].KeyIDs, keyID) - } - - bob, err := keys.GenerateEd25519Key() - if err != nil { - panic(err) - } - - root.AddKey(bob.PublicData()) - root.Roles["root"].KeyIDs = append( - root.Roles["root"].KeyIDs, - bob.PublicData().IDs()..., - ) - - // signer for the other roles, not important - delegatedSigner, _ := keys.GenerateEd25519Key() - root.AddKey(delegatedSigner.PublicData()) - for _, role := range []string{"targets", "snapshot", "timestamp"} { - root.Roles[role] = &data.Role{ - KeyIDs: delegatedSigner.PublicData().IDs(), - Threshold: 1, - } - } - - signedRoot, err := sign.Marshal(root, alice, bob) - c.Assert(err, IsNil) - rootJSON, err := json.Marshal(signedRoot) - c.Assert(err, IsNil) - - // producing evil root using only Alice's key - - evilRoot := root - evilRoot.Version = 2 - - canonical, err := cjson.EncodeCanonical(evilRoot) - c.Assert(err, IsNil) - sig, err := alice.SignMessage(canonical) - c.Assert(err, IsNil) - signedEvilRoot := &data.Signed{ - Signed: canonical, - Signatures: make([]data.Signature, 0), - } - for _, keyID := range oldTUFIDs(alice.PublicData()) { - signedEvilRoot.Signatures = append(signedEvilRoot.Signatures, data.Signature{ - Signature: sig, - KeyID: keyID, - }) - } - evilRootJSON, err := json.Marshal(signedEvilRoot) - c.Assert(err, IsNil) - - // checking that client does not accept root rotation - // to evil root - - localStore := MemoryLocalStore() - err = localStore.SetMeta("root.json", rootJSON) - c.Assert(err, IsNil) - - remoteStore := newFakeRemoteStore() - remoteStore.meta["2.root.json"] = newFakeFile(evilRootJSON) - - client := NewClient(localStore, remoteStore) - - err = client.UpdateRoots() - if err != nil { - c.Assert(err, DeepEquals, verify.ErrRoleThreshold{Expected: 2, Actual: 1}) - } else { - c.Fatalf("client returned no error when updating with evil root") - } -} diff --git a/client/delegations.go b/client/delegations.go deleted file mode 100644 index cc0fc482..00000000 --- a/client/delegations.go +++ /dev/null @@ -1,152 +0,0 @@ -package client - -import ( - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/targets" - "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. -func (c *Client) getTargetFileMeta(target string) (data.TargetFileMeta, error) { - snapshot, err := c.loadLocalSnapshot() - if err != nil { - return data.TargetFileMeta{}, err - } - - targetFileMeta, _, err := c.getTargetFileMetaDelegationPath(target, snapshot) - if err != nil { - return data.TargetFileMeta{}, err - } - return targetFileMeta, nil -} - -// getTargetFileMetaDelegationPath searches for a verified TargetFileMeta matching a target -// Requires snapshot to be passed and is locked to that specific snapshot versions. -// Searches through delegated targets following TUF spec 1.0.19 section 5.6. -func (c *Client) getTargetFileMetaDelegationPath(target string, snapshot *data.Snapshot) (data.TargetFileMeta, []string, error) { - // 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, err := targets.NewDelegationsIterator(target, c.db) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - - targetFileMeta := data.TargetFileMeta{} - delegationRole := "" - - for i := 0; i < c.MaxDelegations; i++ { - d, ok := delegations.Next() - if !ok { - return data.TargetFileMeta{}, nil, ErrUnknownTarget{target, snapshot.Version} - } - - // covers 5.6.{1,2,3,4,5,6} - targets, err := c.loadDelegatedTargets(snapshot, d.Delegatee.Name, d.DB) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - - // stop when the searched TargetFileMeta is found - if m, ok := targets.Targets[target]; ok { - delegationRole = d.Delegatee.Name - targetFileMeta = m - break - } - - if targets.Delegations != nil { - delegationsDB, err := verify.NewDBFromDelegations(targets.Delegations) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - err = delegations.Add(targets.Delegations.Roles, d.Delegatee.Name, delegationsDB) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - } - } - - if len(delegationRole) > 0 { - return targetFileMeta, buildPath(delegations.Parent, delegationRole, ""), nil - } - - return data.TargetFileMeta{}, nil, ErrMaxDelegations{ - Target: target, - MaxDelegations: c.MaxDelegations, - SnapshotVersion: snapshot.Version, - } -} - -func buildPath(parent func(string) string, start string, end string) []string { - if start == end { - return nil - } - - path := []string{start} - current := start - for { - current = parent(current) - if current == end { - break - } - path = append(path, current) - } - return path -} - -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, db *verify.DB) (*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 - // 5.6.4 check against snapshot version - 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 - err = db.Unmarshal(raw, targets, role, fileMeta.Version) - if err != nil { - return nil, ErrDecodeFailed{fileName, err} - } - - // 5.6.6 persist - if !alreadyStored { - if err := c.local.SetMeta(fileName, raw); err != nil { - return nil, err - } - } - return targets, nil -} diff --git a/client/delegations_test.go b/client/delegations_test.go deleted file mode 100644 index cbfc8525..00000000 --- a/client/delegations_test.go +++ /dev/null @@ -1,340 +0,0 @@ -package client - -import ( - "crypto/sha256" - "encoding/json" - "fmt" - "io" - "net" - "net/http" - "os" - "strings" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/util" - "github.com/theupdateframework/go-tuf/verify" -) - -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) - hash := sha256.Sum256([]byte("Contents: f.txt")) - assert.Equal(t, data.HexBytes(hash[:]), f.Hashes["sha256"]) - - f, err = c.getTargetFileMeta("targets.txt") - assert.Nil(t, err) - hash = sha256.Sum256([]byte("Contents: targets.txt")) - assert.Equal(t, data.HexBytes(hash[:]), f.Hashes["sha256"]) -} - -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 int64 - } - var persistedTests = []struct { - file string - targets []expectedTargets - downloadError error - targetError error - fileContent string - }{ - { - file: "unknown", - targets: []expectedTargets{ - { - name: "targets.json", - version: 2, - }, - }, - downloadError: ErrUnknownTarget{Name: "unknown", SnapshotVersion: 2}, - targetError: ErrNotFound{File: "unknown"}, - fileContent: "", - }, - { - file: "b.txt", - targets: []expectedTargets{ - { - name: "targets.json", - version: 2, - }, - { - name: "a.json", - version: 1, - }, - { - name: "b.json", - version: 1, - }, - }, - downloadError: nil, - targetError: 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, - targetError: 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()) - - target, err := c.Target(tt.file) - assert.Equal(t, tt.targetError, err) - if tt.targetError == nil { - meta, err := util.GenerateTargetFileMeta(strings.NewReader(tt.fileContent), target.HashAlgorithms()...) - assert.Nil(t, err) - assert.Nil(t, util.TargetFileMetaEqual(target, meta)) - } - - p, err := c.local.GetMeta() - assert.Nil(t, err) - persisted := copyStore(p) - persistedLocal := copyStore(c.localMeta) - // trim non targets metas - for _, notTargets := range []string{"root.json", "snapshot.json", "timestamp.json"} { - delete(persisted, notTargets) - delete(persistedLocal, notTargets) - } - for _, targets := range tt.targets { - // Test local store - storedVersion, err := versionOfStoredTargets(targets.name, persisted) - assert.Equal(t, targets.version, storedVersion) - assert.Nil(t, err) - delete(persisted, targets.name) - - // Test localMeta - storedVersion, err = versionOfStoredTargets(targets.name, persistedLocal) - assert.Equal(t, targets.version, storedVersion) - assert.Nil(t, err) - delete(persistedLocal, targets.name) - } - assert.Empty(t, persisted) - assert.Empty(t, persistedLocal) - }) - } -} - -func TestGetDelegationPathWithNoTargetFile(t *testing.T) { - // In this test, we have created a target file c.txt for a delegation - // c.json, then we remove that target file and check if c.json is loaded - // in the localMeta. It shouldn't as it has no target file at all and shouldn't - // be used. - verify.IsExpired = func(t time.Time) bool { return false } - client, closer := initTestDelegationClient(t, "testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation") - defer closer() - _, err := client.Update() - assert.Nil(t, err) - - err = client.getLocalMeta() - assert.Nil(t, err) - - _, ok := client.localMeta["a.json"] - assert.True(t, ok) - - _, ok = client.localMeta["b.json"] - assert.True(t, ok) - - _, ok = client.localMeta["c.json"] - assert.False(t, ok) -} - -func versionOfStoredTargets(name string, store map[string]json.RawMessage) (int64, 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) - assert.Nil(t, err) - - c := NewClient(MemoryLocalStore(), remote) - rawFile, err := os.ReadFile(initialStateDir + "/" + "root.json") - assert.Nil(t, err) - assert.Nil(t, c.Init(rawFile)) - files, err := os.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, ".")) < 3 && strings.HasSuffix(name, ".json") { - rawFile, err := os.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 deleted file mode 100644 index 3e7a5dcc..00000000 --- a/client/errors.go +++ /dev/null @@ -1,107 +0,0 @@ -package client - -import ( - "errors" - "fmt" -) - -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 { - Name string -} - -func (e ErrMissingRemoteMetadata) Error() string { - return fmt.Sprintf("tuf: missing remote metadata %s", e.Name) -} - -type ErrDownloadFailed struct { - File string - Err error -} - -func (e ErrDownloadFailed) Error() string { - return fmt.Sprintf("tuf: failed to download %s: %s", e.File, e.Err) -} - -type ErrDecodeFailed struct { - File string - Err error -} - -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 int64 -} - -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) -} - -type ErrNotFound struct { - File string -} - -func (e ErrNotFound) Error() string { - return fmt.Sprintf("tuf: file not found: %s", e.File) -} - -func IsNotFound(err error) bool { - _, ok := err.(ErrNotFound) - return ok -} - -type ErrWrongSize struct { - File string - Actual int64 - Expected int64 -} - -func (e ErrWrongSize) Error() string { - return fmt.Sprintf("tuf: unexpected file size: %s (expected %d bytes, got %d bytes)", e.File, e.Expected, e.Actual) -} - -type ErrUnknownTarget struct { - Name string - SnapshotVersion int64 -} - -func (e ErrUnknownTarget) Error() string { - return fmt.Sprintf("tuf: unknown target file: %s with snapshot version %d", e.Name, e.SnapshotVersion) -} - -type ErrMetaTooLarge struct { - Name string - Size int64 - MaxSize int64 -} - -func (e ErrMetaTooLarge) Error() string { - return fmt.Sprintf("tuf: %s size %d bytes greater than maximum %d bytes", e.Name, e.Size, e.MaxSize) -} - -type ErrInvalidURL struct { - URL string -} - -func (e ErrInvalidURL) Error() string { - return fmt.Sprintf("tuf: invalid repository URL %s", e.URL) -} - -type ErrRoleNotInSnapshot struct { - Role string - SnapshotVersion int64 -} - -func (e ErrRoleNotInSnapshot) Error() string { - return fmt.Sprintf("tuf: role %s not in snapshot version %d", e.Role, e.SnapshotVersion) -} diff --git a/client/file_store.go b/client/file_store.go deleted file mode 100644 index 520bbe73..00000000 --- a/client/file_store.go +++ /dev/null @@ -1,90 +0,0 @@ -package client - -import ( - "bytes" - "errors" - "fmt" - "io" - "io/fs" -) - -// FileRemoteStore provides a RemoteStore interface compatible -// implementation that can be used where the RemoteStore is backed by a -// fs.FS. This is useful for example in air-gapped environments where there's no -// possibility to make outbound network connections. -// By having this be a fs.FS instead of directories allows the repository to -// be backed by something that's not persisted to disk. -func NewFileRemoteStore(fsys fs.FS, targetDir string) (*FileRemoteStore, error) { - if fsys == nil { - return nil, errors.New("nil fs.FS") - } - t := targetDir - if t == "" { - t = "targets" - } - // Make sure directory exists - d, err := fsys.Open(t) - if err != nil { - return nil, fmt.Errorf("failed to open targets directory %s: %w", t, err) - } - fi, err := d.Stat() - if err != nil { - return nil, fmt.Errorf("failed to stat targets directory %s: %w", t, err) - } - if !fi.IsDir() { - return nil, fmt.Errorf("targets directory not a directory %s", t) - } - - fsysT, err := fs.Sub(fsys, t) - if err != nil { - return nil, fmt.Errorf("failed to open targets directory %s: %w", t, err) - } - return &FileRemoteStore{fsys: fsys, targetDir: fsysT}, nil -} - -type FileRemoteStore struct { - // Meta directory fs - fsys fs.FS - // Target directory fs. - targetDir fs.FS - // In order to be able to make write operations (create, delete) we can't - // use fs.FS for it (it's read only), so we have to know the underlying - // directory that add/delete test methods can use. This is only necessary - // for testing purposes. - testDir string -} - -func (f *FileRemoteStore) GetMeta(name string) (io.ReadCloser, int64, error) { - rc, b, err := f.get(f.fsys, name) - return handleErrors(name, rc, b, err) -} - -func (f *FileRemoteStore) GetTarget(name string) (io.ReadCloser, int64, error) { - rc, b, err := f.get(f.targetDir, name) - return handleErrors(name, rc, b, err) -} - -func (f *FileRemoteStore) get(fsys fs.FS, s string) (io.ReadCloser, int64, error) { - if !fs.ValidPath(s) { - return nil, 0, fmt.Errorf("invalid path %s", s) - } - - b, err := fs.ReadFile(fsys, s) - if err != nil { - return nil, -1, err - } - return io.NopCloser(bytes.NewReader(b)), int64(len(b)), nil -} - -// handleErrors converts NotFound errors to something that TUF knows how to -// handle properly. For example, when looking for n+1 root files, this is a -// signal that it will stop looking. -func handleErrors(name string, rc io.ReadCloser, b int64, err error) (io.ReadCloser, int64, error) { - if err == nil { - return rc, b, err - } - if errors.Is(err, fs.ErrNotExist) { - return rc, b, ErrNotFound{name} - } - return rc, b, err -} diff --git a/client/file_store_test.go b/client/file_store_test.go deleted file mode 100644 index 95e02e38..00000000 --- a/client/file_store_test.go +++ /dev/null @@ -1,197 +0,0 @@ -package client - -import ( - "bytes" - "io" - "io/fs" - "os" - "path/filepath" - "runtime" - "strings" - "testing" -) - -const targetsDir = "targets" - -func TestCreates(t *testing.T) { - runningWindows := false - if runtime.GOOS == "windows" { - runningWindows = true - } - tmpDir := t.TempDir() - defer os.RemoveAll(tmpDir) - dir := filepath.Join(tmpDir, "repository") - os.Mkdir(dir, os.ModePerm) - os.Mkdir(filepath.Join(dir, "targets"), os.ModePerm) - if !runningWindows { - targetDirThatIsFile := filepath.Join(dir, "targets-that-isfile") - f, err := os.Create(targetDirThatIsFile) - if err != nil { - t.Fatalf("failed to create file: %s: %v", targetDirThatIsFile, err) - } - defer f.Close() - } - t.Cleanup(func() { rmrf(dir, t.Logf) }) - t.Cleanup(func() { rmrf(tmpDir, t.Logf) }) - - tests := []struct { - name string - fsys fs.FS - td string - wantErr string - doNotRunOnWindows bool - }{{ - name: "nil, error", - wantErr: "nil fs.FS", - }, { - name: "missing targets directory", - fsys: os.DirFS(dir), - td: "targets-not-there", - wantErr: "failed to open targets directory targets-not-there", - }, { - name: "targets directory is not a file", - fsys: os.DirFS(dir), - td: "targets-that-isfile", - wantErr: "targets directory not a directory targets-that-isfile", - doNotRunOnWindows: true, - }, { - name: "works, explicit targets", - fsys: os.DirFS(dir), - td: "targets", - }, { - name: "works, explicit targets", - fsys: os.DirFS(dir), - td: "targets", - }} - - for _, tc := range tests { - if tc.doNotRunOnWindows { - t.Skip("Can't figure out how to make this work on windows") - } - _, err := NewFileRemoteStore(tc.fsys, tc.td) - if tc.wantErr != "" && err == nil { - t.Errorf("%q wanted error %s, got none", tc.name, tc.wantErr) - } else if tc.wantErr == "" && err != nil { - t.Errorf("%q did not want error, got: %v", tc.name, err) - } else if err != nil && !strings.Contains(err.Error(), tc.wantErr) { - t.Errorf("%q wanted error %s but got: %s", tc.name, tc.wantErr, err) - } - } -} - -func TestBasicOps(t *testing.T) { - metas := map[string][]byte{ - "root.json": []byte("root"), - "snapshot.json": []byte("snapshot"), - "timestamp": []byte("timestamp"), - } - - fsys, dir, err := newTestFileStoreFS() - if err != nil { - t.Fatalf("Failed to create test FileStore") - } - t.Cleanup(func() { rmrf(dir, t.Logf) }) - defer os.RemoveAll(dir) - - // Add targets and metas and check them. - for k, v := range targetFiles { - if err := fsys.addTarget(k, v); err != nil { - t.Errorf("failed to add target %s: %v", k, err) - } - rc, size, err := fsys.GetTarget(k) - if err != nil { - t.Errorf("failed to GetTarget %s: %v", k, err) - } - if size != int64(len(v)) { - t.Errorf("unexpected size returned for GetTarget: %s want %d got %d", k, len(v), size) - } - got, err := io.ReadAll(rc) - if err != nil { - t.Errorf("failed to ReadAll returned ReacCloser %s: %v", k, err) - } - if !bytes.Equal(v, got) { - t.Errorf("Read unexpected bytes, want: %s got: %s", string(k), string(got)) - } - } - for k, v := range metas { - if err := fsys.addMeta(k, v); err != nil { - t.Errorf("failed to add meta %s %v", k, err) - } - rc, size, err := fsys.GetMeta(k) - if err != nil { - t.Errorf("failed to GetMeta %s: %v", k, err) - } - if size != int64(len(v)) { - t.Errorf("unexpected size returned for GetMeta: %s want %d got %d", k, len(v), size) - } - got, err := io.ReadAll(rc) - if err != nil { - t.Errorf("failed to ReadAll returned ReacCloser %s: %v", k, err) - } - if !bytes.Equal(v, got) { - t.Errorf("Read unexpected bytes, want: %s got: %s", string(k), string(got)) - } - } -} - -// Test helper methods -func (f *FileRemoteStore) addMeta(name string, data []byte) error { - return os.WriteFile(filepath.Join(f.testDir, name), data, os.ModePerm) -} - -func (f *FileRemoteStore) addTarget(name string, data []byte) error { - fname := filepath.Join(f.testDir, targetsDir, name) - err := os.WriteFile(fname, data, os.ModePerm) - return err -} - -func (f *FileRemoteStore) deleteMeta(name string) error { - return os.Remove(filepath.Join(f.testDir, name)) -} - -func (f *FileRemoteStore) deleteTarget(name string) error { - return os.Remove(filepath.Join(f.testDir, targetsDir, name)) -} - -func newTestFileStoreFS() (*FileRemoteStore, string, error) { - tmpDir := os.TempDir() - tufDir := filepath.Join(tmpDir, "tuf-file-store-test") - // Clean it in case there is cruft left around - os.RemoveAll(tufDir) - os.Mkdir(tufDir, os.ModePerm) - os.Mkdir(filepath.Join(tufDir, targetsDir), os.ModePerm) - fs, err := NewFileRemoteStore(os.DirFS(tufDir), targetsDir) - fs.testDir = tufDir - return fs, tufDir, err -} - -// goes through a dir and removes everything. This is to work around: -// https://github.com/golang/go/issues/51442 -func rmrf(dir string, logger func(string, ...interface{})) { - if dir == "" { - logger("cowardly refusing to remove a not fully specified fir") - return - } - logger("Removing %s", dir) - d, err := os.Open(dir) - if err != nil { - logger("Failed to open %s: %v", dir, err) - return - } - defer d.Close() - // -1 means give me everything, we don't have that many entries, so - // fine here. - names, err := d.Readdirnames(-1) - if err != nil { - logger("Failed to ReaddirNames %s: %v", dir, err) - return - } - for _, name := range names { - toRemove := filepath.Join(dir, name) - err = os.RemoveAll(toRemove) - if err != nil { - logger("Failed to RemoveAll %s: %v", toRemove, err) - // Do not want to fail here, just keep doing the best we can - } - } -} diff --git a/client/filejsonstore/filejsonstore.go b/client/filejsonstore/filejsonstore.go deleted file mode 100644 index 41277c88..00000000 --- a/client/filejsonstore/filejsonstore.go +++ /dev/null @@ -1,148 +0,0 @@ -package client - -import ( - "encoding/json" - "errors" - "fmt" - "io/fs" - "os" - "path/filepath" - "sync" - - "github.com/theupdateframework/go-tuf/client" - "github.com/theupdateframework/go-tuf/internal/fsutil" - "github.com/theupdateframework/go-tuf/util" -) - -const ( - // user: rwx - // group: r-x - // other: --- - dirCreateMode = os.FileMode(0750) - // user: rw- - // group: r-- - // other: --- - fileCreateMode = os.FileMode(0640) -) - -// FileJSONStore represents a local metadata cache relying on raw JSON files -// as retrieved from the remote repository. -type FileJSONStore struct { - mtx sync.RWMutex - baseDir string -} - -var _ client.LocalStore = (*FileJSONStore)(nil) - -// NewFileJSONStore returns a new metadata cache, implemented using raw JSON -// files, stored in a directory provided by the client. -// If the provided directory does not exist on disk, it will be created. -// The provided metadata cache is safe for concurrent access. -func NewFileJSONStore(baseDir string) (*FileJSONStore, error) { - f := &FileJSONStore{ - baseDir: baseDir, - } - - // Does the directory exist? - fi, err := os.Stat(baseDir) - if err != nil { - if errors.Is(err, fs.ErrNotExist) { - // Create the directory - if err = os.MkdirAll(baseDir, dirCreateMode); err != nil { - return nil, fmt.Errorf("error creating directory for metadata cache: %w", err) - } - } else { - return nil, fmt.Errorf("error getting FileInfo for %s: %w", baseDir, err) - } - } else { - // Verify that it is a directory - if !fi.IsDir() { - return nil, fmt.Errorf("can not open %s, not a directory", baseDir) - } - // Verify file mode is not too permissive. - if err = fsutil.EnsureMaxPermissions(fi, dirCreateMode); err != nil { - return nil, err - } - } - - return f, nil -} - -// GetMeta returns the currently cached set of metadata files. -func (f *FileJSONStore) GetMeta() (map[string]json.RawMessage, error) { - f.mtx.RLock() - defer f.mtx.RUnlock() - - names, err := os.ReadDir(f.baseDir) - if err != nil { - return nil, fmt.Errorf("error reading directory %s: %w", f.baseDir, err) - } - - meta := map[string]json.RawMessage{} - for _, name := range names { - ok, err := fsutil.IsMetaFile(name) - if err != nil { - return nil, err - } - if !ok { - continue - } - - // Verify permissions - info, err := name.Info() - if err != nil { - return nil, fmt.Errorf("error retrieving FileInfo for %s: %w", name.Name(), err) - } - if err = fsutil.EnsureMaxPermissions(info, fileCreateMode); err != nil { - return nil, err - } - - p := filepath.Join(f.baseDir, name.Name()) - b, err := os.ReadFile(p) - if err != nil { - return nil, fmt.Errorf("error reading file %s: %w", name.Name(), err) - } - meta[name.Name()] = b - } - - return meta, nil -} - -// SetMeta stores a metadata file in the cache. If the metadata file exist, -// it will be overwritten. -func (f *FileJSONStore) SetMeta(name string, meta json.RawMessage) error { - f.mtx.Lock() - defer f.mtx.Unlock() - - if filepath.Ext(name) != ".json" { - return fmt.Errorf("file %s is not a JSON file", name) - } - - p := filepath.Join(f.baseDir, name) - err := util.AtomicallyWriteFile(p, meta, fileCreateMode) - return err -} - -// DeleteMeta deletes a metadata file from the cache. -// If the file does not exist, an *os.PathError is returned. -func (f *FileJSONStore) DeleteMeta(name string) error { - f.mtx.Lock() - defer f.mtx.Unlock() - - if filepath.Ext(name) != ".json" { - return fmt.Errorf("file %s is not a JSON file", name) - } - - p := filepath.Join(f.baseDir, name) - err := os.Remove(p) - if err == nil { - return nil - } - - return fmt.Errorf("error deleting file %s: %w", name, err) -} - -// Close closes the metadata cache. This is a no-op. -func (f *FileJSONStore) Close() error { - return nil -} diff --git a/client/filejsonstore/filejsonstore_test.go b/client/filejsonstore/filejsonstore_test.go deleted file mode 100644 index 6d00e046..00000000 --- a/client/filejsonstore/filejsonstore_test.go +++ /dev/null @@ -1,194 +0,0 @@ -package client - -import ( - "encoding/json" - "errors" - "os" - "path/filepath" - "strings" - "testing" - - "gopkg.in/check.v1" -) - -type FileJSONStoreSuite struct{} - -var _ = check.Suite(&FileJSONStoreSuite{}) - -// Hook up gocheck into the "go test" runner -func Test(t *testing.T) { check.TestingT(t) } - -func (FileJSONStoreSuite) TestNewOk(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - - // Assert path does not exist - fi, err := os.Stat(p) - c.Assert(fi, check.IsNil) - c.Assert(errors.Is(err, os.ErrNotExist), check.Equals, true) - - // Create implementation - s, err := NewFileJSONStore(p) - c.Assert(err, check.IsNil) - c.Assert(s, check.NotNil) - - // Assert path does exist and is a directory - fi, err = os.Stat(p) - c.Assert(fi, check.NotNil) - c.Assert(err, check.IsNil) - c.Assert(fi.IsDir(), check.Equals, true) -} - -func (FileJSONStoreSuite) TestNewFileExists(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - - // Create an empty file - f, err := os.Create(p) - c.Assert(err, check.IsNil) - f.Close() - - // Create implementation - s, err := NewFileJSONStore(p) - c.Assert(s, check.IsNil) - c.Assert(err, check.NotNil) - found := strings.Contains(err.Error(), ", not a directory") - c.Assert(found, check.Equals, true) -} - -func (FileJSONStoreSuite) TestNewDirectoryExists(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - - err := os.Mkdir(p, 0750) - c.Assert(err, check.IsNil) - - // Create implementation - s, err := NewFileJSONStore(p) - c.Assert(s, check.NotNil) - c.Assert(err, check.IsNil) -} - -func (FileJSONStoreSuite) TestGetMetaEmpty(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(err, check.IsNil) - - md, err := s.GetMeta() - c.Assert(err, check.IsNil) - c.Assert(md, check.HasLen, 0) -} - -func (FileJSONStoreSuite) TestGetNoDirectory(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(err, check.IsNil) - - err = os.Remove(p) - c.Assert(err, check.IsNil) - - md, err := s.GetMeta() - c.Assert(md, check.IsNil) - c.Assert(err, check.NotNil) -} - -func (FileJSONStoreSuite) TestMetadataOperations(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(err, check.IsNil) - - expected := map[string]json.RawMessage{ - "file1.json": []byte{0xf1, 0xe1, 0xd1}, - "file2.json": []byte{0xf2, 0xe2, 0xd2}, - "file3.json": []byte{0xf3, 0xe3, 0xd3}, - } - - for k, v := range expected { - err := s.SetMeta(k, v) - c.Assert(err, check.IsNil) - } - - md, err := s.GetMeta() - c.Assert(err, check.IsNil) - c.Assert(md, check.HasLen, 3) - c.Assert(md, check.DeepEquals, expected) - - // Delete all items - count := 3 - for k := range expected { - err = s.DeleteMeta(k) - c.Assert(err, check.IsNil) - - md, err := s.GetMeta() - c.Assert(err, check.IsNil) - - count-- - c.Assert(md, check.HasLen, count) - } - - md, err = s.GetMeta() - c.Assert(err, check.IsNil) - c.Assert(md, check.HasLen, 0) -} - -func (FileJSONStoreSuite) TestGetNoJSON(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(s, check.NotNil) - c.Assert(err, check.IsNil) - - // Create a file which does not end with '.json' - fp := filepath.Join(p, "meta.xml") - err = os.WriteFile(fp, []byte{}, 0644) - c.Assert(err, check.IsNil) - - md, err := s.GetMeta() - c.Assert(err, check.IsNil) - c.Assert(md, check.HasLen, 0) -} - -func (FileJSONStoreSuite) TestNoJSON(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(s, check.NotNil) - c.Assert(err, check.IsNil) - - files := []string{ - "file.xml", - "file", - "", - } - for _, f := range files { - err := s.SetMeta(f, []byte{}) - c.Assert(err, check.ErrorMatches, "file.*is not a JSON file") - } -} - -func (FileJSONStoreSuite) TestClose(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(s, check.NotNil) - c.Assert(err, check.IsNil) - - err = s.Close() - c.Assert(err, check.IsNil) -} - -func (FileJSONStoreSuite) TestDelete(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(s, check.NotNil) - c.Assert(err, check.IsNil) - - err = s.DeleteMeta("not_json.yml") - c.Assert(err, check.ErrorMatches, "file not_json\\.yml is not a JSON file") - err = s.DeleteMeta("non_existing.json") - c.Assert(errors.Is(err, os.ErrNotExist), check.Equals, true) -} diff --git a/client/filejsonstore/perm_test.go b/client/filejsonstore/perm_test.go deleted file mode 100644 index cda58c43..00000000 --- a/client/filejsonstore/perm_test.go +++ /dev/null @@ -1,54 +0,0 @@ -//go:build !windows -// +build !windows - -package client - -import ( - "os" - "path/filepath" - - "gopkg.in/check.v1" -) - -func (FileJSONStoreSuite) TestNewDirectoryExistsWrongPerm(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - - err := os.Mkdir(p, 0750) - c.Assert(err, check.IsNil) - - // Modify the directory permission and try again - err = os.Chmod(p, 0751) - c.Assert(err, check.IsNil) - s, err := NewFileJSONStore(p) - c.Assert(s, check.IsNil) - c.Assert(err, check.ErrorMatches, "permission bits for file tuf_raw.db failed.*") -} - -func (FileJSONStoreSuite) TestNewNoCreate(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - - // Clear the write bit for the user - err := os.Chmod(tmp, 0551) - c.Assert(err, check.IsNil) - s, err := NewFileJSONStore(p) - c.Assert(s, check.IsNil) - c.Assert(err, check.NotNil) -} - -func (FileJSONStoreSuite) TestGetTooPermissive(c *check.C) { - tmp := c.MkDir() - p := filepath.Join(tmp, "tuf_raw.db") - s, err := NewFileJSONStore(p) - c.Assert(s, check.NotNil) - c.Assert(err, check.IsNil) - - fp := filepath.Join(p, "meta.json") - err = os.WriteFile(fp, []byte{}, 0644) - c.Assert(err, check.IsNil) - - md, err := s.GetMeta() - c.Assert(md, check.IsNil) - c.Assert(err, check.ErrorMatches, "permission bits for file meta.json failed.*") -} diff --git a/client/interop_test.go b/client/interop_test.go deleted file mode 100644 index 1fb4f982..00000000 --- a/client/interop_test.go +++ /dev/null @@ -1,201 +0,0 @@ -package client - -import ( - "bytes" - "fmt" - "io" - "net" - "net/http" - "os" - "path/filepath" - - "github.com/theupdateframework/go-tuf/util" - . "gopkg.in/check.v1" - - goTufGenerator "github.com/theupdateframework/go-tuf/client/testdata/go-tuf/generator" -) - -type InteropSuite struct{} - -var _ = Suite(&InteropSuite{}) - -func (InteropSuite) TestGoClientIdentityConsistentSnapshotFalse(c *C) { - checkGoIdentity(c, false) -} - -func (InteropSuite) TestGoClientIdentityConsistentSnapshotTrue(c *C) { - checkGoIdentity(c, true) -} - -func checkGoIdentity(c *C, consistentSnapshot bool) { - cwd, err := os.Getwd() - c.Assert(err, IsNil) - testDataDir := filepath.Join(cwd, "testdata") - - tempDir, err := os.MkdirTemp("", "") - c.Assert(err, IsNil) - defer os.RemoveAll(tempDir) - - // Generate the metadata and compute hashes for all the files. - goTufGenerator.Generate(tempDir, filepath.Join(testDataDir, "keys.json"), consistentSnapshot) - hashes := computeHashes(c, tempDir) - - snapshotDir := filepath.Join(testDataDir, "go-tuf", fmt.Sprintf("consistent-snapshot-%t", consistentSnapshot)) - snapshotHashes := computeHashes(c, snapshotDir) - - c.Assert(hashes, DeepEquals, snapshotHashes, Commentf("metadata out of date, regenerate by running client/testdata/go-tuf/regenerate-metadata.sh")) -} - -func computeHashes(c *C, dir string) map[string]string { - hashes := make(map[string]string) - - err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - - if info.IsDir() { - return nil - } - - bytes, err := os.ReadFile(path) - if err != nil { - return err - } - - path, err = filepath.Rel(dir, path) - if err != nil { - return err - } - hashes[path] = string(bytes) - - return nil - }) - c.Assert(err, IsNil) - - return hashes -} - -func (InteropSuite) TestGoClientCompatibility(c *C) { - names := []string{ - "go-tuf", - "go-tuf-transition-M3", - "go-tuf-transition-M4", - } - options := &HTTPRemoteOptions{MetadataPath: "", TargetsPath: "targets"} - - for _, name := range names { - for _, consistentSnapshot := range []bool{false, true} { - t := newTestCase(c, name, consistentSnapshot, options) - t.run(c) - } - } -} - -type testCase struct { - name string - consistentSnapshot bool - options *HTTPRemoteOptions - local LocalStore - targets map[string][]byte - testDir string - testSteps []string -} - -func newTestCase(c *C, name string, consistentSnapshot bool, options *HTTPRemoteOptions) testCase { - cwd, err := os.Getwd() - c.Assert(err, IsNil) - testDir := filepath.Join(cwd, "testdata", name, fmt.Sprintf("consistent-snapshot-%t", consistentSnapshot)) - - dirEntries, err := os.ReadDir(testDir) - c.Assert(err, IsNil) - c.Assert(dirEntries, Not(HasLen), 0) - - testSteps := []string{} - for _, dirEntry := range dirEntries { - if dirEntry.IsDir() { - testSteps = append(testSteps, dirEntry.Name()) - } - } - - return testCase{ - name: name, - consistentSnapshot: consistentSnapshot, - options: options, - local: MemoryLocalStore(), - targets: make(map[string][]byte), - testDir: testDir, - testSteps: testSteps, - } -} - -func (t *testCase) run(c *C) { - c.Logf("test case: %s consistent-snapshot: %t", t.name, t.consistentSnapshot) - - for _, stepName := range t.testSteps { - t.runStep(c, stepName) - } -} - -func (t *testCase) runStep(c *C, stepName string) { - c.Logf("step: %s", stepName) - - addr, cleanup := startFileServer(c, t.testDir) - defer cleanup() - - remote, err := HTTPRemoteStore(fmt.Sprintf("http://%s/%s/repository", addr, stepName), t.options, nil) - c.Assert(err, IsNil) - - client := NewClient(t.local, remote) - // initiate a client with the root metadata - ioReader, _, err := remote.GetMeta("root.json") - c.Assert(err, IsNil) - rootJsonBytes, err := io.ReadAll(ioReader) - c.Assert(err, IsNil) - c.Assert(client.Init(rootJsonBytes), IsNil) - - // check update returns the correct updated targets - files, err := client.Update() - c.Assert(err, IsNil) - if stepName != "2" { - // The rest of the test cases add one target file at a time for each cycle, so this is why we expect that - // the number of updated targets returned by Update() should equals to 1 - c.Assert(files, HasLen, 1) - } else { - // The following test case (#2) verifies that when a targets key has been rotated in the latest 3.root.json, - // the local targets.json meta is indeed ignored since it's signed with a key that has been now changed. - // The reason we check for 3 here is that the updated targets corresponds to all target files listed in the - // targets.json for test case #2 - c.Assert(files, HasLen, 3) - } - targetName := stepName - t.targets[targetName] = []byte(targetName) - - file, ok := files[targetName] - if !ok { - c.Fatalf("expected updated targets to contain %s", targetName) - } - - data := t.targets[targetName] - meta, err := util.GenerateTargetFileMeta(bytes.NewReader(data), file.HashAlgorithms()...) - c.Assert(err, IsNil) - c.Assert(util.TargetFileMetaEqual(file, meta), IsNil) - - // download the files and check they have the correct content - for name, data := range t.targets { - for _, prefix := range []string{"", "/"} { - var dest testDestination - c.Assert(client.Download(prefix+name, &dest), IsNil) - c.Assert(dest.deleted, Equals, false) - c.Assert(dest.String(), Equals, string(data)) - } - } -} - -func startFileServer(c *C, dir string) (string, func() error) { - l, err := net.Listen("tcp", "127.0.0.1:0") - c.Assert(err, IsNil) - addr := l.Addr().String() - go http.Serve(l, http.FileServer(http.Dir(dir))) - return addr, l.Close -} diff --git a/client/leveldbstore/leveldbstore.go b/client/leveldbstore/leveldbstore.go deleted file mode 100644 index d9390494..00000000 --- a/client/leveldbstore/leveldbstore.go +++ /dev/null @@ -1,60 +0,0 @@ -package client - -import ( - "encoding/json" - - "github.com/syndtr/goleveldb/leveldb" - "github.com/syndtr/goleveldb/leveldb/errors" - "github.com/syndtr/goleveldb/leveldb/storage" - - tuf_client "github.com/theupdateframework/go-tuf/client" -) - -func FileLocalStore(path string) (tuf_client.LocalStore, error) { - fd, err := storage.OpenFile(path, false) - if err != nil { - return nil, err - } - - db, err := leveldb.Open(fd, nil) - if err != nil && errors.IsCorrupted(err) { - db, err = leveldb.Recover(fd, nil) - } - - return &fileLocalStore{fd: fd, db: db}, err -} - -type fileLocalStore struct { - fd storage.Storage - db *leveldb.DB -} - -func (f *fileLocalStore) GetMeta() (map[string]json.RawMessage, error) { - meta := make(map[string]json.RawMessage) - db_itr := f.db.NewIterator(nil, nil) - for db_itr.Next() { - vcopy := make([]byte, len(db_itr.Value())) - copy(vcopy, db_itr.Value()) - meta[string(db_itr.Key())] = vcopy - } - db_itr.Release() - return meta, db_itr.Error() -} - -func (f *fileLocalStore) SetMeta(name string, meta json.RawMessage) error { - return f.db.Put([]byte(name), []byte(meta), nil) -} - -func (f *fileLocalStore) DeleteMeta(name string) error { - return f.db.Delete([]byte(name), nil) -} - -func (f *fileLocalStore) Close() error { - // Always close both before returning any errors - dbCloseErr := f.db.Close() - fdCloseErr := f.fd.Close() - if dbCloseErr != nil { - return dbCloseErr - } - return fdCloseErr -} diff --git a/client/leveldbstore/leveldbstore_test.go b/client/leveldbstore/leveldbstore_test.go deleted file mode 100644 index 5d29fff5..00000000 --- a/client/leveldbstore/leveldbstore_test.go +++ /dev/null @@ -1,123 +0,0 @@ -package client - -import ( - "encoding/json" - "path/filepath" - "testing" - - . "gopkg.in/check.v1" - "os" -) - -type LocalStoreSuite struct{} - -var _ = Suite(&LocalStoreSuite{}) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -func (LocalStoreSuite) TestFileLocalStore(c *C) { - tmp := c.MkDir() - path := filepath.Join(tmp, "tuf.db") - store, err := FileLocalStore(path) - c.Assert(err, IsNil) - defer store.Close() - - type meta map[string]json.RawMessage - - assertGet := func(expected meta) { - actual, err := store.GetMeta() - c.Assert(err, IsNil) - c.Assert(meta(actual), DeepEquals, expected) - } - - // initial GetMeta should return empty meta - assertGet(meta{}) - - // SetMeta should persist - rootJSON := []byte(`{"_type":"Root"}`) - c.Assert(store.SetMeta("root.json", rootJSON), IsNil) - assertGet(meta{"root.json": rootJSON}) - - // SetMeta should add to existing meta - targetsJSON := []byte(`{"_type":"Target"}`) - c.Assert(store.SetMeta("targets.json", targetsJSON), IsNil) - assertGet(meta{"root.json": rootJSON, "targets.json": targetsJSON}) - - // a new store should get the same meta - c.Assert(store.Close(), IsNil) - store, err = FileLocalStore(path) - c.Assert(err, IsNil) - defer func() { - c.Assert(store.Close(), IsNil) - }() - assertGet(meta{"root.json": rootJSON, "targets.json": targetsJSON}) -} - -func (LocalStoreSuite) TestDeleteMeta(c *C) { - tmp := c.MkDir() - path := filepath.Join(tmp, "tuf.db") - store, err := FileLocalStore(path) - c.Assert(err, IsNil) - - type meta map[string]json.RawMessage - - assertGet := func(expected meta) { - actual, err := store.GetMeta() - c.Assert(err, IsNil) - c.Assert(meta(actual), DeepEquals, expected) - } - - // initial GetMeta should return empty meta - assertGet(meta{}) - - // SetMeta should persist - rootJSON := []byte(`{"_type":"Root"}`) - c.Assert(store.SetMeta("root.json", rootJSON), IsNil) - assertGet(meta{"root.json": rootJSON}) - - store.DeleteMeta("root.json") - m, _ := store.GetMeta() - if _, ok := m["root.json"]; ok { - c.Fatalf("Metadata is not deleted!") - } -} - -func (LocalStoreSuite) TestCorruptManifest(c *C) { - tmp := c.MkDir() - path := filepath.Join(tmp, "tuf.db") - - store, err := FileLocalStore(path) - c.Assert(err, IsNil) - - // now break the manifest file - err = os.Truncate(filepath.Join(path, "MANIFEST-000000"), 1) - c.Assert(err, IsNil) - err = store.Close() - c.Assert(err, IsNil) - - store, err = FileLocalStore(path) - c.Assert(err, IsNil) - - type meta map[string]json.RawMessage - - assertGet := func(expected meta) { - actual, err := store.GetMeta() - c.Assert(err, IsNil) - c.Assert(meta(actual), DeepEquals, expected) - } - - // initial GetMeta should return empty meta - assertGet(meta{}) - - // SetMeta should persist - rootJSON := []byte(`{"_type":"Root"}`) - c.Assert(store.SetMeta("root.json", rootJSON), IsNil) - assertGet(meta{"root.json": rootJSON}) - - store.DeleteMeta("root.json") - m, _ := store.GetMeta() - if _, ok := m["root.json"]; ok { - c.Fatalf("Metadata is not deleted!") - } -} diff --git a/client/local_store.go b/client/local_store.go deleted file mode 100644 index bb9421f5..00000000 --- a/client/local_store.go +++ /dev/null @@ -1,29 +0,0 @@ -package client - -import ( - "encoding/json" -) - -func MemoryLocalStore() LocalStore { - return make(memoryLocalStore) -} - -type memoryLocalStore map[string]json.RawMessage - -func (m memoryLocalStore) GetMeta() (map[string]json.RawMessage, error) { - return m, nil -} - -func (m memoryLocalStore) SetMeta(name string, meta json.RawMessage) error { - m[name] = meta - return nil -} - -func (m memoryLocalStore) DeleteMeta(name string) error { - delete(m, name) - return nil -} - -func (m memoryLocalStore) Close() error { - return nil -} diff --git a/client/local_store_test.go b/client/local_store_test.go deleted file mode 100644 index e2c1dfdb..00000000 --- a/client/local_store_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package client - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestDeleteMeta(t *testing.T) { - l := MemoryLocalStore() - defer func() { - assert.Equal(t, nil, l.Close()) - }() - assert.Equal(t, l.SetMeta("root.json", []byte(` - { - "signed": {}, - "signatures": {}, - } - `)), nil) - m, err := l.GetMeta() - assert.Equal(t, err, nil) - if _, ok := m["root.json"]; !ok { - t.Fatalf("Expected metadata not found!") - } - l.DeleteMeta("root.json") - if _, ok := m["root.json"]; ok { - t.Fatalf("Metadata is not deleted!") - } -} diff --git a/client/python_interop/python_interop_test.go b/client/python_interop/python_interop_test.go deleted file mode 100644 index d29e0ac8..00000000 --- a/client/python_interop/python_interop_test.go +++ /dev/null @@ -1,236 +0,0 @@ -package client - -import ( - "bytes" - "fmt" - "net" - "net/http" - "net/url" - "os" - "os/exec" - "path/filepath" - "testing" - - tuf "github.com/theupdateframework/go-tuf" - client "github.com/theupdateframework/go-tuf/client" - "github.com/theupdateframework/go-tuf/util" - . "gopkg.in/check.v1" -) - -type InteropSuite struct{} - -var _ = Suite(&InteropSuite{}) - -var pythonTargets = map[string][]byte{ - "file1.txt": []byte("file1.txt"), - "dir/file2.txt": []byte("file2.txt"), -} - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type testDestination struct { - bytes.Buffer - deleted bool -} - -func (t *testDestination) Delete() error { - t.deleted = true - return nil -} - -func (InteropSuite) TestGoClientPythonGenerated(c *C) { - // start file server - cwd, err := os.Getwd() - c.Assert(err, IsNil) - testDataDir := filepath.Join(cwd, "testdata", "python-tuf-v3.0.0") - addr, cleanup := startFileServer(c, testDataDir) - defer cleanup() - - for _, dir := range []string{"without-consistent-snapshot", "with-consistent-snapshot"} { - remote, err := client.HTTPRemoteStore( - fmt.Sprintf("http://%s/%s/repository", addr, dir), - &client.HTTPRemoteOptions{MetadataPath: "metadata", TargetsPath: "targets"}, - nil, - ) - c.Assert(err, IsNil) - - // initiate a client with the root metadata - client := client.NewClient(client.MemoryLocalStore(), remote) - rootJSON, err := os.ReadFile(filepath.Join(testDataDir, dir, "repository", "metadata", "1.root.json")) - c.Assert(err, IsNil) - c.Assert(client.Init(rootJSON), IsNil) - - // check update returns the correct updated targets - files, err := client.Update() - c.Assert(err, IsNil) - c.Assert(files, HasLen, len(pythonTargets)) - for name, data := range pythonTargets { - file, ok := files[name] - if !ok { - c.Fatalf("expected updated targets to contain %s", name) - } - meta, err := util.GenerateTargetFileMeta(bytes.NewReader(data), file.HashAlgorithms()...) - c.Assert(err, IsNil) - c.Assert(util.TargetFileMetaEqual(file, meta), IsNil) - } - - // download the files and check they have the correct content - for name, data := range pythonTargets { - var dest testDestination - c.Assert(client.Download(name, &dest), IsNil) - c.Assert(dest.deleted, Equals, false) - c.Assert(dest.String(), Equals, string(data)) - } - } -} - -func generateRepoFS(c *C, dir string, files map[string][]byte, - consistentSnapshot bool) *tuf.Repo { - repo, err := tuf.NewRepo(tuf.FileSystemStore(dir, nil)) - c.Assert(err, IsNil) - if !consistentSnapshot { - c.Assert(repo.Init(false), IsNil) - } - for _, role := range []string{"root", "snapshot", "targets", "timestamp"} { - _, err := repo.GenKey(role) - c.Assert(err, IsNil) - } - for file, data := range files { - path := filepath.Join(dir, "staged", "targets", file) - c.Assert(os.MkdirAll(filepath.Dir(path), 0755), IsNil) - c.Assert(os.WriteFile(path, data, 0644), IsNil) - c.Assert(repo.AddTarget(file, nil), IsNil) - } - c.Assert(repo.Snapshot(), IsNil) - c.Assert(repo.Timestamp(), IsNil) - c.Assert(repo.Commit(), IsNil) - return repo -} - -func refreshRepo(c *C, repo *tuf.Repo) { - c.Assert(repo.Snapshot(), IsNil) - c.Assert(repo.Timestamp(), IsNil) - c.Assert(repo.Commit(), IsNil) -} - -func (InteropSuite) TestPythonClientGoGenerated(c *C) { - // clone the Python client if necessary - cwd, err := os.Getwd() - c.Assert(err, IsNil) - - files := map[string][]byte{ - "foo.txt": []byte("foo"), - "bar/baz.txt": []byte("baz"), - } - - for _, consistentSnapshot := range []bool{false, true} { - // generate repository - tmp := c.MkDir() - // start file server - addr, cleanup := startFileServer(c, tmp) - defer cleanup() - name := fmt.Sprintf("consistent-snapshot-%t", consistentSnapshot) - dir := filepath.Join(tmp, name) - generateRepoFS(c, dir, files, consistentSnapshot) - - // create initial files for Python client - clientDir := filepath.Join(dir, "client") - currDir := filepath.Join(clientDir, "tufrepo", "metadata", "current") - prevDir := filepath.Join(clientDir, "tufrepo", "metadata", "previous") - c.Assert(os.MkdirAll(currDir, 0755), IsNil) - c.Assert(os.MkdirAll(prevDir, 0755), IsNil) - rootJSON, err := os.ReadFile(filepath.Join(dir, "repository", "1.root.json")) - c.Assert(err, IsNil) - c.Assert(os.WriteFile(filepath.Join(currDir, "root.json"), rootJSON, 0644), IsNil) - - args := []string{ - filepath.Join(cwd, "testdata", "python-tuf-v3.0.0", "client.py"), - "--repo=http://" + addr + "/" + name, - } - for path := range files { - args = append(args, path) - } - - // run Python client update - cmd := exec.Command("python", args...) - cmd.Dir = clientDir - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - c.Assert(cmd.Run(), IsNil) - - // check the target files got downloaded - for path, expected := range files { - actual, err := os.ReadFile(filepath.Join(clientDir, "tuftargets", url.QueryEscape(path))) - c.Assert(err, IsNil) - c.Assert(actual, DeepEquals, expected) - } - } -} - -// This is a regression test for issue -// https://github.com/theupdateframework/go-tuf/issues/402 -func (InteropSuite) TestPythonClientGoGeneratedNullDelegations(c *C) { - // clone the Python client if necessary - cwd, err := os.Getwd() - c.Assert(err, IsNil) - - files := map[string][]byte{ - "foo.txt": []byte("foo"), - "bar/baz.txt": []byte("baz"), - } - - for _, consistentSnapshot := range []bool{false, true} { - // generate repository - tmp := c.MkDir() - // start file server - addr, cleanup := startFileServer(c, tmp) - defer cleanup() - name := fmt.Sprintf("consistent-snapshot-delegations-%t", consistentSnapshot) - dir := filepath.Join(tmp, name) - repo := generateRepoFS(c, dir, files, consistentSnapshot) - // "Reset" top-level targets delegations and re-sign - c.Assert(repo.ResetTargetsDelegations("targets"), IsNil) - refreshRepo(c, repo) - - // create initial files for Python client - clientDir := filepath.Join(dir, "client") - currDir := filepath.Join(clientDir, "tufrepo", "metadata", "current") - prevDir := filepath.Join(clientDir, "tufrepo", "metadata", "previous") - c.Assert(os.MkdirAll(currDir, 0755), IsNil) - c.Assert(os.MkdirAll(prevDir, 0755), IsNil) - rootJSON, err := os.ReadFile(filepath.Join(dir, "repository", "1.root.json")) - c.Assert(err, IsNil) - c.Assert(os.WriteFile(filepath.Join(currDir, "root.json"), rootJSON, 0644), IsNil) - - args := []string{ - filepath.Join(cwd, "testdata", "python-tuf-v3.0.0", "client.py"), - "--repo=http://" + addr + "/" + name, - } - for path := range files { - args = append(args, path) - } - - // run Python client update - cmd := exec.Command("python", args...) - cmd.Dir = clientDir - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - c.Assert(cmd.Run(), IsNil) - - // check the target files got downloaded - for path, expected := range files { - actual, err := os.ReadFile(filepath.Join(clientDir, "tuftargets", url.QueryEscape(path))) - c.Assert(err, IsNil) - c.Assert(actual, DeepEquals, expected) - } - } -} - -func startFileServer(c *C, dir string) (string, func() error) { - l, err := net.Listen("tcp", "127.0.0.1:0") - c.Assert(err, IsNil) - addr := l.Addr().String() - go http.Serve(l, http.FileServer(http.Dir(dir))) - return addr, l.Close -} diff --git a/client/python_interop/testdata/LICENSE.txt b/client/python_interop/testdata/LICENSE.txt deleted file mode 100644 index 544f53dc..00000000 --- a/client/python_interop/testdata/LICENSE.txt +++ /dev/null @@ -1,66 +0,0 @@ - This file contains the license for TUF: The Update Framework. - - It also lists license information for components and source - code used by TUF: The Update Framework. - - If you got this file as a part of a larger bundle, - there may be other license terms that you should be aware of. - -=============================================================================== -TUF: The Update Framework is distributed under this license: - -Copyright (c) 2010, Justin Samuel and Justin Cappos. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and/or hardware specification (the “Work”) to deal in the Work -without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Work, -and to permit persons to whom the Work is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Work. - -THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER -DEALINGS IN THE WORK. -=============================================================================== -Many files are modified from Thandy and are licensed under the -following license: - -Thandy is distributed under this license: - -Copyright (c) 2008, The Tor Project, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - - * Neither the names of the copyright owners nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -=============================================================================== diff --git a/client/python_interop/testdata/Makefile b/client/python_interop/testdata/Makefile deleted file mode 100644 index 6ba9a642..00000000 --- a/client/python_interop/testdata/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -PYTHON_TUF=python-tuf-v3.0.0 - -all: - docker build -t tuf-gen ./$(PYTHON_TUF) - docker run tuf-gen | tar x -C $(PYTHON_TUF) - -clean: - rm -rf $(PYTHON_TUF)/with{,out}-consistent-snapshot - -.PHONY: all clean diff --git a/client/python_interop/testdata/README.md b/client/python_interop/testdata/README.md deleted file mode 100644 index 011b998f..00000000 --- a/client/python_interop/testdata/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# TUF testdata - -TUF testdata generated by the Python implementation which is used to test that -the Go client is compatible with files generated by the Python repository tool. - -## Generate - -The `generate` directory contains scripts and a Dockerfile for generating the -test data files. - -Run `make` to regenerate the test files: - -``` -$ make clean -rm -rf keystore repository - -$ make -docker build -t tuf-gen ./generate -... -Successfully built ac1fba1d0b3b -docker run tuf-gen | tar x -Files generated: -. -|-- keystore -| |-- root_key -| |-- root_key.pub -| |-- snapshot_key -| |-- snapshot_key.pub -| |-- targets_key -| |-- targets_key.pub -| |-- timestamp_key -| `-- timestamp_key.pub -|-- repository -| |-- metadata -| | |-- root.json -| | |-- snapshot.json -| | |-- targets.json -| | |-- targets.json.gz -| | `-- timestamp.json -| `-- targets -| |-- dir -| | `-- file2.txt -| `-- file1.txt -`-- tuf.log - -5 directories, 16 files -``` diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/Dockerfile b/client/python_interop/testdata/python-tuf-v3.0.0/Dockerfile deleted file mode 100644 index 896820c2..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:3.10 - -RUN apt-get update && apt-get install -y libsodium-dev tree -RUN pip install -U pip && pip install 'securesystemslib[crypto,pynacl]==0.28.0' 'tuf==v3.0.0' - -ADD generate.py generate.sh / -CMD /generate.sh diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/client.py b/client/python_interop/testdata/python-tuf-v3.0.0/client.py deleted file mode 100644 index 64fe5397..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/client.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2012 - 2023, New York University and the TUF contributors -# SPDX-License-Identifier: MIT OR Apache-2.0 -# -# A simplified version of client_exmample.py from the Python implementation: -# https://github.com/theupdateframework/python-tuf/blob/v1.0.0/examples/client_example/client_example.py - -import argparse - -from typing import List -from pathlib import Path - -from tuf.ngclient import Updater - - -def update_client(repo: str, targets: List[str]): - metadata_dir = Path("tufrepo/metadata/current") - targets_dir = Path("tuftargets") - targets_dir.mkdir() - updater = Updater( - metadata_dir=str(metadata_dir), - metadata_base_url=f"{repo}/repository/", - target_base_url=f"{repo}/repository/targets/", - target_dir=str(targets_dir), - ) - - updater.refresh() - for target in targets: - info = updater.get_targetinfo(target) - assert not updater.find_cached_target(info) - updater.download_target(info) - - -def parse_arguments(): - parser = argparse.ArgumentParser( - description="Retrieve file from TUF repository.") - - parser.add_argument( - "-r", - "--repo", - type=str, - required=True, - metavar="", - help="Specify the remote repository's URI" - " (e.g., http://www.example.com:8001/tuf/). The client retrieves" - " updates from the remote repository.", - ) - - parser.add_argument( - "targets", - nargs="+", - metavar="", - help="Specify" - " the target files to retrieve from the specified TUF repository.", - ) - - parsed_arguments = parser.parse_args() - return parsed_arguments - - -def main(): - arguments = parse_arguments() - update_client(arguments.repo, arguments.targets) - - -if __name__ == "__main__": - main() diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/generate.py b/client/python_interop/testdata/python-tuf-v3.0.0/generate.py deleted file mode 100755 index e494d18f..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/generate.py +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env python -# -# A script to generate TUF repository files. -# -# A modification of generate.py from the Python implementation: -# https://github.com/theupdateframework/tuf/blob/v0.9.9/tests/repository_data/generate.py -# Updated a bit for the v1.0.0 version: -# https://github.com/theupdateframework/python-tuf/blob/v1.0.0/examples/repo_example/basic_repo.py - -import datetime -import optparse -import shutil - -from pathlib import Path -from typing import Dict - -from securesystemslib.keys import generate_ed25519_key -from securesystemslib.signer import SSlibSigner, SSlibKey -from tuf.api.metadata import ( - Metadata, - MetaFile, - Role, - Root, - Snapshot, - TargetFile, - Targets, - Timestamp, -) -from tuf.api.serialization.json import JSONSerializer - - -SPEC_VERSION = "1.0.19" -PRETTY = JSONSerializer(compact=False) -EXPIRY = datetime.datetime(2030, 1, 1, 0, 0) # Far enough in the future -ROLES = set(("targets", "snapshot", "timestamp", "root")) - - -def make_targets(target_dir: Path, consistent_snapshot: bool) -> Dict[str, TargetFile]: - targets = {} - for target in (Path("file1.txt"), Path("dir/file2.txt")): - target_fspath = target_dir / target - target_fspath.parent.mkdir(parents=True, exist_ok=True) - # file contents are the file name - target_fspath.write_text(target.name) - target_file_info = TargetFile.from_file( - str(target), str(target_fspath)) - if consistent_snapshot: - digest = next(iter(target_file_info.hashes.values())) - shutil.move(target_fspath, target_fspath.parent / - f"{digest}.{target.name}") - targets[str(target)] = target_file_info - return targets - - -def make_test_repo(repo_dir: Path, consistent_snapshot: bool): - """Create a test repository in `repo_dir`. - - Two targets: - - `file1.txt` - - `dir/file2.txt` - """ - roles: Dict[str, Metadata] = {} - - targets: Dict[str, TargetFile] = {} - target_dir = repo_dir / "targets" - target_dir.mkdir() - targets = make_targets(target_dir, consistent_snapshot) - target_metadata = Targets( - version=1, spec_version=SPEC_VERSION, expires=EXPIRY, targets=targets - ) - roles["targets"] = Metadata[Targets](target_metadata, {}) - - snapshot_metadata = Snapshot( - version=1, - spec_version=SPEC_VERSION, - expires=EXPIRY, - meta={"targets.json": MetaFile(version=1)}, - ) - roles["snapshot"] = Metadata[Snapshot](snapshot_metadata, {}) - - timestamp_metadata = Timestamp( - version=1, - spec_version=SPEC_VERSION, - expires=EXPIRY, - snapshot_meta=MetaFile(version=1), - ) - roles["timestamp"] = Metadata[Timestamp](timestamp_metadata, {}) - - keys = {name: generate_ed25519_key() for name in ROLES} - - root_metadata = Root( - version=1, - spec_version=SPEC_VERSION, - expires=EXPIRY, - keys={ - key["keyid"]: SSlibKey.from_securesystemslib_key(key) for key in keys.values() - }, - roles={role: Role([key["keyid"]], threshold=1) - for role, key in keys.items()}, - consistent_snapshot=consistent_snapshot, - ) - roles["root"] = Metadata[Root](root_metadata, {}) - - # Write the metadata files - metadata_dir = repo_dir / "metadata" - metadata_dir.mkdir() - for name in ["root", "targets", "snapshot", "timestamp"]: - role = roles[name] - key = keys[role.signed.type] - signer = SSlibSigner(key) - role.sign(signer) - - if name == "root" or (consistent_snapshot and name != "timestamp"): - filename = f"{role.signed.version}.{name}.json" - else: - filename = f"{name}.json" - role.to_file(str(metadata_dir / filename), serializer=PRETTY) - - -def main(): - parser = optparse.OptionParser() - parser.add_option( - "-c", - "--consistent-snapshot", - action="store_true", - dest="consistent_snapshot", - help="Generate consistent snapshot", - default=False, - ) - (options, args) = parser.parse_args() - - repo_dir = Path("repository") - repo_dir.mkdir() - make_test_repo(repo_dir, options.consistent_snapshot) - - -if __name__ == "__main__": - main() diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/generate.sh b/client/python_interop/testdata/python-tuf-v3.0.0/generate.sh deleted file mode 100755 index 094fa411..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/generate.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# -# A script to generate TUF repository files using the Python implementation. -# -# A list of generated files is printed to STDERR and a tar of the files to STDOUT. - -set -e - -main() { - local dir="$(mktemp -d)" - trap "rm -rf ${dir}" EXIT - - pushd "${dir}" >/dev/null - generate_consistent - generate_non_consistent - list_files >&2 - tar c . - popd >/dev/null -} - -generate_consistent() { - mkdir "with-consistent-snapshot" - pushd "with-consistent-snapshot" >/dev/null - python3 /generate.py --consistent-snapshot - popd >/dev/null -} - -generate_non_consistent() { - mkdir "without-consistent-snapshot" - pushd "without-consistent-snapshot" >/dev/null - python3 /generate.py - popd >/dev/null -} - -list_files() { - echo "Files generated:" - tree -} - -main $@ diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.root.json deleted file mode 100755 index e0284c59..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.root.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "signatures": [ - { - "keyid": "c3fcd2035fd2d29b36a29c9e9a52b199f85492b7cf8f9730b865dfa989eb47c8", - "sig": "1c02cfc95564dcce804f2c48de3048881e89be6b49ad3db208a870a5bd69bc7749c809613f44edadd744a01b0ead25753853dbacb955e6b29b59672f654c1809" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "1d98f2950591737d5f49f0a00d00890ee385ed272285fba1cb89553a37813fcf": { - "keytype": "ed25519", - "keyval": { - "public": "4b937cac5c77ce5ebd18b4ce252f92b1da3e8640a033c34726fe7a821c3acd45" - }, - "scheme": "ed25519" - }, - "c3fcd2035fd2d29b36a29c9e9a52b199f85492b7cf8f9730b865dfa989eb47c8": { - "keytype": "ed25519", - "keyval": { - "public": "0cb442e869c9aead667909ba27ce7ed2c87d396fb92a180ec02b37c64f0f0404" - }, - "scheme": "ed25519" - }, - "e45cfc40f8cae2e4d760b4ecec0b59238fd2fd769391998920927eec825e7829": { - "keytype": "ed25519", - "keyval": { - "public": "ce00487915590a5748b9c08ca720c26cd233424a05f72105ccaa49411b662e83" - }, - "scheme": "ed25519" - }, - "f7662dc3e9eebfb74d0e53f56941c6cf5668967110d2af28b41f9371544ccd0b": { - "keytype": "ed25519", - "keyval": { - "public": "64017bbf887018ecb927029b7524ea9b50d201e232274843384204c5e6e25c06" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "c3fcd2035fd2d29b36a29c9e9a52b199f85492b7cf8f9730b865dfa989eb47c8" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "e45cfc40f8cae2e4d760b4ecec0b59238fd2fd769391998920927eec825e7829" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "f7662dc3e9eebfb74d0e53f56941c6cf5668967110d2af28b41f9371544ccd0b" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "1d98f2950591737d5f49f0a00d00890ee385ed272285fba1cb89553a37813fcf" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json deleted file mode 100755 index 1ed1b9c1..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e45cfc40f8cae2e4d760b4ecec0b59238fd2fd769391998920927eec825e7829", - "sig": "f86a214877f8009aee97b2fc0f96131714f07fa8e2e65b153f08be6d3eba1533b82fb2b774cb82d0b7969f2d5d94071c387f4891276484ba6f5e7a0e11b58f09" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.targets.json b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.targets.json deleted file mode 100755 index 84d2e056..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "f7662dc3e9eebfb74d0e53f56941c6cf5668967110d2af28b41f9371544ccd0b", - "sig": "708400f70b965991928ea89f925227c97886f673a4e6a32e57062fc533580812fd1b65989fd751a4c3959ff716d8f0e7a09da0d971fa726553f5cc3ea7ff600e" - } - ], - "signed": { - "_type": "targets", - "expires": "2030-01-01T00:00:00Z", - "spec_version": "1.0.19", - "targets": { - "dir/file2.txt": { - "hashes": { - "sha256": "04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701" - }, - "length": 9 - }, - "file1.txt": { - "hashes": { - "sha256": "55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9" - }, - "length": 9 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/timestamp.json deleted file mode 100755 index 02f509b5..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/timestamp.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "1d98f2950591737d5f49f0a00d00890ee385ed272285fba1cb89553a37813fcf", - "sig": "4453d37f5105ba74f203c72e241c2f3a61df82f37f66e80ba43523534c8bbe30eb06b675133662a38544c87e1087a013d2a786a718ce2f1f338f4177bedccf0e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "version": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt deleted file mode 100644 index 39cd5762..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt +++ /dev/null @@ -1 +0,0 @@ -file1.txt \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt deleted file mode 100644 index c3ee11c8..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt +++ /dev/null @@ -1 +0,0 @@ -file2.txt \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/1.root.json deleted file mode 100755 index f17ee717..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/1.root.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "signatures": [ - { - "keyid": "6a6777bdb8d607b2ca394fab722440c9b82557d4c3d694b69ed37f880d0bb359", - "sig": "32a8f36d461328175f3f48852c8c3f5c0b2202e263e66b40171b3aeca4b485e2d21e29b949da816f1f899f537450fa989a2e7356f7469b9d59b9c37eb0388b06" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "6a6777bdb8d607b2ca394fab722440c9b82557d4c3d694b69ed37f880d0bb359": { - "keytype": "ed25519", - "keyval": { - "public": "16b7d48bb6bf00dd8d3bcbea04c5937f85334dcc4e5be73b62ec551778962def" - }, - "scheme": "ed25519" - }, - "94995c1ecba97e06fc8c65fb881504c62c5906000cbf0fc39bf2ed910690ce91": { - "keytype": "ed25519", - "keyval": { - "public": "e8a65a4317ab8a37a8db8ce3785b8745516282425d9b3d3533605a62c729fc9c" - }, - "scheme": "ed25519" - }, - "b2100105c1dcea16a93bc583fa0a3a6936b5375b1f944eaf6bc8e806c0f43046": { - "keytype": "ed25519", - "keyval": { - "public": "34beb06ede086112f38aef9131eee9e480e0d3670e801b97d2e99add6ac0856f" - }, - "scheme": "ed25519" - }, - "c74276233340a505633ab55237d3ff7c0e2fedb938806d0226d2331e8c5f98f4": { - "keytype": "ed25519", - "keyval": { - "public": "b4135ebeaf0850dad533cdc0a2721af9941503ea2009eace713685a47b15be32" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "6a6777bdb8d607b2ca394fab722440c9b82557d4c3d694b69ed37f880d0bb359" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "94995c1ecba97e06fc8c65fb881504c62c5906000cbf0fc39bf2ed910690ce91" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b2100105c1dcea16a93bc583fa0a3a6936b5375b1f944eaf6bc8e806c0f43046" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "c74276233340a505633ab55237d3ff7c0e2fedb938806d0226d2331e8c5f98f4" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/snapshot.json b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/snapshot.json deleted file mode 100755 index d1639b42..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "94995c1ecba97e06fc8c65fb881504c62c5906000cbf0fc39bf2ed910690ce91", - "sig": "618e99e47678fa0ccc5b664e5b4230de9f529d6456f376ef8ee55a8d94cf4e592e5b1ab5d6789838cbc1e7724af544866be48cd49cb32d3ac9485bb02ec06a0d" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/targets.json b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/targets.json deleted file mode 100755 index e97913ea..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b2100105c1dcea16a93bc583fa0a3a6936b5375b1f944eaf6bc8e806c0f43046", - "sig": "c4ad17cbc0bc54410c135dc74b638c51e1cafbb64f991b0a3e90a526eb63a162c33a73d6fde01ba84775522eb5c724f43c9f3efd7afd5bc469a5814399e31a0f" - } - ], - "signed": { - "_type": "targets", - "expires": "2030-01-01T00:00:00Z", - "spec_version": "1.0.19", - "targets": { - "dir/file2.txt": { - "hashes": { - "sha256": "04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701" - }, - "length": 9 - }, - "file1.txt": { - "hashes": { - "sha256": "55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9" - }, - "length": 9 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/timestamp.json deleted file mode 100755 index 08e84795..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/timestamp.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "c74276233340a505633ab55237d3ff7c0e2fedb938806d0226d2331e8c5f98f4", - "sig": "f1191748bc8b74751c7e6c3bb0a85a02d54f92214bda78cd3230edf826a9bbf0af15dbf214424e7fb6c7b1a84054ed7a6bb57b05169c52ac0e63da099b9fdd02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "version": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt deleted file mode 100644 index c3ee11c8..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt +++ /dev/null @@ -1 +0,0 @@ -file2.txt \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/file1.txt b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/file1.txt deleted file mode 100644 index 39cd5762..00000000 --- a/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/file1.txt +++ /dev/null @@ -1 +0,0 @@ -file1.txt \ No newline at end of file diff --git a/client/remote_store.go b/client/remote_store.go deleted file mode 100644 index 17a63fc5..00000000 --- a/client/remote_store.go +++ /dev/null @@ -1,109 +0,0 @@ -package client - -import ( - "fmt" - "io" - "net/http" - "net/url" - "path" - "strconv" - "strings" - "time" -) - -type HTTPRemoteOptions struct { - MetadataPath string - TargetsPath string - UserAgent string - Retries *HTTPRemoteRetries -} - -type HTTPRemoteRetries struct { - Delay time.Duration - Total time.Duration -} - -var DefaultHTTPRetries = &HTTPRemoteRetries{ - Delay: time.Second, - Total: 10 * time.Second, -} - -func HTTPRemoteStore(baseURL string, opts *HTTPRemoteOptions, client *http.Client) (RemoteStore, error) { - if !strings.HasPrefix(baseURL, "http") { - return nil, ErrInvalidURL{baseURL} - } - if opts == nil { - opts = &HTTPRemoteOptions{} - } - if opts.TargetsPath == "" { - opts.TargetsPath = "targets" - } - if client == nil { - client = http.DefaultClient - } - return &httpRemoteStore{baseURL, opts, client}, nil -} - -type httpRemoteStore struct { - baseURL string - opts *HTTPRemoteOptions - cli *http.Client -} - -func (h *httpRemoteStore) GetMeta(name string) (io.ReadCloser, int64, error) { - return h.get(path.Join(h.opts.MetadataPath, name)) -} - -func (h *httpRemoteStore) GetTarget(name string) (io.ReadCloser, int64, error) { - return h.get(path.Join(h.opts.TargetsPath, name)) -} - -func (h *httpRemoteStore) get(s string) (io.ReadCloser, int64, error) { - u := h.url(s) - req, err := http.NewRequest("GET", u, nil) - if err != nil { - return nil, 0, err - } - if h.opts.UserAgent != "" { - req.Header.Set("User-Agent", h.opts.UserAgent) - } - var res *http.Response - if r := h.opts.Retries; r != nil { - for start := time.Now(); time.Since(start) < r.Total; time.Sleep(r.Delay) { - res, err = h.cli.Do(req) - if err == nil && (res.StatusCode < 500 || res.StatusCode > 599) { - break - } - } - } else { - res, err = h.cli.Do(req) - } - if err != nil { - return nil, 0, err - } - - if res.StatusCode == http.StatusNotFound { - res.Body.Close() - return nil, 0, ErrNotFound{s} - } else if res.StatusCode != http.StatusOK { - res.Body.Close() - return nil, 0, &url.Error{ - Op: "GET", - URL: u, - Err: fmt.Errorf("unexpected HTTP status %d", res.StatusCode), - } - } - - size, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) - if err != nil { - return res.Body, -1, nil - } - return res.Body, size, nil -} - -func (h *httpRemoteStore) url(path string) string { - if !strings.HasPrefix(path, "/") { - path = "/" + path - } - return h.baseURL + path -} diff --git a/client/testdata/Published1Time/client/metadata/current/1.root.json b/client/testdata/Published1Time/client/metadata/current/1.root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/client/metadata/current/1.snapshot.json b/client/testdata/Published1Time/client/metadata/current/1.snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/current/1.targets.json b/client/testdata/Published1Time/client/metadata/current/1.targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/current/1.timestamp.json b/client/testdata/Published1Time/client/metadata/current/1.timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/current/root.json b/client/testdata/Published1Time/client/metadata/current/root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/client/metadata/current/snapshot.json b/client/testdata/Published1Time/client/metadata/current/snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/current/targets.json b/client/testdata/Published1Time/client/metadata/current/targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/current/timestamp.json b/client/testdata/Published1Time/client/metadata/current/timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/previous/1.root.json b/client/testdata/Published1Time/client/metadata/previous/1.root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/client/metadata/previous/1.snapshot.json b/client/testdata/Published1Time/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/previous/1.targets.json b/client/testdata/Published1Time/client/metadata/previous/1.targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/previous/1.timestamp.json b/client/testdata/Published1Time/client/metadata/previous/1.timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/previous/root.json b/client/testdata/Published1Time/client/metadata/previous/root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/client/metadata/previous/snapshot.json b/client/testdata/Published1Time/client/metadata/previous/snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/previous/targets.json b/client/testdata/Published1Time/client/metadata/previous/targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/client/metadata/previous/timestamp.json b/client/testdata/Published1Time/client/metadata/previous/timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/hash.txt b/client/testdata/Published1Time/hash.txt deleted file mode 100644 index e5b238d1..00000000 --- a/client/testdata/Published1Time/hash.txt +++ /dev/null @@ -1 +0,0 @@ -4b336d13d5ef371c39a574265b9c8f5dcf7a6031962a8f2ef9238e8b45d8019b \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata.staged/1.root.json b/client/testdata/Published1Time/server/metadata.staged/1.root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/server/metadata.staged/1.snapshot.json b/client/testdata/Published1Time/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata.staged/1.targets.json b/client/testdata/Published1Time/server/metadata.staged/1.targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata.staged/1.timestamp.json b/client/testdata/Published1Time/server/metadata.staged/1.timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata.staged/root.json b/client/testdata/Published1Time/server/metadata.staged/root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/server/metadata.staged/snapshot.json b/client/testdata/Published1Time/server/metadata.staged/snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata.staged/targets.json b/client/testdata/Published1Time/server/metadata.staged/targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata.staged/timestamp.json b/client/testdata/Published1Time/server/metadata.staged/timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata/1.root.json b/client/testdata/Published1Time/server/metadata/1.root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/server/metadata/1.snapshot.json b/client/testdata/Published1Time/server/metadata/1.snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata/1.targets.json b/client/testdata/Published1Time/server/metadata/1.targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata/1.timestamp.json b/client/testdata/Published1Time/server/metadata/1.timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata/root.json b/client/testdata/Published1Time/server/metadata/root.json deleted file mode 100644 index 6b72b01b..00000000 --- a/client/testdata/Published1Time/server/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "fc18813db531963ba283e63056be9f5e303e6e4f3d4cdc06301ff2c7fdf67e6850881439eb6e5479a4c874f7e5837972cb1debe02e0613a0ef229a9545a0f60d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:36Z", - "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/Published1Time/server/metadata/snapshot.json b/client/testdata/Published1Time/server/metadata/snapshot.json deleted file mode 100644 index 0c760c17..00000000 --- a/client/testdata/Published1Time/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "bff908e74d135b9877db003f078a863701f64ee477f2f9521628396ce14a460d7cbd0b5f81682c7dd082512f18d0dedb5c593b012856f496012445cfd16d6706" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata/targets.json b/client/testdata/Published1Time/server/metadata/targets.json deleted file mode 100644 index 59a8059d..00000000 --- a/client/testdata/Published1Time/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "bc7c651efcc8939b9e8dedaa8655ddb95b4f0e6a9336502dffe82e569e035c1274415c4075eef318f964bceb834d85a763f58e5c34d8e3e88cd603e6aec5ec05" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:36Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time/server/metadata/timestamp.json b/client/testdata/Published1Time/server/metadata/timestamp.json deleted file mode 100644 index afc27222..00000000 --- a/client/testdata/Published1Time/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "e4e6dc4a5e6effa5e9a85a2cb22e29847ee91dec8e5f2f57bd50c573a47e9cc95566f703ef0f9ecf4e0ee82804ad92412a226524924f4fb99724c949fffd1e05" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:36Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "2bf3861b5e3be6cb82dc3820cbb128874d18f88e2f08ef81f6b385f3e3c7900b", - "sha512": "c178334cff4dbb2dec4eea043b135a6339661a3c189dc0a689c6f92f150bd15474de5189c513a8c68bf831ea15656142c4ce8de0ae54ab23806fa6af4683783d" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.root.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/client/metadata/current/1.snapshot.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.targets.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.timestamp.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/root.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/client/metadata/current/snapshot.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/targets.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/timestamp.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.root.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/client/metadata/previous/1.snapshot.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.targets.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.timestamp.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/root.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/client/metadata/previous/snapshot.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/targets.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/timestamp.json b/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/hash.txt b/client/testdata/Published1Time_backwardRootVersion/hash.txt deleted file mode 100644 index eb46ce40..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/hash.txt +++ /dev/null @@ -1 +0,0 @@ -d8e9b9784ec1037e1c2724ae98cf9b8ef3e940e4d61e9f437d003d9f9e2d8d5b \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.root.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/server/metadata.staged/1.snapshot.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.targets.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.timestamp.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/root.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/server/metadata.staged/snapshot.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/targets.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/timestamp.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.snapshot.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.targets.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.timestamp.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata/2.root.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/2.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/server/metadata/root.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published1Time_backwardRootVersion/server/metadata/snapshot.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata/targets.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_backwardRootVersion/server/metadata/timestamp.json b/client/testdata/Published1Time_backwardRootVersion/server/metadata/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published1Time_backwardRootVersion/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/current/1.snapshot.json b/client/testdata/Published1Time_client_no_root/client/metadata/current/1.snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/current/1.targets.json b/client/testdata/Published1Time_client_no_root/client/metadata/current/1.targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/current/1.timestamp.json b/client/testdata/Published1Time_client_no_root/client/metadata/current/1.timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/current/snapshot.json b/client/testdata/Published1Time_client_no_root/client/metadata/current/snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/current/targets.json b/client/testdata/Published1Time_client_no_root/client/metadata/current/targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/current/timestamp.json b/client/testdata/Published1Time_client_no_root/client/metadata/current/timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.root.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.root.json deleted file mode 100644 index 6afde0f9..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "257396e371baf489e38653fef8cf0c98d1915a1f61f5bfbb0e3a03bad7c863795b738cdddc6b6899354447cfed0de0f79f8eaeec7acd509322009ee90c49b20d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T02:30:57Z", - "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/Published1Time_client_no_root/client/metadata/previous/1.snapshot.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.targets.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.timestamp.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/previous/root.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/root.json deleted file mode 100644 index 6afde0f9..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "257396e371baf489e38653fef8cf0c98d1915a1f61f5bfbb0e3a03bad7c863795b738cdddc6b6899354447cfed0de0f79f8eaeec7acd509322009ee90c49b20d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T02:30:57Z", - "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/Published1Time_client_no_root/client/metadata/previous/snapshot.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/previous/targets.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/client/metadata/previous/timestamp.json b/client/testdata/Published1Time_client_no_root/client/metadata/previous/timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/hash.txt b/client/testdata/Published1Time_client_no_root/hash.txt deleted file mode 100644 index adf9cc05..00000000 --- a/client/testdata/Published1Time_client_no_root/hash.txt +++ /dev/null @@ -1 +0,0 @@ -fccdb5eadd5e09460c9ec806e051785d855da2c4862cf9cec2f63401c866bc34 \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.root.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_no_root/server/metadata.staged/1.snapshot.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.targets.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.timestamp.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata.staged/root.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_no_root/server/metadata.staged/snapshot.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata.staged/targets.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata.staged/timestamp.json b/client/testdata/Published1Time_client_no_root/server/metadata.staged/timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata/1.root.json b/client/testdata/Published1Time_client_no_root/server/metadata/1.root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_no_root/server/metadata/1.snapshot.json b/client/testdata/Published1Time_client_no_root/server/metadata/1.snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata/1.targets.json b/client/testdata/Published1Time_client_no_root/server/metadata/1.targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata/1.timestamp.json b/client/testdata/Published1Time_client_no_root/server/metadata/1.timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata/root.json b/client/testdata/Published1Time_client_no_root/server/metadata/root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_no_root/server/metadata/snapshot.json b/client/testdata/Published1Time_client_no_root/server/metadata/snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata/targets.json b/client/testdata/Published1Time_client_no_root/server/metadata/targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_no_root/server/metadata/timestamp.json b/client/testdata/Published1Time_client_no_root/server/metadata/timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_no_root/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/client/metadata/current/root.json b/client/testdata/Published1Time_client_root_only/client/metadata/current/root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_root_only/client/metadata/previous/1.root.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.root.json deleted file mode 100644 index 6afde0f9..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "257396e371baf489e38653fef8cf0c98d1915a1f61f5bfbb0e3a03bad7c863795b738cdddc6b6899354447cfed0de0f79f8eaeec7acd509322009ee90c49b20d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T02:30:57Z", - "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/Published1Time_client_root_only/client/metadata/previous/1.snapshot.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.snapshot.json deleted file mode 100644 index e27a8a22..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "60a5724ac31af58ece866b723ab121a168b9e93f0033a98dd8449e6550f4d897db0329cdb135fd3a016c8c375e4177c16f1f4d3ada550eb6d06a52b5c84fbb07" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T02:30:57Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.targets.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.targets.json deleted file mode 100644 index 850f22ae..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "ecb8da4380f992d0d80cbcb78c31c91baf171dad346725fcbf6b1487f52653fc9a2f1ab46a28d32a733a48badbbd316814dcda52cc49cf3bf6fb415403ce7a0a" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T02:30:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.timestamp.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 4d4abc02..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "4e4f72264b522cf8e2867fcaf1a6b1463d43bdf58027fb5770b6d611ae68a9f36b93ce5a50f874744ef1d7b72a11ad685f24081511c306fd7118dc60c90bdf08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T02:30:57Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "195c327842ae9601900016a50d0536a05136bfbf55ddb70657427ae12ed52181", - "sha512": "8deed35dcd9d634fcce94c42049829078c15a57d35ee83b15c201b6a0c80111fefba49cca522dedb1d79bc000393bf6c45b72d485f9d027f7c5a3f8922734a5c" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/client/metadata/previous/root.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/root.json deleted file mode 100644 index 6afde0f9..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "257396e371baf489e38653fef8cf0c98d1915a1f61f5bfbb0e3a03bad7c863795b738cdddc6b6899354447cfed0de0f79f8eaeec7acd509322009ee90c49b20d" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T02:30:57Z", - "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/Published1Time_client_root_only/client/metadata/previous/snapshot.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/snapshot.json deleted file mode 100644 index e27a8a22..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "60a5724ac31af58ece866b723ab121a168b9e93f0033a98dd8449e6550f4d897db0329cdb135fd3a016c8c375e4177c16f1f4d3ada550eb6d06a52b5c84fbb07" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T02:30:57Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/client/metadata/previous/targets.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/targets.json deleted file mode 100644 index 850f22ae..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "ecb8da4380f992d0d80cbcb78c31c91baf171dad346725fcbf6b1487f52653fc9a2f1ab46a28d32a733a48badbbd316814dcda52cc49cf3bf6fb415403ce7a0a" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T02:30:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/client/metadata/previous/timestamp.json b/client/testdata/Published1Time_client_root_only/client/metadata/previous/timestamp.json deleted file mode 100644 index 4d4abc02..00000000 --- a/client/testdata/Published1Time_client_root_only/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "4e4f72264b522cf8e2867fcaf1a6b1463d43bdf58027fb5770b6d611ae68a9f36b93ce5a50f874744ef1d7b72a11ad685f24081511c306fd7118dc60c90bdf08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T02:30:57Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "195c327842ae9601900016a50d0536a05136bfbf55ddb70657427ae12ed52181", - "sha512": "8deed35dcd9d634fcce94c42049829078c15a57d35ee83b15c201b6a0c80111fefba49cca522dedb1d79bc000393bf6c45b72d485f9d027f7c5a3f8922734a5c" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/hash.txt b/client/testdata/Published1Time_client_root_only/hash.txt deleted file mode 100644 index a03443e1..00000000 --- a/client/testdata/Published1Time_client_root_only/hash.txt +++ /dev/null @@ -1 +0,0 @@ -66b8896b5d1120fa684474d4d4d1a5438539b708c7a8d7a93682ce2fe0f739a4 \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.root.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_root_only/server/metadata.staged/1.snapshot.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.targets.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.timestamp.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata.staged/root.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_root_only/server/metadata.staged/snapshot.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata.staged/targets.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata.staged/timestamp.json b/client/testdata/Published1Time_client_root_only/server/metadata.staged/timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata/1.root.json b/client/testdata/Published1Time_client_root_only/server/metadata/1.root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_root_only/server/metadata/1.snapshot.json b/client/testdata/Published1Time_client_root_only/server/metadata/1.snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata/1.targets.json b/client/testdata/Published1Time_client_root_only/server/metadata/1.targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata/1.timestamp.json b/client/testdata/Published1Time_client_root_only/server/metadata/1.timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata/root.json b/client/testdata/Published1Time_client_root_only/server/metadata/root.json deleted file mode 100644 index 8c174229..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "05353c8d3ec99bf81adec84a3d825a93d0a2e2afde92cfd83397451cd3def63dbcbeca4b4c9873c46ec8f509351ca6f9413d3da6bf166f285be6865a05135709" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-14T12:40:00Z", - "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/Published1Time_client_root_only/server/metadata/snapshot.json b/client/testdata/Published1Time_client_root_only/server/metadata/snapshot.json deleted file mode 100644 index 09129ad4..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "f4684f93d49f3e20c837ff97557fa46e86dc6267973e21baa770de4a9829677e2d54d24b931062077e6ec6920c61507cb9859d06d6b6dcaf33fb7b5706226d03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata/targets.json b/client/testdata/Published1Time_client_root_only/server/metadata/targets.json deleted file mode 100644 index 61a5d6f5..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "69ba74524d033175541495432ecb792395d1980b7218eaca5938a1be90fffbad9e84a64a96dc2029b1341e907187c6cc006be177022791925b04f062f6f2570b" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-14T12:40:00Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published1Time_client_root_only/server/metadata/timestamp.json b/client/testdata/Published1Time_client_root_only/server/metadata/timestamp.json deleted file mode 100644 index 9eff7d6e..00000000 --- a/client/testdata/Published1Time_client_root_only/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0a88915a0566feaa4df4a7f7a51e167ab4f8de8002de66046a6f6698ac2be2acfec915b87cb8b20cdff6e4e9a7c2a01dbb72bb6cc2906873de85c108dace8f02" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-14T12:40:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "dd1aa8bd502e5bdf982dcd41bfc6e8d3783b0cfa33be4bb60aff6da9a4491a5f", - "sha512": "338f427ab68a92c435e6c4e41a858b5e3481d57dd038eb35dbe1d2613d62f9aa1082187091d6f330e6c81de67fabac58e0d60c2bc2cbf2361932ae9f37c75705" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/current/1.root.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_keyrotated/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/current/1.targets.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/current/root.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_keyrotated/client/metadata/current/snapshot.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/current/targets.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/current/timestamp.json b/client/testdata/Published2Times_keyrotated/client/metadata/current/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.root.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_keyrotated/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/previous/root.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_keyrotated/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/previous/targets.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_keyrotated/client/metadata/previous/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/hash.txt b/client/testdata/Published2Times_keyrotated/hash.txt deleted file mode 100644 index 94732d5c..00000000 --- a/client/testdata/Published2Times_keyrotated/hash.txt +++ /dev/null @@ -1 +0,0 @@ -46183e42ee757c6704e7a122ab225ca633157738809243e8bc3cd92c67699dab \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.root.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_keyrotated/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata.staged/2.root.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/2.root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated/server/metadata.staged/root.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata.staged/targets.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_keyrotated/server/metadata.staged/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata/1.root.json b/client/testdata/Published2Times_keyrotated/server/metadata/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_keyrotated/server/metadata/1.snapshot.json b/client/testdata/Published2Times_keyrotated/server/metadata/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata/1.targets.json b/client/testdata/Published2Times_keyrotated/server/metadata/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata/1.timestamp.json b/client/testdata/Published2Times_keyrotated/server/metadata/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata/2.root.json b/client/testdata/Published2Times_keyrotated/server/metadata/2.root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated/server/metadata/root.json b/client/testdata/Published2Times_keyrotated/server/metadata/root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated/server/metadata/snapshot.json b/client/testdata/Published2Times_keyrotated/server/metadata/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata/targets.json b/client/testdata/Published2Times_keyrotated/server/metadata/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated/server/metadata/timestamp.json b/client/testdata/Published2Times_keyrotated/server/metadata/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published2Times_keyrotated_initialrootexpired/client/metadata/current/snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/hash.txt b/client/testdata/Published2Times_keyrotated_initialrootexpired/hash.txt deleted file mode 100644 index 1c67393d..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/hash.txt +++ /dev/null @@ -1 +0,0 @@ -76108cb5fdef506ef1fb58b75b44008193d7368938b090f82deae5dc88dca7df \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/2.root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/2.root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published2Times_keyrotated_initialrootexpired/server/metadata/1.snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/2.root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/2.root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_initialrootexpired/server/metadata/root.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_initialrootexpired/server/metadata/snapshot.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/targets.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/timestamp.json b/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_keyrotated_initialrootexpired/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.root.json deleted file mode 100644 index 4ab5da2f..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "eb855bd4b5abba2553aeeedf6aa7df3a9823486e5ebdd5e584e465db4772872ba07e5d246260249853b8c5c5a057b59bb5f169b944691ec4d898293f3d1fb10e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/root.json deleted file mode 100644 index 4ab5da2f..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "eb855bd4b5abba2553aeeedf6aa7df3a9823486e5ebdd5e584e465db4772872ba07e5d246260249853b8c5c5a057b59bb5f169b944691ec4d898293f3d1fb10e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.root.json deleted file mode 100644 index 4ab5da2f..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "eb855bd4b5abba2553aeeedf6aa7df3a9823486e5ebdd5e584e465db4772872ba07e5d246260249853b8c5c5a057b59bb5f169b944691ec4d898293f3d1fb10e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/root.json deleted file mode 100644 index 4ab5da2f..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "eb855bd4b5abba2553aeeedf6aa7df3a9823486e5ebdd5e584e465db4772872ba07e5d246260249853b8c5c5a057b59bb5f169b944691ec4d898293f3d1fb10e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/hash.txt b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/hash.txt deleted file mode 100644 index 33e50c54..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/hash.txt +++ /dev/null @@ -1 +0,0 @@ -01bad68cbfe77f8d25005708a5ae983304afd54ef92062b4c75cedaf905ec102 \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.root.json deleted file mode 100644 index 4ab5da2f..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "eb855bd4b5abba2553aeeedf6aa7df3a9823486e5ebdd5e584e465db4772872ba07e5d246260249853b8c5c5a057b59bb5f169b944691ec4d898293f3d1fb10e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/2.root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/2.root.json deleted file mode 100644 index 79778404..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "da7ef701db2051465c600eae99a3664653d298e6c6ce230b10414b7044ce18b98f17f15f05ecf5678ce776b4bab058db6aa0d920a832bd5d3c167e81d9d1160d" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "d1c36ce282376aeec81a74229e8d0927f87d0044aace710b93c11088e49a6889f6135dc18fafc23ea2caead0a9164bfec2c0f825d6979fb459ec6bf3471cdb0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/root.json deleted file mode 100644 index 79778404..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "da7ef701db2051465c600eae99a3664653d298e6c6ce230b10414b7044ce18b98f17f15f05ecf5678ce776b4bab058db6aa0d920a832bd5d3c167e81d9d1160d" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "d1c36ce282376aeec81a74229e8d0927f87d0044aace710b93c11088e49a6889f6135dc18fafc23ea2caead0a9164bfec2c0f825d6979fb459ec6bf3471cdb0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.root.json deleted file mode 100644 index 4ab5da2f..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "eb855bd4b5abba2553aeeedf6aa7df3a9823486e5ebdd5e584e465db4772872ba07e5d246260249853b8c5c5a057b59bb5f169b944691ec4d898293f3d1fb10e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/2.root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/2.root.json deleted file mode 100644 index 77fa70e7..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "da7ef701db2051465c600eae99a3664653d298e6c6ce230b10414b7044ce18b98f17f15f05ecf5678ce776b4bab058db6aa0d920a832bd5d3c167e81d9d1160d" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "000000" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/root.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/root.json deleted file mode 100644 index 79778404..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "da7ef701db2051465c600eae99a3664653d298e6c6ce230b10414b7044ce18b98f17f15f05ecf5678ce776b4bab058db6aa0d920a832bd5d3c167e81d9d1160d" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "d1c36ce282376aeec81a74229e8d0927f87d0044aace710b93c11088e49a6889f6135dc18fafc23ea2caead0a9164bfec2c0f825d6979fb459ec6bf3471cdb0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2022-09-10T09:49:07Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/snapshot.json deleted file mode 100644 index 2c249172..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7283800e4ad40d7461b03bf6cd8a37218d7a233341cd9fe803398902274b1647213567ee0287c852b33d1c157461cb999ff399e4dc293a07141afd6abea25a03" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2021-09-17T04:00:47Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/targets.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/targets.json deleted file mode 100644 index 9d27a59d..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6202bb047ad7e5a13b514be1b8c128621374a70c17dba57b29ed58691b0badfe4827e47b6de8ee6fa35b731d1be994a492aa60ba872ed7e9a332a1fbb1cf910c" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2021-12-10T11:27:57Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/timestamp.json deleted file mode 100644 index 99bdb516..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidNewRootSignature/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "f95d84c5d292a024dffc394b842fef1634d00491762841715083c167eb8be1cb5b34604c13d27a6b27a2b73e0188df5e89b219022038b22c8b6d493fdd13a906" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2021-09-11T04:00:47Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "a9591bd41f7ce1b3ce8a13c4266d7ad5ea91ad51279955d1965259aa7fd32394", - "sha512": "191cd66f1e3ebc512b186e3de6f15a1f36cb6a91a7a229f2df67161dd1e75d005a05cf2017512903525160f1c867e6a06b1bacc1ba8d3cdd7521bc9f46a998b3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.root.json deleted file mode 100644 index b7fa8217..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e3b2b8cbc279c332ef1f74f940235d7ab98e49cbbf09f78a4445285dc45bab991ecf98e714487f8e43bbd715efcbbff1d5ba91c190ba6a1826f0d6564aee6d05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/root.json deleted file mode 100644 index b7fa8217..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e3b2b8cbc279c332ef1f74f940235d7ab98e49cbbf09f78a4445285dc45bab991ecf98e714487f8e43bbd715efcbbff1d5ba91c190ba6a1826f0d6564aee6d05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.root.json deleted file mode 100644 index b7fa8217..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e3b2b8cbc279c332ef1f74f940235d7ab98e49cbbf09f78a4445285dc45bab991ecf98e714487f8e43bbd715efcbbff1d5ba91c190ba6a1826f0d6564aee6d05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/root.json deleted file mode 100644 index b7fa8217..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e3b2b8cbc279c332ef1f74f940235d7ab98e49cbbf09f78a4445285dc45bab991ecf98e714487f8e43bbd715efcbbff1d5ba91c190ba6a1826f0d6564aee6d05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/hash.txt b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/hash.txt deleted file mode 100644 index 1ffc9a61..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/hash.txt +++ /dev/null @@ -1 +0,0 @@ -22e59be74a4c783467e0adc5a888fb7222ea10473baad417dbf64bd8fa220e5b \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.root.json deleted file mode 100644 index b7fa8217..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e3b2b8cbc279c332ef1f74f940235d7ab98e49cbbf09f78a4445285dc45bab991ecf98e714487f8e43bbd715efcbbff1d5ba91c190ba6a1826f0d6564aee6d05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/2.root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/2.root.json deleted file mode 100644 index ffe63b57..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "a730b0d31a67712f4bcda4406dd26d515717ce214c7768556a5ebbd9d4f0b8507eb6754421c7d46cabe469ab3db81a774055dfdee88457203bb1148576854e0a" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "4ba4216f3f0fcb14a39ff0690b48200a0b9b4bb3505433a1eaf8269e9eb73c78f36fa8b777fe69b3543b86845739ced2efe13f4d669724f6d6d2111b7dfe5c05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/root.json deleted file mode 100644 index ffe63b57..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "a730b0d31a67712f4bcda4406dd26d515717ce214c7768556a5ebbd9d4f0b8507eb6754421c7d46cabe469ab3db81a774055dfdee88457203bb1148576854e0a" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "4ba4216f3f0fcb14a39ff0690b48200a0b9b4bb3505433a1eaf8269e9eb73c78f36fa8b777fe69b3543b86845739ced2efe13f4d669724f6d6d2111b7dfe5c05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.root.json deleted file mode 100644 index b7fa8217..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e3b2b8cbc279c332ef1f74f940235d7ab98e49cbbf09f78a4445285dc45bab991ecf98e714487f8e43bbd715efcbbff1d5ba91c190ba6a1826f0d6564aee6d05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/2.root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/2.root.json deleted file mode 100644 index d713d810..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "000000" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "4ba4216f3f0fcb14a39ff0690b48200a0b9b4bb3505433a1eaf8269e9eb73c78f36fa8b777fe69b3543b86845739ced2efe13f4d669724f6d6d2111b7dfe5c05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/root.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/root.json deleted file mode 100644 index ffe63b57..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "a730b0d31a67712f4bcda4406dd26d515717ce214c7768556a5ebbd9d4f0b8507eb6754421c7d46cabe469ab3db81a774055dfdee88457203bb1148576854e0a" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "4ba4216f3f0fcb14a39ff0690b48200a0b9b4bb3505433a1eaf8269e9eb73c78f36fa8b777fe69b3543b86845739ced2efe13f4d669724f6d6d2111b7dfe5c05" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/snapshot.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/targets.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/timestamp.json b/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published2Times_keyrotated_invalidOldRootSignature/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.root.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_roottoolarge/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.targets.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/current/root.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_roottoolarge/client/metadata/current/snapshot.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/current/targets.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/current/timestamp.json b/client/testdata/Published2Times_roottoolarge/client/metadata/current/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.root.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_roottoolarge/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/root.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_roottoolarge/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/targets.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_roottoolarge/client/metadata/previous/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/hash.txt b/client/testdata/Published2Times_roottoolarge/hash.txt deleted file mode 100644 index 94732d5c..00000000 --- a/client/testdata/Published2Times_roottoolarge/hash.txt +++ /dev/null @@ -1 +0,0 @@ -46183e42ee757c6704e7a122ab225ca633157738809243e8bc3cd92c67699dab \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.root.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_roottoolarge/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/2.root.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/2.root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_roottoolarge/server/metadata.staged/root.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_roottoolarge/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/targets.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_roottoolarge/server/metadata.staged/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata/1.root.json b/client/testdata/Published2Times_roottoolarge/server/metadata/1.root.json deleted file mode 100644 index fff03947..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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/Published2Times_roottoolarge/server/metadata/1.snapshot.json b/client/testdata/Published2Times_roottoolarge/server/metadata/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata/1.targets.json b/client/testdata/Published2Times_roottoolarge/server/metadata/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata/1.timestamp.json b/client/testdata/Published2Times_roottoolarge/server/metadata/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata/2.root.json b/client/testdata/Published2Times_roottoolarge/server/metadata/2.root.json deleted file mode 100644 index 4aad61d59a62ebedea65d8eb521b0773bec89754..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 512001 zcmeIuF#!Mo0K%a4Pi+hzh(KY$fB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwA zz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEj zFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r z3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@ z0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VK zfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5 zV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwA zz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEj zFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r z3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@ z0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VK zfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5 zV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwA zz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEj zFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r z3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@ z0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VK zfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5 zV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwA zz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEj zFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r z3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@ z0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VK zfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5 zV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM z7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* z1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd z0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwA zz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEj zFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r z3>YwAz<>b*1`HT5V8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b*1`HT5V8DO@ T0|pEjFkrxd0RsjM7&s3M&}sky diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata/root.json b/client/testdata/Published2Times_roottoolarge/server/metadata/root.json deleted file mode 100644 index 21d082c8..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "122b322d6f212fcc22ec9062e6948baf694ec4ecf366e4a3cd5cf4c738aa39706b3420aeacd6d8e0e54f0af0168644e905696b397974dadfd3d2a578be06fd08" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c5e5a542c368d32a8bb1884ffcc850f8902c96537b2b827be3608c44dbdd24ff0cd3b0c326e03869474091e21073f87a57237f2909300a2c43a41ca90c22020c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published2Times_roottoolarge/server/metadata/snapshot.json b/client/testdata/Published2Times_roottoolarge/server/metadata/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata/targets.json b/client/testdata/Published2Times_roottoolarge/server/metadata/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_roottoolarge/server/metadata/timestamp.json b/client/testdata/Published2Times_roottoolarge/server/metadata/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published2Times_roottoolarge/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.root.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_snapshot_keyrotated/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.targets.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/root.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_snapshot_keyrotated/client/metadata/current/snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/targets.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.root.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_snapshot_keyrotated/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/root.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_snapshot_keyrotated/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/targets.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/hash.txt b/client/testdata/Published2Times_snapshot_keyrotated/hash.txt deleted file mode 100644 index 605aae29..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/hash.txt +++ /dev/null @@ -1 +0,0 @@ -c8b65c989faaae06e6962fd58f0d2d84ae5b3786caa60b80514e23877a0ec1a4 \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.root.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_snapshot_keyrotated/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.root.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.root.json deleted file mode 100644 index e829eb10..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "b5ee398bcfdeffec3bc84420a9f21282543e7a45cbd8ffa896b0e3d99d614551fa72e387fd809306ddc1454e16fe8edb01b5808d16f186b664a538353bd38802" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "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/Published2Times_snapshot_keyrotated/server/metadata.staged/2.snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.snapshot.json deleted file mode 100644 index 850e763b..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ba835d8c4556c0d490e81a0aae287dd7359ffa2378160161979756b8c7e04d492eb370c50447c746064e38b318323059168fa319de2399da8387aeb7f951f401" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d9617e7899227aa417a59db0ecd64775fc651cbb3c4196fb45c36885d8bce0af9e19f2e9b0ce1e2f089b72a8bf7d120fdafe649c1ce79b1e0c95845b541c6805" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.timestamp.json deleted file mode 100644 index d902a0b0..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "57e25d5c42c25aeda1cfa5e6144567661867d15ef35746fedb685ea077e2dc803091ab26b3e50dfeedf405454f38159e453541a518c80a9c10923eff240fee07" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "70122787e9fa61099a44d5bc04b4b52c95a6eb553ba7e60b7b778b5d1539913c", - "sha512": "2290f310345240bcba820722f09d70a0a463032c8c807122e30385a7e6a9fbd3ff044dce5d0994d182853ba1651057920ebbf0447c470d85370fb57afef9034e" - }, - "length": 661, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/root.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/root.json deleted file mode 100644 index e829eb10..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "b5ee398bcfdeffec3bc84420a9f21282543e7a45cbd8ffa896b0e3d99d614551fa72e387fd809306ddc1454e16fe8edb01b5808d16f186b664a538353bd38802" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "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/Published2Times_snapshot_keyrotated/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/snapshot.json deleted file mode 100644 index 850e763b..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ba835d8c4556c0d490e81a0aae287dd7359ffa2378160161979756b8c7e04d492eb370c50447c746064e38b318323059168fa319de2399da8387aeb7f951f401" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d9617e7899227aa417a59db0ecd64775fc651cbb3c4196fb45c36885d8bce0af9e19f2e9b0ce1e2f089b72a8bf7d120fdafe649c1ce79b1e0c95845b541c6805" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/targets.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/timestamp.json deleted file mode 100644 index d902a0b0..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "57e25d5c42c25aeda1cfa5e6144567661867d15ef35746fedb685ea077e2dc803091ab26b3e50dfeedf405454f38159e453541a518c80a9c10923eff240fee07" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "70122787e9fa61099a44d5bc04b4b52c95a6eb553ba7e60b7b778b5d1539913c", - "sha512": "2290f310345240bcba820722f09d70a0a463032c8c807122e30385a7e6a9fbd3ff044dce5d0994d182853ba1651057920ebbf0447c470d85370fb57afef9034e" - }, - "length": 661, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.root.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_snapshot_keyrotated/server/metadata/1.snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.targets.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.root.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.root.json deleted file mode 100644 index e829eb10..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "b5ee398bcfdeffec3bc84420a9f21282543e7a45cbd8ffa896b0e3d99d614551fa72e387fd809306ddc1454e16fe8edb01b5808d16f186b664a538353bd38802" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "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/Published2Times_snapshot_keyrotated/server/metadata/2.snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.snapshot.json deleted file mode 100644 index 850e763b..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ba835d8c4556c0d490e81a0aae287dd7359ffa2378160161979756b8c7e04d492eb370c50447c746064e38b318323059168fa319de2399da8387aeb7f951f401" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d9617e7899227aa417a59db0ecd64775fc651cbb3c4196fb45c36885d8bce0af9e19f2e9b0ce1e2f089b72a8bf7d120fdafe649c1ce79b1e0c95845b541c6805" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.timestamp.json deleted file mode 100644 index d902a0b0..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "57e25d5c42c25aeda1cfa5e6144567661867d15ef35746fedb685ea077e2dc803091ab26b3e50dfeedf405454f38159e453541a518c80a9c10923eff240fee07" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "70122787e9fa61099a44d5bc04b4b52c95a6eb553ba7e60b7b778b5d1539913c", - "sha512": "2290f310345240bcba820722f09d70a0a463032c8c807122e30385a7e6a9fbd3ff044dce5d0994d182853ba1651057920ebbf0447c470d85370fb57afef9034e" - }, - "length": 661, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/root.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/root.json deleted file mode 100644 index e829eb10..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "b5ee398bcfdeffec3bc84420a9f21282543e7a45cbd8ffa896b0e3d99d614551fa72e387fd809306ddc1454e16fe8edb01b5808d16f186b664a538353bd38802" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "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/Published2Times_snapshot_keyrotated/server/metadata/snapshot.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/snapshot.json deleted file mode 100644 index 850e763b..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ba835d8c4556c0d490e81a0aae287dd7359ffa2378160161979756b8c7e04d492eb370c50447c746064e38b318323059168fa319de2399da8387aeb7f951f401" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d9617e7899227aa417a59db0ecd64775fc651cbb3c4196fb45c36885d8bce0af9e19f2e9b0ce1e2f089b72a8bf7d120fdafe649c1ce79b1e0c95845b541c6805" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/targets.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/timestamp.json b/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/timestamp.json deleted file mode 100644 index d902a0b0..00000000 --- a/client/testdata/Published2Times_snapshot_keyrotated/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "57e25d5c42c25aeda1cfa5e6144567661867d15ef35746fedb685ea077e2dc803091ab26b3e50dfeedf405454f38159e453541a518c80a9c10923eff240fee07" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "70122787e9fa61099a44d5bc04b4b52c95a6eb553ba7e60b7b778b5d1539913c", - "sha512": "2290f310345240bcba820722f09d70a0a463032c8c807122e30385a7e6a9fbd3ff044dce5d0994d182853ba1651057920ebbf0447c470d85370fb57afef9034e" - }, - "length": 661, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.root.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.root.json deleted file mode 100644 index 2f7a7ac2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "178b16c8bfeefe6b9d2296be36a09ec8d0ec5e2ddcf7db851c1157c2da9ac78623736ddd0e145ef791c00370a261c47ff09eb29817d21a3bd02057b32ad93603" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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/Published2Times_targets_keyrotated/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.snapshot.json deleted file mode 100644 index 580836df..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "aecb0a813124c7a42c125d94fa8dfd0bd6083acc30a1e8e2d85956d61cdd296f8adb561f8035826f9ad0480c5f3fd8581e0595ddf719a6b839acd9549667ad0d" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.targets.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.targets.json deleted file mode 100644 index 74c79a6b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "923e033c7952d24cb509f62d8dfed00fb554b9dd3578567ddd2205377038044a5dd45c132755fed5b3e5f5ff8e4204fa0d219b47bc0f39c1b48fad2fdbc94805" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.timestamp.json deleted file mode 100644 index 62c7756e..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "d284bf6f5dc45828cd3d3cc771657ade69731d815df34bb0eec14dd645aa235eb67c32bb5cb7ad1d4e56e69fc1df002bf48c7264c6f9105e05cbb9a2c6c36b0d" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "8c30184e206b001443cc8c5ab74a45fbb80e3b6f7937fd42917635b64970442e", - "sha512": "22f32f8178f842277f0e2e3dc24c03ccdf310be97533ddf41dffafa40be3448d9b22a1ac596c2b04b2357475823501156e52a2e9c39b730603f3c7ed3c8769d1" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/root.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/root.json deleted file mode 100644 index 2f7a7ac2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "178b16c8bfeefe6b9d2296be36a09ec8d0ec5e2ddcf7db851c1157c2da9ac78623736ddd0e145ef791c00370a261c47ff09eb29817d21a3bd02057b32ad93603" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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/Published2Times_targets_keyrotated/client/metadata/current/snapshot.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/snapshot.json deleted file mode 100644 index 580836df..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "aecb0a813124c7a42c125d94fa8dfd0bd6083acc30a1e8e2d85956d61cdd296f8adb561f8035826f9ad0480c5f3fd8581e0595ddf719a6b839acd9549667ad0d" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/targets.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/targets.json deleted file mode 100644 index 74c79a6b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "923e033c7952d24cb509f62d8dfed00fb554b9dd3578567ddd2205377038044a5dd45c132755fed5b3e5f5ff8e4204fa0d219b47bc0f39c1b48fad2fdbc94805" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/timestamp.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/timestamp.json deleted file mode 100644 index 62c7756e..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "d284bf6f5dc45828cd3d3cc771657ade69731d815df34bb0eec14dd645aa235eb67c32bb5cb7ad1d4e56e69fc1df002bf48c7264c6f9105e05cbb9a2c6c36b0d" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "8c30184e206b001443cc8c5ab74a45fbb80e3b6f7937fd42917635b64970442e", - "sha512": "22f32f8178f842277f0e2e3dc24c03ccdf310be97533ddf41dffafa40be3448d9b22a1ac596c2b04b2357475823501156e52a2e9c39b730603f3c7ed3c8769d1" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.root.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.root.json deleted file mode 100644 index 2f7a7ac2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "178b16c8bfeefe6b9d2296be36a09ec8d0ec5e2ddcf7db851c1157c2da9ac78623736ddd0e145ef791c00370a261c47ff09eb29817d21a3bd02057b32ad93603" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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/Published2Times_targets_keyrotated/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 580836df..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "aecb0a813124c7a42c125d94fa8dfd0bd6083acc30a1e8e2d85956d61cdd296f8adb561f8035826f9ad0480c5f3fd8581e0595ddf719a6b839acd9549667ad0d" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.targets.json deleted file mode 100644 index 74c79a6b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "923e033c7952d24cb509f62d8dfed00fb554b9dd3578567ddd2205377038044a5dd45c132755fed5b3e5f5ff8e4204fa0d219b47bc0f39c1b48fad2fdbc94805" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 62c7756e..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "d284bf6f5dc45828cd3d3cc771657ade69731d815df34bb0eec14dd645aa235eb67c32bb5cb7ad1d4e56e69fc1df002bf48c7264c6f9105e05cbb9a2c6c36b0d" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "8c30184e206b001443cc8c5ab74a45fbb80e3b6f7937fd42917635b64970442e", - "sha512": "22f32f8178f842277f0e2e3dc24c03ccdf310be97533ddf41dffafa40be3448d9b22a1ac596c2b04b2357475823501156e52a2e9c39b730603f3c7ed3c8769d1" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/root.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/root.json deleted file mode 100644 index 2f7a7ac2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "178b16c8bfeefe6b9d2296be36a09ec8d0ec5e2ddcf7db851c1157c2da9ac78623736ddd0e145ef791c00370a261c47ff09eb29817d21a3bd02057b32ad93603" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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/Published2Times_targets_keyrotated/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/snapshot.json deleted file mode 100644 index 580836df..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "aecb0a813124c7a42c125d94fa8dfd0bd6083acc30a1e8e2d85956d61cdd296f8adb561f8035826f9ad0480c5f3fd8581e0595ddf719a6b839acd9549667ad0d" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/targets.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/targets.json deleted file mode 100644 index 74c79a6b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "923e033c7952d24cb509f62d8dfed00fb554b9dd3578567ddd2205377038044a5dd45c132755fed5b3e5f5ff8e4204fa0d219b47bc0f39c1b48fad2fdbc94805" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/timestamp.json deleted file mode 100644 index 62c7756e..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "d284bf6f5dc45828cd3d3cc771657ade69731d815df34bb0eec14dd645aa235eb67c32bb5cb7ad1d4e56e69fc1df002bf48c7264c6f9105e05cbb9a2c6c36b0d" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "8c30184e206b001443cc8c5ab74a45fbb80e3b6f7937fd42917635b64970442e", - "sha512": "22f32f8178f842277f0e2e3dc24c03ccdf310be97533ddf41dffafa40be3448d9b22a1ac596c2b04b2357475823501156e52a2e9c39b730603f3c7ed3c8769d1" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/hash.txt b/client/testdata/Published2Times_targets_keyrotated/hash.txt deleted file mode 100644 index 6032a36c..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/hash.txt +++ /dev/null @@ -1 +0,0 @@ -da386545caf1b4bc294d8be949b3bd1a81de1d72cbeb9389c678e5ded14de472 \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.root.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.root.json deleted file mode 100644 index 2f7a7ac2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "178b16c8bfeefe6b9d2296be36a09ec8d0ec5e2ddcf7db851c1157c2da9ac78623736ddd0e145ef791c00370a261c47ff09eb29817d21a3bd02057b32ad93603" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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/Published2Times_targets_keyrotated/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 580836df..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "aecb0a813124c7a42c125d94fa8dfd0bd6083acc30a1e8e2d85956d61cdd296f8adb561f8035826f9ad0480c5f3fd8581e0595ddf719a6b839acd9549667ad0d" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.targets.json deleted file mode 100644 index 74c79a6b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "923e033c7952d24cb509f62d8dfed00fb554b9dd3578567ddd2205377038044a5dd45c132755fed5b3e5f5ff8e4204fa0d219b47bc0f39c1b48fad2fdbc94805" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 62c7756e..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "d284bf6f5dc45828cd3d3cc771657ade69731d815df34bb0eec14dd645aa235eb67c32bb5cb7ad1d4e56e69fc1df002bf48c7264c6f9105e05cbb9a2c6c36b0d" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "8c30184e206b001443cc8c5ab74a45fbb80e3b6f7937fd42917635b64970442e", - "sha512": "22f32f8178f842277f0e2e3dc24c03ccdf310be97533ddf41dffafa40be3448d9b22a1ac596c2b04b2357475823501156e52a2e9c39b730603f3c7ed3c8769d1" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.root.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.root.json deleted file mode 100644 index 8d2460c2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "11c2da5dc46bcf9e2aa41ce633778480a5f74160c2547085dd85b802e67b71c10e2a3fd2b1fcf800364408a555ca2e1f309cf09137b1225bc015f9535e2c5a01" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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" - }, - "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", - "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/Published2Times_targets_keyrotated/server/metadata.staged/2.snapshot.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.snapshot.json deleted file mode 100644 index 5e104565..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "faa00b87121a1cefdaec6ea5fe1078465d989ac73b18220b594dc62302d8c661d6dea53f9baea9c8fc29fb988c889d5096a9914979ad53027cd281de1549f107" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.targets.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.targets.json deleted file mode 100644 index 91de6b5b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.targets.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9d7c09bf862a443be7a1cf14c1d2bf2f812dea9ab33567f14a3b33ff52af70865fd11c17ed92d187bb319fd984709a6ed59cc3d216ee9f3151af0764eafa460d" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "94541820374b4a4a7d92a8d7fbf22ab5e203c1da0559c21e1168f2ebcbcf19a939bf46f4c96cf678480708ff5549f14fec56e3163cce60f4e753f173ebbc6706" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.timestamp.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.timestamp.json deleted file mode 100644 index ff74b84f..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "56e9600e8db24012f69219ecb7d27edb0c4e3da64dabccd6948c4c12e42be4360854941ced0f6b11544166306c225ed9cd7b2e979de11340246890ed664a3707" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "26e36995257b9d61a9e7d06fe5c7ce43c1f01db1d078509ac1ca91c7a3ea6b97", - "sha512": "ba915258f9b6f711809e657aef8c37f76009be392fe560da3af6ee49e9027101d9d27c8d6cc74502947445fe59864502c992374c5c68dfe5f91a35c72a49d6df" - }, - "length": 431, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/root.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/root.json deleted file mode 100644 index 8d2460c2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "11c2da5dc46bcf9e2aa41ce633778480a5f74160c2547085dd85b802e67b71c10e2a3fd2b1fcf800364408a555ca2e1f309cf09137b1225bc015f9535e2c5a01" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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" - }, - "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", - "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/Published2Times_targets_keyrotated/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/snapshot.json deleted file mode 100644 index 5e104565..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "faa00b87121a1cefdaec6ea5fe1078465d989ac73b18220b594dc62302d8c661d6dea53f9baea9c8fc29fb988c889d5096a9914979ad53027cd281de1549f107" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/targets.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/targets.json deleted file mode 100644 index 91de6b5b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/targets.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9d7c09bf862a443be7a1cf14c1d2bf2f812dea9ab33567f14a3b33ff52af70865fd11c17ed92d187bb319fd984709a6ed59cc3d216ee9f3151af0764eafa460d" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "94541820374b4a4a7d92a8d7fbf22ab5e203c1da0559c21e1168f2ebcbcf19a939bf46f4c96cf678480708ff5549f14fec56e3163cce60f4e753f173ebbc6706" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/timestamp.json deleted file mode 100644 index ff74b84f..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "56e9600e8db24012f69219ecb7d27edb0c4e3da64dabccd6948c4c12e42be4360854941ced0f6b11544166306c225ed9cd7b2e979de11340246890ed664a3707" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "26e36995257b9d61a9e7d06fe5c7ce43c1f01db1d078509ac1ca91c7a3ea6b97", - "sha512": "ba915258f9b6f711809e657aef8c37f76009be392fe560da3af6ee49e9027101d9d27c8d6cc74502947445fe59864502c992374c5c68dfe5f91a35c72a49d6df" - }, - "length": 431, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.root.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.root.json deleted file mode 100644 index 2f7a7ac2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "178b16c8bfeefe6b9d2296be36a09ec8d0ec5e2ddcf7db851c1157c2da9ac78623736ddd0e145ef791c00370a261c47ff09eb29817d21a3bd02057b32ad93603" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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/Published2Times_targets_keyrotated/server/metadata/1.snapshot.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.snapshot.json deleted file mode 100644 index 580836df..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "aecb0a813124c7a42c125d94fa8dfd0bd6083acc30a1e8e2d85956d61cdd296f8adb561f8035826f9ad0480c5f3fd8581e0595ddf719a6b839acd9549667ad0d" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.targets.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.targets.json deleted file mode 100644 index 74c79a6b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "923e033c7952d24cb509f62d8dfed00fb554b9dd3578567ddd2205377038044a5dd45c132755fed5b3e5f5ff8e4204fa0d219b47bc0f39c1b48fad2fdbc94805" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.timestamp.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.timestamp.json deleted file mode 100644 index 62c7756e..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "d284bf6f5dc45828cd3d3cc771657ade69731d815df34bb0eec14dd645aa235eb67c32bb5cb7ad1d4e56e69fc1df002bf48c7264c6f9105e05cbb9a2c6c36b0d" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "8c30184e206b001443cc8c5ab74a45fbb80e3b6f7937fd42917635b64970442e", - "sha512": "22f32f8178f842277f0e2e3dc24c03ccdf310be97533ddf41dffafa40be3448d9b22a1ac596c2b04b2357475823501156e52a2e9c39b730603f3c7ed3c8769d1" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.root.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.root.json deleted file mode 100644 index 8d2460c2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "11c2da5dc46bcf9e2aa41ce633778480a5f74160c2547085dd85b802e67b71c10e2a3fd2b1fcf800364408a555ca2e1f309cf09137b1225bc015f9535e2c5a01" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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" - }, - "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", - "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/Published2Times_targets_keyrotated/server/metadata/2.snapshot.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.snapshot.json deleted file mode 100644 index 5e104565..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "faa00b87121a1cefdaec6ea5fe1078465d989ac73b18220b594dc62302d8c661d6dea53f9baea9c8fc29fb988c889d5096a9914979ad53027cd281de1549f107" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.targets.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.targets.json deleted file mode 100644 index 91de6b5b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.targets.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9d7c09bf862a443be7a1cf14c1d2bf2f812dea9ab33567f14a3b33ff52af70865fd11c17ed92d187bb319fd984709a6ed59cc3d216ee9f3151af0764eafa460d" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "94541820374b4a4a7d92a8d7fbf22ab5e203c1da0559c21e1168f2ebcbcf19a939bf46f4c96cf678480708ff5549f14fec56e3163cce60f4e753f173ebbc6706" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.timestamp.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.timestamp.json deleted file mode 100644 index ff74b84f..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "56e9600e8db24012f69219ecb7d27edb0c4e3da64dabccd6948c4c12e42be4360854941ced0f6b11544166306c225ed9cd7b2e979de11340246890ed664a3707" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "26e36995257b9d61a9e7d06fe5c7ce43c1f01db1d078509ac1ca91c7a3ea6b97", - "sha512": "ba915258f9b6f711809e657aef8c37f76009be392fe560da3af6ee49e9027101d9d27c8d6cc74502947445fe59864502c992374c5c68dfe5f91a35c72a49d6df" - }, - "length": 431, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/root.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/root.json deleted file mode 100644 index 8d2460c2..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "11c2da5dc46bcf9e2aa41ce633778480a5f74160c2547085dd85b802e67b71c10e2a3fd2b1fcf800364408a555ca2e1f309cf09137b1225bc015f9535e2c5a01" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:40Z", - "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" - }, - "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", - "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/Published2Times_targets_keyrotated/server/metadata/snapshot.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/snapshot.json deleted file mode 100644 index 5e104565..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "faa00b87121a1cefdaec6ea5fe1078465d989ac73b18220b594dc62302d8c661d6dea53f9baea9c8fc29fb988c889d5096a9914979ad53027cd281de1549f107" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "targets.json": { - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/targets.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/targets.json deleted file mode 100644 index 91de6b5b..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/targets.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9d7c09bf862a443be7a1cf14c1d2bf2f812dea9ab33567f14a3b33ff52af70865fd11c17ed92d187bb319fd984709a6ed59cc3d216ee9f3151af0764eafa460d" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "94541820374b4a4a7d92a8d7fbf22ab5e203c1da0559c21e1168f2ebcbcf19a939bf46f4c96cf678480708ff5549f14fec56e3163cce60f4e753f173ebbc6706" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:40Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_targets_keyrotated/server/metadata/timestamp.json b/client/testdata/Published2Times_targets_keyrotated/server/metadata/timestamp.json deleted file mode 100644 index ff74b84f..00000000 --- a/client/testdata/Published2Times_targets_keyrotated/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "56e9600e8db24012f69219ecb7d27edb0c4e3da64dabccd6948c4c12e42be4360854941ced0f6b11544166306c225ed9cd7b2e979de11340246890ed664a3707" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:40Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "26e36995257b9d61a9e7d06fe5c7ce43c1f01db1d078509ac1ca91c7a3ea6b97", - "sha512": "ba915258f9b6f711809e657aef8c37f76009be392fe560da3af6ee49e9027101d9d27c8d6cc74502947445fe59864502c992374c5c68dfe5f91a35c72a49d6df" - }, - "length": 431, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.root.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_timestamp_keyrotated/client/metadata/current/1.snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.targets.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/root.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_timestamp_keyrotated/client/metadata/current/snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/targets.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.root.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_timestamp_keyrotated/client/metadata/previous/1.snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.targets.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/root.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_timestamp_keyrotated/client/metadata/previous/snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/targets.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/hash.txt b/client/testdata/Published2Times_timestamp_keyrotated/hash.txt deleted file mode 100644 index 68ccd584..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/hash.txt +++ /dev/null @@ -1 +0,0 @@ -cc8aeb813bb72f4057f56f8c89fc81548ad290592fb0023df691ce505e402a57 \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.root.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_timestamp_keyrotated/server/metadata.staged/1.snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.targets.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.root.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.root.json deleted file mode 100644 index 1d316a87..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "751ae9cf8ef0167e182eae200b05a236041b1a2c4e5fa599c304bf7f99a6f1dcb1627dce10f792dbe85481921e548e4edae2567ec41a927affa3b25d0bb3b804" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.timestamp.json deleted file mode 100644 index cf815406..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/2.timestamp.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "955181a388d83f9ce358bd5430379b66fa3e65412838e807ded2ef4ac0a9c191a0bdceb572b607b923d7ffbfda9c83c621bc8cc9644a8496730b436e7b332101" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "388320f4ba609a57b74687f5c6ec7b64cfbceeac6040631a93515d4f15021cc033518dfc170b979259f227b250063a377d89be042aec0222ef739b2582200a03" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/root.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/root.json deleted file mode 100644 index 1d316a87..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "751ae9cf8ef0167e182eae200b05a236041b1a2c4e5fa599c304bf7f99a6f1dcb1627dce10f792dbe85481921e548e4edae2567ec41a927affa3b25d0bb3b804" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/targets.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/timestamp.json deleted file mode 100644 index cf815406..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "955181a388d83f9ce358bd5430379b66fa3e65412838e807ded2ef4ac0a9c191a0bdceb572b607b923d7ffbfda9c83c621bc8cc9644a8496730b436e7b332101" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "388320f4ba609a57b74687f5c6ec7b64cfbceeac6040631a93515d4f15021cc033518dfc170b979259f227b250063a377d89be042aec0222ef739b2582200a03" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.root.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published2Times_timestamp_keyrotated/server/metadata/1.snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.targets.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.root.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.root.json deleted file mode 100644 index 1d316a87..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "751ae9cf8ef0167e182eae200b05a236041b1a2c4e5fa599c304bf7f99a6f1dcb1627dce10f792dbe85481921e548e4edae2567ec41a927affa3b25d0bb3b804" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.timestamp.json deleted file mode 100644 index cf815406..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/2.timestamp.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "955181a388d83f9ce358bd5430379b66fa3e65412838e807ded2ef4ac0a9c191a0bdceb572b607b923d7ffbfda9c83c621bc8cc9644a8496730b436e7b332101" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "388320f4ba609a57b74687f5c6ec7b64cfbceeac6040631a93515d4f15021cc033518dfc170b979259f227b250063a377d89be042aec0222ef739b2582200a03" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/root.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/root.json deleted file mode 100644 index 1d316a87..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/root.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "751ae9cf8ef0167e182eae200b05a236041b1a2c4e5fa599c304bf7f99a6f1dcb1627dce10f792dbe85481921e548e4edae2567ec41a927affa3b25d0bb3b804" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/snapshot.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/targets.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/timestamp.json b/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/timestamp.json deleted file mode 100644 index cf815406..00000000 --- a/client/testdata/Published2Times_timestamp_keyrotated/server/metadata/timestamp.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "955181a388d83f9ce358bd5430379b66fa3e65412838e807ded2ef4ac0a9c191a0bdceb572b607b923d7ffbfda9c83c621bc8cc9644a8496730b436e7b332101" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "388320f4ba609a57b74687f5c6ec7b64cfbceeac6040631a93515d4f15021cc033518dfc170b979259f227b250063a377d89be042aec0222ef739b2582200a03" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/hash.txt b/client/testdata/Published3Times_keyrotated_forwardRootVersion/hash.txt deleted file mode 100644 index c3fe8ab1..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/hash.txt +++ /dev/null @@ -1 +0,0 @@ -31049291c7fd0a608a198abff1961a1c8ba43af52adc2db79c274959f2b985a0 \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/2.root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/2.root.json deleted file mode 100644 index 87c727f8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "954ba1348157a7f20cc63d59c3049545d31eee1934eee6db9393b29ce7be5b4497863d6559564fe900f313f03ef27acfb49df1df0e45f6585c8209c561c62f01" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "9a0818b253bd97827a036cde24325174ab93a7293e1326ab578ce8ca3c60c451f7a74757eb88796699e08a6247bbf73fe55a5e4f68d3ccf29bfd07703e905b07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/3.root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/3.root.json deleted file mode 100644 index 320afc3d..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/3.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "779ac2132b1e22ad3a5893ed1ccb72517743a4827bd37218f4b4c95710c3a9ed5a127b1a82ee8bfbc68e19d31574610eb47b290f43b8229fc820de6a98575706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "ba5ed25669dbd59354848e288e6fda23b9a86a9e350137a5e6c8beb7a78dad48b148b89cc5cb8c7754e74b47dc66c419957cfe68cb5b2213477cd8b5b5bfe304" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "231490d1052f581842715786bf0692c61c75ef17f37b0dad9432d5464bf9e34f3740ddf103f7afc5bcaa8ade9c1fd310a6393a44de79be38d24e5bdd50190304" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/root.json deleted file mode 100644 index 320afc3d..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "779ac2132b1e22ad3a5893ed1ccb72517743a4827bd37218f4b4c95710c3a9ed5a127b1a82ee8bfbc68e19d31574610eb47b290f43b8229fc820de6a98575706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "ba5ed25669dbd59354848e288e6fda23b9a86a9e350137a5e6c8beb7a78dad48b148b89cc5cb8c7754e74b47dc66c419957cfe68cb5b2213477cd8b5b5bfe304" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "231490d1052f581842715786bf0692c61c75ef17f37b0dad9432d5464bf9e34f3740ddf103f7afc5bcaa8ade9c1fd310a6393a44de79be38d24e5bdd50190304" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.root.json deleted file mode 100644 index 7aa3dbdb..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "7e2a5844a166b2873c86ee92fc2c07319424ddb66a0372797633f9dd5bcb869409eb00384095fd3e8f4fe5ca451da5ef6b3b864fc8c1b3bd1946743f30411205" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "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/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/2.root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/2.root.json deleted file mode 100644 index 320afc3d..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/2.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "779ac2132b1e22ad3a5893ed1ccb72517743a4827bd37218f4b4c95710c3a9ed5a127b1a82ee8bfbc68e19d31574610eb47b290f43b8229fc820de6a98575706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "ba5ed25669dbd59354848e288e6fda23b9a86a9e350137a5e6c8beb7a78dad48b148b89cc5cb8c7754e74b47dc66c419957cfe68cb5b2213477cd8b5b5bfe304" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "231490d1052f581842715786bf0692c61c75ef17f37b0dad9432d5464bf9e34f3740ddf103f7afc5bcaa8ade9c1fd310a6393a44de79be38d24e5bdd50190304" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_forwardRootVersion/server/metadata/root.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/root.json deleted file mode 100644 index 320afc3d..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "779ac2132b1e22ad3a5893ed1ccb72517743a4827bd37218f4b4c95710c3a9ed5a127b1a82ee8bfbc68e19d31574610eb47b290f43b8229fc820de6a98575706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "ba5ed25669dbd59354848e288e6fda23b9a86a9e350137a5e6c8beb7a78dad48b148b89cc5cb8c7754e74b47dc66c419957cfe68cb5b2213477cd8b5b5bfe304" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "231490d1052f581842715786bf0692c61c75ef17f37b0dad9432d5464bf9e34f3740ddf103f7afc5bcaa8ade9c1fd310a6393a44de79be38d24e5bdd50190304" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:39Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_forwardRootVersion/server/metadata/snapshot.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/snapshot.json deleted file mode 100644 index 32c914d6..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "98ca9f817a41745409386dd26a433907349df18d1153b660e8d3cfa01d7dabc35aa06947e9cfac1d93edd7d9276246432fdf647a3357c2185d250d9ddc2be90f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/targets.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/targets.json deleted file mode 100644 index 7b1f6e04..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "70a93be0db6e7180088029c94283f47e60bfae3001982303e4060d952fe8e2db92e861f66bfcf32a4eb10e5a00900eaa719858945a314259c29b14cf39e73f03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:39Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/timestamp.json b/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/timestamp.json deleted file mode 100644 index a8cdfcf8..00000000 --- a/client/testdata/Published3Times_keyrotated_forwardRootVersion/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "05e65cc7a4ebf2dce8472f64c2a69dcee977d5bf8dddc36f4547882782e0d1161a5a03102155b29c41cff10b2f31ff947f6c604d07da1a9ff7eb423477a39c08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:39Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "1ce608f9525f5581f719ed696f6d445ec61ce9a0f97b0c3250bcebb687eb70fe", - "sha512": "22c79c8cb721c21e28cf4ae4e0c31bece6d4f55ed9234f4b538dbbff0c99eb733b2d6e73eaf66e3d9ed955c57a054470d8bfa740487aff0c470a463b7bd967f3" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/hash.txt b/client/testdata/Published3Times_keyrotated_initialrootsexpired/hash.txt deleted file mode 100644 index 4011d3e0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/hash.txt +++ /dev/null @@ -1 +0,0 @@ -7dcc997b6faa38805ccb1c5ce6024f59712b26461b4954dfb3c241df735db994 \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/2.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/2.root.json deleted file mode 100644 index 00ab76d4..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "8f6e2a5a714d0157ab60191cdd2cb6dcb101f00c95b985bfaafd85637e94978a6493ea89535c8e37c4ac5f236c4329ba63e7eac721def60f03d799ae9cbe8204" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "2e6b955314910c3f3b91e9d7b6673afb6b6dcaef28b2a86172f4032228a96585b5f1cbb0182f64555329d724bde28980e9f72dfae019f777b256e9f9dabb620a" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/3.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/3.root.json deleted file mode 100644 index 1fe6df3a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/3.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72c33cb0f06b935b61441ab63da4d2e4b207c5051f70b962c546efb7ebcb60890e6a96a95f02f368524687296b09d34168f4b9b5ee2b49a2b693476cbafa530f" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "8814eeb64bd2e7b88b6f4847085bb1b768d2ed33c0c53292d2a490074a6293be13fd5a03f35c685a17eccfe6f209e6cebf884cffcf706e9395793e23d56cdc0c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "cfae718a6ddda42bfb231fc7d6f5db98bbf80303c31a8ae38c303c61e001895cc6e433afe42c7343fb82eed7060f01dc9634829b4af39562b2c389b4d2c9c903" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/root.json deleted file mode 100644 index 1fe6df3a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72c33cb0f06b935b61441ab63da4d2e4b207c5051f70b962c546efb7ebcb60890e6a96a95f02f368524687296b09d34168f4b9b5ee2b49a2b693476cbafa530f" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "8814eeb64bd2e7b88b6f4847085bb1b768d2ed33c0c53292d2a490074a6293be13fd5a03f35c685a17eccfe6f209e6cebf884cffcf706e9395793e23d56cdc0c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "cfae718a6ddda42bfb231fc7d6f5db98bbf80303c31a8ae38c303c61e001895cc6e433afe42c7343fb82eed7060f01dc9634829b4af39562b2c389b4d2c9c903" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.root.json deleted file mode 100644 index b0cfa49a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c981b331d9fd0adec189ec55593735f05ded1d73d7999d67b882f56d2d2a201525d39c20a99cc9c1f03e9425ec607b1f57c7e24b540c0b0c671992cab26e4d07" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/2.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/2.root.json deleted file mode 100644 index 00ab76d4..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "8f6e2a5a714d0157ab60191cdd2cb6dcb101f00c95b985bfaafd85637e94978a6493ea89535c8e37c4ac5f236c4329ba63e7eac721def60f03d799ae9cbe8204" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "2e6b955314910c3f3b91e9d7b6673afb6b6dcaef28b2a86172f4032228a96585b5f1cbb0182f64555329d724bde28980e9f72dfae019f777b256e9f9dabb620a" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:47Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata/3.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/3.root.json deleted file mode 100644 index 1fe6df3a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/3.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72c33cb0f06b935b61441ab63da4d2e4b207c5051f70b962c546efb7ebcb60890e6a96a95f02f368524687296b09d34168f4b9b5ee2b49a2b693476cbafa530f" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "8814eeb64bd2e7b88b6f4847085bb1b768d2ed33c0c53292d2a490074a6293be13fd5a03f35c685a17eccfe6f209e6cebf884cffcf706e9395793e23d56cdc0c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "cfae718a6ddda42bfb231fc7d6f5db98bbf80303c31a8ae38c303c61e001895cc6e433afe42c7343fb82eed7060f01dc9634829b4af39562b2c389b4d2c9c903" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/root.json deleted file mode 100644 index 1fe6df3a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72c33cb0f06b935b61441ab63da4d2e4b207c5051f70b962c546efb7ebcb60890e6a96a95f02f368524687296b09d34168f4b9b5ee2b49a2b693476cbafa530f" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "8814eeb64bd2e7b88b6f4847085bb1b768d2ed33c0c53292d2a490074a6293be13fd5a03f35c685a17eccfe6f209e6cebf884cffcf706e9395793e23d56cdc0c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "cfae718a6ddda42bfb231fc7d6f5db98bbf80303c31a8ae38c303c61e001895cc6e433afe42c7343fb82eed7060f01dc9634829b4af39562b2c389b4d2c9c903" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:37Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired/server/metadata/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/snapshot.json deleted file mode 100644 index 42d8aae0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/targets.json deleted file mode 100644 index 65bfd77c..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:37Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/timestamp.json deleted file mode 100644 index 9a03f46a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:37Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", - "sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/2.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/2.root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/2.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/2.root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/hash.txt b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/hash.txt deleted file mode 100644 index 2f45092a..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/hash.txt +++ /dev/null @@ -1 +0,0 @@ -f8e3fe50a810a933f4895e479fc7352d60762276a99b6554073a0f68316dbd6a \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/2.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/2.root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/3.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/3.root.json deleted file mode 100644 index 6a3a50e9..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/3.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "3c7663e43e6eedc42d62a2c2ea9ccc76186f105f6adab425245ea0610fdedd030685f7b707b4d88df2d80a942e13276da8330ae4160dabcedc46e1408d1dd803" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9d8e34d3a8c6cf665657d07053d0c77d8d4da801e3049af04b60a98b252523ad691e84c56af4efcadd83da981939d85cb22dbb7304fb5f88be044fbb8ecad408" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "138b6d748491e80c1108a2916dcb3033a0029db01d82539972cb10c5ba22366391ece7d97483494815d758ae08514eab3edd58b1f84ff603b67c28855d5bee0e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/root.json deleted file mode 100644 index 6a3a50e9..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "3c7663e43e6eedc42d62a2c2ea9ccc76186f105f6adab425245ea0610fdedd030685f7b707b4d88df2d80a942e13276da8330ae4160dabcedc46e1408d1dd803" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9d8e34d3a8c6cf665657d07053d0c77d8d4da801e3049af04b60a98b252523ad691e84c56af4efcadd83da981939d85cb22dbb7304fb5f88be044fbb8ecad408" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "138b6d748491e80c1108a2916dcb3033a0029db01d82539972cb10c5ba22366391ece7d97483494815d758ae08514eab3edd58b1f84ff603b67c28855d5bee0e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/2.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/2.root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/3.root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/3.root.json deleted file mode 100644 index 6a3a50e9..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/3.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "3c7663e43e6eedc42d62a2c2ea9ccc76186f105f6adab425245ea0610fdedd030685f7b707b4d88df2d80a942e13276da8330ae4160dabcedc46e1408d1dd803" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9d8e34d3a8c6cf665657d07053d0c77d8d4da801e3049af04b60a98b252523ad691e84c56af4efcadd83da981939d85cb22dbb7304fb5f88be044fbb8ecad408" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "138b6d748491e80c1108a2916dcb3033a0029db01d82539972cb10c5ba22366391ece7d97483494815d758ae08514eab3edd58b1f84ff603b67c28855d5bee0e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/root.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/root.json deleted file mode 100644 index 6a3a50e9..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "3c7663e43e6eedc42d62a2c2ea9ccc76186f105f6adab425245ea0610fdedd030685f7b707b4d88df2d80a942e13276da8330ae4160dabcedc46e1408d1dd803" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9d8e34d3a8c6cf665657d07053d0c77d8d4da801e3049af04b60a98b252523ad691e84c56af4efcadd83da981939d85cb22dbb7304fb5f88be044fbb8ecad408" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "138b6d748491e80c1108a2916dcb3033a0029db01d82539972cb10c5ba22366391ece7d97483494815d758ae08514eab3edd58b1f84ff603b67c28855d5bee0e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:13:38Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/snapshot.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/targets.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/timestamp.json b/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_initialrootsexpired_clientversionis2/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_latestrootexpired/client/metadata/current/snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/hash.txt b/client/testdata/Published3Times_keyrotated_latestrootexpired/hash.txt deleted file mode 100644 index 3e15a175..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/hash.txt +++ /dev/null @@ -1 +0,0 @@ -53afeac61b95af3060968d5bf4acdc71d4eded57ded489974ce47223708532ff \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/2.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/2.root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/3.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/3.root.json deleted file mode 100644 index a5ad77ba..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/3.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5f39777693b8c95b3f1a76172cc147ca6c20acec65c4cd932fda605d6457b10d90e37985197bd6ace2266ea336c16d1669cf2b4b3c1d8502d1b2b1f30fe82c02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "07dde55a3e8182d37b05b3edcf8d559fd088100827d5a697cc3dcafb875da2afa657cc635cbbe2c464c936c336408f31063b0dd9821b56e64d83eedbe7397f01" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e62976570275736532867c395345568051d3f01d5f8c723afb1d6d44b7e901f3b98a5ae4e21406914f1ca46cee40c9ea5d7854d574694d8dc63da499b2746006" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/root.json deleted file mode 100644 index a5ad77ba..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5f39777693b8c95b3f1a76172cc147ca6c20acec65c4cd932fda605d6457b10d90e37985197bd6ace2266ea336c16d1669cf2b4b3c1d8502d1b2b1f30fe82c02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "07dde55a3e8182d37b05b3edcf8d559fd088100827d5a697cc3dcafb875da2afa657cc635cbbe2c464c936c336408f31063b0dd9821b56e64d83eedbe7397f01" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e62976570275736532867c395345568051d3f01d5f8c723afb1d6d44b7e901f3b98a5ae4e21406914f1ca46cee40c9ea5d7854d574694d8dc63da499b2746006" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.root.json deleted file mode 100644 index 184232b0..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "1a1565cf213002416129b7ff558fbe0b4b296984c756e5f67fe10e8b6dae5ccd372b17c9524fd2a92fe79df50c2845baa57a3447e2422bf5dc1c35e00e5e1003" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata/1.snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/2.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/2.root.json deleted file mode 100644 index 6646aca3..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/2.root.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0e22c864c9537c692cf66467310173896c3416d9b48a8c33f33c6f6b0117cd77c194f5d4695fe0f81efd77d3ebfe70d33421f4859374c133de8a247b51625906" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "a40c02d3ea080e4a46a09796926040127a7d8ed5f91ac2acee3a995b8eca403cc787b33f56840983f6975e886d3d5ceb157e1fa999b4ed699d70031a470fc508" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "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" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata/3.root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/3.root.json deleted file mode 100644 index a5ad77ba..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/3.root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5f39777693b8c95b3f1a76172cc147ca6c20acec65c4cd932fda605d6457b10d90e37985197bd6ace2266ea336c16d1669cf2b4b3c1d8502d1b2b1f30fe82c02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "07dde55a3e8182d37b05b3edcf8d559fd088100827d5a697cc3dcafb875da2afa657cc635cbbe2c464c936c336408f31063b0dd9821b56e64d83eedbe7397f01" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e62976570275736532867c395345568051d3f01d5f8c723afb1d6d44b7e901f3b98a5ae4e21406914f1ca46cee40c9ea5d7854d574694d8dc63da499b2746006" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata/root.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/root.json deleted file mode 100644 index a5ad77ba..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/root.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5f39777693b8c95b3f1a76172cc147ca6c20acec65c4cd932fda605d6457b10d90e37985197bd6ace2266ea336c16d1669cf2b4b3c1d8502d1b2b1f30fe82c02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "07dde55a3e8182d37b05b3edcf8d559fd088100827d5a697cc3dcafb875da2afa657cc635cbbe2c464c936c336408f31063b0dd9821b56e64d83eedbe7397f01" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e62976570275736532867c395345568051d3f01d5f8c723afb1d6d44b7e901f3b98a5ae4e21406914f1ca46cee40c9ea5d7854d574694d8dc63da499b2746006" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-09-12T03:13:48Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "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", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "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/Published3Times_keyrotated_latestrootexpired/server/metadata/snapshot.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/snapshot.json deleted file mode 100644 index cff50edf..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "03f7436d986edb991e9812b64fa7a93229e2e73ab419e29feab828a311a5aace9b385ed48d44f602af25b8e3070eaf948c89bc59ab75fb8a1231882df1ef4a05" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/targets.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/targets.json deleted file mode 100644 index 80777dc2..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5d60d0018367fda4bbaa0ebb3b0ee0c2cdbac3bdb233369590f3055ad9d4299fde6a8a8824ed3f38129ca6ee3fa67075b6591169aa1819a6238ea1821dbaa03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:13:38Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/timestamp.json b/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/timestamp.json deleted file mode 100644 index 221e7802..00000000 --- a/client/testdata/Published3Times_keyrotated_latestrootexpired/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "c5a41119ccf10925e7c065c10c14d3690b6c4071fa4f2f7e3bc5944e375ee28ccf81721c9f506d788e0cc9b3d335791a4553f3f1e39873903f00a449a3de5004" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:13:38Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "700c180d3a3d6e2fa86f4bb072d7f81f39f1cc1dc0df32bb6b5e89a715f743d2", - "sha512": "5b21d7bda6e29381e7f095204eddd78137cc14416585c3e9f8915ce21ff1b17b646932b37d7a1147cc0f1d6b7f6ea75d91f6b63d7e229fe73c0b4f1845c40f41" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/hash.txt deleted file mode 100644 index 8bedf9df..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/hash.txt +++ /dev/null @@ -1 +0,0 @@ -1b82d8de8e29a4cff4fa146b19aefdc45d3016b8b580c84d1252d0b38d008343 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/2.root.json deleted file mode 100644 index abb8737a..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/2.root.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "496695b909566a8c2c4649e334c1776b010116e7d1860d855bd53f0f0466c41f733b914828bd4134cdf3d1b2bff1961482f3aaf1dcb848c8dbe63c2c0c4cea0a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "52a32e1b2f680c803c2c79b2083be98abf05a8528a5155cff728578b21fce4b7b75a186875ff8e5b387feb6a6badc2b4bf86497a1e82830cc62636ffcc10850f" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1543bcd29a9ba609f50ce9cce682ceadba8df939b84dd06851f71bcea767f305580c69253179608b3fe8d3fe179158e4ee272f0e04bcc7a9aabf845dfccbcb02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9a6c51a85bc11289755a7f4f61e6a8b21749d70bc1ee26b8ea77ddad49871e052aef72066ebd390632db4f4a88d093ec9c96bb073d63d535f7dbd4122be05a0b" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "361ee22a20fe33cec10fc2fd807c542d3e981739b83fbb5346d94268cfa5bb5c47bfff94a8a48de0011e7dc789eaca880df3474deb8e5a6fb0147fe19d99570e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c1ad1c1192587704f6aa3dd8f26b1fef81145676014ca3507d734eb1b1c5f07541573ae1e0641bb9a1d176f6459d34e8668fe3227f6eb85deb325309bce8d80f" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c7ec24a2dd742793056036bb2ce233b9750d633af21dcba4e7a33a9bb1879dc2664670ae7d15f482bfba54ac2a1844bc14a0859e22331657ac948880f543a70d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "4f693edf9fef84b4fded4107d5958a7578bf589422920d016155d189f09d415a0511055f723746840a1402eb80c7b693dd2dc8496a250308b8a4477172ec1104" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "d88a622ae383cc75dd2f96629dd408483285afd450bdad37f1ade6a105a2367ea35200e8f74e9f29a4843308d59d1d29dbc12536e12a5eb00c4570a04606f300" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/root.json deleted file mode 100644 index abb8737a..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/root.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "496695b909566a8c2c4649e334c1776b010116e7d1860d855bd53f0f0466c41f733b914828bd4134cdf3d1b2bff1961482f3aaf1dcb848c8dbe63c2c0c4cea0a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "52a32e1b2f680c803c2c79b2083be98abf05a8528a5155cff728578b21fce4b7b75a186875ff8e5b387feb6a6badc2b4bf86497a1e82830cc62636ffcc10850f" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1543bcd29a9ba609f50ce9cce682ceadba8df939b84dd06851f71bcea767f305580c69253179608b3fe8d3fe179158e4ee272f0e04bcc7a9aabf845dfccbcb02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9a6c51a85bc11289755a7f4f61e6a8b21749d70bc1ee26b8ea77ddad49871e052aef72066ebd390632db4f4a88d093ec9c96bb073d63d535f7dbd4122be05a0b" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "361ee22a20fe33cec10fc2fd807c542d3e981739b83fbb5346d94268cfa5bb5c47bfff94a8a48de0011e7dc789eaca880df3474deb8e5a6fb0147fe19d99570e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c1ad1c1192587704f6aa3dd8f26b1fef81145676014ca3507d734eb1b1c5f07541573ae1e0641bb9a1d176f6459d34e8668fe3227f6eb85deb325309bce8d80f" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c7ec24a2dd742793056036bb2ce233b9750d633af21dcba4e7a33a9bb1879dc2664670ae7d15f482bfba54ac2a1844bc14a0859e22331657ac948880f543a70d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "4f693edf9fef84b4fded4107d5958a7578bf589422920d016155d189f09d415a0511055f723746840a1402eb80c7b693dd2dc8496a250308b8a4477172ec1104" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "d88a622ae383cc75dd2f96629dd408483285afd450bdad37f1ade6a105a2367ea35200e8f74e9f29a4843308d59d1d29dbc12536e12a5eb00c4570a04606f300" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/2.root.json deleted file mode 100644 index abb8737a..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/2.root.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "496695b909566a8c2c4649e334c1776b010116e7d1860d855bd53f0f0466c41f733b914828bd4134cdf3d1b2bff1961482f3aaf1dcb848c8dbe63c2c0c4cea0a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "52a32e1b2f680c803c2c79b2083be98abf05a8528a5155cff728578b21fce4b7b75a186875ff8e5b387feb6a6badc2b4bf86497a1e82830cc62636ffcc10850f" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1543bcd29a9ba609f50ce9cce682ceadba8df939b84dd06851f71bcea767f305580c69253179608b3fe8d3fe179158e4ee272f0e04bcc7a9aabf845dfccbcb02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9a6c51a85bc11289755a7f4f61e6a8b21749d70bc1ee26b8ea77ddad49871e052aef72066ebd390632db4f4a88d093ec9c96bb073d63d535f7dbd4122be05a0b" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "361ee22a20fe33cec10fc2fd807c542d3e981739b83fbb5346d94268cfa5bb5c47bfff94a8a48de0011e7dc789eaca880df3474deb8e5a6fb0147fe19d99570e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c1ad1c1192587704f6aa3dd8f26b1fef81145676014ca3507d734eb1b1c5f07541573ae1e0641bb9a1d176f6459d34e8668fe3227f6eb85deb325309bce8d80f" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c7ec24a2dd742793056036bb2ce233b9750d633af21dcba4e7a33a9bb1879dc2664670ae7d15f482bfba54ac2a1844bc14a0859e22331657ac948880f543a70d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "4f693edf9fef84b4fded4107d5958a7578bf589422920d016155d189f09d415a0511055f723746840a1402eb80c7b693dd2dc8496a250308b8a4477172ec1104" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "d88a622ae383cc75dd2f96629dd408483285afd450bdad37f1ade6a105a2367ea35200e8f74e9f29a4843308d59d1d29dbc12536e12a5eb00c4570a04606f300" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/root.json deleted file mode 100644 index abb8737a..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/root.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "496695b909566a8c2c4649e334c1776b010116e7d1860d855bd53f0f0466c41f733b914828bd4134cdf3d1b2bff1961482f3aaf1dcb848c8dbe63c2c0c4cea0a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "52a32e1b2f680c803c2c79b2083be98abf05a8528a5155cff728578b21fce4b7b75a186875ff8e5b387feb6a6badc2b4bf86497a1e82830cc62636ffcc10850f" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1543bcd29a9ba609f50ce9cce682ceadba8df939b84dd06851f71bcea767f305580c69253179608b3fe8d3fe179158e4ee272f0e04bcc7a9aabf845dfccbcb02" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9a6c51a85bc11289755a7f4f61e6a8b21749d70bc1ee26b8ea77ddad49871e052aef72066ebd390632db4f4a88d093ec9c96bb073d63d535f7dbd4122be05a0b" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "361ee22a20fe33cec10fc2fd807c542d3e981739b83fbb5346d94268cfa5bb5c47bfff94a8a48de0011e7dc789eaca880df3474deb8e5a6fb0147fe19d99570e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c1ad1c1192587704f6aa3dd8f26b1fef81145676014ca3507d734eb1b1c5f07541573ae1e0641bb9a1d176f6459d34e8668fe3227f6eb85deb325309bce8d80f" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "c7ec24a2dd742793056036bb2ce233b9750d633af21dcba4e7a33a9bb1879dc2664670ae7d15f482bfba54ac2a1844bc14a0859e22331657ac948880f543a70d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "4f693edf9fef84b4fded4107d5958a7578bf589422920d016155d189f09d415a0511055f723746840a1402eb80c7b693dd2dc8496a250308b8a4477172ec1104" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "d88a622ae383cc75dd2f96629dd408483285afd450bdad37f1ade6a105a2367ea35200e8f74e9f29a4843308d59d1d29dbc12536e12a5eb00c4570a04606f300" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_root/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/hash.txt deleted file mode 100644 index 36a468dd..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/hash.txt +++ /dev/null @@ -1 +0,0 @@ -2818c21e8ecee671a52421bedf8cbe7df0e4b7ed45cdf9fa17a10f26bd90989e \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.root.json deleted file mode 100644 index 0c435fe8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "06aa273601715be06bd54ca5f74d7e8e5e5130646a2a7e21fbcef3d30167bf001805f3df25b06b8c0de5e1d17dba8562c454011262c6523a4e64ce24390b4d0c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/2.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/root.json deleted file mode 100644 index 0c435fe8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "06aa273601715be06bd54ca5f74d7e8e5e5130646a2a7e21fbcef3d30167bf001805f3df25b06b8c0de5e1d17dba8562c454011262c6523a4e64ce24390b4d0c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.root.json deleted file mode 100644 index 0c435fe8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "06aa273601715be06bd54ca5f74d7e8e5e5130646a2a7e21fbcef3d30167bf001805f3df25b06b8c0de5e1d17dba8562c454011262c6523a4e64ce24390b4d0c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/2.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/root.json deleted file mode 100644 index 0c435fe8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "06aa273601715be06bd54ca5f74d7e8e5e5130646a2a7e21fbcef3d30167bf001805f3df25b06b8c0de5e1d17dba8562c454011262c6523a4e64ce24390b4d0c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_snapshot/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.root.json deleted file mode 100644 index cdb0cfc8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e007d7f8d4013496a546585fa7a1bc6c793391bd119f84f213b70f70d177a2a48186b4f4892879d65e412c37256406eb0b7bc0467e29e6ae5e86da3addda6407" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.targets.json deleted file mode 100644 index d96641d2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "cbf785791cb07f08524bf07f064cd3dd2aa59d4df683817511186efcf66dc477e775f55669685b0ede916ab8715efab88b6fefb62da052eba03faded53406e0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "8940c7a6d7892be68c9830d339c709b5105d2fcccc0624e43c4f5444e25f7ec578ec4899398692edf0e7b91e1194b8cd2ab7c2fb120e1681cbfeca9066b50d01" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "3d4f10ef870798ec71187ef703fc134a148160a66db0478cef893b0a91487cb90e1e59e7b6b8880def22cd928472421c8ab6ada95d515080b5f483aa17e63b06" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "09c192fb46e99f6aa5b4e12a7a5c6239c509cc30926e2cceefdf09166621e1c7e945a40e0c12c19f62a5cd78e4627673c5b1da0f55af54f4bc8bec43728b6d0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3bbf88e8cac7256a72f7b681dec4b26cd83cc7c72ad048235a5bf16bbe9519a3c9990f404f61f3f8833d7235633cb821062738c863097aa3a0e25e36f371ef0f" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf6e9cd2defa1ae0020e27a91d36910a9a665e127d09f77b698a59d47e70913aa6ebf958057bdc68c2ce8e9d344fffd7e892af66fda424079c732900f3c5590a" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1089b0a143419b02067af4ad353ea03c8adce43370485ff257ff8b6e7006fcddfce8db023844aea960f09520a07f86500bf3be11c3cc71479b4fc2953a0a3d0f" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "e3673a85e84a24c12fb654e114d3702e5fa98ac73f11bcd72aa5304afa1cc8a30d53c0cacbd1d65bcb7ae7a2d34c7e46b58f8cb784765f15b1b4e6730aa1cb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/root.json deleted file mode 100644 index cdb0cfc8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e007d7f8d4013496a546585fa7a1bc6c793391bd119f84f213b70f70d177a2a48186b4f4892879d65e412c37256406eb0b7bc0467e29e6ae5e86da3addda6407" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/targets.json deleted file mode 100644 index d96641d2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "cbf785791cb07f08524bf07f064cd3dd2aa59d4df683817511186efcf66dc477e775f55669685b0ede916ab8715efab88b6fefb62da052eba03faded53406e0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "8940c7a6d7892be68c9830d339c709b5105d2fcccc0624e43c4f5444e25f7ec578ec4899398692edf0e7b91e1194b8cd2ab7c2fb120e1681cbfeca9066b50d01" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "3d4f10ef870798ec71187ef703fc134a148160a66db0478cef893b0a91487cb90e1e59e7b6b8880def22cd928472421c8ab6ada95d515080b5f483aa17e63b06" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "09c192fb46e99f6aa5b4e12a7a5c6239c509cc30926e2cceefdf09166621e1c7e945a40e0c12c19f62a5cd78e4627673c5b1da0f55af54f4bc8bec43728b6d0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3bbf88e8cac7256a72f7b681dec4b26cd83cc7c72ad048235a5bf16bbe9519a3c9990f404f61f3f8833d7235633cb821062738c863097aa3a0e25e36f371ef0f" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf6e9cd2defa1ae0020e27a91d36910a9a665e127d09f77b698a59d47e70913aa6ebf958057bdc68c2ce8e9d344fffd7e892af66fda424079c732900f3c5590a" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1089b0a143419b02067af4ad353ea03c8adce43370485ff257ff8b6e7006fcddfce8db023844aea960f09520a07f86500bf3be11c3cc71479b4fc2953a0a3d0f" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "e3673a85e84a24c12fb654e114d3702e5fa98ac73f11bcd72aa5304afa1cc8a30d53c0cacbd1d65bcb7ae7a2d34c7e46b58f8cb784765f15b1b4e6730aa1cb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.root.json deleted file mode 100644 index cdb0cfc8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e007d7f8d4013496a546585fa7a1bc6c793391bd119f84f213b70f70d177a2a48186b4f4892879d65e412c37256406eb0b7bc0467e29e6ae5e86da3addda6407" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.targets.json deleted file mode 100644 index d96641d2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "cbf785791cb07f08524bf07f064cd3dd2aa59d4df683817511186efcf66dc477e775f55669685b0ede916ab8715efab88b6fefb62da052eba03faded53406e0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "8940c7a6d7892be68c9830d339c709b5105d2fcccc0624e43c4f5444e25f7ec578ec4899398692edf0e7b91e1194b8cd2ab7c2fb120e1681cbfeca9066b50d01" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "3d4f10ef870798ec71187ef703fc134a148160a66db0478cef893b0a91487cb90e1e59e7b6b8880def22cd928472421c8ab6ada95d515080b5f483aa17e63b06" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "09c192fb46e99f6aa5b4e12a7a5c6239c509cc30926e2cceefdf09166621e1c7e945a40e0c12c19f62a5cd78e4627673c5b1da0f55af54f4bc8bec43728b6d0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3bbf88e8cac7256a72f7b681dec4b26cd83cc7c72ad048235a5bf16bbe9519a3c9990f404f61f3f8833d7235633cb821062738c863097aa3a0e25e36f371ef0f" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf6e9cd2defa1ae0020e27a91d36910a9a665e127d09f77b698a59d47e70913aa6ebf958057bdc68c2ce8e9d344fffd7e892af66fda424079c732900f3c5590a" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1089b0a143419b02067af4ad353ea03c8adce43370485ff257ff8b6e7006fcddfce8db023844aea960f09520a07f86500bf3be11c3cc71479b4fc2953a0a3d0f" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "e3673a85e84a24c12fb654e114d3702e5fa98ac73f11bcd72aa5304afa1cc8a30d53c0cacbd1d65bcb7ae7a2d34c7e46b58f8cb784765f15b1b4e6730aa1cb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/root.json deleted file mode 100644 index cdb0cfc8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e007d7f8d4013496a546585fa7a1bc6c793391bd119f84f213b70f70d177a2a48186b4f4892879d65e412c37256406eb0b7bc0467e29e6ae5e86da3addda6407" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/targets.json deleted file mode 100644 index d96641d2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "cbf785791cb07f08524bf07f064cd3dd2aa59d4df683817511186efcf66dc477e775f55669685b0ede916ab8715efab88b6fefb62da052eba03faded53406e0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "8940c7a6d7892be68c9830d339c709b5105d2fcccc0624e43c4f5444e25f7ec578ec4899398692edf0e7b91e1194b8cd2ab7c2fb120e1681cbfeca9066b50d01" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "3d4f10ef870798ec71187ef703fc134a148160a66db0478cef893b0a91487cb90e1e59e7b6b8880def22cd928472421c8ab6ada95d515080b5f483aa17e63b06" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "09c192fb46e99f6aa5b4e12a7a5c6239c509cc30926e2cceefdf09166621e1c7e945a40e0c12c19f62a5cd78e4627673c5b1da0f55af54f4bc8bec43728b6d0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3bbf88e8cac7256a72f7b681dec4b26cd83cc7c72ad048235a5bf16bbe9519a3c9990f404f61f3f8833d7235633cb821062738c863097aa3a0e25e36f371ef0f" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf6e9cd2defa1ae0020e27a91d36910a9a665e127d09f77b698a59d47e70913aa6ebf958057bdc68c2ce8e9d344fffd7e892af66fda424079c732900f3c5590a" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1089b0a143419b02067af4ad353ea03c8adce43370485ff257ff8b6e7006fcddfce8db023844aea960f09520a07f86500bf3be11c3cc71479b4fc2953a0a3d0f" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "e3673a85e84a24c12fb654e114d3702e5fa98ac73f11bcd72aa5304afa1cc8a30d53c0cacbd1d65bcb7ae7a2d34c7e46b58f8cb784765f15b1b4e6730aa1cb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/hash.txt deleted file mode 100644 index b4f24c80..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/hash.txt +++ /dev/null @@ -1 +0,0 @@ -38d05f4a8fc9892deee2ab651bd61de98ed34393955851f1a9699d02d6c652a1 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.root.json deleted file mode 100644 index cdb0cfc8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e007d7f8d4013496a546585fa7a1bc6c793391bd119f84f213b70f70d177a2a48186b4f4892879d65e412c37256406eb0b7bc0467e29e6ae5e86da3addda6407" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.targets.json deleted file mode 100644 index d96641d2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "cbf785791cb07f08524bf07f064cd3dd2aa59d4df683817511186efcf66dc477e775f55669685b0ede916ab8715efab88b6fefb62da052eba03faded53406e0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "8940c7a6d7892be68c9830d339c709b5105d2fcccc0624e43c4f5444e25f7ec578ec4899398692edf0e7b91e1194b8cd2ab7c2fb120e1681cbfeca9066b50d01" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "3d4f10ef870798ec71187ef703fc134a148160a66db0478cef893b0a91487cb90e1e59e7b6b8880def22cd928472421c8ab6ada95d515080b5f483aa17e63b06" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "09c192fb46e99f6aa5b4e12a7a5c6239c509cc30926e2cceefdf09166621e1c7e945a40e0c12c19f62a5cd78e4627673c5b1da0f55af54f4bc8bec43728b6d0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3bbf88e8cac7256a72f7b681dec4b26cd83cc7c72ad048235a5bf16bbe9519a3c9990f404f61f3f8833d7235633cb821062738c863097aa3a0e25e36f371ef0f" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf6e9cd2defa1ae0020e27a91d36910a9a665e127d09f77b698a59d47e70913aa6ebf958057bdc68c2ce8e9d344fffd7e892af66fda424079c732900f3c5590a" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1089b0a143419b02067af4ad353ea03c8adce43370485ff257ff8b6e7006fcddfce8db023844aea960f09520a07f86500bf3be11c3cc71479b4fc2953a0a3d0f" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "e3673a85e84a24c12fb654e114d3702e5fa98ac73f11bcd72aa5304afa1cc8a30d53c0cacbd1d65bcb7ae7a2d34c7e46b58f8cb784765f15b1b4e6730aa1cb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.root.json deleted file mode 100644 index 9a443e46..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "dbfb546e3f361f7b746cc076d6632e5fdfe18ec0268b383de317af45f5cb704c9145707144f1f540e91b256b418cf5753de7391fdc1f8ff27c0a6eb265904005" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.targets.json deleted file mode 100644 index b9ec287f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/2.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "8c3d6300986d5859cdbc3d4a3509f4ca3e3e9dda0b9ccfd51ffcae65757f221a478ed0be7dbae9f1c6c1d10063e5eeec1f05b538c282e4f7de1d8970b9fe210c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2a257763ea72c8d547083ff87438747c4d0f240a24dba479cdddc1bda562a20d929d770262c915d2c5ae79cd3854abebf263cb56668d1d0a347d4f0033dd360c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "163ec38d14a35b364e3c9f3c57a7d6aa7f5a178f8ec23a33ce43aab9eed34a9fbb813d8aebb5f91b278dc03061eb9528a457f1e16a449ff0ffc3c7e279be6204" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "bb4e58d3f96691280935c1f6e0b603739878ad6cacc2da6395d75c1e6fb9d2fb2e4de238634ec3bd417621485093e480490002c22114a321affb7b4994714c01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "c7e970795af37c2ec5e73a627daa2fd052d26764b47b70d84257b3607f2e9b4472da8eba5bd720dd4fc9801d9108a69d1bff78d8c0c6b50031bfe158ba1ca300" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "ddb6f6aa044d7b64831b3321d3aa3e3a0c3c1ef5144e9257204d0d7b8e6ac616c9f210166f7f679d8e120d8bdcbc40cfa1fc1a2faf97dbe90b5897a49bd6fe0f" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "7a5b9705304316df3edad16d934518b73a4ee29259e8d5accad5b9fb88c08ae0cd8a95b06f197d94b6ce09cfba528e63eec2464de56ecb5449bba4a2d110a705" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "a5fb7d23197cb5856ba1524676bf4f6bd96181b8f3a992607167f86a4053c0280651894d37667fbdd3ff21ed16a9f61116e969db4532935e79a7723f2c9af101" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "701c686cb7defb91040a58f94d9800f42a142d3efdcc53db84a2c1a89f372d134f631135ffeef676efa1cc8b90b4ebbb5040bfc513a7a2aa54cf087cf9770b06" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/root.json deleted file mode 100644 index 9a443e46..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "dbfb546e3f361f7b746cc076d6632e5fdfe18ec0268b383de317af45f5cb704c9145707144f1f540e91b256b418cf5753de7391fdc1f8ff27c0a6eb265904005" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/targets.json deleted file mode 100644 index b9ec287f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "8c3d6300986d5859cdbc3d4a3509f4ca3e3e9dda0b9ccfd51ffcae65757f221a478ed0be7dbae9f1c6c1d10063e5eeec1f05b538c282e4f7de1d8970b9fe210c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2a257763ea72c8d547083ff87438747c4d0f240a24dba479cdddc1bda562a20d929d770262c915d2c5ae79cd3854abebf263cb56668d1d0a347d4f0033dd360c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "163ec38d14a35b364e3c9f3c57a7d6aa7f5a178f8ec23a33ce43aab9eed34a9fbb813d8aebb5f91b278dc03061eb9528a457f1e16a449ff0ffc3c7e279be6204" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "bb4e58d3f96691280935c1f6e0b603739878ad6cacc2da6395d75c1e6fb9d2fb2e4de238634ec3bd417621485093e480490002c22114a321affb7b4994714c01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "c7e970795af37c2ec5e73a627daa2fd052d26764b47b70d84257b3607f2e9b4472da8eba5bd720dd4fc9801d9108a69d1bff78d8c0c6b50031bfe158ba1ca300" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "ddb6f6aa044d7b64831b3321d3aa3e3a0c3c1ef5144e9257204d0d7b8e6ac616c9f210166f7f679d8e120d8bdcbc40cfa1fc1a2faf97dbe90b5897a49bd6fe0f" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "7a5b9705304316df3edad16d934518b73a4ee29259e8d5accad5b9fb88c08ae0cd8a95b06f197d94b6ce09cfba528e63eec2464de56ecb5449bba4a2d110a705" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "a5fb7d23197cb5856ba1524676bf4f6bd96181b8f3a992607167f86a4053c0280651894d37667fbdd3ff21ed16a9f61116e969db4532935e79a7723f2c9af101" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "701c686cb7defb91040a58f94d9800f42a142d3efdcc53db84a2c1a89f372d134f631135ffeef676efa1cc8b90b4ebbb5040bfc513a7a2aa54cf087cf9770b06" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.root.json deleted file mode 100644 index cdb0cfc8..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e007d7f8d4013496a546585fa7a1bc6c793391bd119f84f213b70f70d177a2a48186b4f4892879d65e412c37256406eb0b7bc0467e29e6ae5e86da3addda6407" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.targets.json deleted file mode 100644 index d96641d2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "cbf785791cb07f08524bf07f064cd3dd2aa59d4df683817511186efcf66dc477e775f55669685b0ede916ab8715efab88b6fefb62da052eba03faded53406e0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "8940c7a6d7892be68c9830d339c709b5105d2fcccc0624e43c4f5444e25f7ec578ec4899398692edf0e7b91e1194b8cd2ab7c2fb120e1681cbfeca9066b50d01" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "3d4f10ef870798ec71187ef703fc134a148160a66db0478cef893b0a91487cb90e1e59e7b6b8880def22cd928472421c8ab6ada95d515080b5f483aa17e63b06" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "09c192fb46e99f6aa5b4e12a7a5c6239c509cc30926e2cceefdf09166621e1c7e945a40e0c12c19f62a5cd78e4627673c5b1da0f55af54f4bc8bec43728b6d0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3bbf88e8cac7256a72f7b681dec4b26cd83cc7c72ad048235a5bf16bbe9519a3c9990f404f61f3f8833d7235633cb821062738c863097aa3a0e25e36f371ef0f" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf6e9cd2defa1ae0020e27a91d36910a9a665e127d09f77b698a59d47e70913aa6ebf958057bdc68c2ce8e9d344fffd7e892af66fda424079c732900f3c5590a" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1089b0a143419b02067af4ad353ea03c8adce43370485ff257ff8b6e7006fcddfce8db023844aea960f09520a07f86500bf3be11c3cc71479b4fc2953a0a3d0f" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "e3673a85e84a24c12fb654e114d3702e5fa98ac73f11bcd72aa5304afa1cc8a30d53c0cacbd1d65bcb7ae7a2d34c7e46b58f8cb784765f15b1b4e6730aa1cb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.root.json deleted file mode 100644 index 9a443e46..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "dbfb546e3f361f7b746cc076d6632e5fdfe18ec0268b383de317af45f5cb704c9145707144f1f540e91b256b418cf5753de7391fdc1f8ff27c0a6eb265904005" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.targets.json deleted file mode 100644 index b9ec287f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/2.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "8c3d6300986d5859cdbc3d4a3509f4ca3e3e9dda0b9ccfd51ffcae65757f221a478ed0be7dbae9f1c6c1d10063e5eeec1f05b538c282e4f7de1d8970b9fe210c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2a257763ea72c8d547083ff87438747c4d0f240a24dba479cdddc1bda562a20d929d770262c915d2c5ae79cd3854abebf263cb56668d1d0a347d4f0033dd360c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "163ec38d14a35b364e3c9f3c57a7d6aa7f5a178f8ec23a33ce43aab9eed34a9fbb813d8aebb5f91b278dc03061eb9528a457f1e16a449ff0ffc3c7e279be6204" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "bb4e58d3f96691280935c1f6e0b603739878ad6cacc2da6395d75c1e6fb9d2fb2e4de238634ec3bd417621485093e480490002c22114a321affb7b4994714c01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "c7e970795af37c2ec5e73a627daa2fd052d26764b47b70d84257b3607f2e9b4472da8eba5bd720dd4fc9801d9108a69d1bff78d8c0c6b50031bfe158ba1ca300" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "ddb6f6aa044d7b64831b3321d3aa3e3a0c3c1ef5144e9257204d0d7b8e6ac616c9f210166f7f679d8e120d8bdcbc40cfa1fc1a2faf97dbe90b5897a49bd6fe0f" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "7a5b9705304316df3edad16d934518b73a4ee29259e8d5accad5b9fb88c08ae0cd8a95b06f197d94b6ce09cfba528e63eec2464de56ecb5449bba4a2d110a705" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "a5fb7d23197cb5856ba1524676bf4f6bd96181b8f3a992607167f86a4053c0280651894d37667fbdd3ff21ed16a9f61116e969db4532935e79a7723f2c9af101" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "701c686cb7defb91040a58f94d9800f42a142d3efdcc53db84a2c1a89f372d134f631135ffeef676efa1cc8b90b4ebbb5040bfc513a7a2aa54cf087cf9770b06" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/root.json deleted file mode 100644 index 9a443e46..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "dbfb546e3f361f7b746cc076d6632e5fdfe18ec0268b383de317af45f5cb704c9145707144f1f540e91b256b418cf5753de7391fdc1f8ff27c0a6eb265904005" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - }, - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" - }, - "scheme": "ed25519" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/targets.json deleted file mode 100644 index b9ec287f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "8c3d6300986d5859cdbc3d4a3509f4ca3e3e9dda0b9ccfd51ffcae65757f221a478ed0be7dbae9f1c6c1d10063e5eeec1f05b538c282e4f7de1d8970b9fe210c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2a257763ea72c8d547083ff87438747c4d0f240a24dba479cdddc1bda562a20d929d770262c915d2c5ae79cd3854abebf263cb56668d1d0a347d4f0033dd360c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "163ec38d14a35b364e3c9f3c57a7d6aa7f5a178f8ec23a33ce43aab9eed34a9fbb813d8aebb5f91b278dc03061eb9528a457f1e16a449ff0ffc3c7e279be6204" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "bb4e58d3f96691280935c1f6e0b603739878ad6cacc2da6395d75c1e6fb9d2fb2e4de238634ec3bd417621485093e480490002c22114a321affb7b4994714c01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "c7e970795af37c2ec5e73a627daa2fd052d26764b47b70d84257b3607f2e9b4472da8eba5bd720dd4fc9801d9108a69d1bff78d8c0c6b50031bfe158ba1ca300" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "ddb6f6aa044d7b64831b3321d3aa3e3a0c3c1ef5144e9257204d0d7b8e6ac616c9f210166f7f679d8e120d8bdcbc40cfa1fc1a2faf97dbe90b5897a49bd6fe0f" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "7a5b9705304316df3edad16d934518b73a4ee29259e8d5accad5b9fb88c08ae0cd8a95b06f197d94b6ce09cfba528e63eec2464de56ecb5449bba4a2d110a705" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "a5fb7d23197cb5856ba1524676bf4f6bd96181b8f3a992607167f86a4053c0280651894d37667fbdd3ff21ed16a9f61116e969db4532935e79a7723f2c9af101" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "701c686cb7defb91040a58f94d9800f42a142d3efdcc53db84a2c1a89f372d134f631135ffeef676efa1cc8b90b4ebbb5040bfc513a7a2aa54cf087cf9770b06" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/timestamp.json deleted file mode 100644 index d32a8636..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_targets/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.root.json deleted file mode 100644 index ace93498..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ae1ce5269bdb49e159d202abd2bf00bc390c6af87e7efe281d3bc1991103fa2a40617d82163c7014616cdf111a37bf4984f7f2282d63625f1c25829f4752b20e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.timestamp.json deleted file mode 100644 index 7bebab10..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5bb29b3df3004838f4f0d3d0bdcf2e9edcc1859843f129fb54c6dc5da74e43b6c1ba5cd15652d618d5ae9dafae37f0d7a624ae554d2d94d4909425cca1409b07" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "e6216a17a58b31b80fdb6b3bdfb60fb02e35dc15628cb372694715960e0c0ea82028e410852767d511f3b5a7d0953f78d21b004f5fa3eb81da16f1dfe1cc9104" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1b3be15b61bac3a359dcde9ec054f7c4b469c561b2b759e4794ee9535c2ca9defa6d391af04ea108d3cfb0c6e9700b470f115caccdd79db622f73d046b7a8b0d" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "46803209126b583272596e06ef9ce530003f1ca013ee3ef2a77a32afe09d2f9218bcd9016c4c8d947223706f8ca086e01bc0e58a01517c51ef2034a0d8e9f503" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "0bf36823342fe84e5111a887fab0ebb740c8883c3783f68d374f95da6ae142ab9abc1a0be9acdaf6f175fddad15b12a0ecd27fa6a5d7179609468145da1aad01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "27d124a184f4ddaeafe4746a132d119c0e0134a344691eadca7d8847178799d94f41b5f0e3ddeb3f01afab5d9dc8db5d96d0418c18ddec31557306b88d257e0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "34e28fe630dbc1c6c4a67a7775275654262c4e42967a1b99482c903f9171c724b63e95bac7f150d6482ccfd855bd82e1c644e3dd27af4a38afd2040268215100" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "ae3d90d7dd750cf885c78f9c12dbae2d2707f5411b42dd03d3c0bced50952661efc6b05b4f6268a663736c64d9f300d27f3a81d85a93ff5705c310c97058340b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "625c34749f149a2e9183d8efd813da7d8c9ed336a9fb999770290658b9efcc9432551aa85232b3cd994e77ce111265c384216dcc47bbe86c151bb7e14e911907" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/root.json deleted file mode 100644 index ace93498..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ae1ce5269bdb49e159d202abd2bf00bc390c6af87e7efe281d3bc1991103fa2a40617d82163c7014616cdf111a37bf4984f7f2282d63625f1c25829f4752b20e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/timestamp.json deleted file mode 100644 index 7bebab10..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/current/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5bb29b3df3004838f4f0d3d0bdcf2e9edcc1859843f129fb54c6dc5da74e43b6c1ba5cd15652d618d5ae9dafae37f0d7a624ae554d2d94d4909425cca1409b07" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "e6216a17a58b31b80fdb6b3bdfb60fb02e35dc15628cb372694715960e0c0ea82028e410852767d511f3b5a7d0953f78d21b004f5fa3eb81da16f1dfe1cc9104" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1b3be15b61bac3a359dcde9ec054f7c4b469c561b2b759e4794ee9535c2ca9defa6d391af04ea108d3cfb0c6e9700b470f115caccdd79db622f73d046b7a8b0d" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "46803209126b583272596e06ef9ce530003f1ca013ee3ef2a77a32afe09d2f9218bcd9016c4c8d947223706f8ca086e01bc0e58a01517c51ef2034a0d8e9f503" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "0bf36823342fe84e5111a887fab0ebb740c8883c3783f68d374f95da6ae142ab9abc1a0be9acdaf6f175fddad15b12a0ecd27fa6a5d7179609468145da1aad01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "27d124a184f4ddaeafe4746a132d119c0e0134a344691eadca7d8847178799d94f41b5f0e3ddeb3f01afab5d9dc8db5d96d0418c18ddec31557306b88d257e0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "34e28fe630dbc1c6c4a67a7775275654262c4e42967a1b99482c903f9171c724b63e95bac7f150d6482ccfd855bd82e1c644e3dd27af4a38afd2040268215100" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "ae3d90d7dd750cf885c78f9c12dbae2d2707f5411b42dd03d3c0bced50952661efc6b05b4f6268a663736c64d9f300d27f3a81d85a93ff5705c310c97058340b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "625c34749f149a2e9183d8efd813da7d8c9ed336a9fb999770290658b9efcc9432551aa85232b3cd994e77ce111265c384216dcc47bbe86c151bb7e14e911907" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.root.json deleted file mode 100644 index ace93498..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ae1ce5269bdb49e159d202abd2bf00bc390c6af87e7efe281d3bc1991103fa2a40617d82163c7014616cdf111a37bf4984f7f2282d63625f1c25829f4752b20e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 7bebab10..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5bb29b3df3004838f4f0d3d0bdcf2e9edcc1859843f129fb54c6dc5da74e43b6c1ba5cd15652d618d5ae9dafae37f0d7a624ae554d2d94d4909425cca1409b07" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "e6216a17a58b31b80fdb6b3bdfb60fb02e35dc15628cb372694715960e0c0ea82028e410852767d511f3b5a7d0953f78d21b004f5fa3eb81da16f1dfe1cc9104" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1b3be15b61bac3a359dcde9ec054f7c4b469c561b2b759e4794ee9535c2ca9defa6d391af04ea108d3cfb0c6e9700b470f115caccdd79db622f73d046b7a8b0d" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "46803209126b583272596e06ef9ce530003f1ca013ee3ef2a77a32afe09d2f9218bcd9016c4c8d947223706f8ca086e01bc0e58a01517c51ef2034a0d8e9f503" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "0bf36823342fe84e5111a887fab0ebb740c8883c3783f68d374f95da6ae142ab9abc1a0be9acdaf6f175fddad15b12a0ecd27fa6a5d7179609468145da1aad01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "27d124a184f4ddaeafe4746a132d119c0e0134a344691eadca7d8847178799d94f41b5f0e3ddeb3f01afab5d9dc8db5d96d0418c18ddec31557306b88d257e0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "34e28fe630dbc1c6c4a67a7775275654262c4e42967a1b99482c903f9171c724b63e95bac7f150d6482ccfd855bd82e1c644e3dd27af4a38afd2040268215100" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "ae3d90d7dd750cf885c78f9c12dbae2d2707f5411b42dd03d3c0bced50952661efc6b05b4f6268a663736c64d9f300d27f3a81d85a93ff5705c310c97058340b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "625c34749f149a2e9183d8efd813da7d8c9ed336a9fb999770290658b9efcc9432551aa85232b3cd994e77ce111265c384216dcc47bbe86c151bb7e14e911907" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/root.json deleted file mode 100644 index ace93498..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ae1ce5269bdb49e159d202abd2bf00bc390c6af87e7efe281d3bc1991103fa2a40617d82163c7014616cdf111a37bf4984f7f2282d63625f1c25829f4752b20e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/timestamp.json deleted file mode 100644 index 7bebab10..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5bb29b3df3004838f4f0d3d0bdcf2e9edcc1859843f129fb54c6dc5da74e43b6c1ba5cd15652d618d5ae9dafae37f0d7a624ae554d2d94d4909425cca1409b07" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "e6216a17a58b31b80fdb6b3bdfb60fb02e35dc15628cb372694715960e0c0ea82028e410852767d511f3b5a7d0953f78d21b004f5fa3eb81da16f1dfe1cc9104" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1b3be15b61bac3a359dcde9ec054f7c4b469c561b2b759e4794ee9535c2ca9defa6d391af04ea108d3cfb0c6e9700b470f115caccdd79db622f73d046b7a8b0d" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "46803209126b583272596e06ef9ce530003f1ca013ee3ef2a77a32afe09d2f9218bcd9016c4c8d947223706f8ca086e01bc0e58a01517c51ef2034a0d8e9f503" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "0bf36823342fe84e5111a887fab0ebb740c8883c3783f68d374f95da6ae142ab9abc1a0be9acdaf6f175fddad15b12a0ecd27fa6a5d7179609468145da1aad01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "27d124a184f4ddaeafe4746a132d119c0e0134a344691eadca7d8847178799d94f41b5f0e3ddeb3f01afab5d9dc8db5d96d0418c18ddec31557306b88d257e0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "34e28fe630dbc1c6c4a67a7775275654262c4e42967a1b99482c903f9171c724b63e95bac7f150d6482ccfd855bd82e1c644e3dd27af4a38afd2040268215100" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "ae3d90d7dd750cf885c78f9c12dbae2d2707f5411b42dd03d3c0bced50952661efc6b05b4f6268a663736c64d9f300d27f3a81d85a93ff5705c310c97058340b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "625c34749f149a2e9183d8efd813da7d8c9ed336a9fb999770290658b9efcc9432551aa85232b3cd994e77ce111265c384216dcc47bbe86c151bb7e14e911907" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/hash.txt deleted file mode 100644 index 49d284ea..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/hash.txt +++ /dev/null @@ -1 +0,0 @@ -19c5ec00c484505be65a024696fd980add6848b623d74d7eee92dbd3b2c8f178 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.root.json deleted file mode 100644 index ace93498..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ae1ce5269bdb49e159d202abd2bf00bc390c6af87e7efe281d3bc1991103fa2a40617d82163c7014616cdf111a37bf4984f7f2282d63625f1c25829f4752b20e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 7bebab10..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5bb29b3df3004838f4f0d3d0bdcf2e9edcc1859843f129fb54c6dc5da74e43b6c1ba5cd15652d618d5ae9dafae37f0d7a624ae554d2d94d4909425cca1409b07" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "e6216a17a58b31b80fdb6b3bdfb60fb02e35dc15628cb372694715960e0c0ea82028e410852767d511f3b5a7d0953f78d21b004f5fa3eb81da16f1dfe1cc9104" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1b3be15b61bac3a359dcde9ec054f7c4b469c561b2b759e4794ee9535c2ca9defa6d391af04ea108d3cfb0c6e9700b470f115caccdd79db622f73d046b7a8b0d" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "46803209126b583272596e06ef9ce530003f1ca013ee3ef2a77a32afe09d2f9218bcd9016c4c8d947223706f8ca086e01bc0e58a01517c51ef2034a0d8e9f503" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "0bf36823342fe84e5111a887fab0ebb740c8883c3783f68d374f95da6ae142ab9abc1a0be9acdaf6f175fddad15b12a0ecd27fa6a5d7179609468145da1aad01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "27d124a184f4ddaeafe4746a132d119c0e0134a344691eadca7d8847178799d94f41b5f0e3ddeb3f01afab5d9dc8db5d96d0418c18ddec31557306b88d257e0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "34e28fe630dbc1c6c4a67a7775275654262c4e42967a1b99482c903f9171c724b63e95bac7f150d6482ccfd855bd82e1c644e3dd27af4a38afd2040268215100" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "ae3d90d7dd750cf885c78f9c12dbae2d2707f5411b42dd03d3c0bced50952661efc6b05b4f6268a663736c64d9f300d27f3a81d85a93ff5705c310c97058340b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "625c34749f149a2e9183d8efd813da7d8c9ed336a9fb999770290658b9efcc9432551aa85232b3cd994e77ce111265c384216dcc47bbe86c151bb7e14e911907" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.root.json deleted file mode 100644 index ce76c3c4..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "49f17c01fd9e296f1029144b2c7cff78672f8f0d6f2c6c2049e6412a21f33c8f993fd3e8faf8debefdb4af1a2e2c530826398b8f0c2b1bc9d1dbe3d30d20e60a" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "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" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.timestamp.json deleted file mode 100644 index 8ca738c5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/2.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "4bf1ce4b2a66f6f4bb002d06f6d69a3b72678bcf0ce0d16ac4eaf8faa6eb35aba57cb368abb86f81b41c60dc59c0a43bdbee6fcc3ae5be381aad5aec0cc0e80c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f0bbf3b300d72231df1c4bb55e73e20afa08a32f8414ad66d76c886384a71f23b64301fa3f5ebaf30cddd33407ffe58ae00c08112ea30e4f18f355cd4e2bd70d" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "721f21d83e4e22e52da0f4ec76e05a16f2f6ac41e5f688b5ea81c16a2b3d0be44dab1df306a100a826fc10f2991eb6ba295ff0dd7269abd1faa9e57140fc4508" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0d1c192b314eab6296eec926b34a9393e27432fbe9d0ac349384648236138c9a2f4c5cbde14074e1c58ce92247f67d93c4c55d6cbfda0873f285b4922e614003" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d333eccfaadee6bf457743270df4587550c090b32285ab1cea64b9829e6455218c01bbb6848a4e9126b54b5c893121a1c43d2bf5229165396f79d621d0ba7806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "ee798279d0e2a7afc94794e99ab17ce8b5754be06b1e6108e5d380b70950e062d5f4551e261545eeba3845d779f51b1390cc6a535b8a0e5a6db083e648bc060c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5381bd588a78bf1820e284f6b403696fe56b786df783522d85a0f42e6f3750ca8dd9c6c6dc9a81a40471c97ed50be24555b2f6b7a1439e25e31297342ccfe10c" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "400dd1ee64a31bf899f956a9d43710ff9b96cd3737a528fd0ae5ef313a91ba4132ee09dc2ed4b77868b09811b9bc8b7808d4eab06df5b57c16fdb53ac2d9fa0b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e53225418b7b6edd22970bf3e3ed1dd2931d7b8c7ab1e91f54efa12554b151d80c3591f0203eba317873c5aa71bfec5c5349b43ca8a5143a3b393b4751c500b" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/root.json deleted file mode 100644 index ce76c3c4..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "49f17c01fd9e296f1029144b2c7cff78672f8f0d6f2c6c2049e6412a21f33c8f993fd3e8faf8debefdb4af1a2e2c530826398b8f0c2b1bc9d1dbe3d30d20e60a" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "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" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/timestamp.json deleted file mode 100644 index 8ca738c5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "4bf1ce4b2a66f6f4bb002d06f6d69a3b72678bcf0ce0d16ac4eaf8faa6eb35aba57cb368abb86f81b41c60dc59c0a43bdbee6fcc3ae5be381aad5aec0cc0e80c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f0bbf3b300d72231df1c4bb55e73e20afa08a32f8414ad66d76c886384a71f23b64301fa3f5ebaf30cddd33407ffe58ae00c08112ea30e4f18f355cd4e2bd70d" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "721f21d83e4e22e52da0f4ec76e05a16f2f6ac41e5f688b5ea81c16a2b3d0be44dab1df306a100a826fc10f2991eb6ba295ff0dd7269abd1faa9e57140fc4508" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0d1c192b314eab6296eec926b34a9393e27432fbe9d0ac349384648236138c9a2f4c5cbde14074e1c58ce92247f67d93c4c55d6cbfda0873f285b4922e614003" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d333eccfaadee6bf457743270df4587550c090b32285ab1cea64b9829e6455218c01bbb6848a4e9126b54b5c893121a1c43d2bf5229165396f79d621d0ba7806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "ee798279d0e2a7afc94794e99ab17ce8b5754be06b1e6108e5d380b70950e062d5f4551e261545eeba3845d779f51b1390cc6a535b8a0e5a6db083e648bc060c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5381bd588a78bf1820e284f6b403696fe56b786df783522d85a0f42e6f3750ca8dd9c6c6dc9a81a40471c97ed50be24555b2f6b7a1439e25e31297342ccfe10c" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "400dd1ee64a31bf899f956a9d43710ff9b96cd3737a528fd0ae5ef313a91ba4132ee09dc2ed4b77868b09811b9bc8b7808d4eab06df5b57c16fdb53ac2d9fa0b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e53225418b7b6edd22970bf3e3ed1dd2931d7b8c7ab1e91f54efa12554b151d80c3591f0203eba317873c5aa71bfec5c5349b43ca8a5143a3b393b4751c500b" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.root.json deleted file mode 100644 index ace93498..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ae1ce5269bdb49e159d202abd2bf00bc390c6af87e7efe281d3bc1991103fa2a40617d82163c7014616cdf111a37bf4984f7f2282d63625f1c25829f4752b20e" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.timestamp.json deleted file mode 100644 index 7bebab10..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "5bb29b3df3004838f4f0d3d0bdcf2e9edcc1859843f129fb54c6dc5da74e43b6c1ba5cd15652d618d5ae9dafae37f0d7a624ae554d2d94d4909425cca1409b07" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "e6216a17a58b31b80fdb6b3bdfb60fb02e35dc15628cb372694715960e0c0ea82028e410852767d511f3b5a7d0953f78d21b004f5fa3eb81da16f1dfe1cc9104" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "1b3be15b61bac3a359dcde9ec054f7c4b469c561b2b759e4794ee9535c2ca9defa6d391af04ea108d3cfb0c6e9700b470f115caccdd79db622f73d046b7a8b0d" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "46803209126b583272596e06ef9ce530003f1ca013ee3ef2a77a32afe09d2f9218bcd9016c4c8d947223706f8ca086e01bc0e58a01517c51ef2034a0d8e9f503" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "0bf36823342fe84e5111a887fab0ebb740c8883c3783f68d374f95da6ae142ab9abc1a0be9acdaf6f175fddad15b12a0ecd27fa6a5d7179609468145da1aad01" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "27d124a184f4ddaeafe4746a132d119c0e0134a344691eadca7d8847178799d94f41b5f0e3ddeb3f01afab5d9dc8db5d96d0418c18ddec31557306b88d257e0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "34e28fe630dbc1c6c4a67a7775275654262c4e42967a1b99482c903f9171c724b63e95bac7f150d6482ccfd855bd82e1c644e3dd27af4a38afd2040268215100" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "ae3d90d7dd750cf885c78f9c12dbae2d2707f5411b42dd03d3c0bced50952661efc6b05b4f6268a663736c64d9f300d27f3a81d85a93ff5705c310c97058340b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "625c34749f149a2e9183d8efd813da7d8c9ed336a9fb999770290658b9efcc9432551aa85232b3cd994e77ce111265c384216dcc47bbe86c151bb7e14e911907" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.root.json deleted file mode 100644 index ce76c3c4..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "49f17c01fd9e296f1029144b2c7cff78672f8f0d6f2c6c2049e6412a21f33c8f993fd3e8faf8debefdb4af1a2e2c530826398b8f0c2b1bc9d1dbe3d30d20e60a" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "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" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.timestamp.json deleted file mode 100644 index 8ca738c5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/2.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "4bf1ce4b2a66f6f4bb002d06f6d69a3b72678bcf0ce0d16ac4eaf8faa6eb35aba57cb368abb86f81b41c60dc59c0a43bdbee6fcc3ae5be381aad5aec0cc0e80c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f0bbf3b300d72231df1c4bb55e73e20afa08a32f8414ad66d76c886384a71f23b64301fa3f5ebaf30cddd33407ffe58ae00c08112ea30e4f18f355cd4e2bd70d" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "721f21d83e4e22e52da0f4ec76e05a16f2f6ac41e5f688b5ea81c16a2b3d0be44dab1df306a100a826fc10f2991eb6ba295ff0dd7269abd1faa9e57140fc4508" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0d1c192b314eab6296eec926b34a9393e27432fbe9d0ac349384648236138c9a2f4c5cbde14074e1c58ce92247f67d93c4c55d6cbfda0873f285b4922e614003" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d333eccfaadee6bf457743270df4587550c090b32285ab1cea64b9829e6455218c01bbb6848a4e9126b54b5c893121a1c43d2bf5229165396f79d621d0ba7806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "ee798279d0e2a7afc94794e99ab17ce8b5754be06b1e6108e5d380b70950e062d5f4551e261545eeba3845d779f51b1390cc6a535b8a0e5a6db083e648bc060c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5381bd588a78bf1820e284f6b403696fe56b786df783522d85a0f42e6f3750ca8dd9c6c6dc9a81a40471c97ed50be24555b2f6b7a1439e25e31297342ccfe10c" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "400dd1ee64a31bf899f956a9d43710ff9b96cd3737a528fd0ae5ef313a91ba4132ee09dc2ed4b77868b09811b9bc8b7808d4eab06df5b57c16fdb53ac2d9fa0b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e53225418b7b6edd22970bf3e3ed1dd2931d7b8c7ab1e91f54efa12554b151d80c3591f0203eba317873c5aa71bfec5c5349b43ca8a5143a3b393b4751c500b" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/root.json deleted file mode 100644 index ce76c3c4..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/root.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "49f17c01fd9e296f1029144b2c7cff78672f8f0d6f2c6c2049e6412a21f33c8f993fd3e8faf8debefdb4af1a2e2c530826398b8f0c2b1bc9d1dbe3d30d20e60a" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:20Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "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" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/snapshot.json deleted file mode 100644 index 5347f780..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "d5e231a96d45560123b3dc33bf2a9043a4b25959c0b84c621060687f41fc047548978be8673a350545653e0093cd38a4432a9f7ef98699b7fb59fc075a227b0a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/targets.json deleted file mode 100644 index 6884685d..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "a576e0ec5d71e3eec0d3448b5107a0eccd35eeeb148ba5ace712be8979e44cdf3a4df595b76801e19957cd70b72c0783262bc23ca8ffd487c7c97de5f968e300" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:20Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/timestamp.json deleted file mode 100644 index 8ca738c5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_2_threshold_4_timestamp/server/metadata/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "4bf1ce4b2a66f6f4bb002d06f6d69a3b72678bcf0ce0d16ac4eaf8faa6eb35aba57cb368abb86f81b41c60dc59c0a43bdbee6fcc3ae5be381aad5aec0cc0e80c" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f0bbf3b300d72231df1c4bb55e73e20afa08a32f8414ad66d76c886384a71f23b64301fa3f5ebaf30cddd33407ffe58ae00c08112ea30e4f18f355cd4e2bd70d" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "721f21d83e4e22e52da0f4ec76e05a16f2f6ac41e5f688b5ea81c16a2b3d0be44dab1df306a100a826fc10f2991eb6ba295ff0dd7269abd1faa9e57140fc4508" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "0d1c192b314eab6296eec926b34a9393e27432fbe9d0ac349384648236138c9a2f4c5cbde14074e1c58ce92247f67d93c4c55d6cbfda0873f285b4922e614003" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d333eccfaadee6bf457743270df4587550c090b32285ab1cea64b9829e6455218c01bbb6848a4e9126b54b5c893121a1c43d2bf5229165396f79d621d0ba7806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "ee798279d0e2a7afc94794e99ab17ce8b5754be06b1e6108e5d380b70950e062d5f4551e261545eeba3845d779f51b1390cc6a535b8a0e5a6db083e648bc060c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5381bd588a78bf1820e284f6b403696fe56b786df783522d85a0f42e6f3750ca8dd9c6c6dc9a81a40471c97ed50be24555b2f6b7a1439e25e31297342ccfe10c" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "400dd1ee64a31bf899f956a9d43710ff9b96cd3737a528fd0ae5ef313a91ba4132ee09dc2ed4b77868b09811b9bc8b7808d4eab06df5b57c16fdb53ac2d9fa0b" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e53225418b7b6edd22970bf3e3ed1dd2931d7b8c7ab1e91f54efa12554b151d80c3591f0203eba317873c5aa71bfec5c5349b43ca8a5143a3b393b4751c500b" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:20Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "7a797f95dcb2e1894c4b2f59ec6c596dff205c16d23060a5fda55a0f053be2bd", - "sha512": "d7d872b82f550d0a0b0458fb15ab343b66d9c6a07c0915ef1a1cf903ec303b717b56c04013b64599a64171564825ca01314a65c690eafecd088a3881bf62c278" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/hash.txt deleted file mode 100644 index f594895a..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/hash.txt +++ /dev/null @@ -1 +0,0 @@ -3394568b65c89ced0502b93667ebc005aa9337c95f1c10c8e0f09c002b217ede \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/2.root.json deleted file mode 100644 index 06509adb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/2.root.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "1796c3a9956f553c32ff9c7db8734af9d960989f89f185ef0edc36a87591d2e815ef84a7903bd553ec7ed156170e0c701739bdb9c8fd61316b36dd870525b30a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "1aae88766ce5015d6ec2e75345a8ed5ac7b7e7a3c234e7f2215c37e577bb512743f612f6d7ead301970f1a01dbd15a7a4467147823a1e226ce5643817fafb900" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "7f7bec7da5b5b88bd33ac8c94dbee5700c6fdae5454a98a21516edea8a8d5714c16d49957b3eebbb4b88aa3f3e2e17590f2b056894cb1093c7399a403ad33007" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "398ab57bf00e675ccf5c6a34c88013f86488cece97646db6e00aac40ca3e2f68c8ee6e2d73a14ee9484cb6405f1f653ff896ff95b062221c0c36df2a71b5e50f" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "8ea937bb5a9451161b32605676731ded282d3878e8058d585759b43ee1700a77a33d1b21614486e0240fc1d0af39723cc85ea403479d6efb62c05cc6fdd16a08" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf47e74acfdc137847a1c96d7ef42e3049a347cf96c6b873e5047dd2e50050e13a0dba4907138ba3c29e1c768ddfc6332647fb9658fede4229192e1bc5b6d409" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "9c17a9c043a6dc378334f162999767acc012f6cb33e041f3c9b14963cacb1a32b6cba552931eb9ddd8bd78bf0a872498a8829c4c6c261a2978b083a8639c110f" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "c5698a3a2195c4399b4e04fc9db778a7c02acf82c691517fad43a387083fa4dfe9331c1429c10d22ca14088516518939b104994c68dfc16d21b1ada46ef7b700" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "78f401be103e238daf3c931c2eeb6e7a0eb118042bcbabce533a4d0057e9a19b7df5357fd8f837f36d58a69b1a2719ab2e326e4656e92e8435dd14ba2b01640f" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/root.json deleted file mode 100644 index 06509adb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/root.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "1796c3a9956f553c32ff9c7db8734af9d960989f89f185ef0edc36a87591d2e815ef84a7903bd553ec7ed156170e0c701739bdb9c8fd61316b36dd870525b30a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "1aae88766ce5015d6ec2e75345a8ed5ac7b7e7a3c234e7f2215c37e577bb512743f612f6d7ead301970f1a01dbd15a7a4467147823a1e226ce5643817fafb900" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "7f7bec7da5b5b88bd33ac8c94dbee5700c6fdae5454a98a21516edea8a8d5714c16d49957b3eebbb4b88aa3f3e2e17590f2b056894cb1093c7399a403ad33007" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "398ab57bf00e675ccf5c6a34c88013f86488cece97646db6e00aac40ca3e2f68c8ee6e2d73a14ee9484cb6405f1f653ff896ff95b062221c0c36df2a71b5e50f" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "8ea937bb5a9451161b32605676731ded282d3878e8058d585759b43ee1700a77a33d1b21614486e0240fc1d0af39723cc85ea403479d6efb62c05cc6fdd16a08" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf47e74acfdc137847a1c96d7ef42e3049a347cf96c6b873e5047dd2e50050e13a0dba4907138ba3c29e1c768ddfc6332647fb9658fede4229192e1bc5b6d409" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "9c17a9c043a6dc378334f162999767acc012f6cb33e041f3c9b14963cacb1a32b6cba552931eb9ddd8bd78bf0a872498a8829c4c6c261a2978b083a8639c110f" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "c5698a3a2195c4399b4e04fc9db778a7c02acf82c691517fad43a387083fa4dfe9331c1429c10d22ca14088516518939b104994c68dfc16d21b1ada46ef7b700" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "78f401be103e238daf3c931c2eeb6e7a0eb118042bcbabce533a4d0057e9a19b7df5357fd8f837f36d58a69b1a2719ab2e326e4656e92e8435dd14ba2b01640f" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.root.json deleted file mode 100644 index f277106f..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.root.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "876195f83e8dbb1b00f70188fc7f405d05d321da97a9b98781f331d2dea6be1415d0a0b4e23697f2e30235e98c3503a2ec3aade3bd4c1bac8109f368d9ed5005" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "ff3e54a7492085d33ebf25158ce673fdd7d871a49cdccbe31b35c9ba1c28b91fd22b161b8a226248b3ef3e81378cdaa1ef3e37c2100363ec1be6d87d19a2aa0c" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "59da18183f6729135b74539865f55e5c6e3d837209b724922cd56dd79f46c7150016930f477707c78ee9e39ee0f1a8e18304ab4cdaf1c11f81f147cbf5c57904" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "c0b98cba687cdab0628872207026501c9b3c289af113c0be83176a908e58a647b2be9716b37ae4acc78327bbcd715d97d200953681646f3bc918e6c0f409dc0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "7fa4506b7e9c6aac34b6c9b5e1099e8fa995fb1af7804cb9245b0132edf41739b7049277de11577c1ff72c1cf8fe41ba3ec32bf802cf16cb19e42765f53d3f0e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "8c5af6fd1930026a1a9d9816e18205dc4e6bbf0e4b9dd7385d9cc10ca6bf3609cce7c62d5ea5432e0a67e3c395531cf1c67f874f0ba1acb27bf161423b34500c" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ef03e8b766ffe280b1486460ee1b8cd92e6605d4d4af32696a0345b940767f7e3ae66f217b97eae12aa704fa5ee03073079046efe4c76c14989c4784d2d1fa0d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "0a536f66722b82fa8da8ef6837cdae1d719abe72dd27fe36a4fcb2d21302989bb897275825bfef3a5f93fd487f947c75c703da69ad67988c1be46a975a8a6602" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "caf6083cc4ab3fc5a39cc243d08faf0724435b9189b4a3349cb8955b321d9c644697c9d96698e09a5c47f5d032a562c97b08a3e840dbb60f4224afeb438a3a0b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/2.root.json deleted file mode 100644 index 06509adb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/2.root.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "1796c3a9956f553c32ff9c7db8734af9d960989f89f185ef0edc36a87591d2e815ef84a7903bd553ec7ed156170e0c701739bdb9c8fd61316b36dd870525b30a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "1aae88766ce5015d6ec2e75345a8ed5ac7b7e7a3c234e7f2215c37e577bb512743f612f6d7ead301970f1a01dbd15a7a4467147823a1e226ce5643817fafb900" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "7f7bec7da5b5b88bd33ac8c94dbee5700c6fdae5454a98a21516edea8a8d5714c16d49957b3eebbb4b88aa3f3e2e17590f2b056894cb1093c7399a403ad33007" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "398ab57bf00e675ccf5c6a34c88013f86488cece97646db6e00aac40ca3e2f68c8ee6e2d73a14ee9484cb6405f1f653ff896ff95b062221c0c36df2a71b5e50f" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "8ea937bb5a9451161b32605676731ded282d3878e8058d585759b43ee1700a77a33d1b21614486e0240fc1d0af39723cc85ea403479d6efb62c05cc6fdd16a08" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf47e74acfdc137847a1c96d7ef42e3049a347cf96c6b873e5047dd2e50050e13a0dba4907138ba3c29e1c768ddfc6332647fb9658fede4229192e1bc5b6d409" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "9c17a9c043a6dc378334f162999767acc012f6cb33e041f3c9b14963cacb1a32b6cba552931eb9ddd8bd78bf0a872498a8829c4c6c261a2978b083a8639c110f" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "c5698a3a2195c4399b4e04fc9db778a7c02acf82c691517fad43a387083fa4dfe9331c1429c10d22ca14088516518939b104994c68dfc16d21b1ada46ef7b700" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "78f401be103e238daf3c931c2eeb6e7a0eb118042bcbabce533a4d0057e9a19b7df5357fd8f837f36d58a69b1a2719ab2e326e4656e92e8435dd14ba2b01640f" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/root.json deleted file mode 100644 index 06509adb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/root.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "1796c3a9956f553c32ff9c7db8734af9d960989f89f185ef0edc36a87591d2e815ef84a7903bd553ec7ed156170e0c701739bdb9c8fd61316b36dd870525b30a" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "1aae88766ce5015d6ec2e75345a8ed5ac7b7e7a3c234e7f2215c37e577bb512743f612f6d7ead301970f1a01dbd15a7a4467147823a1e226ce5643817fafb900" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "7f7bec7da5b5b88bd33ac8c94dbee5700c6fdae5454a98a21516edea8a8d5714c16d49957b3eebbb4b88aa3f3e2e17590f2b056894cb1093c7399a403ad33007" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "398ab57bf00e675ccf5c6a34c88013f86488cece97646db6e00aac40ca3e2f68c8ee6e2d73a14ee9484cb6405f1f653ff896ff95b062221c0c36df2a71b5e50f" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "8ea937bb5a9451161b32605676731ded282d3878e8058d585759b43ee1700a77a33d1b21614486e0240fc1d0af39723cc85ea403479d6efb62c05cc6fdd16a08" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "bf47e74acfdc137847a1c96d7ef42e3049a347cf96c6b873e5047dd2e50050e13a0dba4907138ba3c29e1c768ddfc6332647fb9658fede4229192e1bc5b6d409" - }, - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "9c17a9c043a6dc378334f162999767acc012f6cb33e041f3c9b14963cacb1a32b6cba552931eb9ddd8bd78bf0a872498a8829c4c6c261a2978b083a8639c110f" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "c5698a3a2195c4399b4e04fc9db778a7c02acf82c691517fad43a387083fa4dfe9331c1429c10d22ca14088516518939b104994c68dfc16d21b1ada46ef7b700" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "78f401be103e238daf3c931c2eeb6e7a0eb118042bcbabce533a4d0057e9a19b7df5357fd8f837f36d58a69b1a2719ab2e326e4656e92e8435dd14ba2b01640f" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:18Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/snapshot.json deleted file mode 100644 index 98ee47eb..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7945d5bbebfd0f077a6f8bcac4eed402709f07307663b935835712ff4fb4eebbc51146039d0a1ecb3bc7726c526f12e0b063cc3d9dae1c422179db99d4409b0c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/targets.json deleted file mode 100644 index 210307f1..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "1c07f726a8988b2bbb150cd91c36fa2e0716eb904a89002e24f2382641d5f7680e04cbedbecf89034c8b6416b7a31d5c4bdcc20f0aa2cd976353828cda0e3e0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:18Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/timestamp.json deleted file mode 100644 index f5c7c185..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_root/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "18e08cd54878e2af5838ed4445230e687ce0007c1b886b3c1446ee639365b0053e294c930b176fdb1258af9f957e4c4927beaccbbffb354cc27b9d5745257808" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:18Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "765e1bc98ad6235b9a6e1c200e8576c262ed924ba81a9960268a65b7fc1bba91", - "sha512": "b245cd1eb39623b7d6d9d07765bae5e7a373471c4bfc66862042e50f0ced2fbe564dfd23565ce7746e926492d6543c700b22ce48bbe19f5e4128698d243cea49" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/hash.txt deleted file mode 100644 index b0c267a5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/hash.txt +++ /dev/null @@ -1 +0,0 @@ -af9b3cfe7cc8b819338f9cf29b6d297df3c3b5969d7fd08fd5f0d945932051e6 \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.root.json deleted file mode 100644 index fe8ada34..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e74e989e4ef342e273a7838703998da620fe1585a53bc9b0700c458acd83d82a8e35d69c9ef448b0ab591da6dbfc22341c950dd32ffbb1f525923c34b9047704" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/2.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/root.json deleted file mode 100644 index fe8ada34..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e74e989e4ef342e273a7838703998da620fe1585a53bc9b0700c458acd83d82a8e35d69c9ef448b0ab591da6dbfc22341c950dd32ffbb1f525923c34b9047704" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.root.json deleted file mode 100644 index ecf8e782..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "6fcc711c61ce5cebe08cc4f3ed4ccfbee0d33a223cea1258d8a10af6be18627129d2ab2b063283eadcd36e67dd8713af00390aa44733ce9889e2aee2e2e1c600" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.snapshot.json deleted file mode 100644 index decb1f60..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "9b7a3b750e08dfc308b46c3671df8385f782507498c03d2f9f7ecd08045e1112ae034e176f5afea79008aa6bc6dd514fc86aaeec598521d2b5e3247d28e56f0b" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "65b00baea2495c7c2093e65b249597160020ec400ec993979ac07acfc99aab4ea8a2a5ed30bde8ac6c9e7d762d2a6f508ba2aefe47b3615d7eb3d3807d6ebe08" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "02926e5f258062cad02f5246701737146bd84ce82a3641d172e0534204604be437aea4842a55964a368416679255308c0db6f7980c885d9afaeae92fc779a40d" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9efc64982359e93211f05350e1399c1953579807ace961423cdc5c2406df96180b56f94ddac14511bc8430625f230235f51a98e9c546c262f9b444e08c31c50d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "3105c9e05fb0a536586a9f241c40ffd0696bb11be43bc50ad18fb63799764139a839bee36c58e509d725b4350658c3d3c2a3e60050de66eda65a87be36b6cc03" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "7b4fd39d2babaead15732edf5cadd72b77e3e3cc8b46a5462fe9eadf4ef79cffe15d7b95d56b94d2e4776a2892c5c9ca7895ec6fabaaa563071be633375b3c03" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "24b9b1f3730d6cc8293d83ebae86e3ea3a9bbb4d0a8907b2c71001cc1b0d257814f037f5aa06f8425e871c66f7c377ab197bfceb4402144924dbbe0422103607" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "5bc6f5738109fe3be3e02c8558a241d61d7494fd76a0274774485ff6b010f41f718b184a3a743a2ceb16324e5bcd57daa6fb87cf32c85bf6c01d8a3098238308" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3e3a376641fce12b3df639293cf52c29fbf6a04398ab6e69d2bf12cfae264ace4c984816440536e870cc50816fb2b94e9b9824ce873c7237561afa9bbb649304" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.root.json deleted file mode 100644 index fe8ada34..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e74e989e4ef342e273a7838703998da620fe1585a53bc9b0700c458acd83d82a8e35d69c9ef448b0ab591da6dbfc22341c950dd32ffbb1f525923c34b9047704" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/2.snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/root.json deleted file mode 100644 index fe8ada34..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "e74e989e4ef342e273a7838703998da620fe1585a53bc9b0700c458acd83d82a8e35d69c9ef448b0ab591da6dbfc22341c950dd32ffbb1f525923c34b9047704" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:19Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "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/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/snapshot.json deleted file mode 100644 index 7cb73051..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/snapshot.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "25cd6eee4f580fed660330de02cb9ab34b9e7495d3f4c57babf225c3c2c39a0937afe633a7760c19681c6b05d89f2c3907a7eef32822992624223cfbcb872d00" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "2011938c47cf0990172acc5a418b9758d124655200b6874fb6646bd6025de6c5a48a3c30ced83b1f955b242c1c3f4d2d346b71861fccdc45c945418aa2511d0e" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "303b7b1062a09644bd18804b6b1af6818c25abd212b6539cab0fab0e729a4eb14621396fde4d809649c37b82db5278e878b21b52052ac4fecbcff471c8f64408" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "85961c73d21ab17e5892681198479700a995920cd02001818979fe35122e5776fcc3fd499811b1f995f922ad737d61c5b72229ab1e4d7aab63d9ea1642795c0d" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "4aed1e9ef8d1ac785d15df386470df92ff484f71c35a37ecd1e83e0fd66e67206172f6a2f277bdebae17372e75d253b45143adf3f9d8b6d23a4690d482e2180b" - }, - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "26ed17502d130ab4c7b26a1ef78730d9f15847cc3aa6623f692003e588554761b6f6c3b60da304933b3e012478466ce634970562504fdab9b6d2c8e818f3220e" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "0b498cf7cd3a926007f158d9b72002283d67f4f0c2e4a61d5bb3d3afe09d0e9dcd41a4bc67d5cc87a2d072028904d2e022ca4d2abc84137433cdd6812f613505" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "1f9aea75e9b632f06769ac0aa611ce3116faa14a3736cddc4cdbcae5f7084a0cd44c4a44a8c78a4200f34b097c0176c8c686b352c79105ffcfd764473f9d3206" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "3f315ca76675299894f1ad111dcce7450e1e2f06400e64a86db5d42c67a14fc7a8f92b1063ae547229544d046bcbb038027e0e0abab05bfb6600f7349a9bf90a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/targets.json deleted file mode 100644 index 56b7bfaf..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "51fff9a858517278b811fc9b8dc4fee5e10c5f444a87bc259cb0241ea54f1da693cf844412693d6ea24bed5302a508d08879e0a32a961f1132a646ef9f370a07" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:19Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/timestamp.json deleted file mode 100644 index fa706c20..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_snapshot/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "de078d3c5438334ab51ed4e433cab94b53f883dad9519505ebe64088f13077f725d96b54c10afbf7909c95ddfd829d0bcca82e09612b91d63dbc9a34e830270c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:19Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "16459413316a5b9a617e84c06840164beaa4d7ef0b67c0c720acefc89cb15be3", - "sha512": "c118a299f2be396ef21097a0803166b1d796256a3c68e3590e1addd656e804dd28d32e67664e460066af4b956f50fcd1abd8b614e2535fb7e175d8e2819d1d87" - }, - "length": 2271, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.root.json deleted file mode 100644 index c067b5f5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ba2efed303d416f5e38018fb72802fb9263c87e6ad63725fd5e839d3cec51e2cfd50bdd0004a96a4017ef929249fc263332a54d0c86552f9014e68f6972b3c08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.targets.json deleted file mode 100644 index 0dab21b5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "2a088977e3828da40fbe4f245d9d0ab6cf6e81eb30835531a1a732e75dc734214d70061ef6e1c30a1984b9d36401d257952471a974314c148823d207781fdd09" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f48198da5d992e46d55f092689c442bf31d83b9c9187d83defee46f7fea5a802c0badc1ab3ae2799492946946b29b90b2c10eaca7f5e8e33a00c555e0d5abc0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "37fffad3ba0cb53593b1d2cf7aa0437cfb821a66d00c1b3ad6dd858117b66336ad42ac7a53de241dcacbd5961e2b22d4c5c1e6535cd0595645c813a0fc222a00" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "42964abf028dd306e5a98920e90c5234dd01492259fbbfe6cafcb3d6076d34bfc296b2e57834a2f7039fdab89fee185dd2291abfec61a9bce256556a922ae006" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "6ba3c3e8485f4298bff2547bc39237d0ba07d275028ef8a7b0d051a1a8867f7d38cf5973b4f5b4acd868820dfc5d4eb86646c87fe9b3cbe77e50a2dcaf963b04" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "3e5189ac4c3c485c833ff697056e07eeae6cabc2de11a32c2a6a074d622ff22295d0ed8f3e42882caa4f59c09ceb3869a6d7b663439327e6f0e56c713ff1780e" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5688ea77f9e7020c2664920af7d48814231dea91a1997d7adec74f9e167e55dea7797603ebea9f9352c4e91306f92cb81980b9351787d90cbf23e706a26730e" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "17adcf644ace2f7e66abf30980426db96c2b1bf275ea728593433feeb90e39e4b2db1bbd5128f8fe56a1fa3db8afafe5fec2b40903b402015a9554c24d543704" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "bed1c8e2e94072dc3c8bf0f823ada338ce7eae194d3d1df6596fb49efdf59733137d02f10b8521db6b00c696d45a1f4689ae350ee1a6cbd5dcc63700da70b401" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/root.json deleted file mode 100644 index c067b5f5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ba2efed303d416f5e38018fb72802fb9263c87e6ad63725fd5e839d3cec51e2cfd50bdd0004a96a4017ef929249fc263332a54d0c86552f9014e68f6972b3c08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/targets.json deleted file mode 100644 index 0dab21b5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "2a088977e3828da40fbe4f245d9d0ab6cf6e81eb30835531a1a732e75dc734214d70061ef6e1c30a1984b9d36401d257952471a974314c148823d207781fdd09" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f48198da5d992e46d55f092689c442bf31d83b9c9187d83defee46f7fea5a802c0badc1ab3ae2799492946946b29b90b2c10eaca7f5e8e33a00c555e0d5abc0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "37fffad3ba0cb53593b1d2cf7aa0437cfb821a66d00c1b3ad6dd858117b66336ad42ac7a53de241dcacbd5961e2b22d4c5c1e6535cd0595645c813a0fc222a00" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "42964abf028dd306e5a98920e90c5234dd01492259fbbfe6cafcb3d6076d34bfc296b2e57834a2f7039fdab89fee185dd2291abfec61a9bce256556a922ae006" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "6ba3c3e8485f4298bff2547bc39237d0ba07d275028ef8a7b0d051a1a8867f7d38cf5973b4f5b4acd868820dfc5d4eb86646c87fe9b3cbe77e50a2dcaf963b04" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "3e5189ac4c3c485c833ff697056e07eeae6cabc2de11a32c2a6a074d622ff22295d0ed8f3e42882caa4f59c09ceb3869a6d7b663439327e6f0e56c713ff1780e" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5688ea77f9e7020c2664920af7d48814231dea91a1997d7adec74f9e167e55dea7797603ebea9f9352c4e91306f92cb81980b9351787d90cbf23e706a26730e" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "17adcf644ace2f7e66abf30980426db96c2b1bf275ea728593433feeb90e39e4b2db1bbd5128f8fe56a1fa3db8afafe5fec2b40903b402015a9554c24d543704" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "bed1c8e2e94072dc3c8bf0f823ada338ce7eae194d3d1df6596fb49efdf59733137d02f10b8521db6b00c696d45a1f4689ae350ee1a6cbd5dcc63700da70b401" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.root.json deleted file mode 100644 index c067b5f5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ba2efed303d416f5e38018fb72802fb9263c87e6ad63725fd5e839d3cec51e2cfd50bdd0004a96a4017ef929249fc263332a54d0c86552f9014e68f6972b3c08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.targets.json deleted file mode 100644 index 0dab21b5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "2a088977e3828da40fbe4f245d9d0ab6cf6e81eb30835531a1a732e75dc734214d70061ef6e1c30a1984b9d36401d257952471a974314c148823d207781fdd09" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f48198da5d992e46d55f092689c442bf31d83b9c9187d83defee46f7fea5a802c0badc1ab3ae2799492946946b29b90b2c10eaca7f5e8e33a00c555e0d5abc0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "37fffad3ba0cb53593b1d2cf7aa0437cfb821a66d00c1b3ad6dd858117b66336ad42ac7a53de241dcacbd5961e2b22d4c5c1e6535cd0595645c813a0fc222a00" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "42964abf028dd306e5a98920e90c5234dd01492259fbbfe6cafcb3d6076d34bfc296b2e57834a2f7039fdab89fee185dd2291abfec61a9bce256556a922ae006" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "6ba3c3e8485f4298bff2547bc39237d0ba07d275028ef8a7b0d051a1a8867f7d38cf5973b4f5b4acd868820dfc5d4eb86646c87fe9b3cbe77e50a2dcaf963b04" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "3e5189ac4c3c485c833ff697056e07eeae6cabc2de11a32c2a6a074d622ff22295d0ed8f3e42882caa4f59c09ceb3869a6d7b663439327e6f0e56c713ff1780e" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5688ea77f9e7020c2664920af7d48814231dea91a1997d7adec74f9e167e55dea7797603ebea9f9352c4e91306f92cb81980b9351787d90cbf23e706a26730e" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "17adcf644ace2f7e66abf30980426db96c2b1bf275ea728593433feeb90e39e4b2db1bbd5128f8fe56a1fa3db8afafe5fec2b40903b402015a9554c24d543704" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "bed1c8e2e94072dc3c8bf0f823ada338ce7eae194d3d1df6596fb49efdf59733137d02f10b8521db6b00c696d45a1f4689ae350ee1a6cbd5dcc63700da70b401" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/root.json deleted file mode 100644 index c067b5f5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ba2efed303d416f5e38018fb72802fb9263c87e6ad63725fd5e839d3cec51e2cfd50bdd0004a96a4017ef929249fc263332a54d0c86552f9014e68f6972b3c08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/targets.json deleted file mode 100644 index 0dab21b5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "2a088977e3828da40fbe4f245d9d0ab6cf6e81eb30835531a1a732e75dc734214d70061ef6e1c30a1984b9d36401d257952471a974314c148823d207781fdd09" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f48198da5d992e46d55f092689c442bf31d83b9c9187d83defee46f7fea5a802c0badc1ab3ae2799492946946b29b90b2c10eaca7f5e8e33a00c555e0d5abc0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "37fffad3ba0cb53593b1d2cf7aa0437cfb821a66d00c1b3ad6dd858117b66336ad42ac7a53de241dcacbd5961e2b22d4c5c1e6535cd0595645c813a0fc222a00" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "42964abf028dd306e5a98920e90c5234dd01492259fbbfe6cafcb3d6076d34bfc296b2e57834a2f7039fdab89fee185dd2291abfec61a9bce256556a922ae006" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "6ba3c3e8485f4298bff2547bc39237d0ba07d275028ef8a7b0d051a1a8867f7d38cf5973b4f5b4acd868820dfc5d4eb86646c87fe9b3cbe77e50a2dcaf963b04" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "3e5189ac4c3c485c833ff697056e07eeae6cabc2de11a32c2a6a074d622ff22295d0ed8f3e42882caa4f59c09ceb3869a6d7b663439327e6f0e56c713ff1780e" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5688ea77f9e7020c2664920af7d48814231dea91a1997d7adec74f9e167e55dea7797603ebea9f9352c4e91306f92cb81980b9351787d90cbf23e706a26730e" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "17adcf644ace2f7e66abf30980426db96c2b1bf275ea728593433feeb90e39e4b2db1bbd5128f8fe56a1fa3db8afafe5fec2b40903b402015a9554c24d543704" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "bed1c8e2e94072dc3c8bf0f823ada338ce7eae194d3d1df6596fb49efdf59733137d02f10b8521db6b00c696d45a1f4689ae350ee1a6cbd5dcc63700da70b401" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/hash.txt deleted file mode 100644 index c0a124d5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/hash.txt +++ /dev/null @@ -1 +0,0 @@ -0d1fafc3b1e2fba17b6702b14477333fd5ed2379cfc454304a93524503f2594e \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.root.json deleted file mode 100644 index c067b5f5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ba2efed303d416f5e38018fb72802fb9263c87e6ad63725fd5e839d3cec51e2cfd50bdd0004a96a4017ef929249fc263332a54d0c86552f9014e68f6972b3c08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.targets.json deleted file mode 100644 index 0dab21b5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "2a088977e3828da40fbe4f245d9d0ab6cf6e81eb30835531a1a732e75dc734214d70061ef6e1c30a1984b9d36401d257952471a974314c148823d207781fdd09" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f48198da5d992e46d55f092689c442bf31d83b9c9187d83defee46f7fea5a802c0badc1ab3ae2799492946946b29b90b2c10eaca7f5e8e33a00c555e0d5abc0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "37fffad3ba0cb53593b1d2cf7aa0437cfb821a66d00c1b3ad6dd858117b66336ad42ac7a53de241dcacbd5961e2b22d4c5c1e6535cd0595645c813a0fc222a00" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "42964abf028dd306e5a98920e90c5234dd01492259fbbfe6cafcb3d6076d34bfc296b2e57834a2f7039fdab89fee185dd2291abfec61a9bce256556a922ae006" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "6ba3c3e8485f4298bff2547bc39237d0ba07d275028ef8a7b0d051a1a8867f7d38cf5973b4f5b4acd868820dfc5d4eb86646c87fe9b3cbe77e50a2dcaf963b04" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "3e5189ac4c3c485c833ff697056e07eeae6cabc2de11a32c2a6a074d622ff22295d0ed8f3e42882caa4f59c09ceb3869a6d7b663439327e6f0e56c713ff1780e" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5688ea77f9e7020c2664920af7d48814231dea91a1997d7adec74f9e167e55dea7797603ebea9f9352c4e91306f92cb81980b9351787d90cbf23e706a26730e" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "17adcf644ace2f7e66abf30980426db96c2b1bf275ea728593433feeb90e39e4b2db1bbd5128f8fe56a1fa3db8afafe5fec2b40903b402015a9554c24d543704" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "bed1c8e2e94072dc3c8bf0f823ada338ce7eae194d3d1df6596fb49efdf59733137d02f10b8521db6b00c696d45a1f4689ae350ee1a6cbd5dcc63700da70b401" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.root.json deleted file mode 100644 index 216adcd5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "5221883d99795f64519d986c33744cf101b50d098735859192a6536a62f2af62d28c7d3348f407fd4302b6c6be8198b5fb33b41a660bc998751626898e954105" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.targets.json deleted file mode 100644 index e3be9d9b..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/2.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "24efa3e5c6463307219075f5c4e816a3c2643024d36909735dbcd617c4300246b4384db27cefce01a8481b6c52f5dad2f3f416830912bf0b0d8398c14508e705" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f9304ff820dbb0f245baa68291ffaa901fa160d446a2fbe864e561afc74006c1f47e112eef2f51a78efa87335d2dc86392d0d3c84d69744366202caa35c80801" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "d2e5e871f943281e59bce283ac874bdd9ec1ed461bf9a7dce48774b577fd481fe3e0975670fbc684d0bbc881974e832cef02ced09f0e533a621266b81b8f1307" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d3044468af5877042ef1585a83d8dc59bf4bd8f0b20837d6e73d39828ed15c1e13fb64ab02d9dbc2940768b02ac95d8cc17d05d9c9fea4200a98453b8463c408" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "cb5da30b57e62e562cb8897adde8ecfc195d9d513ec59ed4931c5d8f1612518f644e7e78f674b8de646373747bcf08a4025351167c3a77d8eff382823d18670b" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "eccd5243a12063c73c56ecad469da0c2ce96dbfd4f04c8f6c5b1456336193d92f6ef69efb5ec6e69d29e868983a576d2baab66e983b7ae7bee553f5fcd9ef909" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "4892c826626dd62c189707efcd1b340ed6bf6e68833eefb1f94020bf59a9c4eefafacfa4a3998d149fca8ad5a30e12f8aa1a936821c45726d445403df0688508" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "12b6240c2d9a922a35591e3d86877f4a407210f7e6d3bf270ef2e496394029f731f77cb3220a361b0b49b54f5564969aaa62262219db0a5b58b86fd0cf42420e" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "894a62b4b9ae92e45298abd9465aeedeba40eb82a4ca014d41f1b58b6117d9ab3e89c2d152e2a7adce99396bc53c9f1324dbb4af8ff00e251f3f16e1ed52f103" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/root.json deleted file mode 100644 index 216adcd5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "5221883d99795f64519d986c33744cf101b50d098735859192a6536a62f2af62d28c7d3348f407fd4302b6c6be8198b5fb33b41a660bc998751626898e954105" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/targets.json deleted file mode 100644 index e3be9d9b..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "24efa3e5c6463307219075f5c4e816a3c2643024d36909735dbcd617c4300246b4384db27cefce01a8481b6c52f5dad2f3f416830912bf0b0d8398c14508e705" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f9304ff820dbb0f245baa68291ffaa901fa160d446a2fbe864e561afc74006c1f47e112eef2f51a78efa87335d2dc86392d0d3c84d69744366202caa35c80801" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "d2e5e871f943281e59bce283ac874bdd9ec1ed461bf9a7dce48774b577fd481fe3e0975670fbc684d0bbc881974e832cef02ced09f0e533a621266b81b8f1307" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d3044468af5877042ef1585a83d8dc59bf4bd8f0b20837d6e73d39828ed15c1e13fb64ab02d9dbc2940768b02ac95d8cc17d05d9c9fea4200a98453b8463c408" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "cb5da30b57e62e562cb8897adde8ecfc195d9d513ec59ed4931c5d8f1612518f644e7e78f674b8de646373747bcf08a4025351167c3a77d8eff382823d18670b" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "eccd5243a12063c73c56ecad469da0c2ce96dbfd4f04c8f6c5b1456336193d92f6ef69efb5ec6e69d29e868983a576d2baab66e983b7ae7bee553f5fcd9ef909" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "4892c826626dd62c189707efcd1b340ed6bf6e68833eefb1f94020bf59a9c4eefafacfa4a3998d149fca8ad5a30e12f8aa1a936821c45726d445403df0688508" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "12b6240c2d9a922a35591e3d86877f4a407210f7e6d3bf270ef2e496394029f731f77cb3220a361b0b49b54f5564969aaa62262219db0a5b58b86fd0cf42420e" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "894a62b4b9ae92e45298abd9465aeedeba40eb82a4ca014d41f1b58b6117d9ab3e89c2d152e2a7adce99396bc53c9f1324dbb4af8ff00e251f3f16e1ed52f103" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.root.json deleted file mode 100644 index c067b5f5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "ba2efed303d416f5e38018fb72802fb9263c87e6ad63725fd5e839d3cec51e2cfd50bdd0004a96a4017ef929249fc263332a54d0c86552f9014e68f6972b3c08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.targets.json deleted file mode 100644 index 0dab21b5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "2a088977e3828da40fbe4f245d9d0ab6cf6e81eb30835531a1a732e75dc734214d70061ef6e1c30a1984b9d36401d257952471a974314c148823d207781fdd09" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f48198da5d992e46d55f092689c442bf31d83b9c9187d83defee46f7fea5a802c0badc1ab3ae2799492946946b29b90b2c10eaca7f5e8e33a00c555e0d5abc0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "37fffad3ba0cb53593b1d2cf7aa0437cfb821a66d00c1b3ad6dd858117b66336ad42ac7a53de241dcacbd5961e2b22d4c5c1e6535cd0595645c813a0fc222a00" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "42964abf028dd306e5a98920e90c5234dd01492259fbbfe6cafcb3d6076d34bfc296b2e57834a2f7039fdab89fee185dd2291abfec61a9bce256556a922ae006" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "6ba3c3e8485f4298bff2547bc39237d0ba07d275028ef8a7b0d051a1a8867f7d38cf5973b4f5b4acd868820dfc5d4eb86646c87fe9b3cbe77e50a2dcaf963b04" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "3e5189ac4c3c485c833ff697056e07eeae6cabc2de11a32c2a6a074d622ff22295d0ed8f3e42882caa4f59c09ceb3869a6d7b663439327e6f0e56c713ff1780e" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "c5688ea77f9e7020c2664920af7d48814231dea91a1997d7adec74f9e167e55dea7797603ebea9f9352c4e91306f92cb81980b9351787d90cbf23e706a26730e" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "17adcf644ace2f7e66abf30980426db96c2b1bf275ea728593433feeb90e39e4b2db1bbd5128f8fe56a1fa3db8afafe5fec2b40903b402015a9554c24d543704" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "bed1c8e2e94072dc3c8bf0f823ada338ce7eae194d3d1df6596fb49efdf59733137d02f10b8521db6b00c696d45a1f4689ae350ee1a6cbd5dcc63700da70b401" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.root.json deleted file mode 100644 index 216adcd5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "5221883d99795f64519d986c33744cf101b50d098735859192a6536a62f2af62d28c7d3348f407fd4302b6c6be8198b5fb33b41a660bc998751626898e954105" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.targets.json deleted file mode 100644 index e3be9d9b..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/2.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "24efa3e5c6463307219075f5c4e816a3c2643024d36909735dbcd617c4300246b4384db27cefce01a8481b6c52f5dad2f3f416830912bf0b0d8398c14508e705" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f9304ff820dbb0f245baa68291ffaa901fa160d446a2fbe864e561afc74006c1f47e112eef2f51a78efa87335d2dc86392d0d3c84d69744366202caa35c80801" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "d2e5e871f943281e59bce283ac874bdd9ec1ed461bf9a7dce48774b577fd481fe3e0975670fbc684d0bbc881974e832cef02ced09f0e533a621266b81b8f1307" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d3044468af5877042ef1585a83d8dc59bf4bd8f0b20837d6e73d39828ed15c1e13fb64ab02d9dbc2940768b02ac95d8cc17d05d9c9fea4200a98453b8463c408" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "cb5da30b57e62e562cb8897adde8ecfc195d9d513ec59ed4931c5d8f1612518f644e7e78f674b8de646373747bcf08a4025351167c3a77d8eff382823d18670b" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "eccd5243a12063c73c56ecad469da0c2ce96dbfd4f04c8f6c5b1456336193d92f6ef69efb5ec6e69d29e868983a576d2baab66e983b7ae7bee553f5fcd9ef909" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "4892c826626dd62c189707efcd1b340ed6bf6e68833eefb1f94020bf59a9c4eefafacfa4a3998d149fca8ad5a30e12f8aa1a936821c45726d445403df0688508" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "12b6240c2d9a922a35591e3d86877f4a407210f7e6d3bf270ef2e496394029f731f77cb3220a361b0b49b54f5564969aaa62262219db0a5b58b86fd0cf42420e" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "894a62b4b9ae92e45298abd9465aeedeba40eb82a4ca014d41f1b58b6117d9ab3e89c2d152e2a7adce99396bc53c9f1324dbb4af8ff00e251f3f16e1ed52f103" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/root.json deleted file mode 100644 index 216adcd5..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "5221883d99795f64519d986c33744cf101b50d098735859192a6536a62f2af62d28c7d3348f407fd4302b6c6be8198b5fb33b41a660bc998751626898e954105" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:22Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/snapshot.json deleted file mode 100644 index 6a260788..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "8d1132037c4a0fb48600ecda532f1518a24e85aba93147021f763762793ff82e75fa5b7904d223085ceabbfe10206f667cd4951fab481b3712ab01115e85060a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/targets.json deleted file mode 100644 index e3be9d9b..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "24efa3e5c6463307219075f5c4e816a3c2643024d36909735dbcd617c4300246b4384db27cefce01a8481b6c52f5dad2f3f416830912bf0b0d8398c14508e705" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "f9304ff820dbb0f245baa68291ffaa901fa160d446a2fbe864e561afc74006c1f47e112eef2f51a78efa87335d2dc86392d0d3c84d69744366202caa35c80801" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "d2e5e871f943281e59bce283ac874bdd9ec1ed461bf9a7dce48774b577fd481fe3e0975670fbc684d0bbc881974e832cef02ced09f0e533a621266b81b8f1307" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "d3044468af5877042ef1585a83d8dc59bf4bd8f0b20837d6e73d39828ed15c1e13fb64ab02d9dbc2940768b02ac95d8cc17d05d9c9fea4200a98453b8463c408" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "cb5da30b57e62e562cb8897adde8ecfc195d9d513ec59ed4931c5d8f1612518f644e7e78f674b8de646373747bcf08a4025351167c3a77d8eff382823d18670b" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "eccd5243a12063c73c56ecad469da0c2ce96dbfd4f04c8f6c5b1456336193d92f6ef69efb5ec6e69d29e868983a576d2baab66e983b7ae7bee553f5fcd9ef909" - }, - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "4892c826626dd62c189707efcd1b340ed6bf6e68833eefb1f94020bf59a9c4eefafacfa4a3998d149fca8ad5a30e12f8aa1a936821c45726d445403df0688508" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "12b6240c2d9a922a35591e3d86877f4a407210f7e6d3bf270ef2e496394029f731f77cb3220a361b0b49b54f5564969aaa62262219db0a5b58b86fd0cf42420e" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "894a62b4b9ae92e45298abd9465aeedeba40eb82a4ca014d41f1b58b6117d9ab3e89c2d152e2a7adce99396bc53c9f1324dbb4af8ff00e251f3f16e1ed52f103" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:22Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/timestamp.json deleted file mode 100644 index 04f3fdf2..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_targets/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "09068b028ead5c22678544002721e77c9cea836ed1034ea90c5757ac8fdd121a5bb9b54891306643e45816f63edb563a2faf88c0b92f4a6da7c9102fad1cde09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:22Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "e4f270f0f80cd430d6b7596625a9f75664ca0d0fe27f42a9bfde9041d498b737", - "sha512": "abeb893c9e16771a1336374ff257dcb6752c2ed3ad51de8f2a9799f2dd515fc3677bb8bb4f0420a2e423f2c87f26a2a04df9f380ea2d2d6dc6b7f9cbb337cd8f" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.root.json deleted file mode 100644 index cc719f73..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "87ccdd9f898665507c07b9b5ae4b19cc5069a35db47d2bb59fe31324c019f384701a650966965f680c2fb2e43950beaac3818c430a5e0450a2d61439273b4803" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.timestamp.json deleted file mode 100644 index f95627f9..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0d88a87a5c298a1629f784cdad65c1fc6bf65a2a5e6fe92912e86d0c86ef5a8d4a90b978b1b80c980fe5f04cc78f76b1fb388d964208c3136690b12054da4008" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "570e7580e1087363f1c1ba92b97cb92d5157a21c044ad3ae3f7638b087c8d8257cade3db5d40e0006ef41fa90c7cc6fbff8fc3ebe91324edfcd4e539617f6c00" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "4f7000d954a4133cb731c60f45bbfaf172327b866570f8f81035c8177cf0d1ec725fe4c1e48be94d649ee69a9434c0a00aff85aaf3198b242783569995d60c03" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "952a8b5311c810be01ee3b79aeb837a408e53aa316d8b3b79843e27899f951fbd6b335507739c045582a6abc47d43912ba7533786342d1a726cf96c8b2464806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "58c5523a8f0b127b320772c1525ad3d5c98ce1217a178b02c97ea855a3a1e7d3037b5f7c21a485d6bf1815c11f4e56a874a6c4c72ab26590246ba7ce51c3f001" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5250b1ef0952043c6787cb0818e0bc9ab309e57ad40763471a06e72df759b952043b33de0b5f3d5ee5c08ab9143248dc5eabb81b236548cb8241a06a0d3bd405" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "27735b3d6b7f6cb928f4b5ea689127d4f22213dc49560e3aa6043cb385a1cf2656bc806bbade810bb301c0ba906b638691ba0cf7557b5f7fb696a15c3a581005" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "5d4076732895f6ef7419cbaab36e61e18e99c19320ef9fb94b9b34a7146f1d790940847986ed61fca47bfce36ab67f19e476232fb3d30dcc690c887c2eb9d704" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/root.json deleted file mode 100644 index cc719f73..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "87ccdd9f898665507c07b9b5ae4b19cc5069a35db47d2bb59fe31324c019f384701a650966965f680c2fb2e43950beaac3818c430a5e0450a2d61439273b4803" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/timestamp.json deleted file mode 100644 index f95627f9..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/current/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0d88a87a5c298a1629f784cdad65c1fc6bf65a2a5e6fe92912e86d0c86ef5a8d4a90b978b1b80c980fe5f04cc78f76b1fb388d964208c3136690b12054da4008" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "570e7580e1087363f1c1ba92b97cb92d5157a21c044ad3ae3f7638b087c8d8257cade3db5d40e0006ef41fa90c7cc6fbff8fc3ebe91324edfcd4e539617f6c00" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "4f7000d954a4133cb731c60f45bbfaf172327b866570f8f81035c8177cf0d1ec725fe4c1e48be94d649ee69a9434c0a00aff85aaf3198b242783569995d60c03" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "952a8b5311c810be01ee3b79aeb837a408e53aa316d8b3b79843e27899f951fbd6b335507739c045582a6abc47d43912ba7533786342d1a726cf96c8b2464806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "58c5523a8f0b127b320772c1525ad3d5c98ce1217a178b02c97ea855a3a1e7d3037b5f7c21a485d6bf1815c11f4e56a874a6c4c72ab26590246ba7ce51c3f001" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5250b1ef0952043c6787cb0818e0bc9ab309e57ad40763471a06e72df759b952043b33de0b5f3d5ee5c08ab9143248dc5eabb81b236548cb8241a06a0d3bd405" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "27735b3d6b7f6cb928f4b5ea689127d4f22213dc49560e3aa6043cb385a1cf2656bc806bbade810bb301c0ba906b638691ba0cf7557b5f7fb696a15c3a581005" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "5d4076732895f6ef7419cbaab36e61e18e99c19320ef9fb94b9b34a7146f1d790940847986ed61fca47bfce36ab67f19e476232fb3d30dcc690c887c2eb9d704" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.root.json deleted file mode 100644 index cc719f73..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "87ccdd9f898665507c07b9b5ae4b19cc5069a35db47d2bb59fe31324c019f384701a650966965f680c2fb2e43950beaac3818c430a5e0450a2d61439273b4803" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.timestamp.json deleted file mode 100644 index f95627f9..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0d88a87a5c298a1629f784cdad65c1fc6bf65a2a5e6fe92912e86d0c86ef5a8d4a90b978b1b80c980fe5f04cc78f76b1fb388d964208c3136690b12054da4008" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "570e7580e1087363f1c1ba92b97cb92d5157a21c044ad3ae3f7638b087c8d8257cade3db5d40e0006ef41fa90c7cc6fbff8fc3ebe91324edfcd4e539617f6c00" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "4f7000d954a4133cb731c60f45bbfaf172327b866570f8f81035c8177cf0d1ec725fe4c1e48be94d649ee69a9434c0a00aff85aaf3198b242783569995d60c03" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "952a8b5311c810be01ee3b79aeb837a408e53aa316d8b3b79843e27899f951fbd6b335507739c045582a6abc47d43912ba7533786342d1a726cf96c8b2464806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "58c5523a8f0b127b320772c1525ad3d5c98ce1217a178b02c97ea855a3a1e7d3037b5f7c21a485d6bf1815c11f4e56a874a6c4c72ab26590246ba7ce51c3f001" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5250b1ef0952043c6787cb0818e0bc9ab309e57ad40763471a06e72df759b952043b33de0b5f3d5ee5c08ab9143248dc5eabb81b236548cb8241a06a0d3bd405" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "27735b3d6b7f6cb928f4b5ea689127d4f22213dc49560e3aa6043cb385a1cf2656bc806bbade810bb301c0ba906b638691ba0cf7557b5f7fb696a15c3a581005" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "5d4076732895f6ef7419cbaab36e61e18e99c19320ef9fb94b9b34a7146f1d790940847986ed61fca47bfce36ab67f19e476232fb3d30dcc690c887c2eb9d704" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/root.json deleted file mode 100644 index cc719f73..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "87ccdd9f898665507c07b9b5ae4b19cc5069a35db47d2bb59fe31324c019f384701a650966965f680c2fb2e43950beaac3818c430a5e0450a2d61439273b4803" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/timestamp.json deleted file mode 100644 index f95627f9..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0d88a87a5c298a1629f784cdad65c1fc6bf65a2a5e6fe92912e86d0c86ef5a8d4a90b978b1b80c980fe5f04cc78f76b1fb388d964208c3136690b12054da4008" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "570e7580e1087363f1c1ba92b97cb92d5157a21c044ad3ae3f7638b087c8d8257cade3db5d40e0006ef41fa90c7cc6fbff8fc3ebe91324edfcd4e539617f6c00" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "4f7000d954a4133cb731c60f45bbfaf172327b866570f8f81035c8177cf0d1ec725fe4c1e48be94d649ee69a9434c0a00aff85aaf3198b242783569995d60c03" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "952a8b5311c810be01ee3b79aeb837a408e53aa316d8b3b79843e27899f951fbd6b335507739c045582a6abc47d43912ba7533786342d1a726cf96c8b2464806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "58c5523a8f0b127b320772c1525ad3d5c98ce1217a178b02c97ea855a3a1e7d3037b5f7c21a485d6bf1815c11f4e56a874a6c4c72ab26590246ba7ce51c3f001" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5250b1ef0952043c6787cb0818e0bc9ab309e57ad40763471a06e72df759b952043b33de0b5f3d5ee5c08ab9143248dc5eabb81b236548cb8241a06a0d3bd405" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "27735b3d6b7f6cb928f4b5ea689127d4f22213dc49560e3aa6043cb385a1cf2656bc806bbade810bb301c0ba906b638691ba0cf7557b5f7fb696a15c3a581005" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "5d4076732895f6ef7419cbaab36e61e18e99c19320ef9fb94b9b34a7146f1d790940847986ed61fca47bfce36ab67f19e476232fb3d30dcc690c887c2eb9d704" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/hash.txt b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/hash.txt deleted file mode 100644 index 9f6c8333..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/hash.txt +++ /dev/null @@ -1 +0,0 @@ -2d2c91c4805412779df23c78ae6477ea01ca2bccc740eb1750b6b8d4e02d527a \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.root.json deleted file mode 100644 index cc719f73..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "87ccdd9f898665507c07b9b5ae4b19cc5069a35db47d2bb59fe31324c019f384701a650966965f680c2fb2e43950beaac3818c430a5e0450a2d61439273b4803" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.timestamp.json deleted file mode 100644 index f95627f9..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0d88a87a5c298a1629f784cdad65c1fc6bf65a2a5e6fe92912e86d0c86ef5a8d4a90b978b1b80c980fe5f04cc78f76b1fb388d964208c3136690b12054da4008" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "570e7580e1087363f1c1ba92b97cb92d5157a21c044ad3ae3f7638b087c8d8257cade3db5d40e0006ef41fa90c7cc6fbff8fc3ebe91324edfcd4e539617f6c00" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "4f7000d954a4133cb731c60f45bbfaf172327b866570f8f81035c8177cf0d1ec725fe4c1e48be94d649ee69a9434c0a00aff85aaf3198b242783569995d60c03" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "952a8b5311c810be01ee3b79aeb837a408e53aa316d8b3b79843e27899f951fbd6b335507739c045582a6abc47d43912ba7533786342d1a726cf96c8b2464806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "58c5523a8f0b127b320772c1525ad3d5c98ce1217a178b02c97ea855a3a1e7d3037b5f7c21a485d6bf1815c11f4e56a874a6c4c72ab26590246ba7ce51c3f001" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5250b1ef0952043c6787cb0818e0bc9ab309e57ad40763471a06e72df759b952043b33de0b5f3d5ee5c08ab9143248dc5eabb81b236548cb8241a06a0d3bd405" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "27735b3d6b7f6cb928f4b5ea689127d4f22213dc49560e3aa6043cb385a1cf2656bc806bbade810bb301c0ba906b638691ba0cf7557b5f7fb696a15c3a581005" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "5d4076732895f6ef7419cbaab36e61e18e99c19320ef9fb94b9b34a7146f1d790940847986ed61fca47bfce36ab67f19e476232fb3d30dcc690c887c2eb9d704" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.root.json deleted file mode 100644 index 5ecd3432..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "af983d51f4deacf728c3076b7a5c79dd8c8d2c1c25071ec1523ca4d18f47e1d5e39a411ae18f437267079300fe0c74331e0f3231017f9a39a2f11628079e3406" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.timestamp.json deleted file mode 100644 index be3cf940..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/2.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ec1d63e79fadec3dddb5852a1007fa7e5ed4b746b3d608ba9d3fa6fa2f25afa308a72474d820fe2b88adf4f9d6352e57fe7475725e539858f1ab07ab7a5ca305" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "c3021d40208c80b25034d7d7d29d2faeeb7b0e4e3238430a0f2c0435337d3b2c47e87f4ec2c5692dc2aec01dee8e72feea2b6f72cb17591aca1e5252fe2c4f0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "dbe051e077a6d7ad54ad39c41e3fc497c65b8f5cd9ac9b9c7bf0900dba979614198922232fcd2ef66ec9d5e571b9e936cd997c41e74c55abce8448d13b178007" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "76946f3caeba163ff8fcaa9892f92457a9531da85092ddff660d8af2859fc94ea714e1962ab704a4e028fe48b195b850d6c29d13cf668bb2bf41b0814229b402" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9f5c7234e8c67e15fa326bc693595b6ac75aacbec4c5c6bd07bb4c8d8e9bfb35d1ee121987629e45fbb2f4fdcd6593a1f4cd1231b361b89832dcc19be248f70a" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "d33845b0bfc6ace034377acc4e043dedd3c26c1d58b2f11bb3fa9416c86f55a396c3547d5f95662cbafe231af913752be851947413fca7fa5ec86948aae8ae0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "f94b9c239f481f74715627accec1f2794faeefbc0a110e4ac4c8ab0f3451812042ea5b5f85b66b568ea2b00ac46b3d5496b184bc6a59fdee1361b6dbf5e6d90d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "b17e9fed31051906f6d31c81db44c025718ced629d2d2914e09c0da4f303163bbfbd11673491aafcce6e35226b3c2f1a6fefa3ff5f39b838d4c3d736e521ac07" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "b82b9a726284bbc488f3fa8e7b91cd641b63aa0488c7706d7a8a09eecd9a12ce99e02fe77e0994084e72316476e26df42aac2d89616674e40c82a1c3f7082409" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/root.json deleted file mode 100644 index 5ecd3432..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "af983d51f4deacf728c3076b7a5c79dd8c8d2c1c25071ec1523ca4d18f47e1d5e39a411ae18f437267079300fe0c74331e0f3231017f9a39a2f11628079e3406" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/timestamp.json deleted file mode 100644 index be3cf940..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ec1d63e79fadec3dddb5852a1007fa7e5ed4b746b3d608ba9d3fa6fa2f25afa308a72474d820fe2b88adf4f9d6352e57fe7475725e539858f1ab07ab7a5ca305" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "c3021d40208c80b25034d7d7d29d2faeeb7b0e4e3238430a0f2c0435337d3b2c47e87f4ec2c5692dc2aec01dee8e72feea2b6f72cb17591aca1e5252fe2c4f0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "dbe051e077a6d7ad54ad39c41e3fc497c65b8f5cd9ac9b9c7bf0900dba979614198922232fcd2ef66ec9d5e571b9e936cd997c41e74c55abce8448d13b178007" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "76946f3caeba163ff8fcaa9892f92457a9531da85092ddff660d8af2859fc94ea714e1962ab704a4e028fe48b195b850d6c29d13cf668bb2bf41b0814229b402" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9f5c7234e8c67e15fa326bc693595b6ac75aacbec4c5c6bd07bb4c8d8e9bfb35d1ee121987629e45fbb2f4fdcd6593a1f4cd1231b361b89832dcc19be248f70a" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "d33845b0bfc6ace034377acc4e043dedd3c26c1d58b2f11bb3fa9416c86f55a396c3547d5f95662cbafe231af913752be851947413fca7fa5ec86948aae8ae0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "f94b9c239f481f74715627accec1f2794faeefbc0a110e4ac4c8ab0f3451812042ea5b5f85b66b568ea2b00ac46b3d5496b184bc6a59fdee1361b6dbf5e6d90d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "b17e9fed31051906f6d31c81db44c025718ced629d2d2914e09c0da4f303163bbfbd11673491aafcce6e35226b3c2f1a6fefa3ff5f39b838d4c3d736e521ac07" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "b82b9a726284bbc488f3fa8e7b91cd641b63aa0488c7706d7a8a09eecd9a12ce99e02fe77e0994084e72316476e26df42aac2d89616674e40c82a1c3f7082409" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.root.json deleted file mode 100644 index cc719f73..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.root.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "87ccdd9f898665507c07b9b5ae4b19cc5069a35db47d2bb59fe31324c019f384701a650966965f680c2fb2e43950beaac3818c430a5e0450a2d61439273b4803" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - }, - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" - }, - "scheme": "ed25519" - }, - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "scheme": "ed25519" - }, - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.timestamp.json deleted file mode 100644 index f95627f9..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/1.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "0d88a87a5c298a1629f784cdad65c1fc6bf65a2a5e6fe92912e86d0c86ef5a8d4a90b978b1b80c980fe5f04cc78f76b1fb388d964208c3136690b12054da4008" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "570e7580e1087363f1c1ba92b97cb92d5157a21c044ad3ae3f7638b087c8d8257cade3db5d40e0006ef41fa90c7cc6fbff8fc3ebe91324edfcd4e539617f6c00" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "4f7000d954a4133cb731c60f45bbfaf172327b866570f8f81035c8177cf0d1ec725fe4c1e48be94d649ee69a9434c0a00aff85aaf3198b242783569995d60c03" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "af71d15c2434dbd9ed4e2eb05628227e9ce9ced8eb9546153544e928f35f18e9093c5ba3a5ee30d71d2000065e0a94a729e5db90e519839b3255c627922d5706" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "952a8b5311c810be01ee3b79aeb837a408e53aa316d8b3b79843e27899f951fbd6b335507739c045582a6abc47d43912ba7533786342d1a726cf96c8b2464806" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "58c5523a8f0b127b320772c1525ad3d5c98ce1217a178b02c97ea855a3a1e7d3037b5f7c21a485d6bf1815c11f4e56a874a6c4c72ab26590246ba7ce51c3f001" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "5250b1ef0952043c6787cb0818e0bc9ab309e57ad40763471a06e72df759b952043b33de0b5f3d5ee5c08ab9143248dc5eabb81b236548cb8241a06a0d3bd405" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "27735b3d6b7f6cb928f4b5ea689127d4f22213dc49560e3aa6043cb385a1cf2656bc806bbade810bb301c0ba906b638691ba0cf7557b5f7fb696a15c3a581005" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "5d4076732895f6ef7419cbaab36e61e18e99c19320ef9fb94b9b34a7146f1d790940847986ed61fca47bfce36ab67f19e476232fb3d30dcc690c887c2eb9d704" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.root.json deleted file mode 100644 index 5ecd3432..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "af983d51f4deacf728c3076b7a5c79dd8c8d2c1c25071ec1523ca4d18f47e1d5e39a411ae18f437267079300fe0c74331e0f3231017f9a39a2f11628079e3406" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.timestamp.json deleted file mode 100644 index be3cf940..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/2.timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ec1d63e79fadec3dddb5852a1007fa7e5ed4b746b3d608ba9d3fa6fa2f25afa308a72474d820fe2b88adf4f9d6352e57fe7475725e539858f1ab07ab7a5ca305" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "c3021d40208c80b25034d7d7d29d2faeeb7b0e4e3238430a0f2c0435337d3b2c47e87f4ec2c5692dc2aec01dee8e72feea2b6f72cb17591aca1e5252fe2c4f0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "dbe051e077a6d7ad54ad39c41e3fc497c65b8f5cd9ac9b9c7bf0900dba979614198922232fcd2ef66ec9d5e571b9e936cd997c41e74c55abce8448d13b178007" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "76946f3caeba163ff8fcaa9892f92457a9531da85092ddff660d8af2859fc94ea714e1962ab704a4e028fe48b195b850d6c29d13cf668bb2bf41b0814229b402" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9f5c7234e8c67e15fa326bc693595b6ac75aacbec4c5c6bd07bb4c8d8e9bfb35d1ee121987629e45fbb2f4fdcd6593a1f4cd1231b361b89832dcc19be248f70a" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "d33845b0bfc6ace034377acc4e043dedd3c26c1d58b2f11bb3fa9416c86f55a396c3547d5f95662cbafe231af913752be851947413fca7fa5ec86948aae8ae0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "f94b9c239f481f74715627accec1f2794faeefbc0a110e4ac4c8ab0f3451812042ea5b5f85b66b568ea2b00ac46b3d5496b184bc6a59fdee1361b6dbf5e6d90d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "b17e9fed31051906f6d31c81db44c025718ced629d2d2914e09c0da4f303163bbfbd11673491aafcce6e35226b3c2f1a6fefa3ff5f39b838d4c3d736e521ac07" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "b82b9a726284bbc488f3fa8e7b91cd641b63aa0488c7706d7a8a09eecd9a12ce99e02fe77e0994084e72316476e26df42aac2d89616674e40c82a1c3f7082409" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/root.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/root.json deleted file mode 100644 index 5ecd3432..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/root.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "af983d51f4deacf728c3076b7a5c79dd8c8d2c1c25071ec1523ca4d18f47e1d5e39a411ae18f437267079300fe0c74331e0f3231017f9a39a2f11628079e3406" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2031-09-09T23:20:21Z", - "keys": { - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f6b299bcfb4e15ef652c80e9e3dda995acbb4bf71dce889a82ba70228e45a8bf" - }, - "scheme": "ed25519" - }, - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e104199cda6e018d7d9044fa6225aa5dc9c2af5ee4e1c0fe6d16ad002220390d" - }, - "scheme": "ed25519" - }, - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "9b1db36a5cad80284b5f40b040621e0e444f25ee09efa5c1fd6da4499c711bd5" - }, - "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" - }, - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "fa386632ae9cc358ad0b56565edef362ad10d7fadb05bc8dc8995627372b990e" - }, - "scheme": "ed25519" - }, - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "683d345a948a9baa343be4e44c076ca115da3838e72c28a06340c8ec1b3ef6be" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8" - ], - "threshold": 4 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/snapshot.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/snapshot.json deleted file mode 100644 index 1e51a237..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "5939785ca69e19f3dd0e1c9a6fe36179625528fb36e30173a88dbdf139eb1ed7f9f3e0f4e0db075ff51a74141e70669cb329a042938369faa3ca1d5605c0980a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/targets.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/targets.json deleted file mode 100644 index 1a026e51..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "6745efba317ff34aea61685be997d9ee18d02fee2445cfd9cef32da940d2497b12986b95edbc9be38302bbca90ade299697ad2506ce354b8a3ea9528898fab09" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2031-09-09T23:20:21Z", - "spec_version": "1.0.0", - "targets": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/timestamp.json b/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/timestamp.json deleted file mode 100644 index be3cf940..00000000 --- a/client/testdata/PublishedTwiceMultiKeysadd_9_revoke_4_threshold_4_timestamp/server/metadata/timestamp.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "ec1d63e79fadec3dddb5852a1007fa7e5ed4b746b3d608ba9d3fa6fa2f25afa308a72474d820fe2b88adf4f9d6352e57fe7475725e539858f1ab07ab7a5ca305" - }, - { - "keyid": "06e78858e726b48732eaae08a5731465587d322f4e63c0fae62ec13537c0a1cb", - "sig": "c3021d40208c80b25034d7d7d29d2faeeb7b0e4e3238430a0f2c0435337d3b2c47e87f4ec2c5692dc2aec01dee8e72feea2b6f72cb17591aca1e5252fe2c4f0b" - }, - { - "keyid": "15024498e03f033ec92758a1dc7107b34eebe759b09827b02a7fb3c64ca3e586", - "sig": "dbe051e077a6d7ad54ad39c41e3fc497c65b8f5cd9ac9b9c7bf0900dba979614198922232fcd2ef66ec9d5e571b9e936cd997c41e74c55abce8448d13b178007" - }, - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "76946f3caeba163ff8fcaa9892f92457a9531da85092ddff660d8af2859fc94ea714e1962ab704a4e028fe48b195b850d6c29d13cf668bb2bf41b0814229b402" - }, - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "9f5c7234e8c67e15fa326bc693595b6ac75aacbec4c5c6bd07bb4c8d8e9bfb35d1ee121987629e45fbb2f4fdcd6593a1f4cd1231b361b89832dcc19be248f70a" - }, - { - "keyid": "75b81ec1572cc1dd55f88f13f0f0217b4e7a25f1665deed40115b612ff9c0eb8", - "sig": "d33845b0bfc6ace034377acc4e043dedd3c26c1d58b2f11bb3fa9416c86f55a396c3547d5f95662cbafe231af913752be851947413fca7fa5ec86948aae8ae0c" - }, - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "f94b9c239f481f74715627accec1f2794faeefbc0a110e4ac4c8ab0f3451812042ea5b5f85b66b568ea2b00ac46b3d5496b184bc6a59fdee1361b6dbf5e6d90d" - }, - { - "keyid": "e9829d3f2fdff6d6f31002c17cf7f20cf0398e215ca0c0c44d075ccd76a26f62", - "sig": "b17e9fed31051906f6d31c81db44c025718ced629d2d2914e09c0da4f303163bbfbd11673491aafcce6e35226b3c2f1a6fefa3ff5f39b838d4c3d736e521ac07" - }, - { - "keyid": "f581c9aeff9989106aeeea35319d1d1f067149619a2ff005249d6f60560557be", - "sig": "b82b9a726284bbc488f3fa8e7b91cd641b63aa0488c7706d7a8a09eecd9a12ce99e02fe77e0994084e72316476e26df42aac2d89616674e40c82a1c3f7082409" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2031-09-09T23:20:21Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "47ceec303641a009684536b381ee11129a338e4f8a0ea30f99efa205a78265de", - "sha512": "6d1e34a684483108365554f3c6996fba96f1f64892920436d2c4e27a399bb7b0cdd4fac07d1df250554ab2164e417be7391281b422a12ae26fb1dd619dc8a1c7" - }, - "length": 431, - "version": 1 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/1.root.json deleted file mode 100644 index 7e05abd5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/1.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "5ff5c02ecdfc36583f4fb1a8e660bee1643f82a1a7cb3291739200b9f9be6ee026958af3b342e6d8d4f242a05f8e8558e146b6f692ddd4a7d558b85e82ad9b05" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "5ff5c02ecdfc36583f4fb1a8e660bee1643f82a1a7cb3291739200b9f9be6ee026958af3b342e6d8d4f242a05f8e8558e146b6f692ddd4a7d558b85e82ad9b05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/root.json deleted file mode 100644 index 7e05abd5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "5ff5c02ecdfc36583f4fb1a8e660bee1643f82a1a7cb3291739200b9f9be6ee026958af3b342e6d8d4f242a05f8e8558e146b6f692ddd4a7d558b85e82ad9b05" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "5ff5c02ecdfc36583f4fb1a8e660bee1643f82a1a7cb3291739200b9f9be6ee026958af3b342e6d8d4f242a05f8e8558e146b6f692ddd4a7d558b85e82ad9b05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/snapshot.json deleted file mode 100644 index e794f209..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "683aae02eb3fcc4fc0ffc37f2f43dc0fdb43e7997d3c65653cfdabcaea9fed8414e3d77047483eca96490747b2a62dec4d17021de42173520f12b60b39ffbc0f" - }, - "length": 3832, - "version": 1 - }, - "targets.json": { - "hashes": { - "sha512": "6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e" - }, - "length": 866, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "30374e6296c813037083321b16c0d2b9578de32a99f56e33134d1936ff14c611e50d0a68bf9e6a2f25dfb449e599f069c51f1c8e3113e36d905a6a0fe825a005" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "30374e6296c813037083321b16c0d2b9578de32a99f56e33134d1936ff14c611e50d0a68bf9e6a2f25dfb449e599f069c51f1c8e3113e36d905a6a0fe825a005" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets.json deleted file mode 100644 index 60091e73..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - } - }, - "version": 1 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets/0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets/0 deleted file mode 100644 index c2270834..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/timestamp.json deleted file mode 100644 index 9ba2ee4a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/0/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "892f57086442891029dd180f01c8653ab91d0ddba2ab6002437634ad0a3579e31e21ef8790577086773ba8b5ffc1da80451589dae92ae122d2943a963fae9725" - }, - "length": 1125, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "f661d41e29185709f03c5fc28498c369153df6be0eee08d11df869046a5b6605471729541ce8d05d9d5f035adac00d531efe6294c99715270c7e8acc5967fb0a" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "f661d41e29185709f03c5fc28498c369153df6be0eee08d11df869046a5b6605471729541ce8d05d9d5f035adac00d531efe6294c99715270c7e8acc5967fb0a" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/1.root.json deleted file mode 120000 index 0ffd2b6d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/2.root.json deleted file mode 100644 index efd2263e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/2.root.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "61cfd8782175d6b88a05088ad57c4147d56328bfeac7a8d2f135e831bb1d9f37eaa32e61405baabec61ae280f5ca47af21a3b2a6ef9866889a0d5eb4ce00fa08" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "61cfd8782175d6b88a05088ad57c4147d56328bfeac7a8d2f135e831bb1d9f37eaa32e61405baabec61ae280f5ca47af21a3b2a6ef9866889a0d5eb4ce00fa08" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "855ab125077b6a8e00f8224ef9e8bd595d8b5baeae7a4588605702b4279030f6a34dfa4ba544d6c66fcbec92dc7dc4d5df4f744b7b9962b281a24f7e5c264905" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "855ab125077b6a8e00f8224ef9e8bd595d8b5baeae7a4588605702b4279030f6a34dfa4ba544d6c66fcbec92dc7dc4d5df4f744b7b9962b281a24f7e5c264905" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/root.json deleted file mode 100644 index efd2263e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/root.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "61cfd8782175d6b88a05088ad57c4147d56328bfeac7a8d2f135e831bb1d9f37eaa32e61405baabec61ae280f5ca47af21a3b2a6ef9866889a0d5eb4ce00fa08" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "61cfd8782175d6b88a05088ad57c4147d56328bfeac7a8d2f135e831bb1d9f37eaa32e61405baabec61ae280f5ca47af21a3b2a6ef9866889a0d5eb4ce00fa08" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "855ab125077b6a8e00f8224ef9e8bd595d8b5baeae7a4588605702b4279030f6a34dfa4ba544d6c66fcbec92dc7dc4d5df4f744b7b9962b281a24f7e5c264905" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "855ab125077b6a8e00f8224ef9e8bd595d8b5baeae7a4588605702b4279030f6a34dfa4ba544d6c66fcbec92dc7dc4d5df4f744b7b9962b281a24f7e5c264905" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/snapshot.json deleted file mode 100644 index bcf536b9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "4feab9708b19ebd38844cab9879fb6c9c52b6a55c4281030149f696090d4e4ca07ebcaf7c97d6e13f41bae6c332242dda18ebeb63fb2555d759b2283cf8187ab" - }, - "length": 4340, - "version": 2 - }, - "targets.json": { - "hashes": { - "sha512": "118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22" - }, - "length": 1067, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "9d6b3455d3749f21974ccfe087044ca46254c84e6d0b8a0767e001a4eb6bb2bee19f341cec0c4f752deebd657fdeea7641df661c6a9d224e1d1fe8cee5826203" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "9d6b3455d3749f21974ccfe087044ca46254c84e6d0b8a0767e001a4eb6bb2bee19f341cec0c4f752deebd657fdeea7641df661c6a9d224e1d1fe8cee5826203" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets.json deleted file mode 100644 index eeb97eb3..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - } - }, - "version": 2 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/0 deleted file mode 120000 index aced6879..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../0/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/1 deleted file mode 100644 index 56a6051c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/timestamp.json deleted file mode 100644 index 7c58b004..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/1/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "c94cf74bfd65605e8310957476c6cad2102bf9d3c76711a3530ed8e5f38289474fb01ac5747b4977d3ff0a4ddbb3f6767231c1ba54c78a708969807a2d587119" - }, - "length": 1126, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "08dc93ecb35c64fe26e319b8a7cb06117d96257c96e4781960f8f0b158f559ec756f8affaafd9b6404494b00525e33b3cd2130f8ea2cb5990e6e5461025ea60c" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "08dc93ecb35c64fe26e319b8a7cb06117d96257c96e4781960f8f0b158f559ec756f8affaafd9b6404494b00525e33b3cd2130f8ea2cb5990e6e5461025ea60c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/1.root.json deleted file mode 120000 index cd730513..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/2.root.json deleted file mode 120000 index bbdcb128..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/3.root.json deleted file mode 100644 index af419a23..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/3.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "f88ad025e4e486cba6fc97d0a28bc9eb25d8f2148f66fb1929a8c906d5cc7753849ff91a56ade22e4a9d8729347617b75cbc34a5769b1cf1db8cbf2137168c0e" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "f88ad025e4e486cba6fc97d0a28bc9eb25d8f2148f66fb1929a8c906d5cc7753849ff91a56ade22e4a9d8729347617b75cbc34a5769b1cf1db8cbf2137168c0e" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/root.json deleted file mode 100644 index af419a23..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "f88ad025e4e486cba6fc97d0a28bc9eb25d8f2148f66fb1929a8c906d5cc7753849ff91a56ade22e4a9d8729347617b75cbc34a5769b1cf1db8cbf2137168c0e" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "f88ad025e4e486cba6fc97d0a28bc9eb25d8f2148f66fb1929a8c906d5cc7753849ff91a56ade22e4a9d8729347617b75cbc34a5769b1cf1db8cbf2137168c0e" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/snapshot.json deleted file mode 100644 index cc575cd8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "baf96d1da4a27b3e57dc35fa1ddde8b20a18f96f6268e07252ed4840725f599d4375ed99d9509f2edde04309efbba71c86735ba630698401cc1778cc31e768f4" - }, - "length": 3832, - "version": 3 - }, - "targets.json": { - "hashes": { - "sha512": "bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4" - }, - "length": 1268, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "4f202ab758b9a2baefbd23d8fea5deaa8c66d967afa9c52d81df2c17915fc10b059775d53ea858da2c668735f1eb1692f04e2f971545f4ba631f41579e729903" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "4f202ab758b9a2baefbd23d8fea5deaa8c66d967afa9c52d81df2c17915fc10b059775d53ea858da2c668735f1eb1692f04e2f971545f4ba631f41579e729903" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets.json deleted file mode 100644 index 147dfc68..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - } - }, - "version": 3 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/0 deleted file mode 120000 index 2ac1d8be..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/1 deleted file mode 120000 index 8e78bc37..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/2 deleted file mode 100644 index d8263ee9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/timestamp.json deleted file mode 100644 index ffcf0ebd..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/2/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "27cf44e990df07e40205463d25a12bbacd2ee3dc2650d1a01a37fa0ac27a5e2c885a6e85c2b07e8f56f8bd165cdcd756b182ccfb7f2728709b7a77a7b2251e86" - }, - "length": 1126, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "9d1c694c4037e0f7d9665ae450ba1b3be30f0a882942802991986f3211788fc347edba9b90a6eeed54c20d9bf5ed9434b0e088a79d7ad2185d16a1b8589bce0f" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "9d1c694c4037e0f7d9665ae450ba1b3be30f0a882942802991986f3211788fc347edba9b90a6eeed54c20d9bf5ed9434b0e088a79d7ad2185d16a1b8589bce0f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/1.root.json deleted file mode 120000 index fb4fe81b..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/2.root.json deleted file mode 120000 index 55f8b9d4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/3.root.json deleted file mode 120000 index b4564b7f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/4.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/4.root.json deleted file mode 100644 index c0966ce5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/4.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "780d8db1d802ef7ccaa23ae9bcccf7b619d820a505ae75f61453ebbc882ce4dff37194ee112f3da22feba8cc89531329872e22704a75a21658a5ec38ee568c00" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "780d8db1d802ef7ccaa23ae9bcccf7b619d820a505ae75f61453ebbc882ce4dff37194ee112f3da22feba8cc89531329872e22704a75a21658a5ec38ee568c00" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/root.json deleted file mode 100644 index c0966ce5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "780d8db1d802ef7ccaa23ae9bcccf7b619d820a505ae75f61453ebbc882ce4dff37194ee112f3da22feba8cc89531329872e22704a75a21658a5ec38ee568c00" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "780d8db1d802ef7ccaa23ae9bcccf7b619d820a505ae75f61453ebbc882ce4dff37194ee112f3da22feba8cc89531329872e22704a75a21658a5ec38ee568c00" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/snapshot.json deleted file mode 100644 index 788252b2..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "f23ff2acc0678a3e5d75d192417e3d008c35aa1143fb65807c46310b28a0c2cb88c94fc8d29bef3bebf81ef1c32db0cec6f5f00359c6259f22346a252ddf664d" - }, - "length": 3832, - "version": 4 - }, - "targets.json": { - "hashes": { - "sha512": "7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461" - }, - "length": 1469, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "a076e6f99019484fc5daf715a62967e23a2ee94e8847298f5bc8ca21d0ae91207f0098dbd368c287d4468142c2ce29a74c9cecff0368a09673af1b2b0313dd00" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "a076e6f99019484fc5daf715a62967e23a2ee94e8847298f5bc8ca21d0ae91207f0098dbd368c287d4468142c2ce29a74c9cecff0368a09673af1b2b0313dd00" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets.json deleted file mode 100644 index c960d1c8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - } - }, - "version": 4 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/0 deleted file mode 120000 index 2e6dba05..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/1 deleted file mode 120000 index 14fee5d8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/2 deleted file mode 120000 index dcd19e04..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/3 deleted file mode 100644 index e440e5c8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/timestamp.json deleted file mode 100644 index 2d62fa2a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/3/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "3e1518698609a8ea5dc88323cbc3c7f487346cf489db59ff6c74d232372c3d77217416c5ccbdcf3172cb79df93ed635c3981663f2019f958a6f6a84cd443aee3" - }, - "length": 1126, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "87d09d36cd148d9e7947353514818cb1ae455962acec5f98c1d8941755d1a515bc8f0cdde4602fd2eb25999c2e842f60882fa1e8d9dc97dbf6442e6f4c8c4e0e" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "87d09d36cd148d9e7947353514818cb1ae455962acec5f98c1d8941755d1a515bc8f0cdde4602fd2eb25999c2e842f60882fa1e8d9dc97dbf6442e6f4c8c4e0e" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/1.root.json deleted file mode 120000 index 741d2189..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/2.root.json deleted file mode 120000 index fb9b350d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/3.root.json deleted file mode 120000 index 65e6c5b4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/4.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/4.root.json deleted file mode 120000 index c3662ce8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/5.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/5.root.json deleted file mode 100644 index 75f57ce0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/5.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "b9bec20a6e47c15ee0abae1ec2314bf129d838c0996be90dfa5ef5983354d2c55b83ddf2fbd9d783fb82d16f4b1106af8b01331bbd9648807e42f0eaafecb600" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "b9bec20a6e47c15ee0abae1ec2314bf129d838c0996be90dfa5ef5983354d2c55b83ddf2fbd9d783fb82d16f4b1106af8b01331bbd9648807e42f0eaafecb600" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/root.json deleted file mode 100644 index 75f57ce0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "b9bec20a6e47c15ee0abae1ec2314bf129d838c0996be90dfa5ef5983354d2c55b83ddf2fbd9d783fb82d16f4b1106af8b01331bbd9648807e42f0eaafecb600" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "b9bec20a6e47c15ee0abae1ec2314bf129d838c0996be90dfa5ef5983354d2c55b83ddf2fbd9d783fb82d16f4b1106af8b01331bbd9648807e42f0eaafecb600" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/snapshot.json deleted file mode 100644 index 8f96582e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "1d328734fe2f05dcf8527fd56dc2be8eb93f0c55f71d14aa6e8ad756d9d0a9dd41355df2712aaf992adc50add64ffde009a56cde02c4792e8c2d3b694ac70fc3" - }, - "length": 3832, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db" - }, - "length": 1670, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "e7b397e79f9fe7c12a662abbc99424b615790c64065e1ed66f6ce46d48ac0132a8c90e93ae3e7bfe5a75279cd015dbf52ef1a73c543697f1de5bb059072b7d02" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "e7b397e79f9fe7c12a662abbc99424b615790c64065e1ed66f6ce46d48ac0132a8c90e93ae3e7bfe5a75279cd015dbf52ef1a73c543697f1de5bb059072b7d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets.json deleted file mode 100644 index 7dc90947..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - } - }, - "version": 5 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/0 deleted file mode 120000 index efe18e41..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/1 deleted file mode 120000 index b4a40c47..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/2 deleted file mode 120000 index 1c681715..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/3 deleted file mode 120000 index 1dc4d27e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/4 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/4 deleted file mode 100644 index bf0d87ab..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/targets/4 +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/timestamp.json deleted file mode 100644 index 0119345c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/4/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "f3285e9249d6fe5c693a9766c8f9efbfb915349213f155cfc7e511e40fc43134b9925c589efb9cc561edf3bea182e4b61e23dc8434c00e0bf1a35dea1a7c81d9" - }, - "length": 1126, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "method": "ed25519", - "sig": "efeb3f5a53fd6c6c9e03cb3ac48dccc9a7ff050108e89dc85d83b8ad56d7b752174c0d0ee60621982da9858c8d468844cc0f3d011ff0b121e58f34b6af1a1f0b" - }, - { - "keyid": "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d", - "method": "ed25519", - "sig": "efeb3f5a53fd6c6c9e03cb3ac48dccc9a7ff050108e89dc85d83b8ad56d7b752174c0d0ee60621982da9858c8d468844cc0f3d011ff0b121e58f34b6af1a1f0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/1.root.json deleted file mode 120000 index fb796e32..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/2.root.json deleted file mode 120000 index 5a3e4546..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/3.root.json deleted file mode 120000 index d1cb2513..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/4.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/4.root.json deleted file mode 120000 index bda6d089..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/5.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/5.root.json deleted file mode 120000 index f99552a4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/5.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/root.json deleted file mode 120000 index 3d140581..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/snapshot.json deleted file mode 100644 index 96ad4378..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "1d328734fe2f05dcf8527fd56dc2be8eb93f0c55f71d14aa6e8ad756d9d0a9dd41355df2712aaf992adc50add64ffde009a56cde02c4792e8c2d3b694ac70fc3" - }, - "length": 3832, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262" - }, - "length": 1871, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "cf36c85855679c11e0efb1cc53deb1a1bfd43d02e8fb564e6c280f1ef280a62fe05368336fdbe59daa642313b28479accfed25f4a3c8be9cc1d0474ab87c150f" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "cf36c85855679c11e0efb1cc53deb1a1bfd43d02e8fb564e6c280f1ef280a62fe05368336fdbe59daa642313b28479accfed25f4a3c8be9cc1d0474ab87c150f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets.json deleted file mode 100644 index 3f07d3d1..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - }, - "5": { - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - }, - "length": 1 - } - }, - "version": 6 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/0 deleted file mode 120000 index 94cc2872..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/1 deleted file mode 120000 index 51c7c9a9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/2 deleted file mode 120000 index 46e3032e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/3 deleted file mode 120000 index ca268e91..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/4 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/4 deleted file mode 120000 index 19339ad4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/4 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/5 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/5 deleted file mode 100644 index 7813681f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/targets/5 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/timestamp.json deleted file mode 100644 index 00124e2a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-false/5/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "416d5114cfe34e8412cc68c85a1aaded17f53d8ba77f4c3fa769835904ae664d729711e88e1a90c2a6bc4f3c61e46eb026c0a1da5a22c7d28a3103c82c6b284a" - }, - "length": 1126, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - }, - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "method": "ed25519", - "sig": "d238cb69543dc66c40e5f9d5bcf58d43e6c99e5559399be52c08f6a7c29809a4d7c50014ea631f871b5e2be28264b0c682eafe775297888bc883061214c55600" - }, - { - "keyid": "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d", - "method": "ed25519", - "sig": "d238cb69543dc66c40e5f9d5bcf58d43e6c99e5559399be52c08f6a7c29809a4d7c50014ea631f871b5e2be28264b0c682eafe775297888bc883061214c55600" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.root.json deleted file mode 100644 index 93189d2c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "485c97e0bb392ee60f9644cdd430f1325cb2329a8c0223fc69b209061d8f3a72268a087f4a715f5a0f70f967edaecebdcc8e9fc914ea8aff1c9741d495f5f904" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "485c97e0bb392ee60f9644cdd430f1325cb2329a8c0223fc69b209061d8f3a72268a087f4a715f5a0f70f967edaecebdcc8e9fc914ea8aff1c9741d495f5f904" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.snapshot.json deleted file mode 100644 index 7bf654da..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3" - }, - "length": 3831, - "version": 1 - }, - "targets.json": { - "hashes": { - "sha512": "6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e" - }, - "length": 866, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "f2ee59f04d66fa5a73249e985bae22e04bad839131334b630a2bd57566a2da2e5c32179c147daac927909a88a4896cc541dc30129450549c63b41bb5f0506e0d" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "f2ee59f04d66fa5a73249e985bae22e04bad839131334b630a2bd57566a2da2e5c32179c147daac927909a88a4896cc541dc30129450549c63b41bb5f0506e0d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.targets.json deleted file mode 100644 index 60091e73..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/1.targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - } - }, - "version": 1 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json deleted file mode 100644 index 7bf654da..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3" - }, - "length": 3831, - "version": 1 - }, - "targets.json": { - "hashes": { - "sha512": "6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e" - }, - "length": 866, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "f2ee59f04d66fa5a73249e985bae22e04bad839131334b630a2bd57566a2da2e5c32179c147daac927909a88a4896cc541dc30129450549c63b41bb5f0506e0d" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "f2ee59f04d66fa5a73249e985bae22e04bad839131334b630a2bd57566a2da2e5c32179c147daac927909a88a4896cc541dc30129450549c63b41bb5f0506e0d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json deleted file mode 100644 index 60091e73..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - } - }, - "version": 1 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json deleted file mode 100644 index 93189d2c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "485c97e0bb392ee60f9644cdd430f1325cb2329a8c0223fc69b209061d8f3a72268a087f4a715f5a0f70f967edaecebdcc8e9fc914ea8aff1c9741d495f5f904" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "485c97e0bb392ee60f9644cdd430f1325cb2329a8c0223fc69b209061d8f3a72268a087f4a715f5a0f70f967edaecebdcc8e9fc914ea8aff1c9741d495f5f904" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/root.json deleted file mode 100644 index 93189d2c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "485c97e0bb392ee60f9644cdd430f1325cb2329a8c0223fc69b209061d8f3a72268a087f4a715f5a0f70f967edaecebdcc8e9fc914ea8aff1c9741d495f5f904" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "485c97e0bb392ee60f9644cdd430f1325cb2329a8c0223fc69b209061d8f3a72268a087f4a715f5a0f70f967edaecebdcc8e9fc914ea8aff1c9741d495f5f904" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/snapshot.json deleted file mode 100644 index 7bf654da..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3" - }, - "length": 3831, - "version": 1 - }, - "targets.json": { - "hashes": { - "sha512": "6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e" - }, - "length": 866, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "f2ee59f04d66fa5a73249e985bae22e04bad839131334b630a2bd57566a2da2e5c32179c147daac927909a88a4896cc541dc30129450549c63b41bb5f0506e0d" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "f2ee59f04d66fa5a73249e985bae22e04bad839131334b630a2bd57566a2da2e5c32179c147daac927909a88a4896cc541dc30129450549c63b41bb5f0506e0d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets.json deleted file mode 100644 index 60091e73..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - } - }, - "version": 1 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/0.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/0.0 deleted file mode 100644 index c2270834..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/0.0 +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 100644 index c2270834..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/timestamp.json deleted file mode 100644 index ca0d4e31..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/0/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4" - }, - "length": 1125, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "1b51547737f70f5a3c4ee95c4ae9698d571777dd8b0a3c5d57af266beb95802889b3d7ba9062ff06e85427f05b76ad193d5f3ca45e1be86a266e53b2d0526504" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "1b51547737f70f5a3c4ee95c4ae9698d571777dd8b0a3c5d57af266beb95802889b3d7ba9062ff06e85427f05b76ad193d5f3ca45e1be86a266e53b2d0526504" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.root.json deleted file mode 120000 index 0ffd2b6d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.snapshot.json deleted file mode 120000 index 840f843e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.targets.json deleted file mode 120000 index 4d11148d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json deleted file mode 100644 index eeb97eb3..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - } - }, - "version": 2 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.root.json deleted file mode 100644 index 911c87f8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.root.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "eaca65a09fb8f16ebc7c4560e9d23875225c0fd0f84747542a23e2dd9942fcf4c2bebd7292f06e1eaaf242048103594107353b75eea161bfe15ab24bfd752706" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "eaca65a09fb8f16ebc7c4560e9d23875225c0fd0f84747542a23e2dd9942fcf4c2bebd7292f06e1eaaf242048103594107353b75eea161bfe15ab24bfd752706" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "0dd9685391cc229d15c468fb3a71d93780bf1220b82e97c5dc6384db76eab74b9254478c89c26f5cf86f640e6a49d0a9d6990ba151fb862648181c8c029f470d" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "0dd9685391cc229d15c468fb3a71d93780bf1220b82e97c5dc6384db76eab74b9254478c89c26f5cf86f640e6a49d0a9d6990ba151fb862648181c8c029f470d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.snapshot.json deleted file mode 100644 index 43bfdc14..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098" - }, - "length": 4339, - "version": 2 - }, - "targets.json": { - "hashes": { - "sha512": "118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22" - }, - "length": 1067, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "f5b71b0dfefa020f7110d8767d5a6b7a98f6a71a89a3819cd54ae628081502b3bd18e8c7f1254f53a5346088deaee66fdd359ae365ea3758f0dc0032e9517a05" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "f5b71b0dfefa020f7110d8767d5a6b7a98f6a71a89a3819cd54ae628081502b3bd18e8c7f1254f53a5346088deaee66fdd359ae365ea3758f0dc0032e9517a05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.targets.json deleted file mode 100644 index eeb97eb3..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/2.targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - } - }, - "version": 2 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json deleted file mode 100644 index 43bfdc14..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098" - }, - "length": 4339, - "version": 2 - }, - "targets.json": { - "hashes": { - "sha512": "118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22" - }, - "length": 1067, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "f5b71b0dfefa020f7110d8767d5a6b7a98f6a71a89a3819cd54ae628081502b3bd18e8c7f1254f53a5346088deaee66fdd359ae365ea3758f0dc0032e9517a05" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "f5b71b0dfefa020f7110d8767d5a6b7a98f6a71a89a3819cd54ae628081502b3bd18e8c7f1254f53a5346088deaee66fdd359ae365ea3758f0dc0032e9517a05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json deleted file mode 120000 index 027671c5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json deleted file mode 120000 index aecd9476..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json deleted file mode 100644 index 911c87f8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "eaca65a09fb8f16ebc7c4560e9d23875225c0fd0f84747542a23e2dd9942fcf4c2bebd7292f06e1eaaf242048103594107353b75eea161bfe15ab24bfd752706" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "eaca65a09fb8f16ebc7c4560e9d23875225c0fd0f84747542a23e2dd9942fcf4c2bebd7292f06e1eaaf242048103594107353b75eea161bfe15ab24bfd752706" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "0dd9685391cc229d15c468fb3a71d93780bf1220b82e97c5dc6384db76eab74b9254478c89c26f5cf86f640e6a49d0a9d6990ba151fb862648181c8c029f470d" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "0dd9685391cc229d15c468fb3a71d93780bf1220b82e97c5dc6384db76eab74b9254478c89c26f5cf86f640e6a49d0a9d6990ba151fb862648181c8c029f470d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json deleted file mode 120000 index 70b171e6..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/root.json deleted file mode 100644 index 911c87f8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/root.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "method": "ed25519", - "sig": "eaca65a09fb8f16ebc7c4560e9d23875225c0fd0f84747542a23e2dd9942fcf4c2bebd7292f06e1eaaf242048103594107353b75eea161bfe15ab24bfd752706" - }, - { - "keyid": "f806b84c8763453d011c0ba830a3290ee4be587969f5325117c7626411a0f953", - "method": "ed25519", - "sig": "eaca65a09fb8f16ebc7c4560e9d23875225c0fd0f84747542a23e2dd9942fcf4c2bebd7292f06e1eaaf242048103594107353b75eea161bfe15ab24bfd752706" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "0dd9685391cc229d15c468fb3a71d93780bf1220b82e97c5dc6384db76eab74b9254478c89c26f5cf86f640e6a49d0a9d6990ba151fb862648181c8c029f470d" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "0dd9685391cc229d15c468fb3a71d93780bf1220b82e97c5dc6384db76eab74b9254478c89c26f5cf86f640e6a49d0a9d6990ba151fb862648181c8c029f470d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/snapshot.json deleted file mode 100644 index 43bfdc14..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098" - }, - "length": 4339, - "version": 2 - }, - "targets.json": { - "hashes": { - "sha512": "118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22" - }, - "length": 1067, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "f5b71b0dfefa020f7110d8767d5a6b7a98f6a71a89a3819cd54ae628081502b3bd18e8c7f1254f53a5346088deaee66fdd359ae365ea3758f0dc0032e9517a05" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "f5b71b0dfefa020f7110d8767d5a6b7a98f6a71a89a3819cd54ae628081502b3bd18e8c7f1254f53a5346088deaee66fdd359ae365ea3758f0dc0032e9517a05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets.json deleted file mode 100644 index eeb97eb3..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - } - }, - "version": 2 - }, - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - }, - { - "keyid": "d77999c3b2d553fceee309cc47bf7ab2fee37b8a0b30d4033e4b40dc09719556", - "method": "ed25519", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.0 deleted file mode 120000 index 0a5640e6..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.0 +++ /dev/null @@ -1 +0,0 @@ -../../../0/repository/targets/0.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.1 deleted file mode 100644 index 56a6051c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/0.1 +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index b0c459f9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 100644 index 56a6051c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/timestamp.json deleted file mode 100644 index 884a54b8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/1/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9" - }, - "length": 1126, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "c077ad4567c1db81609c89ab80310de559a2045d58a7f0166269f82e6d33a326248414ff7e5eb2d876d7741652ea1b6fab61f9bc774a6592727ac248a196720f" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "c077ad4567c1db81609c89ab80310de559a2045d58a7f0166269f82e6d33a326248414ff7e5eb2d876d7741652ea1b6fab61f9bc774a6592727ac248a196720f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.root.json deleted file mode 120000 index cd730513..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.snapshot.json deleted file mode 120000 index 1307f574..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.targets.json deleted file mode 120000 index 85e1ecc2..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json deleted file mode 120000 index 0018c825..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json deleted file mode 100644 index c6303cd5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94" - }, - "length": 3831, - "version": 3 - }, - "targets.json": { - "hashes": { - "sha512": "bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4" - }, - "length": 1268, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "b3aa3119a74147ceb37b98248638710da5741c635e5791b13fd851b37212e4d3d5e7f6cbd4122b232a4010c13332c3048c1c6cc3e2838934ed481e6959441f05" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "b3aa3119a74147ceb37b98248638710da5741c635e5791b13fd851b37212e4d3d5e7f6cbd4122b232a4010c13332c3048c1c6cc3e2838934ed481e6959441f05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.root.json deleted file mode 120000 index bbdcb128..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.snapshot.json deleted file mode 120000 index 24d10752..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.targets.json deleted file mode 120000 index f6a17494..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json deleted file mode 120000 index 69cd01db..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.root.json deleted file mode 100644 index deacdc19..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "d11082d75a4e60f9c5d1d176dfea4d7c43a41a9d4595a8b14b844a43c329bf86d2bf4eb8d6255af1afd97bbd5cfc1a69f038a82617cbfcfb82c6434e1790c702" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "d11082d75a4e60f9c5d1d176dfea4d7c43a41a9d4595a8b14b844a43c329bf86d2bf4eb8d6255af1afd97bbd5cfc1a69f038a82617cbfcfb82c6434e1790c702" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.snapshot.json deleted file mode 100644 index c6303cd5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94" - }, - "length": 3831, - "version": 3 - }, - "targets.json": { - "hashes": { - "sha512": "bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4" - }, - "length": 1268, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "b3aa3119a74147ceb37b98248638710da5741c635e5791b13fd851b37212e4d3d5e7f6cbd4122b232a4010c13332c3048c1c6cc3e2838934ed481e6959441f05" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "b3aa3119a74147ceb37b98248638710da5741c635e5791b13fd851b37212e4d3d5e7f6cbd4122b232a4010c13332c3048c1c6cc3e2838934ed481e6959441f05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.targets.json deleted file mode 100644 index 147dfc68..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/3.targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - } - }, - "version": 3 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json deleted file mode 120000 index 944d3575..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json deleted file mode 100644 index deacdc19..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "d11082d75a4e60f9c5d1d176dfea4d7c43a41a9d4595a8b14b844a43c329bf86d2bf4eb8d6255af1afd97bbd5cfc1a69f038a82617cbfcfb82c6434e1790c702" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "d11082d75a4e60f9c5d1d176dfea4d7c43a41a9d4595a8b14b844a43c329bf86d2bf4eb8d6255af1afd97bbd5cfc1a69f038a82617cbfcfb82c6434e1790c702" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json deleted file mode 120000 index de6ef376..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json deleted file mode 120000 index f8bb03c5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json deleted file mode 100644 index 147dfc68..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - } - }, - "version": 3 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json deleted file mode 120000 index ce078d7e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/root.json deleted file mode 100644 index deacdc19..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "d11082d75a4e60f9c5d1d176dfea4d7c43a41a9d4595a8b14b844a43c329bf86d2bf4eb8d6255af1afd97bbd5cfc1a69f038a82617cbfcfb82c6434e1790c702" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "d11082d75a4e60f9c5d1d176dfea4d7c43a41a9d4595a8b14b844a43c329bf86d2bf4eb8d6255af1afd97bbd5cfc1a69f038a82617cbfcfb82c6434e1790c702" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/snapshot.json deleted file mode 100644 index c6303cd5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94" - }, - "length": 3831, - "version": 3 - }, - "targets.json": { - "hashes": { - "sha512": "bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4" - }, - "length": 1268, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "method": "ed25519", - "sig": "b3aa3119a74147ceb37b98248638710da5741c635e5791b13fd851b37212e4d3d5e7f6cbd4122b232a4010c13332c3048c1c6cc3e2838934ed481e6959441f05" - }, - { - "keyid": "7165b3cf2ad6a10d456498d958e80f2356b0d3a230d93a96a8dada5fdd8dd40d", - "method": "ed25519", - "sig": "b3aa3119a74147ceb37b98248638710da5741c635e5791b13fd851b37212e4d3d5e7f6cbd4122b232a4010c13332c3048c1c6cc3e2838934ed481e6959441f05" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets.json deleted file mode 100644 index 147dfc68..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - } - }, - "version": 3 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.0 deleted file mode 120000 index 59c65e1e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.0 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/0.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.1 deleted file mode 120000 index 37e8fbc1..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.1 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/0.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.2 deleted file mode 100644 index d8263ee9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/0.2 +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index de9aac3a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 100644 index d8263ee9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 2ebb2d33..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/timestamp.json deleted file mode 100644 index 2356947d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/2/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432" - }, - "length": 1126, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "25122819bb1e9fcd7383d0a13a35a049470162140b1573eb139e4269e29ec31b77a9771396bf2c9719c9ddb4e167e2e5ebabfef229cb4f16b59db45c6fdb4508" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "25122819bb1e9fcd7383d0a13a35a049470162140b1573eb139e4269e29ec31b77a9771396bf2c9719c9ddb4e167e2e5ebabfef229cb4f16b59db45c6fdb4508" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.root.json deleted file mode 120000 index fb4fe81b..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.snapshot.json deleted file mode 120000 index 4dfb0d02..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.targets.json deleted file mode 120000 index 1eeb5642..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json deleted file mode 120000 index 32bd3243..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json deleted file mode 100644 index 66717236..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa" - }, - "length": 3831, - "version": 4 - }, - "targets.json": { - "hashes": { - "sha512": "7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461" - }, - "length": 1469, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "4619db132982f96f2f7d62d1ea5e7bfdc69eab8cf10cc6eca8721557144a8b193b98f6c3a25da862c414da348d42cee78b59c3f14903be937b16b39e1003f503" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "4619db132982f96f2f7d62d1ea5e7bfdc69eab8cf10cc6eca8721557144a8b193b98f6c3a25da862c414da348d42cee78b59c3f14903be937b16b39e1003f503" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json deleted file mode 120000 index 03468a15..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.root.json deleted file mode 120000 index 55f8b9d4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.snapshot.json deleted file mode 120000 index 65445cb4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.targets.json deleted file mode 120000 index 3600a0f4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json deleted file mode 120000 index b20325e0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.root.json deleted file mode 120000 index b4564b7f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.snapshot.json deleted file mode 120000 index 7d86b95a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.targets.json deleted file mode 120000 index d1df10e4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json deleted file mode 120000 index d1372152..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.root.json deleted file mode 100644 index 8ccb8d72..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "5a5afbd4270a2638b84f50d0291e35acdf59e25492914017cb317c617d71c3a9c450d3f71f1dd7a33c369399d8de26f3a61060146682d84159f27c08f1675005" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "5a5afbd4270a2638b84f50d0291e35acdf59e25492914017cb317c617d71c3a9c450d3f71f1dd7a33c369399d8de26f3a61060146682d84159f27c08f1675005" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.snapshot.json deleted file mode 100644 index 66717236..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa" - }, - "length": 3831, - "version": 4 - }, - "targets.json": { - "hashes": { - "sha512": "7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461" - }, - "length": 1469, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "4619db132982f96f2f7d62d1ea5e7bfdc69eab8cf10cc6eca8721557144a8b193b98f6c3a25da862c414da348d42cee78b59c3f14903be937b16b39e1003f503" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "4619db132982f96f2f7d62d1ea5e7bfdc69eab8cf10cc6eca8721557144a8b193b98f6c3a25da862c414da348d42cee78b59c3f14903be937b16b39e1003f503" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.targets.json deleted file mode 100644 index c960d1c8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/4.targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - } - }, - "version": 4 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json deleted file mode 120000 index f966ccc6..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json deleted file mode 120000 index 77a36563..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json deleted file mode 100644 index 8ccb8d72..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "5a5afbd4270a2638b84f50d0291e35acdf59e25492914017cb317c617d71c3a9c450d3f71f1dd7a33c369399d8de26f3a61060146682d84159f27c08f1675005" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "5a5afbd4270a2638b84f50d0291e35acdf59e25492914017cb317c617d71c3a9c450d3f71f1dd7a33c369399d8de26f3a61060146682d84159f27c08f1675005" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json deleted file mode 100644 index c960d1c8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - } - }, - "version": 4 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json deleted file mode 120000 index 49199f1e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json deleted file mode 120000 index 4e721c74..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json deleted file mode 120000 index f1f205ad..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/root.json deleted file mode 100644 index 8ccb8d72..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "5a5afbd4270a2638b84f50d0291e35acdf59e25492914017cb317c617d71c3a9c450d3f71f1dd7a33c369399d8de26f3a61060146682d84159f27c08f1675005" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "5a5afbd4270a2638b84f50d0291e35acdf59e25492914017cb317c617d71c3a9c450d3f71f1dd7a33c369399d8de26f3a61060146682d84159f27c08f1675005" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/snapshot.json deleted file mode 100644 index 66717236..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa" - }, - "length": 3831, - "version": 4 - }, - "targets.json": { - "hashes": { - "sha512": "7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461" - }, - "length": 1469, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "4619db132982f96f2f7d62d1ea5e7bfdc69eab8cf10cc6eca8721557144a8b193b98f6c3a25da862c414da348d42cee78b59c3f14903be937b16b39e1003f503" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "4619db132982f96f2f7d62d1ea5e7bfdc69eab8cf10cc6eca8721557144a8b193b98f6c3a25da862c414da348d42cee78b59c3f14903be937b16b39e1003f503" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets.json deleted file mode 100644 index c960d1c8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - } - }, - "version": 4 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.0 deleted file mode 120000 index 13920b05..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.0 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/0.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.1 deleted file mode 120000 index 357ae1e9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.1 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/0.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.2 deleted file mode 120000 index 20ee725e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.2 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/0.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.3 deleted file mode 100644 index e440e5c8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/0.3 +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index f8203976..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 100644 index e440e5c8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index 7cbcc2a6..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 180cdb4f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/timestamp.json deleted file mode 100644 index ebdf9f8e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/3/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7" - }, - "length": 1126, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - }, - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "method": "ed25519", - "sig": "a14cd9dfc17e257aa7f5d6586e32defbc076d1aa3cb30fd86be362f0c528df3145aeba52f5eceb8fab481336b95667c9009fb639bfe996cbe11412c60226320a" - }, - { - "keyid": "c7a2ca868b0e65b50cc6a2dfcfd9c129bdcb3da390ac78bb83a732be02ed5a5d", - "method": "ed25519", - "sig": "a14cd9dfc17e257aa7f5d6586e32defbc076d1aa3cb30fd86be362f0c528df3145aeba52f5eceb8fab481336b95667c9009fb639bfe996cbe11412c60226320a" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.root.json deleted file mode 120000 index 741d2189..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.snapshot.json deleted file mode 120000 index f87f7ed7..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.targets.json deleted file mode 120000 index b0002ec9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json deleted file mode 120000 index 71b4225b..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json deleted file mode 120000 index 11937d87..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json deleted file mode 120000 index 0e10c4d0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.root.json deleted file mode 120000 index fb9b350d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.snapshot.json deleted file mode 120000 index e96983b5..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.targets.json deleted file mode 120000 index dbb2a759..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json deleted file mode 120000 index 57800212..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.root.json deleted file mode 120000 index 65e6c5b4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.snapshot.json deleted file mode 120000 index f2fd5601..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.targets.json deleted file mode 120000 index ca61e77d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json deleted file mode 120000 index 98160f78..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.root.json deleted file mode 120000 index c3662ce8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.snapshot.json deleted file mode 120000 index a2f839ac..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.targets.json deleted file mode 120000 index 9f7a7841..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.root.json deleted file mode 100644 index a9f853e4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "1d3e90aac8b4fad8846d3ae59ed9069ba335310bd14259a6ca6a905499a9b166761c3c737cbef6d231f84b78575d2cb543caba350a1fcaa104589c86cf2e890c" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "1d3e90aac8b4fad8846d3ae59ed9069ba335310bd14259a6ca6a905499a9b166761c3c737cbef6d231f84b78575d2cb543caba350a1fcaa104589c86cf2e890c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.snapshot.json deleted file mode 100644 index 882ff3a0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd" - }, - "length": 3831, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db" - }, - "length": 1670, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "1d473b59dec8a119fb8bc1e5b33c3b0896f62598d0b560cc7a98f501bdc9436fb2399219f8d0301081fe9db22f6734bd1b865a3b9040c3a5357e67d0dc89880f" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "1d473b59dec8a119fb8bc1e5b33c3b0896f62598d0b560cc7a98f501bdc9436fb2399219f8d0301081fe9db22f6734bd1b865a3b9040c3a5357e67d0dc89880f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.targets.json deleted file mode 100644 index 7dc90947..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/5.targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - } - }, - "version": 5 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json deleted file mode 120000 index fcb3707a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json deleted file mode 120000 index 21e403ff..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json deleted file mode 120000 index 37511d05..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json deleted file mode 120000 index 29e8425a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json deleted file mode 100644 index a9f853e4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "1d3e90aac8b4fad8846d3ae59ed9069ba335310bd14259a6ca6a905499a9b166761c3c737cbef6d231f84b78575d2cb543caba350a1fcaa104589c86cf2e890c" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "1d3e90aac8b4fad8846d3ae59ed9069ba335310bd14259a6ca6a905499a9b166761c3c737cbef6d231f84b78575d2cb543caba350a1fcaa104589c86cf2e890c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json deleted file mode 120000 index 26fca709..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json deleted file mode 120000 index b978f58f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json deleted file mode 120000 index c4206729..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json deleted file mode 100644 index 7dc90947..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - } - }, - "version": 5 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json deleted file mode 100644 index 882ff3a0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd" - }, - "length": 3831, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db" - }, - "length": 1670, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "1d473b59dec8a119fb8bc1e5b33c3b0896f62598d0b560cc7a98f501bdc9436fb2399219f8d0301081fe9db22f6734bd1b865a3b9040c3a5357e67d0dc89880f" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "1d473b59dec8a119fb8bc1e5b33c3b0896f62598d0b560cc7a98f501bdc9436fb2399219f8d0301081fe9db22f6734bd1b865a3b9040c3a5357e67d0dc89880f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/root.json deleted file mode 100644 index a9f853e4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/root.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - }, - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "method": "ed25519", - "sig": "1d3e90aac8b4fad8846d3ae59ed9069ba335310bd14259a6ca6a905499a9b166761c3c737cbef6d231f84b78575d2cb543caba350a1fcaa104589c86cf2e890c" - }, - { - "keyid": "a67ca94ed559c97db79999d32b79ca35b5ae1795d2f6be3eafa3bd5816a8f2c4", - "method": "ed25519", - "sig": "1d3e90aac8b4fad8846d3ae59ed9069ba335310bd14259a6ca6a905499a9b166761c3c737cbef6d231f84b78575d2cb543caba350a1fcaa104589c86cf2e890c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/snapshot.json deleted file mode 100644 index 882ff3a0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd" - }, - "length": 3831, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db" - }, - "length": 1670, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "1d473b59dec8a119fb8bc1e5b33c3b0896f62598d0b560cc7a98f501bdc9436fb2399219f8d0301081fe9db22f6734bd1b865a3b9040c3a5357e67d0dc89880f" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "1d473b59dec8a119fb8bc1e5b33c3b0896f62598d0b560cc7a98f501bdc9436fb2399219f8d0301081fe9db22f6734bd1b865a3b9040c3a5357e67d0dc89880f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets.json deleted file mode 100644 index 7dc90947..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - } - }, - "version": 5 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.0 deleted file mode 120000 index 7561d7e3..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.0 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/0.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.1 deleted file mode 120000 index ef5bca2c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.1 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/0.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.2 deleted file mode 120000 index 26212c83..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.2 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/0.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.3 deleted file mode 120000 index 6a0a9626..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.3 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/0.3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.4 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.4 deleted file mode 100644 index bf0d87ab..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/0.4 +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index 8bca78fb..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 120000 index 814339fc..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index dc5c46dc..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 16b79678..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 deleted file mode 100644 index bf0d87ab..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/timestamp.json deleted file mode 100644 index 142621e1..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/4/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c" - }, - "length": 1126, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - }, - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "method": "ed25519", - "sig": "82aa747d16c493b0b92c32de5832bf447d2f2348970f066598835d11efba303bc9685e3436200a88778d78a50111df81639d206c5e09b491989bec461a98550b" - }, - { - "keyid": "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d", - "method": "ed25519", - "sig": "82aa747d16c493b0b92c32de5832bf447d2f2348970f066598835d11efba303bc9685e3436200a88778d78a50111df81639d206c5e09b491989bec461a98550b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.root.json deleted file mode 120000 index fb796e32..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.snapshot.json deleted file mode 120000 index f7fb0982..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.targets.json deleted file mode 120000 index 127f6097..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json deleted file mode 120000 index d1949f9d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/118c2a2b6b9f7bc667dca8404a2671910a22b6fe48e460816a9f6f2be66f7806a789c9dc4880d2c2812c0bc7607caac30cc0a8299183fd7228e1049f6920ce22.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json deleted file mode 120000 index 8106e599..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/148c273a895a85127bb254edd19da2190176272446cd0f43220aba2b0f72fe954a2eab52c38daf67b1c3cbe877848d01266d8a1af3e858c8d004682a3393f3a7.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json deleted file mode 120000 index 1c73279d..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/15c2c14fb300cecb52c9ef9a88545759028ec5d7e0f028269ba828c2199e3f0e56f963bdcfd0897c51ebb95ee2452666ec7f65bae688b48db1b8aa8de944e432.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.root.json deleted file mode 120000 index 5a3e4546..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.snapshot.json deleted file mode 120000 index 5b418d6a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.targets.json deleted file mode 120000 index 04b0be44..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json deleted file mode 120000 index 237b697b..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/23170400c30b4bbcd375c88ae22104241e377006e9c40c64ed49aef9ad2bdfa49ba2832ccb9c3776aaee336195de73cda28b5ba65fb468f7a5e60b870cbe26e9.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.root.json deleted file mode 120000 index d1cb2513..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.snapshot.json deleted file mode 120000 index d23c05ca..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.targets.json deleted file mode 120000 index 2854154a..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json deleted file mode 120000 index aad4346e..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/33b282c1970996734deff944f2862f84b196f0b2b67dfa7383f75f95ef3e8673602aa411e05572075729ead6caa35df6720ce5723fd67c63d4aaa81dd966c5a4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.root.json deleted file mode 120000 index bda6d089..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.snapshot.json deleted file mode 120000 index b7aefb24..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.targets.json deleted file mode 120000 index fef64e45..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.root.json deleted file mode 120000 index f99552a4..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.snapshot.json deleted file mode 120000 index 4e98537c..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.targets.json deleted file mode 120000 index f8771442..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/5.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json deleted file mode 120000 index 102fb8f3..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/590c7d2df37495eae436e25eea548eb48294ef63aaeebe51b1bc1056c149fd54710c67d231c19c14708824aa7095e0028b6691fcf21c1edfcc7a88a48d4b7b94.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.snapshot.json deleted file mode 100644 index 15ab63b9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd" - }, - "length": 3831, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262" - }, - "length": 1871, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "61f3a52657285ee76cac838dcf7bd605c8b895dadd7877f5ef3aaa8b22ec0e952fa44c9d9145d5740e56568d5c772c4ca46f96458c813d24c61596cfddff350b" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "61f3a52657285ee76cac838dcf7bd605c8b895dadd7877f5ef3aaa8b22ec0e952fa44c9d9145d5740e56568d5c772c4ca46f96458c813d24c61596cfddff350b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.targets.json deleted file mode 100644 index 3f07d3d1..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6.targets.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - }, - "5": { - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - }, - "length": 1 - } - }, - "version": 6 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/63c16cc2225e77b7c94ec3b143271e02d97a1bfba828e11820392b9108412ef22f09732694673331f386b6f8a281103e20d07c21db78f487e1b046d9968173c8.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/63c16cc2225e77b7c94ec3b143271e02d97a1bfba828e11820392b9108412ef22f09732694673331f386b6f8a281103e20d07c21db78f487e1b046d9968173c8.snapshot.json deleted file mode 100644 index 15ab63b9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/63c16cc2225e77b7c94ec3b143271e02d97a1bfba828e11820392b9108412ef22f09732694673331f386b6f8a281103e20d07c21db78f487e1b046d9968173c8.snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd" - }, - "length": 3831, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262" - }, - "length": 1871, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "61f3a52657285ee76cac838dcf7bd605c8b895dadd7877f5ef3aaa8b22ec0e952fa44c9d9145d5740e56568d5c772c4ca46f96458c813d24c61596cfddff350b" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "61f3a52657285ee76cac838dcf7bd605c8b895dadd7877f5ef3aaa8b22ec0e952fa44c9d9145d5740e56568d5c772c4ca46f96458c813d24c61596cfddff350b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json deleted file mode 120000 index 18eed32f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/6ecff211b4df20d84e5a99a1145b7f96752efe880147439a3a8c2ecc080762f84b5b784da1b41d2ccb1492d112c521b4b82973589285dfbcfbb6c423c559ff4e.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json deleted file mode 120000 index 9bad4bde..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/765d0de07adc4de8aa6060a9c579c70938f0a6e998d76ad75363945fdb998b8019d4d42a00642141ac8a86346098dfb40bc7be32d684077be5aae06495f57cfa.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json deleted file mode 120000 index eed61239..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/7c7a5e381e1e8c3f10bc4ab1c1d33f6460f741a5c0bbeb8be4f206de58e9ce67964bef7cef0738d22d5c55238d2062a2a9a72c99f6df0c57a2bece6435a3e461.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json deleted file mode 120000 index 9e5a79b0..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262.targets.json deleted file mode 100644 index 3f07d3d1..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262.targets.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - }, - "5": { - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - }, - "length": 1 - } - }, - "version": 6 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json deleted file mode 120000 index 557a1575..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/93b38df5b9cb993dd7e2e16e9b8dd07386b35936f21c36b7527e1587052dce86f64b5eb5669fffe86b4aae4c581a2bbba6e49d780d8687dd6c304fae9b6fe098.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json deleted file mode 120000 index 60975e48..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/bdcbdfe0a1ecaaf9c0c5dc9728bc2eebb1c931b17e57676bd251f8b05640826dcf923ed854c235247329e7068c0d01ad6920b4454a976feb0c9f29b64e338ee4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json deleted file mode 120000 index abbc6bdd..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/bf4f7f4a062fd3780055d98572619db84d6d6c9b9b647bf6bca1190e984963ffb86189fb455110f4c13956ce9cbe72d95d03c5e6d72295414ac6bbcc3d1957c3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json deleted file mode 120000 index b786bfab..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/c86fd75fe946b88488ece0fa399857a75f3cc80bd85bc71f3fcc030ad6201c559370cbc67a8a547f1964355911fc0ef8000dd8e9f0ff84a3cc8e45cbd42ec7db.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json deleted file mode 120000 index ef1e4439..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/dce60b87bbc2b98c1e4cc86cc5798d381561600934b0da7d044ed72511dafefc5e4e640a76e59ea96f6c9edf1a002974180e1562b0496127fcb44ca6b08c294c.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/root.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/root.json deleted file mode 120000 index 3d140581..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/snapshot.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/snapshot.json deleted file mode 100644 index 15ab63b9..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/snapshot.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "8aae80ec8056a31ca28304ed0b0b35f0dacb11c5d6684cc7200086ff237fec23dc1e3fc2b43afb968d780c8053bd4081f4ae7ca71a066894042b1d24983fc0fd" - }, - "length": 3831, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "8ec9b98766edfe6acc23bb700183532a990b966ceb7b62784f6c80d4b1bfe5661df3cc2765b57bd0e78eb4b5c2b136f5ab7a365665c6e918d4137b83cb7e2262" - }, - "length": 1871, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - }, - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "method": "ed25519", - "sig": "61f3a52657285ee76cac838dcf7bd605c8b895dadd7877f5ef3aaa8b22ec0e952fa44c9d9145d5740e56568d5c772c4ca46f96458c813d24c61596cfddff350b" - }, - { - "keyid": "ad7c98dfb3b99024f8b49e33f3d92e66537f0abab78a84f1e4b667dfbf52bf60", - "method": "ed25519", - "sig": "61f3a52657285ee76cac838dcf7bd605c8b895dadd7877f5ef3aaa8b22ec0e952fa44c9d9145d5740e56568d5c772c4ca46f96458c813d24c61596cfddff350b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets.json deleted file mode 100644 index 3f07d3d1..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - }, - "5": { - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - }, - "length": 1 - } - }, - "version": 6 - }, - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - }, - { - "keyid": "0efcc6a8d07a1cb5955fb698b8ea57e903b6924854f5a025c90f16c9a52b2700", - "method": "ed25519", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.0 deleted file mode 120000 index 28473bd3..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.0 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.1 deleted file mode 120000 index e371cbf8..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.1 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.2 deleted file mode 120000 index 4819cabf..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.2 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.3 deleted file mode 120000 index 86d22912..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.3 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0.3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.4 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.4 deleted file mode 120000 index 8ad49cb7..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.4 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0.4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.5 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.5 deleted file mode 100644 index 7813681f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/0.5 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 deleted file mode 100644 index 7813681f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index c70b61bd..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 120000 index 1e66cb1b..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index a02a2316..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 74d1328f..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 deleted file mode 120000 index 73a65ad2..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/timestamp.json b/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/timestamp.json deleted file mode 100644 index fb031588..00000000 --- a/client/testdata/go-tuf-transition-M3/consistent-snapshot-true/5/repository/timestamp.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "63c16cc2225e77b7c94ec3b143271e02d97a1bfba828e11820392b9108412ef22f09732694673331f386b6f8a281103e20d07c21db78f487e1b046d9968173c8" - }, - "length": 1126, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - }, - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "method": "ed25519", - "sig": "93de7e13e6ad7b03be3c299169aba2cf1fed7a6bac8b3059ca858e4a709063b6a0237b78614e9101c9beed0d9f470bfcd77644108246688d75cf58b243ea1f0c" - }, - { - "keyid": "e23c19fb64db7146965700b9983df63d2dd4362b1f99d74da2383234da4ab20d", - "method": "ed25519", - "sig": "93de7e13e6ad7b03be3c299169aba2cf1fed7a6bac8b3059ca858e4a709063b6a0237b78614e9101c9beed0d9f470bfcd77644108246688d75cf58b243ea1f0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M3/generate.go b/client/testdata/go-tuf-transition-M3/generate.go deleted file mode 100644 index 2a9d20f3..00000000 --- a/client/testdata/go-tuf-transition-M3/generate.go +++ /dev/null @@ -1,150 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "log" - "os" - "os/exec" - "path/filepath" - "time" - - tuf "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -var expirationDate = time.Date(2100, time.January, 1, 0, 0, 0, 0, time.UTC) - -type persistedKeys struct { - Encrypted bool `json:"encrypted"` - Data []*data.PrivateKey `json:"data"` -} - -func assertNoError(err error) { - if err != nil { - panic(fmt.Sprintf("assertion failed: %s", err)) - } -} - -func copyRepo(src string, dst string) { - cmd := exec.Command("cp", "-r", src, dst) - assertNoError(cmd.Run()) -} - -func newRepo(dir string) *tuf.Repo { - repo, err := tuf.NewRepoIndent(tuf.FileSystemStore(dir, nil), "", "\t") - assertNoError(err) - - return repo -} - -func commit(dir string, repo *tuf.Repo) { - assertNoError(repo.SnapshotWithExpires(expirationDate)) - assertNoError(repo.TimestampWithExpires(expirationDate)) - assertNoError(repo.Commit()) - - // Remove the keys directory to make sure we don't accidentally use a key. - assertNoError(os.RemoveAll(filepath.Join(dir, "keys"))) -} - -func addKeys(repo *tuf.Repo, roleKeys map[string][]*data.PrivateKey) { - for role, keyList := range roleKeys { - for _, key := range keyList { - signer, err := keys.GetSigner(key) - assertNoError(err) - assertNoError(repo.AddPrivateKeyWithExpires(role, signer, expirationDate)) - } - } -} - -func addTargets(repo *tuf.Repo, dir string, files map[string][]byte) { - paths := []string{} - for file, data := range files { - path := filepath.Join(dir, "staged", "targets", file) - assertNoError(os.MkdirAll(filepath.Dir(path), 0755)) - assertNoError(os.WriteFile(path, data, 0644)) - paths = append(paths, file) - } - assertNoError(repo.AddTargetsWithExpires(paths, nil, expirationDate)) -} - -func revokeKeys(repo *tuf.Repo, role string, keyList []*data.PrivateKey) { - for _, key := range keyList { - signer, err := keys.GetSigner(key) - assertNoError(err) - assertNoError(repo.RevokeKeyWithExpires(role, signer.PublicData().IDs()[0], expirationDate)) - } -} - -func generateRepos(dir string, consistentSnapshot bool) { - f, err := os.Open("../keys.json") - assertNoError(err) - - var roleKeys map[string][][]*data.PrivateKey - assertNoError(json.NewDecoder(f).Decode(&roleKeys)) - - // Collect all the initial keys we'll use when creating repositories. - // We'll modify this to reflect rotated keys. - keys := map[string][]*data.PrivateKey{ - "root": roleKeys["root"][0], - "targets": roleKeys["targets"][0], - "snapshot": roleKeys["snapshot"][0], - "timestamp": roleKeys["timestamp"][0], - } - - // Create the initial repo. - dir0 := filepath.Join(dir, "0") - repo0 := newRepo(dir0) - repo0.Init(consistentSnapshot) - addKeys(repo0, keys) - addTargets(repo0, dir0, map[string][]byte{"0": []byte("0")}) - commit(dir0, repo0) - - // Rotate all the keys to make sure that works. - oldDir := dir0 - i := 1 - for _, role := range []string{"root", "targets", "snapshot", "timestamp"} { - // Setup the repo. - stepName := fmt.Sprintf("%d", i) - d := filepath.Join(dir, stepName) - copyRepo(oldDir, d) - repo := newRepo(d) - addKeys(repo, keys) - - // Actually rotate the keys - revokeKeys(repo, role, roleKeys[role][0]) - addKeys(repo, map[string][]*data.PrivateKey{ - role: roleKeys[role][1], - }) - keys[role] = roleKeys[role][1] - - // Add a target to make sure that works, then commit. - addTargets(repo, d, map[string][]byte{stepName: []byte(stepName)}) - commit(d, repo) - - i += 1 - oldDir = d - } - - // Add another target file to make sure the workflow worked. - stepName := fmt.Sprintf("%d", i) - d := filepath.Join(dir, stepName) - copyRepo(oldDir, d) - repo := newRepo(d) - addKeys(repo, keys) - addTargets(repo, d, map[string][]byte{stepName: []byte(stepName)}) - commit(d, repo) -} - -func main() { - cwd, err := os.Getwd() - assertNoError(err) - - for _, consistentSnapshot := range []bool{false, true} { - name := fmt.Sprintf("consistent-snapshot-%t", consistentSnapshot) - log.Printf("generating %s", name) - generateRepos(filepath.Join(cwd, name), consistentSnapshot) - } - -} diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/1.root.json deleted file mode 100644 index f02c25bd..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/1.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "4d84952574a5ef31fa9f8d97a3159305b8b99c011b27327e969d88f8f88a5d56ef4a3d03b19134d0f8a1627de8d03b11847ffb7ed0e15c2fad0d8cfd5a57ae0f" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/root.json deleted file mode 100644 index f02c25bd..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "4d84952574a5ef31fa9f8d97a3159305b8b99c011b27327e969d88f8f88a5d56ef4a3d03b19134d0f8a1627de8d03b11847ffb7ed0e15c2fad0d8cfd5a57ae0f" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/snapshot.json deleted file mode 100644 index a846dde6..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "0c2eb81db397d04faed82a5b75c4e5980d3fb2dafb13ff6892a7bdc131a6d698fe635ee369a016a4a8e47964a77f56f834cc432853d76feccc70e3fbb9dcc70a" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "d2a63252478ef0e4baef238f277261b469dac193d731c618194d37492dcd57eb391563fe065c2df054628dc28ae9896f20670a41b1264507a739ff36dab85d9f" - }, - "length": 2118, - "version": 1 - }, - "targets.json": { - "hashes": { - "sha512": "257ae8c4653e9ecd1580d0f95ece3cbd03d67ace62e670c0493cde2afde96670a1620fcdf4a2e81ecbf8a67c7b0af9e03e6f9c5c8195d4b1940f7e0e61cc04c8" - }, - "length": 588, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets.json deleted file mode 100644 index 7e9ac2d8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets/0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets/0 deleted file mode 100644 index c2270834..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/timestamp.json deleted file mode 100644 index f03cdb6a..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/0/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "cff803896a6af526281ad8ae7e3c3039bd850a4f56afc23e50564b9259719d2dd9e2f7956bf89f04d405a6f2c836db0ae98fa21846921bba39ed43adbf728c0e" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "9f96c109f0d6a53fa01567d1577fdbc02a34c4a755cba6cfb2e3dd9f6c87596755b9285317c6640a139abad25dcbac22da79208f37ecffd17c67fb87fc89ce1c" - }, - "length": 847, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/1.root.json deleted file mode 120000 index 0ffd2b6d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/2.root.json deleted file mode 100644 index 7c2571f3..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "2c7952346c8f899b15f33048bfc22db078a2ee5df5ae4dfc1c7e4eb303ee5dd99b6957d8bddd39ddddbc2e49b0abd76e27c0b0439984ae36e23db5bafb51d104" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "a9ae363c57c79235e0fb646f364a747e88d61a25eef9e92e44f13f6849bb62ee1a91db6ba021cbef330e9a5b3e2131a45b5922bbd1a30596a11973743aedc404" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/root.json deleted file mode 100644 index 7c2571f3..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "2c7952346c8f899b15f33048bfc22db078a2ee5df5ae4dfc1c7e4eb303ee5dd99b6957d8bddd39ddddbc2e49b0abd76e27c0b0439984ae36e23db5bafb51d104" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "a9ae363c57c79235e0fb646f364a747e88d61a25eef9e92e44f13f6849bb62ee1a91db6ba021cbef330e9a5b3e2131a45b5922bbd1a30596a11973743aedc404" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/snapshot.json deleted file mode 100644 index aee62e66..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "3b170ced5f99155d617d933721eb8b1bc37d53bacd13787495f5b65f8e217898b0432391ddc76ddf350d367a590f39c44ef89350c67119d7c3cf869375da6004" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "fac18f6f1804305c960c48700111947a77b6249659a43ebc1caffb701784a16a3967bb640b7ad612235f6b5078b9c9f178b0cb5acaf9d2a49cabd4bd8ec418de" - }, - "length": 2348, - "version": 2 - }, - "targets.json": { - "hashes": { - "sha512": "0fa0d9f7f64ffaf2a52bda808851c71ae87c7c47aaec4ce2ba28c19123a0d4394156dce76012a5253c1c02ccdf88843cdb980042eab746e1a93ce2541f89d91c" - }, - "length": 789, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets.json deleted file mode 100644 index eb115384..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - } - }, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/0 deleted file mode 120000 index aced6879..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../0/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/1 deleted file mode 100644 index 56a6051c..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/timestamp.json deleted file mode 100644 index e3596528..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/1/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "df50c702b51dec901cd5d6f548b4c551ab578aaf8e791d7d3fc85697f291e6102c64e9d758fb4291d09dd28bcfd442cdb7598167821b7b50247b4af3f763780c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "c150afd2864d6b6f0f14e4549c592418abf4b390ca6c88f0a50c4e615f54cc449cd9cf9dfbc227bea900fd3007921fb64ff6fd30bf5cfa2877682af66368a2f6" - }, - "length": 847, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/1.root.json deleted file mode 120000 index cd730513..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/2.root.json deleted file mode 120000 index bbdcb128..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/3.root.json deleted file mode 100644 index 923eafc4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/3.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "ea2529b895eeabd2aaf00c06d5789fc3152aab134d8f1265954304c89f4a6eeca4e7f0be6620c8fce14caf4c447b8c472483438d74273d2a50ea86f5de59aa06" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/root.json deleted file mode 100644 index 923eafc4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "ea2529b895eeabd2aaf00c06d5789fc3152aab134d8f1265954304c89f4a6eeca4e7f0be6620c8fce14caf4c447b8c472483438d74273d2a50ea86f5de59aa06" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/snapshot.json deleted file mode 100644 index f68be591..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "e4a00bb62fb3c1efd1b949050d952d89023461ab6db280f2b5233bafd8b672abfc23b22453eb1becb5d850eb70c7e201ee6780555fabd5f6c4d68b69c82f1406" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "cd1af4dae35649774a2090ea0471ccaf677dddd080973807faa37c0744649f316052603c43032fc308c85c60379bf5067201957622061ad91acd942a1b55b274" - }, - "length": 2118, - "version": 3 - }, - "targets.json": { - "hashes": { - "sha512": "33835f152dcc9ab1396e0f44dff841eca2c747dfd8cccc079dd0f4a88e7920f29cfaa3d895618c39463bed3997d6ba83c7791749483f2df8f3589fff3f4c379d" - }, - "length": 990, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets.json deleted file mode 100644 index 6c7e9196..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - } - }, - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/0 deleted file mode 120000 index 2ac1d8be..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/1 deleted file mode 120000 index 8e78bc37..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/2 deleted file mode 100644 index d8263ee9..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/timestamp.json deleted file mode 100644 index 55ef71fa..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/2/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "3c11c4fea59b6433d678dfa7e6405182d7337f66bfcbe74c82602c689f2bfcca8cb5663ddf8d325fcc3e434c50bea08777e07d34ff439264f1e7cb688921ef00" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "0ab33430ecbe903acaafa3158ad1bfe2cfc22968b5966a6816c16d16a72bfa5da09426d98b547fc5c8784a6502972977c331956ed84c525f1e85fb385a36fb58" - }, - "length": 847, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/1.root.json deleted file mode 120000 index fb4fe81b..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/2.root.json deleted file mode 120000 index 55f8b9d4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/3.root.json deleted file mode 120000 index b4564b7f..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/4.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/4.root.json deleted file mode 100644 index c71e3b75..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/4.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "ec7e22d27d5b5c43d350ae7b6345fd0acc37b7106063081f637f49fe09cc8f4c6db664f2198d53f930dc061c1ab25d1b015336a12085ee582e823eaf309b1202" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/root.json deleted file mode 100644 index c71e3b75..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "ec7e22d27d5b5c43d350ae7b6345fd0acc37b7106063081f637f49fe09cc8f4c6db664f2198d53f930dc061c1ab25d1b015336a12085ee582e823eaf309b1202" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/snapshot.json deleted file mode 100644 index e67fb808..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "fb791108edb246566da93f43af287fc8bb7ac03d6a7c615b4c14622a95a9f029fe1b1ad97c14554bc5fa681d39df2b67858a3b63e5d49578c87f1a1a134bdb0e" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "52f836fc2bdeec872c621b84a87a1ab9e2d46763d640bbb775f862306b060ba51370ff838b9589a732f86938509c3a55731d2e3e6f1601d14c42c47efe990ddc" - }, - "length": 2118, - "version": 4 - }, - "targets.json": { - "hashes": { - "sha512": "518518c1f03d874f9832390dea5bc12ab0061400bd0b3b8b44e4a353087d802accde1ec3dc94e0be4931f572960a0192bd84e667c02e6ac99d0a3bf28f5f9802" - }, - "length": 1191, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets.json deleted file mode 100644 index 4ed9d72e..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - } - }, - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/0 deleted file mode 120000 index 2e6dba05..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/1 deleted file mode 120000 index 14fee5d8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/2 deleted file mode 120000 index dcd19e04..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/3 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/3 deleted file mode 100644 index e440e5c8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/timestamp.json deleted file mode 100644 index d6a3549d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/3/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "f93295631c148c1f4949c44cb07e1daca4b0cf587e5d3b999740b3e012e0dd2780803b3aec44c9fa1f27d0f5fa28136073331c41d81de5e4b82a7d7df5591509" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "6455d62f5676402784607019dbb9a23ab31ee61b47a67a4fcd2a69bf3a3b5ec60b602b42112626f17ef2ec0177c4392e61d587637c06f636831ff63c3317827d" - }, - "length": 848, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/1.root.json deleted file mode 120000 index 741d2189..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/2.root.json deleted file mode 120000 index fb9b350d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/3.root.json deleted file mode 120000 index 65e6c5b4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/4.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/4.root.json deleted file mode 120000 index c3662ce8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/5.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/5.root.json deleted file mode 100644 index d112eae2..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/5.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "fc0f92883c9c89135505c1ae59ec11bf4bbd82ead0dca1d719eda4251345830514f0bd1b264d36d26b971ab58d7ee3f10110190cadee753b24fc98eaa61d2004" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/root.json deleted file mode 100644 index d112eae2..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "fc0f92883c9c89135505c1ae59ec11bf4bbd82ead0dca1d719eda4251345830514f0bd1b264d36d26b971ab58d7ee3f10110190cadee753b24fc98eaa61d2004" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/snapshot.json deleted file mode 100644 index 94ed0e99..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "074a04f426d423f2675b58c8db38814bfe1bded4717c6c748ff2484cbc94fe2b67cb166cfe4550908565759018427042ebc59fc95005c105d12c1c0c1d779808" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "6393ac77695995ad751bf33c885882088a4f5c3b1c58ed75433007a5c79aef45aeea10881094686254198e12fc78be781f777947f23ed5bef0bdb157ef55e74d" - }, - "length": 2118, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "25ba8ef109680040b2e28dde51389397c51f4ba12acb1ea1b70dfc7e1bc5eceec71b1cbfb4747c47af8d9cdf76baa53ab5b2403eef226be1ae7a8d7794474ebf" - }, - "length": 1392, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets.json deleted file mode 100644 index 163e9e86..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - } - }, - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/0 deleted file mode 120000 index efe18e41..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/1 deleted file mode 120000 index b4a40c47..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/2 deleted file mode 120000 index 1c681715..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/3 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/3 deleted file mode 120000 index 1dc4d27e..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/4 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/4 deleted file mode 100644 index bf0d87ab..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/targets/4 +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/timestamp.json deleted file mode 100644 index f028ca8d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/4/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "sig": "5f5f3f30efa3531c4a8174283820a7c499b15c36f93e5f0e179b32be898e4a43810cc46e3bd06cda75b16237a258f909884ae3718189830f6e2991b5d4968b04" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "26e8fa7db5884e5b8c6868898d8ad2fa26d37da07255364b48d4e09560e83b25586767ee53e2c39eb372d6ef0db0c8d7ae72a50bfb0bdab57510439d5e3ceef8" - }, - "length": 848, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/1.root.json deleted file mode 120000 index fb796e32..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/2.root.json deleted file mode 120000 index 5a3e4546..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/3.root.json deleted file mode 120000 index d1cb2513..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/4.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/4.root.json deleted file mode 120000 index bda6d089..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/5.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/5.root.json deleted file mode 120000 index f99552a4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/5.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/root.json deleted file mode 120000 index 3d140581..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/snapshot.json deleted file mode 100644 index 4c3731e3..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "a44ce7ca76f178c41acf92e6cb6cacc5c4cd17e1e99cc0d7ba8fb37d11b468b8475ad2801adeef7a246947595f845545be420ee912bfcb7091708530fab3eb01" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "6393ac77695995ad751bf33c885882088a4f5c3b1c58ed75433007a5c79aef45aeea10881094686254198e12fc78be781f777947f23ed5bef0bdb157ef55e74d" - }, - "length": 2118, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "c57a6fd231341bea3adb36d5a9c07167ef26bf9b037470bef1dadfeb2cdafa73b39b30965e39175fa9be5426065073bbf859f149c366ae07ea2a0f6fb6730b00" - }, - "length": 1593, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets.json deleted file mode 100644 index c528a435..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - }, - "5": { - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - }, - "length": 1 - } - }, - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/0 deleted file mode 120000 index 94cc2872..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/1 deleted file mode 120000 index 51c7c9a9..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/2 deleted file mode 120000 index 46e3032e..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/3 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/3 deleted file mode 120000 index ca268e91..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/4 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/4 deleted file mode 120000 index 19339ad4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/4 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/5 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/5 deleted file mode 100644 index 7813681f..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/targets/5 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/timestamp.json deleted file mode 100644 index 4a6a11fc..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-false/5/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "sig": "5de52850930dc5e8e6c5c1d85d84e8d968f170904c958de30473f81f8293e7b48e27e9d2afa1592eb1d527a0937553ee5e2540f0255837d2f93c5af12d510f08" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "c0fb132da6b90f31ba8c1122388c13d37e4a553ff5b5fa0a65dcf19c53af41965a62b7f88526b4363b288005bfc286c4480fa6d8d63ba54a0ec491f14329b549" - }, - "length": 848, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.root.json deleted file mode 100644 index 53cd5460..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "971ed150895f0dc14d5a2cfb7d805131ba7d0152f315f1e8498f5a0119fa0254c4f4dd4cdbb6401e8d2e1649df1dd91ed56cf5623986a81135b5e94f40dbda08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.snapshot.json deleted file mode 100644 index 38848bd9..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "baefc778a9aaa93cfa86bd9d0f5b4d05c58c48e1abdff6d44f1c0b3ffac7c18989c357f78222f4decc52f0372251679ca074b3969e11991a424c6c2f3bda9709" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "c125be40b37191d913a727873ff99224f2641d665534211641c7bf8bc7813e3b9b90a80380d118c5815188f799ba8e43d3ccc7dcb2ea42563e7250ac7791c1db" - }, - "length": 2117, - "version": 1 - }, - "targets.json": { - "hashes": { - "sha512": "257ae8c4653e9ecd1580d0f95ece3cbd03d67ace62e670c0493cde2afde96670a1620fcdf4a2e81ecbf8a67c7b0af9e03e6f9c5c8195d4b1940f7e0e61cc04c8" - }, - "length": 588, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.targets.json deleted file mode 100644 index 7e9ac2d8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/1.targets.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/root.json deleted file mode 100644 index 53cd5460..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "971ed150895f0dc14d5a2cfb7d805131ba7d0152f315f1e8498f5a0119fa0254c4f4dd4cdbb6401e8d2e1649df1dd91ed56cf5623986a81135b5e94f40dbda08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/snapshot.json deleted file mode 100644 index 38848bd9..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "baefc778a9aaa93cfa86bd9d0f5b4d05c58c48e1abdff6d44f1c0b3ffac7c18989c357f78222f4decc52f0372251679ca074b3969e11991a424c6c2f3bda9709" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "c125be40b37191d913a727873ff99224f2641d665534211641c7bf8bc7813e3b9b90a80380d118c5815188f799ba8e43d3ccc7dcb2ea42563e7250ac7791c1db" - }, - "length": 2117, - "version": 1 - }, - "targets.json": { - "hashes": { - "sha512": "257ae8c4653e9ecd1580d0f95ece3cbd03d67ace62e670c0493cde2afde96670a1620fcdf4a2e81ecbf8a67c7b0af9e03e6f9c5c8195d4b1940f7e0e61cc04c8" - }, - "length": 588, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets.json deleted file mode 100644 index 7e9ac2d8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 100644 index c2270834..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/timestamp.json deleted file mode 100644 index 93fb20b3..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/0/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "d66dc8ec2ede5c442ec600c22c46a5e0661bfdaae9a24ace66fedafe6a8f7a8d20cbe8685d3e0947c5d84bc4e9fdd4f4a442477c1544316678eef537fcdd0e06" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "67b27e18e00391e67d5ce85d60cc8aaf862cff0d22e541d044c39373ed7d524969ab8a31a826722a94ee42ff1e81eedcefba379b2f02f0116b4c30c5285692f3" - }, - "length": 847, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.root.json deleted file mode 120000 index 0ffd2b6d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.snapshot.json deleted file mode 120000 index 840f843e..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.targets.json deleted file mode 120000 index 4d11148d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.root.json deleted file mode 100644 index b0d7ec38..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "953fe3874eeb876b137ff4449d6e3d49d61a0b9e7bd339a47f9df3bd19e197aeee1e6b2b89a0ed4425c66e551b396ec53ea73f46d772ca81e27a3daf917e130d" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "09cd32bfed745ebdd6c8f69c3dca6ac74ddaf0121098442414ef4cb141f4916b14cc2127223f9ffaec2a4e0bde03c04f33aba3c357f7f8c3544666bfe84ede02" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.snapshot.json deleted file mode 100644 index 592682f7..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "b0298a786de3c14313b5a8f5afe8bbab0a407699a91062b8ead172f3afc74fc27210a7a042978c7d42b4ae9874f4bb139628be8a7be5b57c7bacc9f5a4cec809" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "df686bed8fac62391d47356f6be52fe3316bf856a415a7a2102369289d23d274a739a1071f6095a712654e6b75296b726198e67604666d808c2e7caa3964f419" - }, - "length": 2347, - "version": 2 - }, - "targets.json": { - "hashes": { - "sha512": "0fa0d9f7f64ffaf2a52bda808851c71ae87c7c47aaec4ce2ba28c19123a0d4394156dce76012a5253c1c02ccdf88843cdb980042eab746e1a93ce2541f89d91c" - }, - "length": 789, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.targets.json deleted file mode 100644 index eb115384..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/2.targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - } - }, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/root.json deleted file mode 100644 index b0d7ec38..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "160f5ae5e7017bc783bbbe26c5419bbeeeb87f507b140ef474da0517d56549f7", - "sig": "953fe3874eeb876b137ff4449d6e3d49d61a0b9e7bd339a47f9df3bd19e197aeee1e6b2b89a0ed4425c66e551b396ec53ea73f46d772ca81e27a3daf917e130d" - }, - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "09cd32bfed745ebdd6c8f69c3dca6ac74ddaf0121098442414ef4cb141f4916b14cc2127223f9ffaec2a4e0bde03c04f33aba3c357f7f8c3544666bfe84ede02" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/snapshot.json deleted file mode 100644 index 592682f7..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "b0298a786de3c14313b5a8f5afe8bbab0a407699a91062b8ead172f3afc74fc27210a7a042978c7d42b4ae9874f4bb139628be8a7be5b57c7bacc9f5a4cec809" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "df686bed8fac62391d47356f6be52fe3316bf856a415a7a2102369289d23d274a739a1071f6095a712654e6b75296b726198e67604666d808c2e7caa3964f419" - }, - "length": 2347, - "version": 2 - }, - "targets.json": { - "hashes": { - "sha512": "0fa0d9f7f64ffaf2a52bda808851c71ae87c7c47aaec4ce2ba28c19123a0d4394156dce76012a5253c1c02ccdf88843cdb980042eab746e1a93ce2541f89d91c" - }, - "length": 789, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets.json deleted file mode 100644 index eb115384..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b1eb1d74c0e65524c85f96f9badf09a4d2ed1259fb427fc689fc2279ebb4d867", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - } - }, - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index b0c459f9..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 100644 index 56a6051c..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/timestamp.json deleted file mode 100644 index 96de50ec..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/1/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "d55dc9bd3e7a5a56cada46ca40858b7dd48fd994de1ea0067e20e9fc6401faf5d25b20ddc8f93a966d82d4f0eabf7ef03c3612dd01339bb7527a5271b1c41b07" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "41a2de22c5a4b972102e2c65b9f5024c384be52a03c345a36736c3bee79e30a7aa3853c4dfdc7dfc3d5ddb713258454f0ef9140ac52e832f3ca927030013ca8e" - }, - "length": 847, - "version": 2 - } - }, - "spec_version": "1.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.root.json deleted file mode 120000 index cd730513..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.snapshot.json deleted file mode 120000 index 1307f574..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.targets.json deleted file mode 120000 index 85e1ecc2..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.root.json deleted file mode 120000 index bbdcb128..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.snapshot.json deleted file mode 120000 index 24d10752..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.targets.json deleted file mode 120000 index f6a17494..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.root.json deleted file mode 100644 index 8ac5eb01..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "46ef3256d2df1f7259ec3044030cc6af71536aee4976b8858a46b0f0e98763679794546bcc21736231c0dac8cfbad936bdd18437d02a1c97e7ef347c16ddeb0c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.snapshot.json deleted file mode 100644 index 7363452d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "42974be1e70b41809ab6c5bfaaef53508c3c1184cd045ee38cd737b0c9debaddbc0244731cbd208ead966561ab1103bae40d26fa3236ac974cb589ad77019c0e" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "c113580e6b210d8cdaf93530870555cac34cd7a394a91ffd0462ed38326766f09c5712b1fb1c3ad53e7b2c24feac0180649b4fdcea7722e5c1ab05635709b4d4" - }, - "length": 2117, - "version": 3 - }, - "targets.json": { - "hashes": { - "sha512": "33835f152dcc9ab1396e0f44dff841eca2c747dfd8cccc079dd0f4a88e7920f29cfaa3d895618c39463bed3997d6ba83c7791749483f2df8f3589fff3f4c379d" - }, - "length": 990, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.targets.json deleted file mode 100644 index 6c7e9196..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/3.targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - } - }, - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/root.json deleted file mode 100644 index 8ac5eb01..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "46ef3256d2df1f7259ec3044030cc6af71536aee4976b8858a46b0f0e98763679794546bcc21736231c0dac8cfbad936bdd18437d02a1c97e7ef347c16ddeb0c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/snapshot.json deleted file mode 100644 index 7363452d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d792ff8cf3c5d9a8fe0fdfa585b25028fa9f49aa29c62a658140d4b98cc2c917", - "sig": "42974be1e70b41809ab6c5bfaaef53508c3c1184cd045ee38cd737b0c9debaddbc0244731cbd208ead966561ab1103bae40d26fa3236ac974cb589ad77019c0e" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "c113580e6b210d8cdaf93530870555cac34cd7a394a91ffd0462ed38326766f09c5712b1fb1c3ad53e7b2c24feac0180649b4fdcea7722e5c1ab05635709b4d4" - }, - "length": 2117, - "version": 3 - }, - "targets.json": { - "hashes": { - "sha512": "33835f152dcc9ab1396e0f44dff841eca2c747dfd8cccc079dd0f4a88e7920f29cfaa3d895618c39463bed3997d6ba83c7791749483f2df8f3589fff3f4c379d" - }, - "length": 990, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets.json deleted file mode 100644 index 6c7e9196..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - } - }, - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index de9aac3a..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 100644 index d8263ee9..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 2ebb2d33..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/timestamp.json deleted file mode 100644 index 81071466..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/2/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "6344ddf5432d68616adb91cb81ad5017d17d95c238f15e4a5fe291e145d19d30b4834917a233c4c897ede7ba2d61dd23cdb285134de2b09b84ab62e8fea0120a" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "78828a5b8f961563240c4037cb8c90778ec5b14c54fbd2fc4e3c9ace67c55061d23cb532713ce23bfa71c1699f33dba928046749c1a70b0bf83688df12850353" - }, - "length": 847, - "version": 3 - } - }, - "spec_version": "1.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.root.json deleted file mode 120000 index fb4fe81b..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.snapshot.json deleted file mode 120000 index 4dfb0d02..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.targets.json deleted file mode 120000 index 1eeb5642..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.root.json deleted file mode 120000 index 55f8b9d4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.snapshot.json deleted file mode 120000 index 65445cb4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.targets.json deleted file mode 120000 index 3600a0f4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.root.json deleted file mode 120000 index b4564b7f..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.snapshot.json deleted file mode 120000 index 7d86b95a..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.targets.json deleted file mode 120000 index d1df10e4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.root.json deleted file mode 100644 index a889f176..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "78594f8ff3160bfef32c85e58a795d8dc6831e4ec2596e6a93d17f2bcb183c3c2e2ec99a28cf9467ab9a947c5803f3c16703f9fada8b43f33ccd3c49bf8fe707" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.snapshot.json deleted file mode 100644 index dce624dd..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "c186db540040a5f552e34365f62a497164ffe1a657bfd30ff5d7fa9eec7f1cf0a4302f99a28233b64492d27bd5a85f7a6114a7dba875f087f7ea27d553d0a80e" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "1ab59b54e351d71820aff7a1a8c845e1d6820793ab542e798989bd28d2db80a05f1382dd4b403f387793be5bacbc179be429ee13e8ff5cb6a4b7d6e73b3e30bc" - }, - "length": 2117, - "version": 4 - }, - "targets.json": { - "hashes": { - "sha512": "518518c1f03d874f9832390dea5bc12ab0061400bd0b3b8b44e4a353087d802accde1ec3dc94e0be4931f572960a0192bd84e667c02e6ac99d0a3bf28f5f9802" - }, - "length": 1191, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.targets.json deleted file mode 100644 index 4ed9d72e..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/4.targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - } - }, - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/root.json deleted file mode 100644 index a889f176..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "78594f8ff3160bfef32c85e58a795d8dc6831e4ec2596e6a93d17f2bcb183c3c2e2ec99a28cf9467ab9a947c5803f3c16703f9fada8b43f33ccd3c49bf8fe707" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/snapshot.json deleted file mode 100644 index dce624dd..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "c186db540040a5f552e34365f62a497164ffe1a657bfd30ff5d7fa9eec7f1cf0a4302f99a28233b64492d27bd5a85f7a6114a7dba875f087f7ea27d553d0a80e" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "1ab59b54e351d71820aff7a1a8c845e1d6820793ab542e798989bd28d2db80a05f1382dd4b403f387793be5bacbc179be429ee13e8ff5cb6a4b7d6e73b3e30bc" - }, - "length": 2117, - "version": 4 - }, - "targets.json": { - "hashes": { - "sha512": "518518c1f03d874f9832390dea5bc12ab0061400bd0b3b8b44e4a353087d802accde1ec3dc94e0be4931f572960a0192bd84e667c02e6ac99d0a3bf28f5f9802" - }, - "length": 1191, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets.json deleted file mode 100644 index 4ed9d72e..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - } - }, - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index f8203976..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 100644 index e440e5c8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index 7cbcc2a6..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 180cdb4f..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/timestamp.json deleted file mode 100644 index 6df0aafd..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/3/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "b59406a55fbe2492022f2951dacd01fc7b400b7b41ec4028b8356161a5a71a33", - "sig": "d854e4d42a126ba8b7d643c5f8d721d9e3bef4e950a8c61f521148888dbda1f7f7ac6f665029a15d1c1e52787c3677611be4a1cb7251e93a3fbc0229f6e5a40f" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "9af21a02c5b066aea02f0216fc22cb66e40c95d0bcbd50d35f16e32636beb0ffd41f1547ec86e2d0640322953d3ffb8285bb495065898cd8b95faf54fd5a3309" - }, - "length": 848, - "version": 4 - } - }, - "spec_version": "1.0", - "version": 4 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.root.json deleted file mode 120000 index 741d2189..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.snapshot.json deleted file mode 120000 index f87f7ed7..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.targets.json deleted file mode 120000 index b0002ec9..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.root.json deleted file mode 120000 index fb9b350d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.snapshot.json deleted file mode 120000 index e96983b5..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.targets.json deleted file mode 120000 index dbb2a759..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.root.json deleted file mode 120000 index 65e6c5b4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.snapshot.json deleted file mode 120000 index f2fd5601..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.targets.json deleted file mode 120000 index ca61e77d..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.root.json deleted file mode 120000 index c3662ce8..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.snapshot.json deleted file mode 120000 index a2f839ac..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.targets.json deleted file mode 120000 index 9f7a7841..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.root.json deleted file mode 100644 index 4e4912d6..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "a8bf62746b62a58f80c81bdbbdc67d142f1db9e6681ac0e46bf7d33aeac527e86af8294a35fea4cfd6c750d4f1333287c201837b2b37fce7a440ea58bdb0d907" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.snapshot.json deleted file mode 100644 index e62aef93..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "6c6b90af042c63f79a7d8079a26bd58fdcb8d84c829fd62aa554b4e9df6d31dfb5a6efb7744b814f7536ace6196c2e0b2768794fa40abf85b49dcc661d0f9a06" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "7a60ff2c4e027e05c318e9a0dc891c46e9899994b50c2ac0dad0bd6f439c69a71486606adf309969f981de6b20630e27f0e529e020c41c638b9f0895ccbd797b" - }, - "length": 2117, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "25ba8ef109680040b2e28dde51389397c51f4ba12acb1ea1b70dfc7e1bc5eceec71b1cbfb4747c47af8d9cdf76baa53ab5b2403eef226be1ae7a8d7794474ebf" - }, - "length": 1392, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.targets.json deleted file mode 100644 index 163e9e86..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/5.targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - } - }, - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/root.json deleted file mode 100644 index 4e4912d6..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d", - "sig": "a8bf62746b62a58f80c81bdbbdc67d142f1db9e6681ac0e46bf7d33aeac527e86af8294a35fea4cfd6c750d4f1333287c201837b2b37fce7a440ea58bdb0d907" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - }, - "scheme": "ed25519" - }, - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - }, - "scheme": "ed25519" - }, - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - }, - "scheme": "ed25519" - }, - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f": { - "keyid_hash_algorithms": [ - "sha256" - ], - "keytype": "ed25519", - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "4c663b6d0b9f2c74a19b6791c1417c8d1916e2d84461be1a8148e4386c89582d" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/snapshot.json deleted file mode 100644 index e62aef93..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "6c6b90af042c63f79a7d8079a26bd58fdcb8d84c829fd62aa554b4e9df6d31dfb5a6efb7744b814f7536ace6196c2e0b2768794fa40abf85b49dcc661d0f9a06" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "7a60ff2c4e027e05c318e9a0dc891c46e9899994b50c2ac0dad0bd6f439c69a71486606adf309969f981de6b20630e27f0e529e020c41c638b9f0895ccbd797b" - }, - "length": 2117, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "25ba8ef109680040b2e28dde51389397c51f4ba12acb1ea1b70dfc7e1bc5eceec71b1cbfb4747c47af8d9cdf76baa53ab5b2403eef226be1ae7a8d7794474ebf" - }, - "length": 1392, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets.json deleted file mode 100644 index 163e9e86..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - } - }, - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index 8bca78fb..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 120000 index 814339fc..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index dc5c46dc..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 16b79678..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 deleted file mode 100644 index bf0d87ab..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/timestamp.json deleted file mode 100644 index 028d6314..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/4/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "sig": "6341fa975ecf98a7144a458ed4dc6a32b4d3bd0121fc0831679a582a9628cff71f8b13fe5b14f4fc8227f5ae8cfbc40998ed3ccfec84a91ee1e7ce6996678003" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "d1e96adc64da3b4d67016060b8ee9034e486e288595d51d5c24fcd037d4e756a6cff8a9e244da5de9b2bb6ab5bb7f3e7238ffebad0a1a3d50587d01c28f98c15" - }, - "length": 848, - "version": 5 - } - }, - "spec_version": "1.0", - "version": 5 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.root.json deleted file mode 120000 index fb796e32..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.snapshot.json deleted file mode 120000 index f7fb0982..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.targets.json deleted file mode 120000 index 127f6097..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.root.json deleted file mode 120000 index 5a3e4546..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.snapshot.json deleted file mode 120000 index 5b418d6a..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.targets.json deleted file mode 120000 index 04b0be44..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.root.json deleted file mode 120000 index d1cb2513..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.snapshot.json deleted file mode 120000 index d23c05ca..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.targets.json deleted file mode 120000 index 2854154a..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.root.json deleted file mode 120000 index bda6d089..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.snapshot.json deleted file mode 120000 index b7aefb24..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.targets.json deleted file mode 120000 index fef64e45..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.root.json deleted file mode 120000 index f99552a4..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.snapshot.json deleted file mode 120000 index 4e98537c..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.targets.json deleted file mode 120000 index f8771442..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/5.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.snapshot.json deleted file mode 100644 index 7c199965..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "0e8dc07c124c26108fea54bf637b8133a6b9ba9defee8820ed8ebade9ed1f9b178163e712329179d3fe681e734d7d2078b3714e69e5e9d2a72abad3611c9560e" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "7a60ff2c4e027e05c318e9a0dc891c46e9899994b50c2ac0dad0bd6f439c69a71486606adf309969f981de6b20630e27f0e529e020c41c638b9f0895ccbd797b" - }, - "length": 2117, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "c57a6fd231341bea3adb36d5a9c07167ef26bf9b037470bef1dadfeb2cdafa73b39b30965e39175fa9be5426065073bbf859f149c366ae07ea2a0f6fb6730b00" - }, - "length": 1593, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.targets.json deleted file mode 100644 index c528a435..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/6.targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - }, - "5": { - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - }, - "length": 1 - } - }, - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/root.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/root.json deleted file mode 120000 index 3d140581..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/root.json \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/snapshot.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/snapshot.json deleted file mode 100644 index 7c199965..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/snapshot.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "signatures": [ - { - "keyid": "bed15bf57ba4deb4e09667099d45d119504420983d16fd0927ebfb0c25184e7f", - "sig": "0e8dc07c124c26108fea54bf637b8133a6b9ba9defee8820ed8ebade9ed1f9b178163e712329179d3fe681e734d7d2078b3714e69e5e9d2a72abad3611c9560e" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "root.json": { - "hashes": { - "sha512": "7a60ff2c4e027e05c318e9a0dc891c46e9899994b50c2ac0dad0bd6f439c69a71486606adf309969f981de6b20630e27f0e529e020c41c638b9f0895ccbd797b" - }, - "length": 2117, - "version": 5 - }, - "targets.json": { - "hashes": { - "sha512": "c57a6fd231341bea3adb36d5a9c07167ef26bf9b037470bef1dadfeb2cdafa73b39b30965e39175fa9be5426065073bbf859f149c366ae07ea2a0f6fb6730b00" - }, - "length": 1593, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets.json deleted file mode 100644 index c528a435..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signatures": [ - { - "keyid": "a3eba2113e37b749b908101bdb7b856a44f2853641830c0f939730aca3e30360", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ], - "signed": { - "_type": "targets", - "expires": "2100-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "0": { - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - }, - "length": 1 - }, - "1": { - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - }, - "length": 1 - }, - "2": { - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - }, - "length": 1 - }, - "3": { - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - }, - "length": 1 - }, - "4": { - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - }, - "length": 1 - }, - "5": { - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - }, - "length": 1 - } - }, - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 deleted file mode 100644 index 7813681f..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index c70b61bd..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 120000 index 1e66cb1b..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index a02a2316..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 74d1328f..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 deleted file mode 120000 index 73a65ad2..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/timestamp.json b/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/timestamp.json deleted file mode 100644 index 85dd0d68..00000000 --- a/client/testdata/go-tuf-transition-M4/consistent-snapshot-true/5/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "79b5760e4c96b6becc12bec4260c9c1d533b9b70628ade2b229ef02b772b10b0", - "sig": "c928d7bd646cf71f1bc97efef782e5eccb7c88ebe0187708735a39f68dddd4e233702f72ba79a94f27cdb3cab3f568bc3c89598191d2f2dc6cfb968a0906c40d" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha512": "afa8cb95af9715cbf1ef4cf0497daec22e43c96012fd0e34de928c3adef7b4c9e71f10188ffa6d83c06d81c9182421acb03d20bcd7cc32df9b051bf37a728e89" - }, - "length": 848, - "version": 6 - } - }, - "spec_version": "1.0", - "version": 6 - } -} \ No newline at end of file diff --git a/client/testdata/go-tuf-transition-M4/generate.go b/client/testdata/go-tuf-transition-M4/generate.go deleted file mode 100644 index 6dc567c4..00000000 --- a/client/testdata/go-tuf-transition-M4/generate.go +++ /dev/null @@ -1,148 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "log" - "os" - "os/exec" - "path/filepath" - "time" - - tuf "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -var expirationDate = time.Date(2100, time.January, 1, 0, 0, 0, 0, time.UTC) - -type persistedKeys struct { - Encrypted bool `json:"encrypted"` - Data []*data.PrivateKey `json:"data"` -} - -func assertNoError(err error) { - if err != nil { - panic(fmt.Sprintf("assertion failed: %s", err)) - } -} - -func copyRepo(src string, dst string) { - cmd := exec.Command("cp", "-r", src, dst) - assertNoError(cmd.Run()) -} - -func newRepo(dir string) *tuf.Repo { - repo, err := tuf.NewRepoIndent(tuf.FileSystemStore(dir, nil), "", "\t") - assertNoError(err) - - return repo -} - -func commit(dir string, repo *tuf.Repo) { - assertNoError(repo.SnapshotWithExpires(expirationDate)) - assertNoError(repo.TimestampWithExpires(expirationDate)) - assertNoError(repo.Commit()) - - // Remove the keys directory to make sure we don't accidentally use a key. - assertNoError(os.RemoveAll(filepath.Join(dir, "keys"))) -} - -func addKeys(repo *tuf.Repo, roleKeys map[string][]*data.PrivateKey) { - for role, keys := range roleKeys { - for _, key := range keys { - assertNoError(repo.AddPrivateKeyWithExpires(role, key, expirationDate)) - } - } -} - -func addTargets(repo *tuf.Repo, dir string, files map[string][]byte) { - paths := []string{} - for file, data := range files { - path := filepath.Join(dir, "staged", "targets", file) - assertNoError(os.MkdirAll(filepath.Dir(path), 0755)) - assertNoError(os.WriteFile(path, data, 0644)) - paths = append(paths, file) - } - assertNoError(repo.AddTargetsWithExpires(paths, nil, expirationDate)) -} - -func revokeKeys(repo *tuf.Repo, role string, keyList []*data.PrivateKey) { - for _, key := range keyList { - signer, err := keys.GetSigner(key) - assertNoError(err) - assertNoError(repo.RevokeKeyWithExpires(role, signer.PublicData().IDs()[0], expirationDate)) - } -} - -func generateRepos(dir string, consistentSnapshot bool) { - f, err := os.Open("../keys.json") - assertNoError(err) - - var roleKeys map[string][][]*data.PrivateKey - assertNoError(json.NewDecoder(f).Decode(&roleKeys)) - - // Collect all the initial keys we'll use when creating repositories. - // We'll modify this to reflect rotated keys. - keys := map[string][]*data.PrivateKey{ - "root": roleKeys["root"][0], - "targets": roleKeys["targets"][0], - "snapshot": roleKeys["snapshot"][0], - "timestamp": roleKeys["timestamp"][0], - } - - // Create the initial repo. - dir0 := filepath.Join(dir, "0") - repo0 := newRepo(dir0) - repo0.Init(consistentSnapshot) - addKeys(repo0, keys) - addTargets(repo0, dir0, map[string][]byte{"0": []byte("0")}) - commit(dir0, repo0) - - // Rotate all the keys to make sure that works. - oldDir := dir0 - i := 1 - for _, role := range []string{"root", "targets", "snapshot", "timestamp"} { - // Setup the repo. - stepName := fmt.Sprintf("%d", i) - d := filepath.Join(dir, stepName) - copyRepo(oldDir, d) - repo := newRepo(d) - addKeys(repo, keys) - - // Actually rotate the keys - revokeKeys(repo, role, roleKeys[role][0]) - addKeys(repo, map[string][]*data.PrivateKey{ - role: roleKeys[role][1], - }) - keys[role] = roleKeys[role][1] - - // Add a target to make sure that works, then commit. - addTargets(repo, d, map[string][]byte{stepName: []byte(stepName)}) - commit(d, repo) - - i += 1 - oldDir = d - } - - // Add another target file to make sure the workflow worked. - stepName := fmt.Sprintf("%d", i) - d := filepath.Join(dir, stepName) - copyRepo(oldDir, d) - repo := newRepo(d) - addKeys(repo, keys) - addTargets(repo, d, map[string][]byte{stepName: []byte(stepName)}) - commit(d, repo) -} - -func main() { - cwd, err := os.Getwd() - assertNoError(err) - - for _, consistentSnapshot := range []bool{false, true} { - name := fmt.Sprintf("consistent-snapshot-%t", consistentSnapshot) - log.Printf("generating %s", name) - generateRepos(filepath.Join(cwd, name), consistentSnapshot) - } - -} diff --git a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-false/0/repository/1.root.json deleted file mode 100644 index a9ac50a0..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - } - } - }, - "roles": { - "root": { - "keyids": [ - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "afab8b34f93c99e200505cc6f0d6a9c4e757a7229f96bd31ab618f8bc4c3abe491b372bfec9d231136de46c1e183df194d372360ee9d32652f8c04d7574e2608" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-false/0/repository/root.json deleted file mode 100644 index a9ac50a0..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - } - } - }, - "roles": { - "root": { - "keyids": [ - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "afab8b34f93c99e200505cc6f0d6a9c4e757a7229f96bd31ab618f8bc4c3abe491b372bfec9d231136de46c1e183df194d372360ee9d32652f8c04d7574e2608" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-false/0/repository/snapshot.json deleted file mode 100644 index 5d2428fd..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 588, - "hashes": { - "sha512": "2532c645262d3a15db2afc561d9ae75db96c3b42abe8bd994c173e45ea70177bc1b080e211d92b6f244d267dcb0a0bc2fbcd1c2b008881c19f950c5e8c0035ec" - }, - "version": 1 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "6efc0efbc7a3b849a58e9cb394af10fe6d199d2ead18e6931932c85f44269d5d73e8f18808d0d9b66fbfd9926b0bda9d2d26a7508a960758c0b84eb8aa31ac0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets.json deleted file mode 100644 index 6a822008..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - } - } - }, - "signatures": [ - { - "keyid": "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets/0 b/client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets/0 deleted file mode 100644 index c2270834..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-false/0/repository/timestamp.json deleted file mode 100644 index 92d160db..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/0/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 617, - "hashes": { - "sha512": "6fd318e2cc3bca35d2f597e504c095137263ffe3e72f5e5c64e6c7860bea1207448c8994066ffc1cf20898a9d1586cdf09be4e3ea06f69593ed5c7d772f8dfd1" - }, - "version": 1 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "943b219ab6c651793da08d8cf38c7d25fb959c75161b5b86562983841433f9f38c237bb87cf6ecfbb3cb7c78113a3ed2651ee57d3515e7edfc3bebbf349f2809" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/1.root.json deleted file mode 120000 index 0ffd2b6d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/2.root.json deleted file mode 100644 index 38d2617a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/2.root.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "20e91b55c995989b270091b714347b15169285cb636ef05d68d49ed7b7a96ebfda13898e0d9ef928c382873b9dba90dca492dbf705d56a4b293adaaed574340f" - }, - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "65f63745aa8bd39132f827c427ea6d87f620ec805d9f376b6a8400dc3db7eb964e5423d31ed08867916d039661a70d6bf255bca552248021a4e78b5d357c2b0f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/root.json deleted file mode 100644 index 38d2617a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/root.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "20e91b55c995989b270091b714347b15169285cb636ef05d68d49ed7b7a96ebfda13898e0d9ef928c382873b9dba90dca492dbf705d56a4b293adaaed574340f" - }, - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "65f63745aa8bd39132f827c427ea6d87f620ec805d9f376b6a8400dc3db7eb964e5423d31ed08867916d039661a70d6bf255bca552248021a4e78b5d357c2b0f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/snapshot.json deleted file mode 100644 index aed7835d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 789, - "hashes": { - "sha512": "7a919ed2a5fb7cf80252c9307ac4d27bc2ab54f9bb803389977dcc3d09ae7dff533639c1b19a810d2b212a5c5e904e0f73ab01324ba79dffbb9f7488204caf2a" - }, - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "9a3734441c38daa3275ba60a2178b8dfe5f98296f408bf434144b4bd4f68af73b7f6860e6f2e638b93144ac5bebe361642bbff66a1195596bb8c841429b34508" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets.json deleted file mode 100644 index 0ae4c794..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - } - } - }, - "signatures": [ - { - "keyid": "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/0 b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/0 deleted file mode 120000 index aced6879..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../0/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/1 b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/1 deleted file mode 100644 index 56a6051c..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-false/1/repository/timestamp.json deleted file mode 100644 index ab60e90d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/1/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 617, - "hashes": { - "sha512": "d7204efe9ded4f18d679d75054f43b02b20d74189ea81ad90a67399a8884a810e380a4d343e284c4b6fde506e22a464038871d06950166548a84a76344e2bf3a" - }, - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "85c5afdd9dd3777d2cb31721519ab2942edffc9e1282b65b2cede505a469051ac5e86388461db49f948a5998b132dddb5ce0156d21622a6d2201fb93322de20f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/1.root.json deleted file mode 120000 index cd730513..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/2.root.json deleted file mode 120000 index bbdcb128..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/3.root.json deleted file mode 100644 index fab2f0a2..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/3.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "cfe8b0919d1707ca6c23501909b77c8b94d1ede2b85a3081ab7146244cc6fe436b06ad58163919276f2e37ddbcc13a0dde4851301053dcea2a9bcabc5e1cd004" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/root.json deleted file mode 100644 index fab2f0a2..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "cfe8b0919d1707ca6c23501909b77c8b94d1ede2b85a3081ab7146244cc6fe436b06ad58163919276f2e37ddbcc13a0dde4851301053dcea2a9bcabc5e1cd004" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/snapshot.json deleted file mode 100644 index ded8ac93..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 990, - "hashes": { - "sha512": "987022c23793b3d234d422c3ed4525f8c3771887db610fb2e7d6b455d27ad8b1b4a957a699d519c03754fe4feeb387ec84c95e1edac1d4e9b186bfbdff76ad10" - }, - "version": 3 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "31896c9165a37aa54cf1c4d5f936035e092b1cf4c233ef35cd12c987aaa02de7ec99f26c198984fe0dcc21765d096b25cd67e7ca058613b2b2abef3193dd880d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets.json deleted file mode 100644 index b22a1d7a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/0 b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/0 deleted file mode 120000 index 2ac1d8be..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/1 b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/1 deleted file mode 120000 index 8e78bc37..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/2 b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/2 deleted file mode 100644 index d8263ee9..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-false/2/repository/timestamp.json deleted file mode 100644 index 4856974c..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/2/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 617, - "hashes": { - "sha512": "70d2f64bc810a0ae1c827c28eed47304c3a9c57402447d129aa3ac851d809a48bd0421aaa99e9e49055984e77f221510415cf27aca8f30f4db1767d6b7bd6024" - }, - "version": 3 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "22367ebcf7c5265260b288e9fec6110257b8c8745af25f2b14c5d347ddab94f46893926bdd37c58d142089419708e446c5e3c1af5c47c51187fe69ca95038605" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/1.root.json deleted file mode 120000 index fb4fe81b..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/2.root.json deleted file mode 120000 index 55f8b9d4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/3.root.json deleted file mode 120000 index b4564b7f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/4.root.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/4.root.json deleted file mode 100644 index 8f1b843b..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/4.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "3004c4b60645c6cca18e33835837a1639eead05355aa549f1d1304a22304e7058a50fb6188fc3617a47248eb7481de7a625f036cc69b53daf04a103b12768401" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/root.json deleted file mode 100644 index 8f1b843b..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "3004c4b60645c6cca18e33835837a1639eead05355aa549f1d1304a22304e7058a50fb6188fc3617a47248eb7481de7a625f036cc69b53daf04a103b12768401" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/snapshot.json deleted file mode 100644 index 41e4ac68..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1191, - "hashes": { - "sha512": "2bf10fb9469cb5f44ccae3c8dac2f70c19e7c58479f74f21aca7a424774ed7ef43295fff3c05f7cfe457b5832366b64e0550874775e277d7233c060e9f94e140" - }, - "version": 4 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "c5efdc1b461ae319c991fd1840771d94dfc8a3e655ac233901a27959e9f2c3e7ab61b83e3d674caf9e2a6043e776d7c32a2c36dbf0922f7f08059d08fc26720a" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets.json deleted file mode 100644 index 8265b26f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/0 b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/0 deleted file mode 120000 index 2e6dba05..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/1 b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/1 deleted file mode 120000 index 14fee5d8..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/2 b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/2 deleted file mode 120000 index dcd19e04..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/3 b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/3 deleted file mode 100644 index e440e5c8..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-false/3/repository/timestamp.json deleted file mode 100644 index c87022e7..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/3/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 618, - "hashes": { - "sha512": "4ddee1c0c54af1a3dc54897af33c2457525963059c29583e6df65b9b238732070bd8eb470201154f2d2fa5f8bdf37e01a86e6a53c2bcfe0ff302571458c1898d" - }, - "version": 4 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "585cdcc87c23711642449d469df8bedb53a67b65ac75c303d13b7022c8c34c1db70c926e009c2438639af3be1d613f7ce4c7e28020865ad5ad93a5b085a76005" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/1.root.json deleted file mode 120000 index 741d2189..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/2.root.json deleted file mode 120000 index fb9b350d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/3.root.json deleted file mode 120000 index 65e6c5b4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/4.root.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/4.root.json deleted file mode 120000 index c3662ce8..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/5.root.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/5.root.json deleted file mode 100644 index b4113364..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/5.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "bd2edde6ba4f5cb3a0cc28dca272e2fc0be691575082479f86b82cea4e541a686a0c132c3a7eca231a5782e52e629df92f8f3f89a5b1f57e8b5368986bddfa0e" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/root.json deleted file mode 100644 index b4113364..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315" - ], - "threshold": 1 - } - }, - "consistent_snapshot": false - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "bd2edde6ba4f5cb3a0cc28dca272e2fc0be691575082479f86b82cea4e541a686a0c132c3a7eca231a5782e52e629df92f8f3f89a5b1f57e8b5368986bddfa0e" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/snapshot.json deleted file mode 100644 index 489ec316..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1392, - "hashes": { - "sha512": "93146957ab1f54fe1e8687f408c21a19ad6c033518148bb730b7e635e02f96d9297f1edf12ea5f50354cfcb90385eec9f594d04a08ee876c83759e2314ec8b1a" - }, - "version": 5 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "c9da15fd5b0b359a46503d0a23fa3a4e8e481cb2bdb72d6dbec4852ed6f9d32e186b35071b6ca70ec947e1688458c3476d33991af202b177ffd79ff89955e703" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets.json deleted file mode 100644 index d81d1a69..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - }, - "4": { - "length": 1, - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/0 b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/0 deleted file mode 120000 index efe18e41..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/1 b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/1 deleted file mode 120000 index b4a40c47..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/2 b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/2 deleted file mode 120000 index 1c681715..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/3 b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/3 deleted file mode 120000 index 1dc4d27e..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/3 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/4 b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/4 deleted file mode 100644 index bf0d87ab..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/targets/4 +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-false/4/repository/timestamp.json deleted file mode 100644 index 1eb6f40a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/4/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 618, - "hashes": { - "sha512": "066115510f2f7fbb2f5cb0a1c1d00759161d8a92329e9ce54d4b17c06466b5a4423bb8bcc9e47c0a37db5c7d8d3bc01df10c4ea25605778e788a76e3e9ca1e0e" - }, - "version": 5 - } - } - }, - "signatures": [ - { - "keyid": "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315", - "sig": "84b9e41c93b32eed4bdb6febe70f9bd4db39bbc7f0c7f820f6a078bbb7146df080a9ceaa237303e3f69e49eb33cc63f8ddff8fba8330904f5fe8d7a66f70400e" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/1.root.json deleted file mode 120000 index fb796e32..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/2.root.json deleted file mode 120000 index 5a3e4546..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/3.root.json deleted file mode 120000 index d1cb2513..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/4.root.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/4.root.json deleted file mode 120000 index bda6d089..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/5.root.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/5.root.json deleted file mode 120000 index f99552a4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/5.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/root.json deleted file mode 120000 index 3d140581..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/snapshot.json deleted file mode 100644 index 45a607b4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1593, - "hashes": { - "sha512": "96fa32225e88f9e98db51369fce606039040efc51f098552594132b301228a78c2f2034d059e4d7d6d7bea14ae9862dd8a995056c5f2ed5ff0d6dc09b9da01df" - }, - "version": 6 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "7da0cd1e09be0b8161a1048e08a645e5c8d1558137b2934418bf4e28d4d380b6df2306f5cc89e87e41e5abf079547a709fccd2548bf00fd5acfe5ad2496d670b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets.json deleted file mode 100644 index 241d29bd..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - }, - "4": { - "length": 1, - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - } - }, - "5": { - "length": 1, - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/0 b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/0 deleted file mode 120000 index 94cc2872..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/0 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/1 b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/1 deleted file mode 120000 index 51c7c9a9..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/1 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/2 b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/2 deleted file mode 120000 index 46e3032e..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/2 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/3 b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/3 deleted file mode 120000 index ca268e91..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/3 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/3 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/4 b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/4 deleted file mode 120000 index 19339ad4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/4 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/4 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/5 b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/5 deleted file mode 100644 index 7813681f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/targets/5 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-false/5/repository/timestamp.json deleted file mode 100644 index 1129005f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-false/5/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 618, - "hashes": { - "sha512": "7113ee370f6e1b35df7fd8203d27760e8eb8c32195e8a895f140584caff81256ccdf2d03ed43a5efac45ee4f869908cee2275c0f7e6b54969602e0542c9f78f9" - }, - "version": 6 - } - } - }, - "signatures": [ - { - "keyid": "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315", - "sig": "85758e7d1cdbedfd3d363136924a6e7878a2b9b68486ecc65658a29f96b55fcfeeda0f94fcae30fa3ceafc3ef5f82df8c68ad2774b6e4f4ea0e6cdbafdce8e0f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.root.json deleted file mode 100644 index a564c6a3..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - } - } - }, - "roles": { - "root": { - "keyids": [ - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "104eb78cba674adfc7ade1d4396c99466a7d4480e50aab89df53117faffd3d4d4ea87833fe6f83b8dc7f6e1e4a62c0329244c6e5f910627772df3c4d61a8900f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.snapshot.json deleted file mode 100644 index 5d2428fd..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 588, - "hashes": { - "sha512": "2532c645262d3a15db2afc561d9ae75db96c3b42abe8bd994c173e45ea70177bc1b080e211d92b6f244d267dcb0a0bc2fbcd1c2b008881c19f950c5e8c0035ec" - }, - "version": 1 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "6efc0efbc7a3b849a58e9cb394af10fe6d199d2ead18e6931932c85f44269d5d73e8f18808d0d9b66fbfd9926b0bda9d2d26a7508a960758c0b84eb8aa31ac0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.targets.json deleted file mode 100644 index 6a822008..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/1.targets.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - } - } - }, - "signatures": [ - { - "keyid": "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/root.json deleted file mode 100644 index a564c6a3..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - } - } - }, - "roles": { - "root": { - "keyids": [ - "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "104eb78cba674adfc7ade1d4396c99466a7d4480e50aab89df53117faffd3d4d4ea87833fe6f83b8dc7f6e1e4a62c0329244c6e5f910627772df3c4d61a8900f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/snapshot.json deleted file mode 100644 index 5d2428fd..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 588, - "hashes": { - "sha512": "2532c645262d3a15db2afc561d9ae75db96c3b42abe8bd994c173e45ea70177bc1b080e211d92b6f244d267dcb0a0bc2fbcd1c2b008881c19f950c5e8c0035ec" - }, - "version": 1 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "6efc0efbc7a3b849a58e9cb394af10fe6d199d2ead18e6931932c85f44269d5d73e8f18808d0d9b66fbfd9926b0bda9d2d26a7508a960758c0b84eb8aa31ac0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets.json deleted file mode 100644 index 6a822008..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - } - } - }, - "signatures": [ - { - "keyid": "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937", - "sig": "4d5c3a5da43f3792d077c1128fa28585982ff2957fae59be02a831fc920d0b91cbeaa99fd6c15066ec4da8bf12f993440a90d1624fd7b0a68070e5d60ed2500f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 100644 index c2270834..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-true/0/repository/timestamp.json deleted file mode 100644 index 92d160db..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/0/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 1, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 617, - "hashes": { - "sha512": "6fd318e2cc3bca35d2f597e504c095137263ffe3e72f5e5c64e6c7860bea1207448c8994066ffc1cf20898a9d1586cdf09be4e3ea06f69593ed5c7d772f8dfd1" - }, - "version": 1 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "943b219ab6c651793da08d8cf38c7d25fb959c75161b5b86562983841433f9f38c237bb87cf6ecfbb3cb7c78113a3ed2651ee57d3515e7edfc3bebbf349f2809" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.root.json deleted file mode 120000 index 0ffd2b6d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.snapshot.json deleted file mode 120000 index 840f843e..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.targets.json deleted file mode 120000 index 4d11148d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../0/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.root.json deleted file mode 100644 index 92ff6b2c..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.root.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "7ac71619b21fe3a076fbbf3e17f92177c5374f005c32f1818e7c92eee107e3c726ccf906e800878035a9caf7679610147d72cb515cd76164b08b5c8bf93c0f0e" - }, - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "e560f386c0c270bb44cedda965ad21526e65162b41a2c30d84fb3a80f58913432e8dc74e5e7b0635ccdf51a2b951dae3b0ba28b4aac4088641a2b2cd2933dd04" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.snapshot.json deleted file mode 100644 index aed7835d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 789, - "hashes": { - "sha512": "7a919ed2a5fb7cf80252c9307ac4d27bc2ab54f9bb803389977dcc3d09ae7dff533639c1b19a810d2b212a5c5e904e0f73ab01324ba79dffbb9f7488204caf2a" - }, - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "9a3734441c38daa3275ba60a2178b8dfe5f98296f408bf434144b4bd4f68af73b7f6860e6f2e638b93144ac5bebe361642bbff66a1195596bb8c841429b34508" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.targets.json deleted file mode 100644 index 0ae4c794..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/2.targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - } - } - }, - "signatures": [ - { - "keyid": "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/root.json deleted file mode 100644 index 92ff6b2c..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/root.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "7ac71619b21fe3a076fbbf3e17f92177c5374f005c32f1818e7c92eee107e3c726ccf906e800878035a9caf7679610147d72cb515cd76164b08b5c8bf93c0f0e" - }, - { - "keyid": "ce72db3f938914205461a415c9b7b91267a2079df991fd6283aa8461988c1add", - "sig": "e560f386c0c270bb44cedda965ad21526e65162b41a2c30d84fb3a80f58913432e8dc74e5e7b0635ccdf51a2b951dae3b0ba28b4aac4088641a2b2cd2933dd04" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/snapshot.json deleted file mode 100644 index aed7835d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 789, - "hashes": { - "sha512": "7a919ed2a5fb7cf80252c9307ac4d27bc2ab54f9bb803389977dcc3d09ae7dff533639c1b19a810d2b212a5c5e904e0f73ab01324ba79dffbb9f7488204caf2a" - }, - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "9a3734441c38daa3275ba60a2178b8dfe5f98296f408bf434144b4bd4f68af73b7f6860e6f2e638b93144ac5bebe361642bbff66a1195596bb8c841429b34508" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets.json deleted file mode 100644 index 0ae4c794..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - } - } - }, - "signatures": [ - { - "keyid": "808aa256a8172bb0cb961767c6768e55ccf732c99afccc6145752d7a328b7937", - "sig": "81bcf5921834a20b8b0946815ad4316f43ffce20b3793e6653dc5fd4b98f1c6318ce2243948574e82414a102717a6f2d731250b3191c54abc8391fd867503e0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index b0c459f9..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../0/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 100644 index 56a6051c..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-true/1/repository/timestamp.json deleted file mode 100644 index ab60e90d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/1/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 2, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 617, - "hashes": { - "sha512": "d7204efe9ded4f18d679d75054f43b02b20d74189ea81ad90a67399a8884a810e380a4d343e284c4b6fde506e22a464038871d06950166548a84a76344e2bf3a" - }, - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "85c5afdd9dd3777d2cb31721519ab2942edffc9e1282b65b2cede505a469051ac5e86388461db49f948a5998b132dddb5ce0156d21622a6d2201fb93322de20f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.root.json deleted file mode 120000 index cd730513..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.snapshot.json deleted file mode 120000 index 1307f574..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.targets.json deleted file mode 120000 index 85e1ecc2..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.root.json deleted file mode 120000 index bbdcb128..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.snapshot.json deleted file mode 120000 index 24d10752..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.targets.json deleted file mode 120000 index f6a17494..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../1/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.root.json deleted file mode 100644 index 3b1c2e28..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "475436056dca79fd151ae830ad2f4dbc7ecc5b146a79319c20a1167d4f214047d8f3847d1cda4ccd32a48acb13acbea55ba7e8254cffaa07e3de9ecdd0c13d03" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.snapshot.json deleted file mode 100644 index ded8ac93..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 990, - "hashes": { - "sha512": "987022c23793b3d234d422c3ed4525f8c3771887db610fb2e7d6b455d27ad8b1b4a957a699d519c03754fe4feeb387ec84c95e1edac1d4e9b186bfbdff76ad10" - }, - "version": 3 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "31896c9165a37aa54cf1c4d5f936035e092b1cf4c233ef35cd12c987aaa02de7ec99f26c198984fe0dcc21765d096b25cd67e7ca058613b2b2abef3193dd880d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.targets.json deleted file mode 100644 index b22a1d7a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/3.targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/root.json deleted file mode 100644 index 3b1c2e28..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - }, - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "475436056dca79fd151ae830ad2f4dbc7ecc5b146a79319c20a1167d4f214047d8f3847d1cda4ccd32a48acb13acbea55ba7e8254cffaa07e3de9ecdd0c13d03" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/snapshot.json deleted file mode 100644 index ded8ac93..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 990, - "hashes": { - "sha512": "987022c23793b3d234d422c3ed4525f8c3771887db610fb2e7d6b455d27ad8b1b4a957a699d519c03754fe4feeb387ec84c95e1edac1d4e9b186bfbdff76ad10" - }, - "version": 3 - } - } - }, - "signatures": [ - { - "keyid": "289e5a9e71afd7909326aa4caea92f7557ee0e2283d8c31f0c3401ce67248a45", - "sig": "31896c9165a37aa54cf1c4d5f936035e092b1cf4c233ef35cd12c987aaa02de7ec99f26c198984fe0dcc21765d096b25cd67e7ca058613b2b2abef3193dd880d" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets.json deleted file mode 100644 index b22a1d7a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "09593c7b47f4dbf1e8ac949fa010279ffbbd36070a54a89b689378441e8111602d4236fa2962063778c82027d4746a8973ba8fea86e9c105190da9fa362d8b0c" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index de9aac3a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 100644 index d8263ee9..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 2ebb2d33..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../1/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-true/2/repository/timestamp.json deleted file mode 100644 index 4856974c..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/2/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 3, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 617, - "hashes": { - "sha512": "70d2f64bc810a0ae1c827c28eed47304c3a9c57402447d129aa3ac851d809a48bd0421aaa99e9e49055984e77f221510415cf27aca8f30f4db1767d6b7bd6024" - }, - "version": 3 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "22367ebcf7c5265260b288e9fec6110257b8c8745af25f2b14c5d347ddab94f46893926bdd37c58d142089419708e446c5e3c1af5c47c51187fe69ca95038605" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.root.json deleted file mode 120000 index fb4fe81b..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.snapshot.json deleted file mode 120000 index 4dfb0d02..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.targets.json deleted file mode 120000 index 1eeb5642..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.root.json deleted file mode 120000 index 55f8b9d4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.snapshot.json deleted file mode 120000 index 65445cb4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.targets.json deleted file mode 120000 index 3600a0f4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.root.json deleted file mode 120000 index b4564b7f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.snapshot.json deleted file mode 120000 index 7d86b95a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.targets.json deleted file mode 120000 index d1df10e4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../2/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.root.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.root.json deleted file mode 100644 index a389f497..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "15431a0217deb636e2e79876cfdfc8b78fdda1119e6c8512c7dc61af240a7d2303f172e7fc28de7dfe58d92c84f5118ccd09d0f29f49aaa3f7ef95edf21e2d0a" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.snapshot.json deleted file mode 100644 index 41e4ac68..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1191, - "hashes": { - "sha512": "2bf10fb9469cb5f44ccae3c8dac2f70c19e7c58479f74f21aca7a424774ed7ef43295fff3c05f7cfe457b5832366b64e0550874775e277d7233c060e9f94e140" - }, - "version": 4 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "c5efdc1b461ae319c991fd1840771d94dfc8a3e655ac233901a27959e9f2c3e7ab61b83e3d674caf9e2a6043e776d7c32a2c36dbf0922f7f08059d08fc26720a" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.targets.json deleted file mode 100644 index 8265b26f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/4.targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/root.json deleted file mode 100644 index a389f497..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "15431a0217deb636e2e79876cfdfc8b78fdda1119e6c8512c7dc61af240a7d2303f172e7fc28de7dfe58d92c84f5118ccd09d0f29f49aaa3f7ef95edf21e2d0a" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/snapshot.json deleted file mode 100644 index 41e4ac68..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1191, - "hashes": { - "sha512": "2bf10fb9469cb5f44ccae3c8dac2f70c19e7c58479f74f21aca7a424774ed7ef43295fff3c05f7cfe457b5832366b64e0550874775e277d7233c060e9f94e140" - }, - "version": 4 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "c5efdc1b461ae319c991fd1840771d94dfc8a3e655ac233901a27959e9f2c3e7ab61b83e3d674caf9e2a6043e776d7c32a2c36dbf0922f7f08059d08fc26720a" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets.json deleted file mode 100644 index 8265b26f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "7bfe0a63ee324034807b5341336d9d2d64e9ef3936086577b5bbcc6d021b4656bd6bf14d817bbb3908e4dcb05391d1b4031b527c14d942c2d1e38275d5ff1308" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index f8203976..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 100644 index e440e5c8..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index 7cbcc2a6..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 180cdb4f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../2/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-true/3/repository/timestamp.json deleted file mode 100644 index c87022e7..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/3/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 4, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 618, - "hashes": { - "sha512": "4ddee1c0c54af1a3dc54897af33c2457525963059c29583e6df65b9b238732070bd8eb470201154f2d2fa5f8bdf37e01a86e6a53c2bcfe0ff302571458c1898d" - }, - "version": 4 - } - } - }, - "signatures": [ - { - "keyid": "aa3255b4e8e17e566d2bdbea0e5842978f9fa1d2fa9ec76ae76b146164acbfc8", - "sig": "585cdcc87c23711642449d469df8bedb53a67b65ac75c303d13b7022c8c34c1db70c926e009c2438639af3be1d613f7ce4c7e28020865ad5ad93a5b085a76005" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.root.json deleted file mode 120000 index 741d2189..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.snapshot.json deleted file mode 120000 index f87f7ed7..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.targets.json deleted file mode 120000 index b0002ec9..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.root.json deleted file mode 120000 index fb9b350d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.snapshot.json deleted file mode 120000 index e96983b5..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.targets.json deleted file mode 120000 index dbb2a759..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.root.json deleted file mode 120000 index 65e6c5b4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.snapshot.json deleted file mode 120000 index f2fd5601..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.targets.json deleted file mode 120000 index ca61e77d..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.root.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.root.json deleted file mode 120000 index c3662ce8..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.snapshot.json deleted file mode 120000 index a2f839ac..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.targets.json deleted file mode 120000 index 9f7a7841..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../3/repository/4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.root.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.root.json deleted file mode 100644 index dcb0e92f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "2b6f30258eaf8b4b2d900a2efb4a597b45a9c0c5a0720d5521dd37d63c34d1db62aafaa1d95b6d881f9c991615ab68930c24ef247d2f45836bca3659e36d9c0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.snapshot.json deleted file mode 100644 index 489ec316..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1392, - "hashes": { - "sha512": "93146957ab1f54fe1e8687f408c21a19ad6c033518148bb730b7e635e02f96d9297f1edf12ea5f50354cfcb90385eec9f594d04a08ee876c83759e2314ec8b1a" - }, - "version": 5 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "c9da15fd5b0b359a46503d0a23fa3a4e8e481cb2bdb72d6dbec4852ed6f9d32e186b35071b6ca70ec947e1688458c3476d33991af202b177ffd79ff89955e703" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.targets.json deleted file mode 100644 index d81d1a69..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/5.targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - }, - "4": { - "length": 1, - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/root.json deleted file mode 100644 index dcb0e92f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "keys": { - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - } - }, - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - }, - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - }, - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - }, - "roles": { - "root": { - "keyids": [ - "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315" - ], - "threshold": 1 - } - }, - "consistent_snapshot": true - }, - "signatures": [ - { - "keyid": "b2403f96ae9b1089d8cbc15bbc35e9acbacd7984571f951b43aab56aedcfa84f", - "sig": "2b6f30258eaf8b4b2d900a2efb4a597b45a9c0c5a0720d5521dd37d63c34d1db62aafaa1d95b6d881f9c991615ab68930c24ef247d2f45836bca3659e36d9c0b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/snapshot.json deleted file mode 100644 index 489ec316..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1392, - "hashes": { - "sha512": "93146957ab1f54fe1e8687f408c21a19ad6c033518148bb730b7e635e02f96d9297f1edf12ea5f50354cfcb90385eec9f594d04a08ee876c83759e2314ec8b1a" - }, - "version": 5 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "c9da15fd5b0b359a46503d0a23fa3a4e8e481cb2bdb72d6dbec4852ed6f9d32e186b35071b6ca70ec947e1688458c3476d33991af202b177ffd79ff89955e703" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets.json deleted file mode 100644 index d81d1a69..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - }, - "4": { - "length": 1, - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "68f2346cdbe045e8558b2ccd86be66e15466955167557c704b51d7163838f670c53ab9247c16a4ed0cd4ecc981a7e2a04a350b01548f97654499d6f9c17c4202" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index 8bca78fb..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 120000 index 814339fc..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index dc5c46dc..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 16b79678..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../3/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 deleted file mode 100644 index bf0d87ab..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 +++ /dev/null @@ -1 +0,0 @@ -4 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-true/4/repository/timestamp.json deleted file mode 100644 index 1eb6f40a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/4/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 5, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 618, - "hashes": { - "sha512": "066115510f2f7fbb2f5cb0a1c1d00759161d8a92329e9ce54d4b17c06466b5a4423bb8bcc9e47c0a37db5c7d8d3bc01df10c4ea25605778e788a76e3e9ca1e0e" - }, - "version": 5 - } - } - }, - "signatures": [ - { - "keyid": "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315", - "sig": "84b9e41c93b32eed4bdb6febe70f9bd4db39bbc7f0c7f820f6a078bbb7146df080a9ceaa237303e3f69e49eb33cc63f8ddff8fba8330904f5fe8d7a66f70400e" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.root.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.root.json deleted file mode 120000 index fb796e32..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.snapshot.json deleted file mode 120000 index f7fb0982..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.targets.json deleted file mode 120000 index 127f6097..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/1.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/1.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.root.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.root.json deleted file mode 120000 index 5a3e4546..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.snapshot.json deleted file mode 120000 index 5b418d6a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.targets.json deleted file mode 120000 index 04b0be44..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/2.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/2.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.root.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.root.json deleted file mode 120000 index d1cb2513..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.snapshot.json deleted file mode 120000 index d23c05ca..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.targets.json deleted file mode 120000 index 2854154a..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/3.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/3.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.root.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.root.json deleted file mode 120000 index bda6d089..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.snapshot.json deleted file mode 120000 index b7aefb24..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.targets.json deleted file mode 120000 index fef64e45..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/4.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/4.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.root.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.root.json deleted file mode 120000 index f99552a4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.snapshot.json deleted file mode 120000 index 4e98537c..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.snapshot.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.snapshot.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.targets.json deleted file mode 120000 index f8771442..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/5.targets.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/5.targets.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.snapshot.json deleted file mode 100644 index 45a607b4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1593, - "hashes": { - "sha512": "96fa32225e88f9e98db51369fce606039040efc51f098552594132b301228a78c2f2034d059e4d7d6d7bea14ae9862dd8a995056c5f2ed5ff0d6dc09b9da01df" - }, - "version": 6 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "7da0cd1e09be0b8161a1048e08a645e5c8d1558137b2934418bf4e28d4d380b6df2306f5cc89e87e41e5abf079547a709fccd2548bf00fd5acfe5ad2496d670b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.targets.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.targets.json deleted file mode 100644 index 241d29bd..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/6.targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - }, - "4": { - "length": 1, - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - } - }, - "5": { - "length": 1, - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/root.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/root.json deleted file mode 120000 index 3d140581..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/root.json +++ /dev/null @@ -1 +0,0 @@ -../../4/repository/root.json \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/snapshot.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/snapshot.json deleted file mode 100644 index 45a607b4..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/snapshot.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "targets.json": { - "length": 1593, - "hashes": { - "sha512": "96fa32225e88f9e98db51369fce606039040efc51f098552594132b301228a78c2f2034d059e4d7d6d7bea14ae9862dd8a995056c5f2ed5ff0d6dc09b9da01df" - }, - "version": 6 - } - } - }, - "signatures": [ - { - "keyid": "b096bc2d67080cec22e6c0bbaa69cfd9d714b9e9ad847d255f950b2728855fef", - "sig": "7da0cd1e09be0b8161a1048e08a645e5c8d1558137b2934418bf4e28d4d380b6df2306f5cc89e87e41e5abf079547a709fccd2548bf00fd5acfe5ad2496d670b" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets.json deleted file mode 100644 index 241d29bd..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "targets": { - "0": { - "length": 1, - "hashes": { - "sha512": "31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99" - } - }, - "1": { - "length": 1, - "hashes": { - "sha512": "4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a" - } - }, - "2": { - "length": 1, - "hashes": { - "sha512": "40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114" - } - }, - "3": { - "length": 1, - "hashes": { - "sha512": "3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb" - } - }, - "4": { - "length": 1, - "hashes": { - "sha512": "a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568" - } - }, - "5": { - "length": 1, - "hashes": { - "sha512": "06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25" - } - } - } - }, - "signatures": [ - { - "keyid": "bc8f087663855564b358ddf314d5932ab920af17bd1df2f58b397afd82d76dc1", - "sig": "1e80ae84c4badf194e2fd7225c120999d8f628598fa0e994a2ff7cac705ec2f14601a64ba5370fc668f3fb114975dd81c554400d757f41762c4e12eb4db35d02" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 deleted file mode 100644 index 7813681f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/06df05371981a237d0ed11472fae7c94c9ac0eff1d05413516710d17b10a4fb6f4517bda4a695f02d0a73dd4db543b4653df28f5d09dab86f92ffb9b86d01e25.5 +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 deleted file mode 120000 index c70b61bd..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/31bca02094eb78126a517b206a88c73cfa9ec6f704c7030d18212cace820f025f00bf0ea68dbf3f3a5436ca63b53bf7bf80ad8d5de7d8359d0b7fed9dbc3ab99.0 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 deleted file mode 120000 index 1e66cb1b..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/3bafbf08882a2d10133093a1b8433f50563b93c14acd05b79028eb1d12799027241450980651994501423a66c276ae26c43b739bc65c4e16b10c3af6c202aebb.3 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 deleted file mode 120000 index a02a2316..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/40b244112641dd78dd4f93b6c9190dd46e0099194d5a44257b7efad6ef9ff4683da1eda0244448cb343aa688f5d3efd7314dafe580ac0bcbf115aeca9e8dc114.2 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 deleted file mode 120000 index 74d1328f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/4dff4ea340f0a823f15d3f4f01ab62eae0e5da579ccb851f8db9dfe84c58b2b37b89903a740e1ee172da793a6e79d560e5f7f9bd058a12a280433ed6fa46510a.1 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 deleted file mode 120000 index 73a65ad2..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 +++ /dev/null @@ -1 +0,0 @@ -../../../4/repository/targets/a321d8b405e3ef2604959847b36d171eebebc4a8941dc70a4784935a4fca5d5813de84dfa049f06549aa61b20848c1633ce81b675286ea8fb53db240d831c568.4 \ No newline at end of file diff --git a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/timestamp.json b/client/testdata/go-tuf/consistent-snapshot-true/5/repository/timestamp.json deleted file mode 100644 index 1129005f..00000000 --- a/client/testdata/go-tuf/consistent-snapshot-true/5/repository/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0", - "version": 6, - "expires": "2100-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "length": 618, - "hashes": { - "sha512": "7113ee370f6e1b35df7fd8203d27760e8eb8c32195e8a895f140584caff81256ccdf2d03ed43a5efac45ee4f869908cee2275c0f7e6b54969602e0542c9f78f9" - }, - "version": 6 - } - } - }, - "signatures": [ - { - "keyid": "a8eaf6de5aecfd0a72b60295b1e1cd12f349079ebcbbb63dbe7072f162e85315", - "sig": "85758e7d1cdbedfd3d363136924a6e7878a2b9b68486ecc65658a29f96b55fcfeeda0f94fcae30fa3ceafc3ef5f82df8c68ad2774b6e4f4ea0e6cdbafdce8e0f" - } - ] -} \ No newline at end of file diff --git a/client/testdata/go-tuf/generate.go b/client/testdata/go-tuf/generate.go deleted file mode 100644 index 51629bd3..00000000 --- a/client/testdata/go-tuf/generate.go +++ /dev/null @@ -1,19 +0,0 @@ -package main - -import ( - "log" - "os" - "path/filepath" - - "github.com/theupdateframework/go-tuf/client/testdata/go-tuf/generator" -) - -func main() { - cwd, err := os.Getwd() - if err != nil { - log.Fatal(err) - } - - generator.Generate(filepath.Join(cwd, "consistent-snapshot-false"), "../keys.json", false) - generator.Generate(filepath.Join(cwd, "consistent-snapshot-true"), "../keys.json", true) -} diff --git a/client/testdata/go-tuf/generator/generator.go b/client/testdata/go-tuf/generator/generator.go deleted file mode 100644 index 43903ace..00000000 --- a/client/testdata/go-tuf/generator/generator.go +++ /dev/null @@ -1,177 +0,0 @@ -package generator - -import ( - "encoding/json" - "fmt" - "io" - "io/fs" - "log" - "os" - "path/filepath" - "time" - - tuf "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -var expirationDate = time.Date(2100, time.January, 1, 0, 0, 0, 0, time.UTC) - -type persistedKeys struct { - Encrypted bool `json:"encrypted"` - Data []*data.PrivateKey `json:"data"` -} - -func assertNoError(err error) { - if err != nil { - panic(fmt.Sprintf("assertion failed: %s", err)) - } -} - -// copyRepo recursively copies all regular files and directories under src -// to dst. In the case where any destination file/directory exists -// (including dst itself), an error is returned. -func copyRepo(src string, dst string) error { - copyToDest := func(path string, info fs.FileInfo, err error) error { - if err != nil { - return err - } - rel, err := filepath.Rel(src, path) - if err != nil { - return err - } - target := filepath.Join(dst, rel) - mode := info.Mode() - if mode.IsDir() { - return os.Mkdir(target, mode.Perm()) - } else if mode.IsRegular() { - sfile, err := os.Open(path) - if err != nil { - return err - } - defer sfile.Close() - dfile, err := os.OpenFile(target, os.O_WRONLY|os.O_CREATE|os.O_EXCL, mode.Perm()) - if err != nil { - return err - } - defer dfile.Close() - if _, err := io.Copy(dfile, sfile); err != nil { - return err - } - return nil - } - return fmt.Errorf("unknown mode %v", mode) - } - return filepath.Walk(src, copyToDest) -} - -func newRepo(dir string) *tuf.Repo { - repo, err := tuf.NewRepoIndent(tuf.FileSystemStore(dir, nil), "", "\t") - assertNoError(err) - - return repo -} - -func commit(dir string, repo *tuf.Repo) { - assertNoError(repo.SnapshotWithExpires(expirationDate)) - assertNoError(repo.TimestampWithExpires(expirationDate)) - assertNoError(repo.Commit()) - - // Remove the keys directory to make sure we don't accidentally use a key. - assertNoError(os.RemoveAll(filepath.Join(dir, "keys"))) -} - -func addKeys(repo *tuf.Repo, roleKeys map[string][]*data.PrivateKey) { - for role, keyList := range roleKeys { - for _, key := range keyList { - signer, err := keys.GetSigner(key) - assertNoError(err) - assertNoError(repo.AddPrivateKeyWithExpires(role, signer, expirationDate)) - } - } -} - -func addTargets(repo *tuf.Repo, dir string, files map[string][]byte) { - paths := []string{} - for file, data := range files { - path := filepath.Join(dir, "staged", "targets", file) - assertNoError(os.MkdirAll(filepath.Dir(path), 0755)) - assertNoError(os.WriteFile(path, data, 0644)) - paths = append(paths, file) - } - assertNoError(repo.AddTargetsWithExpires(paths, nil, expirationDate)) -} - -func revokeKeys(repo *tuf.Repo, role string, keyList []*data.PrivateKey) { - for _, key := range keyList { - signer, err := keys.GetSigner(key) - assertNoError(err) - assertNoError(repo.RevokeKeyWithExpires(role, signer.PublicData().IDs()[0], expirationDate)) - } -} - -func generateRepos(dir string, roleKeys map[string][][]*data.PrivateKey, consistentSnapshot bool) { - // Collect all the initial keys we'll use when creating repositories. - // We'll modify this to reflect rotated keys. - keys := map[string][]*data.PrivateKey{ - "root": roleKeys["root"][0], - "targets": roleKeys["targets"][0], - "snapshot": roleKeys["snapshot"][0], - "timestamp": roleKeys["timestamp"][0], - } - - // Create the initial repo. - dir0 := filepath.Join(dir, "0") - repo0 := newRepo(dir0) - repo0.Init(consistentSnapshot) - addKeys(repo0, keys) - addTargets(repo0, dir0, map[string][]byte{"0": []byte("0")}) - commit(dir0, repo0) - - // Rotate all the keys to make sure that works. - oldDir := dir0 - i := 1 - for _, role := range []string{"root", "targets", "snapshot", "timestamp"} { - // Setup the repo. - stepName := fmt.Sprintf("%d", i) - d := filepath.Join(dir, stepName) - assertNoError(copyRepo(oldDir, d)) - repo := newRepo(d) - addKeys(repo, keys) - - // Actually rotate the keys - revokeKeys(repo, role, roleKeys[role][0]) - addKeys(repo, map[string][]*data.PrivateKey{ - role: roleKeys[role][1], - }) - keys[role] = roleKeys[role][1] - - // Add a target to make sure that works, then commit. - addTargets(repo, d, map[string][]byte{stepName: []byte(stepName)}) - commit(d, repo) - - i += 1 - oldDir = d - } - - // Add another target file to make sure the workflow worked. - stepName := fmt.Sprintf("%d", i) - d := filepath.Join(dir, stepName) - assertNoError(copyRepo(oldDir, d)) - repo := newRepo(d) - addKeys(repo, keys) - addTargets(repo, d, map[string][]byte{stepName: []byte(stepName)}) - commit(d, repo) -} - -func Generate(dir string, keysPath string, consistentSnapshot bool) { - f, err := os.Open(keysPath) - assertNoError(err) - - var roleKeys map[string][][]*data.PrivateKey - assertNoError(json.NewDecoder(f).Decode(&roleKeys)) - - log.Printf("generating %s", dir) - - generateRepos(dir, roleKeys, consistentSnapshot) -} diff --git a/client/testdata/go-tuf/regenerate-metadata.sh b/client/testdata/go-tuf/regenerate-metadata.sh deleted file mode 100755 index ea286a03..00000000 --- a/client/testdata/go-tuf/regenerate-metadata.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -eu - -cd `dirname $0` - -for d in consistent-snapshot-false consistent-snapshot-true; do - if [[ -e $d ]]; then - rm -r $d - fi -done - -go run generate.go -go run ../tools/linkify-metadata.go diff --git a/client/testdata/keys.json b/client/testdata/keys.json deleted file mode 100644 index 0edf9e3a..00000000 --- a/client/testdata/keys.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "root": [ - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca", - "private": "68c2a06583ce83dabb1fc5d2b3697015b936f341f21be1be1397670a650ebd53bca152214dbfd3e7a1b7a7b3e2cc179fb00520fd7212c8a60ba99f14dfc0e1ca" - } - } - ], - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54", - "private": "e53595d99a85a33d7c228d28b25c856148c65be36558d0d61faa7e018a51db5c153986a7370e002f377dd68797e7466c421180c1571e233de2f8ab41c8af4f54" - } - } - ] - ], - "snapshot": [ - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94", - "private": "28de1763cc4cc78702167bd6cf862fc3977afc2404c5eebbdfb948bab55f14f0d482fa4805a50870aa1356ace6b764f7ab47ed4dc38f49b1a189afa25f179e94" - } - } - ], - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f", - "private": "fb85703e9c1c77cfe87c18eda24d5637d997503fef4107f6c04777b0fbec2b8c722dbc861813bb5b568524d62083e875c08e66fed1694d9161d253fa163dd86f" - } - } - ] - ], - "targets": [ - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a", - "private": "dee6d1fa7f041bee48a4e783d416e12c72ecdbd164202a71b23149adbb1c3d1f62f71f99c788f16bcdc8bb252455e3a690350e4ddea5a6aab1f9a3aaabcf369a" - } - } - ], - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "aee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42", - "private": "9f51d6d05cda79b80dad73d7e1611df50555d5090bf9fe6bfac5ad3690b57e2aaee574e56780ea1709a8b56e02d4ffdd9a3a1deaed61e2eb0701f376a4422e42" - } - } - ] - ], - "timestamp": [ - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "8656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160", - "private": "2ef838a6f0aa4bc0a746b8086098683f96bb5118c4dca7d3caa3dee5c86ea8398656ad20568cd3534c405e4d9a84b0c6e6163f7f66434df77416502835b9b160" - } - } - ], - [ - { - "keytype": "ed25519", - "scheme": "ed25519", - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keyval": { - "public": "3ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76", - "private": "1d9a579675ee85074a7c5d8a3e4a58a21e82bddc53bbfe1bef547d681d4049783ab34b0c2d4eadccaa0f0cf22ced07b552394063a9de2806993d022360dffc76" - } - } - ] - ] -} diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.a.json deleted file mode 100755 index ef485a9c..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72b215c194090407abc8b7c513d69fd340abbe63037d26cbc2e4dd88c095a14da8d6e4aae0561f265e97d5c658b0260be2031af73c26e157e5f062c5f4aceb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" - ], - "name": "b", - "paths": [ - "*.txt" - ], - "terminating": false, - "threshold": 1 - }, - { - "keyids": [ - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" - ], - "name": "c", - "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/TUFTestFixture2LevelDelegation/client/metadata/current/1.b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.b.json deleted file mode 100755 index b3c9ffd4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "6a4f4bb63d7b6db4b6c09ce081fd229052ca087c98d25653c8d187de04dbedfc219aa9482774b939d84eb404fd51cfe383f9ea65e19a1d3cc79b642701bcff0d" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "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/TUFTestFixture2LevelDelegation/client/metadata/current/1.c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.c.json deleted file mode 100755 index 9305d64f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.c.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/1.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.root.json deleted file mode 100755 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/1.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.snapshot.json deleted file mode 100755 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/1.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.targets.json deleted file mode 100755 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/1.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.timestamp.json deleted file mode 100755 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/2.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.root.json deleted file mode 100755 index 2d5222c3..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/2.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.snapshot.json deleted file mode 100755 index 428c358d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "699125952eb773b09461a25fee03cf5a00237625e5dcb4e20334a13f09212daf6c97aff36fc1ac09ee302142eaec81447d57ba46d0831becb98d1526cb035106" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.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/TUFTestFixture2LevelDelegation/client/metadata/current/2.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.targets.json deleted file mode 100755 index 9f9d94b6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "3b54f35d6c03622b723fe38d0115e9d98d47e147eaaa1d60e2f2925199c19e520a3a0de8842b16b1e4e73c0e71d8ca26169fa2b4063f544fb1613185f616f704" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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/TUFTestFixture2LevelDelegation/client/metadata/current/2.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.timestamp.json deleted file mode 100755 index 82737adc..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "36db44bdcb33c37f259e8a12098e9a9114f0cffde4a7d4db0d88d04d7c93add316333e671c2c2305b081fe6a9a56f365ee3000ccf8675f43d5c663d66d3edb00" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "35c207d52640e403b9df82386a2258e093091538c7d77a641295e7b0262d6ca0", - "sha512": "0a89bb735c8324ff1e661ad25c4017c0c330f09cbd3213ffac7104540c5fa01a35787ae3f517fc2966a89f53f7c91754de852988776cc59b2a574f28a0434139" - }, - "length": 545, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/a.json deleted file mode 100755 index ef485a9c..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72b215c194090407abc8b7c513d69fd340abbe63037d26cbc2e4dd88c095a14da8d6e4aae0561f265e97d5c658b0260be2031af73c26e157e5f062c5f4aceb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" - ], - "name": "b", - "paths": [ - "*.txt" - ], - "terminating": false, - "threshold": 1 - }, - { - "keyids": [ - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" - ], - "name": "c", - "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/TUFTestFixture2LevelDelegation/client/metadata/current/b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/b.json deleted file mode 100755 index b3c9ffd4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "6a4f4bb63d7b6db4b6c09ce081fd229052ca087c98d25653c8d187de04dbedfc219aa9482774b939d84eb404fd51cfe383f9ea65e19a1d3cc79b642701bcff0d" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "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/TUFTestFixture2LevelDelegation/client/metadata/current/c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/c.json deleted file mode 100755 index 9305d64f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/c.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/root.json deleted file mode 100755 index 2d5222c3..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/current/snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/snapshot.json deleted file mode 100755 index 428c358d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "699125952eb773b09461a25fee03cf5a00237625e5dcb4e20334a13f09212daf6c97aff36fc1ac09ee302142eaec81447d57ba46d0831becb98d1526cb035106" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.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/TUFTestFixture2LevelDelegation/client/metadata/current/targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/targets.json deleted file mode 100755 index 9f9d94b6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "3b54f35d6c03622b723fe38d0115e9d98d47e147eaaa1d60e2f2925199c19e520a3a0de8842b16b1e4e73c0e71d8ca26169fa2b4063f544fb1613185f616f704" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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/TUFTestFixture2LevelDelegation/client/metadata/current/timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/timestamp.json deleted file mode 100755 index 82737adc..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "36db44bdcb33c37f259e8a12098e9a9114f0cffde4a7d4db0d88d04d7c93add316333e671c2c2305b081fe6a9a56f365ee3000ccf8675f43d5c663d66d3edb00" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "35c207d52640e403b9df82386a2258e093091538c7d77a641295e7b0262d6ca0", - "sha512": "0a89bb735c8324ff1e661ad25c4017c0c330f09cbd3213ffac7104540c5fa01a35787ae3f517fc2966a89f53f7c91754de852988776cc59b2a574f28a0434139" - }, - "length": 545, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.root.json deleted file mode 100755 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/previous/1.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.snapshot.json deleted file mode 100755 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/previous/1.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.targets.json deleted file mode 100755 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/previous/1.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.timestamp.json deleted file mode 100755 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/previous/root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/root.json deleted file mode 100755 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/previous/snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/snapshot.json deleted file mode 100755 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/previous/targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/targets.json deleted file mode 100755 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/client/metadata/previous/timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/timestamp.json deleted file mode 100755 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/hash.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/hash.txt deleted file mode 100644 index 08714f7d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/hash.txt +++ /dev/null @@ -1 +0,0 @@ -cc7b129f475232ee357a05756746938abe35b652ec9c53a9ffb93d3c67103b20 \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.a.json deleted file mode 100755 index ef485a9c..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72b215c194090407abc8b7c513d69fd340abbe63037d26cbc2e4dd88c095a14da8d6e4aae0561f265e97d5c658b0260be2031af73c26e157e5f062c5f4aceb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" - ], - "name": "b", - "paths": [ - "*.txt" - ], - "terminating": false, - "threshold": 1 - }, - { - "keyids": [ - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" - ], - "name": "c", - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/1.b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.b.json deleted file mode 100755 index b3c9ffd4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "6a4f4bb63d7b6db4b6c09ce081fd229052ca087c98d25653c8d187de04dbedfc219aa9482774b939d84eb404fd51cfe383f9ea65e19a1d3cc79b642701bcff0d" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/1.c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.c.json deleted file mode 100755 index 9305d64f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.c.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/1.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.root.json deleted file mode 100755 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/1.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.snapshot.json deleted file mode 100755 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/1.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.targets.json deleted file mode 100755 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/1.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.timestamp.json deleted file mode 100755 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/2.c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.c.json deleted file mode 100755 index b3289663..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.c.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c2f5f087f1bb9708f48657789cf8516b3d974e2250d3ec0268e347e89fa6f9eaa9e9441f5402ce32735fe31750013c5dc1b53f4e9a93d748ff060fa94ad3fd07" - } - ], - "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/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.root.json deleted file mode 100755 index 2d5222c3..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/2.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.snapshot.json deleted file mode 100755 index 428c358d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "699125952eb773b09461a25fee03cf5a00237625e5dcb4e20334a13f09212daf6c97aff36fc1ac09ee302142eaec81447d57ba46d0831becb98d1526cb035106" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.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/TUFTestFixture2LevelDelegation/server/metadata.staged/2.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.targets.json deleted file mode 100755 index 9f9d94b6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "3b54f35d6c03622b723fe38d0115e9d98d47e147eaaa1d60e2f2925199c19e520a3a0de8842b16b1e4e73c0e71d8ca26169fa2b4063f544fb1613185f616f704" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/2.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.timestamp.json deleted file mode 100755 index 82737adc..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "36db44bdcb33c37f259e8a12098e9a9114f0cffde4a7d4db0d88d04d7c93add316333e671c2c2305b081fe6a9a56f365ee3000ccf8675f43d5c663d66d3edb00" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "35c207d52640e403b9df82386a2258e093091538c7d77a641295e7b0262d6ca0", - "sha512": "0a89bb735c8324ff1e661ad25c4017c0c330f09cbd3213ffac7104540c5fa01a35787ae3f517fc2966a89f53f7c91754de852988776cc59b2a574f28a0434139" - }, - "length": 545, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.root.json deleted file mode 100755 index 85a9f0c6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "bd598e8bc29a3eb07aa71caceb0644977d73df87aae8f84c98aff5e87ea2de642c4950232fc2f4065b12a9c19ecf33e511f4e4ac78da7dcd75b3779802f39504" - } - ], - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.snapshot.json deleted file mode 100755 index 9a9a016e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "563e4fa25cf88c0d029ac30608b219f27d9389945c7afd46c118eda1931fb64cae0f376780fee5ddbc66ab768733e2a5b640f3cc19ea687a3e71ae4116e5dd0f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.json": { - "version": 2 - }, - "targets.json": { - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.targets.json deleted file mode 100755 index 44f46760..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "ced6f3e967a4366731f268a72a0f78aac0025641345a869baa013bb903502d7812ff22086834ab6b45f5c47cb7832139048663549d4e87d9219a0be7145c2807" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.timestamp.json deleted file mode 100755 index 5d64bbdd..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/3.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "65d615183cd58d8a6df898e8f7d6e886a44ca111d6cce95e9a86414b369703b2e9e897bfde405d0c0688b26a11c8f74217d0e0f62b4307d30919ce0f2cb0f700" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "83d637428ffc782a3f762dc6d983548aad231680f2d0d84270e02b538ecd0f68", - "sha512": "3bcc5c70fe8c65d8103dcb60a0773ff436719159854d8d24242fb1f39721e9648b849b2a495487986aba1fdc53382ce604e6ddcd1fde72cbb81f8e8149bfd2f1" - }, - "length": 545, - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/a.json deleted file mode 100755 index ef485a9c..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72b215c194090407abc8b7c513d69fd340abbe63037d26cbc2e4dd88c095a14da8d6e4aae0561f265e97d5c658b0260be2031af73c26e157e5f062c5f4aceb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" - ], - "name": "b", - "paths": [ - "*.txt" - ], - "terminating": false, - "threshold": 1 - }, - { - "keyids": [ - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" - ], - "name": "c", - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/b.json deleted file mode 100755 index b3c9ffd4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "6a4f4bb63d7b6db4b6c09ce081fd229052ca087c98d25653c8d187de04dbedfc219aa9482774b939d84eb404fd51cfe383f9ea65e19a1d3cc79b642701bcff0d" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "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/TUFTestFixture2LevelDelegation/server/metadata.staged/c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/c.json deleted file mode 100755 index b3289663..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/c.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c2f5f087f1bb9708f48657789cf8516b3d974e2250d3ec0268e347e89fa6f9eaa9e9441f5402ce32735fe31750013c5dc1b53f4e9a93d748ff060fa94ad3fd07" - } - ], - "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/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/root.json deleted file mode 100755 index 85a9f0c6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "bd598e8bc29a3eb07aa71caceb0644977d73df87aae8f84c98aff5e87ea2de642c4950232fc2f4065b12a9c19ecf33e511f4e4ac78da7dcd75b3779802f39504" - } - ], - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/snapshot.json deleted file mode 100755 index 9a9a016e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "563e4fa25cf88c0d029ac30608b219f27d9389945c7afd46c118eda1931fb64cae0f376780fee5ddbc66ab768733e2a5b640f3cc19ea687a3e71ae4116e5dd0f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.json": { - "version": 2 - }, - "targets.json": { - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/targets.json deleted file mode 100755 index 44f46760..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "ced6f3e967a4366731f268a72a0f78aac0025641345a869baa013bb903502d7812ff22086834ab6b45f5c47cb7832139048663549d4e87d9219a0be7145c2807" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/timestamp.json deleted file mode 100755 index 5d64bbdd..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata.staged/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "65d615183cd58d8a6df898e8f7d6e886a44ca111d6cce95e9a86414b369703b2e9e897bfde405d0c0688b26a11c8f74217d0e0f62b4307d30919ce0f2cb0f700" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "83d637428ffc782a3f762dc6d983548aad231680f2d0d84270e02b538ecd0f68", - "sha512": "3bcc5c70fe8c65d8103dcb60a0773ff436719159854d8d24242fb1f39721e9648b849b2a495487986aba1fdc53382ce604e6ddcd1fde72cbb81f8e8149bfd2f1" - }, - "length": 545, - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.a.json deleted file mode 100755 index ef485a9c..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72b215c194090407abc8b7c513d69fd340abbe63037d26cbc2e4dd88c095a14da8d6e4aae0561f265e97d5c658b0260be2031af73c26e157e5f062c5f4aceb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" - ], - "name": "b", - "paths": [ - "*.txt" - ], - "terminating": false, - "threshold": 1 - }, - { - "keyids": [ - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" - ], - "name": "c", - "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/TUFTestFixture2LevelDelegation/server/metadata/1.b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.b.json deleted file mode 100755 index b3c9ffd4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "6a4f4bb63d7b6db4b6c09ce081fd229052ca087c98d25653c8d187de04dbedfc219aa9482774b939d84eb404fd51cfe383f9ea65e19a1d3cc79b642701bcff0d" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "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/TUFTestFixture2LevelDelegation/server/metadata/1.c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.c.json deleted file mode 100755 index 9305d64f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.c.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata/1.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.root.json deleted file mode 100755 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata/1.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.snapshot.json deleted file mode 100755 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata/1.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.targets.json deleted file mode 100755 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata/1.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.timestamp.json deleted file mode 100755 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata/2.c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.c.json deleted file mode 100755 index b3289663..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.c.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c2f5f087f1bb9708f48657789cf8516b3d974e2250d3ec0268e347e89fa6f9eaa9e9441f5402ce32735fe31750013c5dc1b53f4e9a93d748ff060fa94ad3fd07" - } - ], - "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/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.root.json deleted file mode 100755 index 2d5222c3..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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/TUFTestFixture2LevelDelegation/server/metadata/2.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.snapshot.json deleted file mode 100755 index 428c358d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "699125952eb773b09461a25fee03cf5a00237625e5dcb4e20334a13f09212daf6c97aff36fc1ac09ee302142eaec81447d57ba46d0831becb98d1526cb035106" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.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/TUFTestFixture2LevelDelegation/server/metadata/2.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.targets.json deleted file mode 100755 index 9f9d94b6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "3b54f35d6c03622b723fe38d0115e9d98d47e147eaaa1d60e2f2925199c19e520a3a0de8842b16b1e4e73c0e71d8ca26169fa2b4063f544fb1613185f616f704" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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/TUFTestFixture2LevelDelegation/server/metadata/2.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.timestamp.json deleted file mode 100755 index 82737adc..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "36db44bdcb33c37f259e8a12098e9a9114f0cffde4a7d4db0d88d04d7c93add316333e671c2c2305b081fe6a9a56f365ee3000ccf8675f43d5c663d66d3edb00" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "35c207d52640e403b9df82386a2258e093091538c7d77a641295e7b0262d6ca0", - "sha512": "0a89bb735c8324ff1e661ad25c4017c0c330f09cbd3213ffac7104540c5fa01a35787ae3f517fc2966a89f53f7c91754de852988776cc59b2a574f28a0434139" - }, - "length": 545, - "version": 2 - } - }, - "spec_version": "1.0.0", - "version": 2 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.root.json deleted file mode 100755 index 85a9f0c6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "bd598e8bc29a3eb07aa71caceb0644977d73df87aae8f84c98aff5e87ea2de642c4950232fc2f4065b12a9c19ecf33e511f4e4ac78da7dcd75b3779802f39504" - } - ], - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.snapshot.json deleted file mode 100755 index 9a9a016e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "563e4fa25cf88c0d029ac30608b219f27d9389945c7afd46c118eda1931fb64cae0f376780fee5ddbc66ab768733e2a5b640f3cc19ea687a3e71ae4116e5dd0f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.json": { - "version": 2 - }, - "targets.json": { - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.targets.json deleted file mode 100755 index 44f46760..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "ced6f3e967a4366731f268a72a0f78aac0025641345a869baa013bb903502d7812ff22086834ab6b45f5c47cb7832139048663549d4e87d9219a0be7145c2807" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.timestamp.json deleted file mode 100755 index 5d64bbdd..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/3.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "65d615183cd58d8a6df898e8f7d6e886a44ca111d6cce95e9a86414b369703b2e9e897bfde405d0c0688b26a11c8f74217d0e0f62b4307d30919ce0f2cb0f700" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "83d637428ffc782a3f762dc6d983548aad231680f2d0d84270e02b538ecd0f68", - "sha512": "3bcc5c70fe8c65d8103dcb60a0773ff436719159854d8d24242fb1f39721e9648b849b2a495487986aba1fdc53382ce604e6ddcd1fde72cbb81f8e8149bfd2f1" - }, - "length": 545, - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/a.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/a.json deleted file mode 100755 index ef485a9c..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "signatures": [ - { - "keyid": "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b", - "sig": "72b215c194090407abc8b7c513d69fd340abbe63037d26cbc2e4dd88c095a14da8d6e4aae0561f265e97d5c658b0260be2031af73c26e157e5f062c5f4aceb00" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "82f52e4503dbb364fabe8e5567f1cf909d4175d45468a021dfe75653db9ac98c" - }, - "scheme": "ed25519" - }, - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "06e4dee0de7826c8d539a6112940b7459892b4ecaf696e67dc064aea0923f95c" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68" - ], - "name": "b", - "paths": [ - "*.txt" - ], - "terminating": false, - "threshold": 1 - }, - { - "keyids": [ - "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b" - ], - "name": "c", - "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/TUFTestFixture2LevelDelegation/server/metadata/b.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/b.json deleted file mode 100755 index b3c9ffd4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/b.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "718fedad390b4d0d470b890781eb8c94e5a7e975aebe65fc0862246c945fce68", - "sig": "6a4f4bb63d7b6db4b6c09ce081fd229052ca087c98d25653c8d187de04dbedfc219aa9482774b939d84eb404fd51cfe383f9ea65e19a1d3cc79b642701bcff0d" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "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/TUFTestFixture2LevelDelegation/server/metadata/c.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/c.json deleted file mode 100755 index b3289663..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/c.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "9ca81f7ff17f6218246474a51b47eb035741bc472557ef5ac493e279f446b85b", - "sig": "c2f5f087f1bb9708f48657789cf8516b3d974e2250d3ec0268e347e89fa6f9eaa9e9441f5402ce32735fe31750013c5dc1b53f4e9a93d748ff060fa94ad3fd07" - } - ], - "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/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/root.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/root.json deleted file mode 100755 index 85a9f0c6..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", - "sig": "bd598e8bc29a3eb07aa71caceb0644977d73df87aae8f84c98aff5e87ea2de642c4950232fc2f4065b12a9c19ecf33e511f4e4ac78da7dcd75b3779802f39504" - } - ], - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/snapshot.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/snapshot.json deleted file mode 100755 index 9a9a016e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/snapshot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "signatures": [ - { - "keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", - "sig": "563e4fa25cf88c0d029ac30608b219f27d9389945c7afd46c118eda1931fb64cae0f376780fee5ddbc66ab768733e2a5b640f3cc19ea687a3e71ae4116e5dd0f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2020-01-08T00:00:00Z", - "meta": { - "a.json": { - "version": 1 - }, - "b.json": { - "version": 1 - }, - "c.json": { - "version": 2 - }, - "targets.json": { - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/targets.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/targets.json deleted file mode 100755 index 44f46760..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/targets.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", - "sig": "ced6f3e967a4366731f268a72a0f78aac0025641345a869baa013bb903502d7812ff22086834ab6b45f5c47cb7832139048663549d4e87d9219a0be7145c2807" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "f758af464295e62a1da4d3267be6d13f4aba9c7d52166d01b6bd5b4559496c9d" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "05e17c1501d627b2597322f80d33aacec6f30a507552d3326a88913422b0e30b" - ], - "name": "a", - "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": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/timestamp.json b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/timestamp.json deleted file mode 100755 index 5d64bbdd..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", - "sig": "65d615183cd58d8a6df898e8f7d6e886a44ca111d6cce95e9a86414b369703b2e9e897bfde405d0c0688b26a11c8f74217d0e0f62b4307d30919ce0f2cb0f700" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2020-01-02T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "83d637428ffc782a3f762dc6d983548aad231680f2d0d84270e02b538ecd0f68", - "sha512": "3bcc5c70fe8c65d8103dcb60a0773ff436719159854d8d24242fb1f39721e9648b849b2a495487986aba1fdc53382ce604e6ddcd1fde72cbb81f8e8149bfd2f1" - }, - "length": 545, - "version": 3 - } - }, - "spec_version": "1.0.0", - "version": 3 - } -} \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt deleted file mode 100644 index 5f1e6033..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: targets.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt deleted file mode 100644 index 3c405619..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: a.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt deleted file mode 100644 index 5f1e6033..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: targets.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt deleted file mode 100644 index 924df500..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: c.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt deleted file mode 100644 index 976e178d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: b.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/a.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/a.txt deleted file mode 100644 index 3c405619..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/a.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: a.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/b.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/b.txt deleted file mode 100644 index 976e178d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/b.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: b.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/c.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/c.txt deleted file mode 100644 index 924df500..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/c.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: c.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt deleted file mode 100644 index 924df500..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: c.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt deleted file mode 100644 index 3c405619..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: a.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt deleted file mode 100644 index 976e178d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: b.txt \ No newline at end of file diff --git a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/targets.txt b/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/targets.txt deleted file mode 100644 index 5f1e6033..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture2LevelDelegation/server/targets/targets.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: targets.txt \ 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 deleted file mode 100644 index 36285a68..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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 deleted file mode 100644 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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 deleted file mode 100644 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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 deleted file mode 100644 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/current/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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 deleted file mode 100644 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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 deleted file mode 100644 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/client/metadata/previous/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index 90237d1e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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 deleted file mode 100644 index bee9490e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.b.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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 deleted file mode 100644 index 9305d64f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.c.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index 2c9f1117..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.d.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index a473d7dc..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.e.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index 941ae66f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.f.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index 08986107..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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 deleted file mode 100644 index dcbd2f47..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index 820691ec..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.targets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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 deleted file mode 100644 index aae05fba..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/1.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index 2d5222c3..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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 deleted file mode 100644 index 11e7e071..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.snapshot.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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 deleted file mode 100644 index bece42a9..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.targets.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "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 deleted file mode 100644 index 218e6de7..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/2.timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index 90237d1e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/a.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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 deleted file mode 100644 index bee9490e..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/b.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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 deleted file mode 100644 index 9305d64f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/c.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index 2c9f1117..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/d.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index a473d7dc..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/e.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index 941ae66f..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/f.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "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 deleted file mode 100644 index 2d5222c3..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "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 deleted file mode 100644 index 11e7e071..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/snapshot.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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 deleted file mode 100644 index bece42a9..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/targets.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "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 deleted file mode 100644 index 218e6de7..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/metadata/timestamp.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "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 deleted file mode 100644 index 7bece393..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/027b3d1814dae8547aed3d7e7b99aa0d59d82cc18411037b0ef0318eb754ce86.e.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 5f1e6033..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/0951c719b5adf26a55700bd1ac6b657fb513b04e4adb335a935a0da7f12f2ac99834b47442d0b832e5f4ffdd365ef538f14d3a52221c0cf81ef7b68ce312476a.targets.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 3c405619..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/3f90cedf303207851bbdc5f857e018daf93b4c0083306cef17df547b42e4e985.a.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 5f1e6033..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/6da6f624811b0d7792c57dc9ed58f1af8cbf4ebfaaaa3ea2011b57b4af63f7e6.targets.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 36ce6ad4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/79b44a183eaa0025f3997b856537502ac1759de74263985ad1dd9ab0bb5cc8ce46b6c45c1bf37adb87c2839cca54ae784c3d3488e994d29f003decc81638d589.d.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 924df500..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/946e2ea9180de673891ae09ce0edfb207966bc32bd6324ebdad2c50c82075ffd.c.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 976e178d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/949c6a4318dabe8bbd140cef99ea669ba031919ccf9bce0f5b4d0b61d1c0aa2e.b.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 3c405619..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/a.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 976e178d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 36ce6ad4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b2ce56612fa7e840d56d263f75804f60baaad5d6e0a7d544e65e1791f2df5e55.d.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f7c5df53..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/b8061c4c83d478aaadc6758a74861f749420e83dd6bf07e931738b0619404a75d12758429b12f8d047643d6d13047ec0b65bb253cf5f5b961515658864301207.f.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 924df500..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/c.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 36ce6ad4..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/d.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 924df500..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ddb5fb256a368d778b5fdd03d497ad79944c766245f3cccfc8b098b14c488ec424a68b86a6a2add36db4ef0f0214f15dbe0d63fbc5ca7a9619fb4c39544d78a9.c.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7bece393..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/e.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f7c5df53..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index f7c5df53..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f0b07df15d4a3e98ffc6ee6a4c00d04623b0171de458d94dbec4abb7646bc60e.f.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 3c405619..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4631ef7ea7b015d7b88e411842fafeb78a72f0181bec72ea9754604ede74ea0e491bf8411659aabc96304fc764d0131ce49ba86066ab5f7b7480dde719e0bfd.a.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 976e178d..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/f4cc9ce5c73b37e2a6707af7a0ea614ea5fa428bd2509e3af4528a5d330ce98a09c4dd98c859ad9b27b8aba24e1eacbf1af8393fdbfed899cecb995c87a11e3c.b.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 7bece393..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/ffca8c347335e5e019deba8a15212297fe25afc734ac06fcd01b4d9dae12b16d750d7a44bdafcada254148990aa6611bc9ed2f2841da2c0dd70bb870be7275f6.e.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 5f1e6033..00000000 --- a/client/testdata/php-tuf-fixtures/TUFTestFixture3LevelDelegation/server/targets/targets.txt +++ /dev/null @@ -1 +0,0 @@ -Contents: targets.txt \ No newline at end of file diff --git a/client/testdata/tools/gen-keys.go b/client/testdata/tools/gen-keys.go deleted file mode 100644 index f4db562e..00000000 --- a/client/testdata/tools/gen-keys.go +++ /dev/null @@ -1,50 +0,0 @@ -// This helper files generates a bunch of ed25519 keys to be used by the test -// runners. This is done such that the signatures stay stable when the metadata -// is regenerated. - -package main - -import ( - "encoding/json" - "fmt" - "os" - "time" - - "github.com/theupdateframework/go-tuf/data" -) - -var expirationDate = time.Date(2100, time.January, 1, 0, 0, 0, 0, time.UTC) - -func main() { - rolenames := []string{ - "root", - "snapshot", - "targets", - "timestamp", - } - - roles := make(map[string][][]*data.PrivateKey) - - for _, name := range rolenames { - keys := [][]*data.PrivateKey{} - - for i := 0; i < 2; i++ { - signer, err := keys.GenerateEd25519Key() - assertNoError(err) - keys = append(keys, []*data.PrivateKey{signer}) - } - - roles[name] = keys - } - - s, err := json.MarshalIndent(&roles, "", " ") - assertNoError(err) - - os.WriteFile("keys.json", []byte(s), 0644) -} - -func assertNoError(err error) { - if err != nil { - panic(fmt.Sprintf("assertion failed: %s", err)) - } -} diff --git a/client/testdata/tools/linkify-metadata.go b/client/testdata/tools/linkify-metadata.go deleted file mode 100644 index 17886808..00000000 --- a/client/testdata/tools/linkify-metadata.go +++ /dev/null @@ -1,112 +0,0 @@ -// This helper command identifies duplicated metadata across multiple test -// stages, and replaces them with symlinks in order to make changes to them -// easier to read. - -package main - -import ( - "crypto/sha256" - "fmt" - "log" - "os" - "path/filepath" -) - -func main() { - for _, consistentSnapshot := range []bool{false, true} { - err := linkifyDir(fmt.Sprintf("consistent-snapshot-%t", consistentSnapshot)) - if err != nil { - log.Fatal(err) - } - } -} - -func linkifyDir(rootDir string) error { - stepDirs, err := readStepDirs(rootDir) - if err != nil { - return err - } - - oldDir := stepDirs[0] - oldHashes := computeHashes(oldDir) - - for _, dir := range stepDirs[1:] { - log.Printf("checking: %s", dir) - - hashes := computeHashes(dir) - - for path, hash := range hashes { - if oldHashes[path] == hash { - newPath := filepath.Join(dir, path) - oldPath := filepath.Join(oldDir, path) - if err = linkifyPath(oldPath, newPath); err != nil { - return err - } - } - } - - oldDir = dir - oldHashes = hashes - log.Printf("-----") - } - - return nil -} - -func readStepDirs(rootDir string) ([]string, error) { - dirEntries, err := os.ReadDir(rootDir) - if err != nil { - return []string{}, err - } - - // We only want to consider linkifying directories. - var dirs []string - for _, dirEntry := range dirEntries { - if dirEntry.IsDir() { - dirs = append(dirs, filepath.Join(rootDir, dirEntry.Name())) - } - } - - return dirs, nil -} - -func computeHashes(dir string) map[string][32]byte { - hashes := make(map[string][32]byte) - - err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if info.IsDir() || !info.Mode().IsRegular() { - return nil - } - - bytes, err := os.ReadFile(path) - if err != nil { - return err - } - - hashes[path[len(dir)+1:]] = sha256.Sum256(bytes) - - return nil - }) - if err != nil { - log.Fatalf("failed to linkify: %s", err) - } - - return hashes -} - -func linkifyPath(oldPath string, newPath string) error { - p, err := filepath.Rel(filepath.Dir(newPath), oldPath) - if err != nil { - return err - } - log.Printf("symlinking %s to %s", newPath, p) - - if err = os.Remove(newPath); err != nil { - return err - } - if err = os.Symlink(p, newPath); err != nil { - return err - } - - return nil -} diff --git a/cmd/tuf-client/README.md b/cmd/tuf-client/README.md deleted file mode 100644 index 1fe80385..00000000 --- a/cmd/tuf-client/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# go-tuf client CLI - -## Install - -``` -go get github.com/theupdateframework/go-tuf/cmd/tuf-client -``` - -## Usage - -The CLI provides three commands: - -* `tuf-client init` - initialize a local file store using root keys (e.g. from - the output of `tuf root-keys`) -* `tuf-client list` - list available targets and their file sizes -* `tuf-client get` - get a target file and write to STDOUT - -All commands require the base URL of the TUF repository as the first non-flag -argument, and accept an optional `--store` flag which is the path to the local -storage. - -Run `tuf-client help` from the command line to get more detailed usage -information. - -## Examples - -``` -# init -$ tuf-client init https://example.com/path/to/repo - -# init with a custom store path -$ tuf-client init --store /tmp/tuf.db https://example.com/path/to/repo - -# list available targets -$ tuf-client list https://example.com/path/to/repo -PATH SIZE -/foo.txt 1.6KB -/bar.txt 336B -/baz.txt 1.5KB - -# get a target -$ tuf-client get https://example.com/path/to/repo /foo.txt -the contents of foo.txt - -# the prefixed / is optional -$ tuf-client get https://example.com/path/to/repo foo.txt -the contents of foo.txt -``` diff --git a/cmd/tuf-client/get.go b/cmd/tuf-client/get.go deleted file mode 100644 index 60df6461..00000000 --- a/cmd/tuf-client/get.go +++ /dev/null @@ -1,51 +0,0 @@ -package main - -import ( - "io" - "os" - - "github.com/flynn/go-docopt" - tuf "github.com/theupdateframework/go-tuf/client" - "github.com/theupdateframework/go-tuf/util" -) - -func init() { - register("get", cmdGet, ` -usage: tuf-client get [-s|--store=] - -Options: - -s The path to the local file store [default: tuf.db] - -Get a target from the repository. - `) -} - -type tmpFile struct { - *os.File -} - -func (t *tmpFile) Delete() error { - t.Close() - return os.Remove(t.Name()) -} - -func cmdGet(args *docopt.Args, client *tuf.Client) error { - if _, err := client.Update(); err != nil { - return err - } - target := util.NormalizeTarget(args.String[""]) - file, err := os.CreateTemp("", "go-tuf") - if err != nil { - return err - } - tmp := tmpFile{file} - if err := client.Download(target, &tmp); err != nil { - return err - } - defer tmp.Delete() - if _, err := tmp.Seek(0, io.SeekStart); err != nil { - return err - } - _, err = io.Copy(os.Stdout, file) - return err -} diff --git a/cmd/tuf-client/init.go b/cmd/tuf-client/init.go deleted file mode 100644 index b3a0f6ae..00000000 --- a/cmd/tuf-client/init.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "io" - "os" - - "github.com/flynn/go-docopt" - tuf "github.com/theupdateframework/go-tuf/client" -) - -func init() { - register("init", cmdInit, ` -usage: tuf-client init [-s|--store=] [] - -Options: - -s The path to the local file store [default: tuf.db] - -Initialize the local file store with root metadata. - `) -} - -func cmdInit(args *docopt.Args, client *tuf.Client) error { - file := args.String[""] - var in io.Reader - if file == "" || file == "-" { - in = os.Stdin - } else { - var err error - in, err = os.Open(file) - if err != nil { - return err - } - } - bytes, err := io.ReadAll(in) - if err != nil { - return err - } - return client.Init(bytes) -} diff --git a/cmd/tuf-client/list.go b/cmd/tuf-client/list.go deleted file mode 100644 index f00209d8..00000000 --- a/cmd/tuf-client/list.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "fmt" - "os" - "text/tabwriter" - - "github.com/dustin/go-humanize" - "github.com/flynn/go-docopt" - tuf "github.com/theupdateframework/go-tuf/client" -) - -func init() { - register("list", cmdList, ` -usage: tuf-client list [-s|--store=] - -Options: - -s The path to the local file store [default: tuf.db] - -List available target files. - `) -} - -func cmdList(args *docopt.Args, client *tuf.Client) error { - if _, err := client.Update(); err != nil { - return err - } - targets, err := client.Targets() - if err != nil { - return err - } - w := tabwriter.NewWriter(os.Stdout, 1, 2, 2, ' ', 0) - defer w.Flush() - fmt.Fprintln(w, "PATH\tSIZE") - for path, meta := range targets { - fmt.Fprintf(w, "%s\t%s\n", path, humanize.Bytes(uint64(meta.Length))) - } - return nil -} diff --git a/cmd/tuf-client/main.go b/cmd/tuf-client/main.go deleted file mode 100644 index df3632b2..00000000 --- a/cmd/tuf-client/main.go +++ /dev/null @@ -1,98 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" - - docopt "github.com/flynn/go-docopt" - tuf "github.com/theupdateframework/go-tuf/client" - tuf_leveldbstore "github.com/theupdateframework/go-tuf/client/leveldbstore" -) - -func main() { - log.SetFlags(0) - - usage := `usage: tuf-client [-h|--help] [...] - -Options: - -h, --help - -Commands: - help Show usage for a specific command - init Initialize with root keys - list List available target files - get Get a target file - -See "tuf-client help " for more information on a specific command. -` - - args, _ := docopt.Parse(usage, nil, true, "", true) - cmd := args.String[""] - cmdArgs := args.All[""].([]string) - - if cmd == "help" { - if len(cmdArgs) == 0 { // `tuf-client help` - fmt.Fprint(os.Stdout, usage) - return - } else { // `tuf-client help ` - cmd = cmdArgs[0] - cmdArgs = []string{"--help"} - } - } - - if err := runCommand(cmd, cmdArgs); err != nil { - log.Fatalln("ERROR:", err) - } -} - -type cmdFunc func(*docopt.Args, *tuf.Client) error - -type command struct { - usage string - f cmdFunc -} - -var commands = make(map[string]*command) - -func register(name string, f cmdFunc, usage string) { - commands[name] = &command{usage: usage, f: f} -} - -func runCommand(name string, args []string) error { - argv := make([]string, 1, 1+len(args)) - argv[0] = name - argv = append(argv, args...) - - cmd, ok := commands[name] - if !ok { - return fmt.Errorf("%s is not a tuf-client command. See 'tuf-client help'", name) - } - - parsedArgs, err := docopt.Parse(cmd.usage, argv, true, "", true) - if err != nil { - return err - } - - client, err := tufClient(parsedArgs) - if err != nil { - return err - } - return cmd.f(parsedArgs, client) -} - -func tufClient(args *docopt.Args) (*tuf.Client, error) { - store, ok := args.String["--store"] - if !ok { - store = args.String["-s"] - } - local, err := tuf_leveldbstore.FileLocalStore(store) - if err != nil { - return nil, err - } - remote, err := tuf.HTTPRemoteStore(args.String[""], nil, nil) - if err != nil { - return nil, err - } - return tuf.NewClient(local, remote), nil -} diff --git a/cmd/tuf/add.go b/cmd/tuf/add.go deleted file mode 100644 index 39dd0a11..00000000 --- a/cmd/tuf/add.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "encoding/json" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("add", cmdAdd, ` -usage: tuf add [--expires=] [--custom=] [...] - -Add target file(s). - -Alternatively, passphrases can be set via environment variables in the -form of TUF_{{ROLE}}_PASSPHRASE - -Options: - --expires= Set the targets metadata file to expire days from now. - --custom= Set custom JSON data for the target(s). -`) -} - -func cmdAdd(args *docopt.Args, repo *tuf.Repo) error { - var custom json.RawMessage - if c := args.String["--custom"]; c != "" { - custom = json.RawMessage(c) - } - paths := args.All[""].([]string) - if arg := args.String["--expires"]; arg != "" { - expires, err := parseExpires(arg) - if err != nil { - return err - } - return repo.AddTargetsWithExpires(paths, custom, expires) - } - return repo.AddTargets(paths, custom) -} diff --git a/cmd/tuf/add_key.go b/cmd/tuf/add_key.go deleted file mode 100644 index e88e25d8..00000000 --- a/cmd/tuf/add_key.go +++ /dev/null @@ -1,77 +0,0 @@ -package main - -import ( - "fmt" - "os" - "time" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" -) - -func init() { - register("add-key", cmdAddKey, ` -usage: tuf add-key [--scheme=] [--expires=] [--public-key=] - -Adds a new signing key for the given role. - -The root metadata file will be staged -with the addition of the key's ID to the role's list of key IDs. - -Options: - --public-key= The Path to the file containing value of the public key. If absent, will be read from stdin. - --expires= Set the metadata file to expire days from now. - --scheme= Set the key scheme to use [default: ed25519]. -`) -} - -func cmdAddKey(args *docopt.Args, repo *tuf.Repo) error { - role := args.String[""] - var keyids []string - - var keyScheme data.KeyScheme - switch t := args.String["--scheme"]; t { - case string(data.KeySchemeEd25519), - string(data.KeySchemeECDSA_SHA2_P256), - string(data.KeySchemeRSASSA_PSS_SHA256): - keyScheme = data.KeyScheme(t) - default: - fmt.Fprintf(os.Stderr, "tuf: key schema %s not recognised\n", t) - return nil - } - f := args.String["--public-key"] - var publicValue string - if f != "" { - bytes, err := os.ReadFile(f) - if err != nil { - return err - } - publicValue = string(bytes) - } else { - var input string - _, err := fmt.Scan(&input) - if err != nil { - return err - } - publicValue = input - } - var err error - var expires time.Time - if arg := args.String["--expires"]; arg != "" { - expires, err = parseExpires(arg) - if err != nil { - return err - } - } else { - expires = data.DefaultExpires(role) - } - keyids, err = repo.AddKeyWithSchemeAndExpires(role, expires, keyScheme, publicValue) - if err != nil { - return err - } - for _, id := range keyids { - fmt.Fprintf(os.Stdout, "Add key with ID %s\n", id) - } - return nil -} diff --git a/cmd/tuf/add_signatures.go b/cmd/tuf/add_signatures.go deleted file mode 100644 index adb24e5d..00000000 --- a/cmd/tuf/add_signatures.go +++ /dev/null @@ -1,75 +0,0 @@ -package main - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "os" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" -) - -func init() { - register("add-signatures", cmdAddSignature, ` -usage: tuf add-signatures [--signatures ] [--format=] [--key-id=] - -Adds signatures (the output of "sign-payload") to the given role metadata file. - -If the signature does not verify, it will not be added. - -Options: - --signatures= The path to the file containing the signatures to add. If not present, the contents are read from stdin - --format= One of 'json', 'hex', or 'base64'. Defaults to 'json' - --key-id= The key-id of the signature being added. Only required if the format is not 'json' -`) -} - -func cmdAddSignature(args *docopt.Args, repo *tuf.Repo) error { - roleFilename := args.String[""] - - f := args.String["--signatures"] - var sigBytes []byte - var err error - if f != "" { - sigBytes, err = os.ReadFile(f) - if err != nil { - return err - } - } else { - var input string - _, err := fmt.Scan(&input) - if err != nil { - return err - } - sigBytes = []byte(input) - } - sigs := []data.Signature{} - switch args.String["--format"] { - case "base64": - base64bytes, err := base64.StdEncoding.DecodeString(string(sigBytes)) - if err != nil { - return err - } - sigs = append(sigs, data.Signature{KeyID: args.String["--key-id"], Signature: base64bytes}) - case "hex": - hex := data.HexBytes{} - if err = hex.FromString(sigBytes); err != nil { - return err - } - sigs = append(sigs, data.Signature{KeyID: args.String["--key-id"], Signature: hex}) - case "json": - default: - if err = json.Unmarshal(sigBytes, &sigs); err != nil { - return err - } - } - for _, sig := range sigs { - if err = repo.AddOrUpdateSignature(roleFilename, sig); err != nil { - return err - } - } - fmt.Fprintln(os.Stderr, "tuf: added", len(sigs), "new signature(s)") - return nil -} diff --git a/cmd/tuf/change_passphrase.go b/cmd/tuf/change_passphrase.go deleted file mode 100644 index be685ad3..00000000 --- a/cmd/tuf/change_passphrase.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import ( - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("change-passphrase", cmdChangePassphrase, ` -usage: tuf change-passphrase - -Changes the passphrase for given role keys file. - -Alternatively, passphrases can be passed via environment variables in the -form of TUF_{{ROLE}}_PASSPHRASE for existing ones and -TUF_NEW_{{ROLE}}_PASSPHRASE for setting new ones. -`) -} - -func cmdChangePassphrase(args *docopt.Args, repo *tuf.Repo) error { - return repo.ChangePassphrase(args.String[""]) -} diff --git a/cmd/tuf/clean.go b/cmd/tuf/clean.go deleted file mode 100644 index 303662bd..00000000 --- a/cmd/tuf/clean.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("clean", cmdClean, ` -usage: tuf clean - -Remove all staged metadata files. -`) -} - -func cmdClean(args *docopt.Args, repo *tuf.Repo) error { - err := repo.Clean() - if err == tuf.ErrNewRepository { - fmt.Fprintln(os.Stderr, "tuf: refusing to clean new repository") - return nil - } - return err -} diff --git a/cmd/tuf/commit.go b/cmd/tuf/commit.go deleted file mode 100644 index 0bff3b28..00000000 --- a/cmd/tuf/commit.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("commit", cmdCommit, ` -usage: tuf commit - -Commit staged files to the repository. -`) -} - -func cmdCommit(args *docopt.Args, repo *tuf.Repo) error { - return repo.Commit() -} diff --git a/cmd/tuf/gen_key.go b/cmd/tuf/gen_key.go deleted file mode 100644 index 2ad77a58..00000000 --- a/cmd/tuf/gen_key.go +++ /dev/null @@ -1,64 +0,0 @@ -package main - -import ( - "fmt" - "os" - "time" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" -) - -func init() { - register("gen-key", cmdGenKey, ` -usage: tuf gen-key [--expires=] [--scheme=] - -Generate a new signing key for the given role. - -The key will be serialized to JSON and written to the "keys" directory with -filename pattern "ROLE-KEYID.json". The root metadata file will also be staged -with the addition of the key's ID to the role's list of key IDs. - -Alternatively, passphrases can be set via environment variables in the -form of TUF_{{ROLE}}_PASSPHRASE - -Options: - --expires= Set the root metadata file to expire days from now. - --scheme= Set the key scheme to use [default: ed25519]. -`) -} - -func cmdGenKey(args *docopt.Args, repo *tuf.Repo) error { - role := args.String[""] - var keyids []string - - keyScheme := data.KeySchemeEd25519 - switch t := args.String["--scheme"]; t { - case string(data.KeySchemeEd25519), - string(data.KeySchemeECDSA_SHA2_P256), - string(data.KeySchemeRSASSA_PSS_SHA256): - keyScheme = data.KeyScheme(t) - default: - fmt.Fprint(os.Stderr, "Using default key scheme", keyScheme) - } - - var err error - var expires time.Time - if arg := args.String["--expires"]; arg != "" { - expires, err = parseExpires(arg) - if err != nil { - return err - } - } else { - expires = data.DefaultExpires(role) - } - keyids, err = repo.GenKeyWithSchemeAndExpires(role, expires, keyScheme) - if err != nil { - return err - } - for _, id := range keyids { - fmt.Fprintf(os.Stdout, "Generated %s %s key with ID %s", role, keyScheme, id) - } - return nil -} diff --git a/cmd/tuf/get_threshold.go b/cmd/tuf/get_threshold.go deleted file mode 100644 index a0d78fdd..00000000 --- a/cmd/tuf/get_threshold.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("get-threshold", cmdGetThreshold, ` -usage: tuf get-threshold - -Gets the threshold for a role. -`) -} - -func cmdGetThreshold(args *docopt.Args, repo *tuf.Repo) error { - role := args.String[""] - - threshold, err := repo.GetThreshold(role) - if err != nil { - return err - } - - fmt.Fprintf(os.Stdout, "The threshold for %s role is %d", role, threshold) - return nil -} diff --git a/cmd/tuf/init.go b/cmd/tuf/init.go deleted file mode 100644 index 7c785494..00000000 --- a/cmd/tuf/init.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("init", cmdInit, ` -usage: tuf init [--consistent-snapshot=false] - -Initialize 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. - `) -} - -func cmdInit(args *docopt.Args, repo *tuf.Repo) error { - return repo.Init(args.String["--consistent-snapshot"] != "false") -} diff --git a/cmd/tuf/main.go b/cmd/tuf/main.go deleted file mode 100644 index 1c9439ea..00000000 --- a/cmd/tuf/main.go +++ /dev/null @@ -1,176 +0,0 @@ -package main - -import ( - "bytes" - "errors" - "fmt" - "log" - "os" - "strconv" - "strings" - "syscall" - "time" - - docopt "github.com/flynn/go-docopt" - tuf "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/util" - "golang.org/x/term" -) - -func main() { - log.SetFlags(0) - - usage := `usage: tuf [-h|--help] [-d|--dir=] [--insecure-plaintext] [...] - -Options: - -h, --help - -d The path to the repository (defaults to the current working directory) - --insecure-plaintext Don't encrypt signing keys - -Commands: - help Show usage for a specific command - init Initialize a new repository - add-key Adds a new signing key for a specific role - gen-key Generate a new signing key for a specific metadata file - revoke-key Revoke a signing key - add Add target file(s) - remove Remove a target file - snapshot Update the snapshot metadata file - timestamp Update the timestamp metadata file - payload Output a role's metadata file for signing - add-signatures Adds signatures generated offline - sign Sign a role's metadata file - sign-payload Sign a file from the "payload" command. - status Check if a role's metadata has expired - commit Commit staged files to the repository - regenerate Recreate the targets metadata file [Not supported yet] - set-threshold Sets the threshold for a role - get-threshold Outputs the threshold for a role - change-passphrase Changes the passphrase for given role keys file - root-keys Output a JSON serialized array of root keys to STDOUT - clean Remove all staged metadata files - -See "tuf help " for more information on a specific command -` - - args, _ := docopt.Parse(usage, nil, true, "", true) - cmd := args.String[""] - cmdArgs := args.All[""].([]string) - - if cmd == "help" { - if len(cmdArgs) == 0 { // `tuf help` - fmt.Fprint(os.Stdout, usage) - return - } else { // `tuf help ` - cmd = cmdArgs[0] - cmdArgs = []string{"--help"} - } - } - - dir, ok := args.String["-d"] - if !ok { - dir = args.String["--dir"] - } - if dir == "" { - var err error - dir, err = os.Getwd() - if err != nil { - log.Fatal(err) - } - } - - if err := runCommand(cmd, cmdArgs, dir, args.Bool["--insecure-plaintext"]); err != nil { - log.Fatalln("ERROR:", err) - } -} - -type cmdFunc func(*docopt.Args, *tuf.Repo) error - -type command struct { - usage string - f cmdFunc -} - -var commands = make(map[string]*command) - -func register(name string, f cmdFunc, usage string) { - commands[name] = &command{usage: usage, f: f} -} - -func runCommand(name string, args []string, dir string, insecure bool) error { - argv := make([]string, 1, 1+len(args)) - argv[0] = name - argv = append(argv, args...) - - cmd, ok := commands[name] - if !ok { - return fmt.Errorf("%s is not a tuf command. See 'tuf help'", name) - } - - parsedArgs, err := docopt.Parse(cmd.usage, argv, true, "", true) - if err != nil { - return err - } - - var p util.PassphraseFunc - if !insecure { - p = getPassphrase - } - logger := log.New(os.Stdout, "", 0) - storeOpts := tuf.StoreOpts{Logger: logger, PassFunc: p} - - repo, err := tuf.NewRepoWithOpts(tuf.FileSystemStoreWithOpts(dir, storeOpts), - tuf.WithLogger(logger)) - if err != nil { - return err - } - return cmd.f(parsedArgs, repo) -} - -func parseExpires(arg string) (time.Time, error) { - days, err := strconv.Atoi(arg) - if err != nil { - return time.Time{}, fmt.Errorf("failed to parse --expires arg: %s", err) - } - return time.Now().AddDate(0, 0, days).UTC(), nil -} - -func getPassphrase(role string, confirm bool, change bool) ([]byte, error) { - // In case of change we need to prompt explicitly for a new passphrase - // and not read it from the environment variable, if present - if pass := os.Getenv(fmt.Sprintf("TUF_%s_PASSPHRASE", strings.ToUpper(role))); pass != "" && !change { - return []byte(pass), nil - } - // Alter role string if we are prompting for a passphrase change - if change { - // Check if environment variable for new passphrase exist - if new_pass := os.Getenv(fmt.Sprintf("TUF_NEW_%s_PASSPHRASE", strings.ToUpper(role))); new_pass != "" { - // If so, just read the new passphrase from it and return - return []byte(new_pass), nil - } - // No environment variable set, so proceed prompting for new passphrase - role = fmt.Sprintf("new %s", role) - } - fmt.Fprintf(os.Stderr, "Enter %s keys passphrase: ", role) - passphrase, err := term.ReadPassword(int(syscall.Stdin)) - fmt.Fprintln(os.Stderr) - if err != nil { - return nil, err - } - - if !confirm { - return passphrase, nil - } - - fmt.Fprintf(os.Stderr, "Repeat %s keys passphrase: ", role) - confirmation, err := term.ReadPassword(int(syscall.Stdin)) - fmt.Fprintln(os.Stderr) - if err != nil { - return nil, err - } - - if !bytes.Equal(passphrase, confirmation) { - return nil, errors.New("the entered passphrases do not match") - } - return passphrase, nil -} diff --git a/cmd/tuf/payload.go b/cmd/tuf/payload.go deleted file mode 100644 index 3ae2c891..00000000 --- a/cmd/tuf/payload.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("payload", cmdPayload, ` -usage: tuf payload - -Outputs the metadata file for a role in a ready-to-sign (canonicalized) format. -`) -} - -func cmdPayload(args *docopt.Args, repo *tuf.Repo) error { - p, err := repo.Payload(args.String[""]) - if err != nil { - return err - } - fmt.Fprint(os.Stdout, string(p)) - return nil -} diff --git a/cmd/tuf/regenerate.go b/cmd/tuf/regenerate.go deleted file mode 100644 index bfcbbadc..00000000 --- a/cmd/tuf/regenerate.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "log" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("regenerate", cmdRegenerate, ` -usage: tuf regenerate [--consistent-snapshot=false] - -Recreate the targets metadata file. Important: Not supported yet - -Alternatively, passphrases can be set via environment variables in the -form of TUF_{{ROLE}}_PASSPHRASE -`) -} - -func cmdRegenerate(args *docopt.Args, repo *tuf.Repo) error { - // TODO: implement this - log.Println("Not supported yet") - return nil -} diff --git a/cmd/tuf/remove.go b/cmd/tuf/remove.go deleted file mode 100644 index e1e0b771..00000000 --- a/cmd/tuf/remove.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "errors" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("remove", cmdRemove, ` -usage: tuf remove [--expires=] [--all] [...] - -Remove target file(s). - -Alternatively, passphrases can be set via environment variables in the -form of TUF_{{ROLE}}_PASSPHRASE - -Options: - --all Remove all target files. - --expires= Set the targets metadata file to expire days from now. -`) -} - -func cmdRemove(args *docopt.Args, repo *tuf.Repo) error { - paths := args.All[""].([]string) - if len(paths) == 0 && !args.Bool["--all"] { - return errors.New("either specify some paths or set the --all flag to remove all targets") - } - if arg := args.String["--expires"]; arg != "" { - expires, err := parseExpires(arg) - if err != nil { - return err - } - return repo.RemoveTargetsWithExpires(paths, expires) - } - return repo.RemoveTargets(paths) -} diff --git a/cmd/tuf/revoke_key.go b/cmd/tuf/revoke_key.go deleted file mode 100644 index 8aff2e09..00000000 --- a/cmd/tuf/revoke_key.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("revoke-key", cmdRevokeKey, ` -usage: tuf revoke-key [--expires=] - -Revoke a signing key - -The key will be removed from the root metadata file, but the key will remain in the -"keys" directory if present. - -Options: - --expires= Set the root metadata file to expire days from now. -`) -} - -func cmdRevokeKey(args *docopt.Args, repo *tuf.Repo) error { - if arg := args.String["--expires"]; arg != "" { - expires, err := parseExpires(arg) - if err != nil { - return err - } - return repo.RevokeKeyWithExpires(args.String[""], args.String[""], expires) - } - return repo.RevokeKey(args.String[""], args.String[""]) -} diff --git a/cmd/tuf/root_keys.go b/cmd/tuf/root_keys.go deleted file mode 100644 index e3397648..00000000 --- a/cmd/tuf/root_keys.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("root-keys", cmdRootKeys, ` -usage: 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. -`) -} - -func cmdRootKeys(args *docopt.Args, repo *tuf.Repo) error { - keys, err := repo.RootKeys() - if err != nil { - return err - } - data, err := json.Marshal(keys) - if err == nil { - fmt.Fprintf(os.Stderr, "The resulting JSON should be distributed to clients for performing initial updates:\n\n") - fmt.Fprintln(os.Stdout, string(data)) - } - return err -} diff --git a/cmd/tuf/set_threshold.go b/cmd/tuf/set_threshold.go deleted file mode 100644 index 29149ff9..00000000 --- a/cmd/tuf/set_threshold.go +++ /dev/null @@ -1,34 +0,0 @@ -package main - -import ( - "fmt" - "os" - "strconv" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("set-threshold", cmdSetThreshold, ` -usage: tuf set-threshold - -Set the threshold for a role. -`) -} - -func cmdSetThreshold(args *docopt.Args, repo *tuf.Repo) error { - role := args.String[""] - thresholdStr := args.String[""] - threshold, err := strconv.Atoi(thresholdStr) - if err != nil { - return err - } - - if err := repo.SetThreshold(role, threshold); err != nil { - return err - } - - fmt.Fprintf(os.Stdout, "The threshold for %s role is now %d", role, threshold) - return nil -} diff --git a/cmd/tuf/sign.go b/cmd/tuf/sign.go deleted file mode 100644 index ee8917bb..00000000 --- a/cmd/tuf/sign.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("sign", cmdSign, ` -usage: tuf sign - -Sign a role's metadata file. - -Signs the given role's staged metadata file with all keys present in the 'keys' -directory for that role. -`) -} - -func cmdSign(args *docopt.Args, repo *tuf.Repo) error { - return repo.Sign(args.String[""]) -} diff --git a/cmd/tuf/sign_payload.go b/cmd/tuf/sign_payload.go deleted file mode 100644 index 1905fd2e..00000000 --- a/cmd/tuf/sign_payload.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - - "github.com/flynn/go-docopt" - tuf "github.com/theupdateframework/go-tuf" -) - -func init() { - register("sign-payload", cmdSignPayload, ` -usage: tuf sign-payload --role= - -Sign a file (outside of the TUF repo) using keys for the given role (from the TUF repo). - -Typically, path will be the output of "tuf payload". -`) -} - -func cmdSignPayload(args *docopt.Args, repo *tuf.Repo) error { - payload, err := os.ReadFile(args.String[""]) - if err != nil { - return err - } - - signatures, err := repo.SignRaw(args.String["--role"], payload) - if err != nil { - return err - } - fmt.Fprintln(os.Stderr, "tuf: signed") - - bytes, err := json.Marshal(signatures) - if err != nil { - return err - } - fmt.Fprint(os.Stdout, string(bytes)) - - return nil -} diff --git a/cmd/tuf/snapshot.go b/cmd/tuf/snapshot.go deleted file mode 100644 index dfffb696..00000000 --- a/cmd/tuf/snapshot.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("snapshot", cmdSnapshot, ` -usage: tuf snapshot [--expires=] - -Update the snapshot metadata file. - -Alternatively, passphrases can be set via environment variables in the -form of TUF_{{ROLE}}_PASSPHRASE - -Options: - --expires= Set the snapshot metadata file to expire days from now. -`) -} - -func cmdSnapshot(args *docopt.Args, repo *tuf.Repo) error { - if arg := args.String["--expires"]; arg != "" { - expires, err := parseExpires(arg) - if err != nil { - return err - } - return repo.SnapshotWithExpires(expires) - } - return repo.Snapshot() -} diff --git a/cmd/tuf/status.go b/cmd/tuf/status.go deleted file mode 100644 index 97568e78..00000000 --- a/cmd/tuf/status.go +++ /dev/null @@ -1,47 +0,0 @@ -package main - -import ( - "fmt" - "time" - - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("status", cmdStatus, ` -usage: tuf status --valid-at= - -Check if the role's metadata will be expired on the given date. - -The command's exit status will be 1 if the role has expired, 0 otherwise. - -Example: - # See if timestamp metadata is expiring in the next hour: - tuf status --valid-at "$(date -d '+1 hour')" timestamp || echo "Time to refresh" - -Options: - --valid-at= Must be in one of the formats: - * RFC3339 - 2006-01-02T15:04:05Z07:00 - * RFC822 - 02 Jan 06 15:04 MST - * UnixDate - Mon Jan _2 15:04:05 MST 2006 -`) -} - -func cmdStatus(args *docopt.Args, repo *tuf.Repo) error { - role := args.String[""] - validAtStr := args.String["--valid-at"] - - formats := []string{ - time.RFC3339, - time.RFC822, - time.UnixDate, - } - for _, fmt := range formats { - validAt, err := time.Parse(fmt, validAtStr) - if err == nil { - return repo.CheckRoleUnexpired(role, validAt) - } - } - return fmt.Errorf("failed to parse --valid-at arg") -} diff --git a/cmd/tuf/timestamp.go b/cmd/tuf/timestamp.go deleted file mode 100644 index 646f174e..00000000 --- a/cmd/tuf/timestamp.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "github.com/flynn/go-docopt" - "github.com/theupdateframework/go-tuf" -) - -func init() { - register("timestamp", cmdTimestamp, ` -usage: tuf timestamp [--expires=] - -Update the timestamp metadata file. - -Alternatively, passphrases can be set via environment variables in the -form of TUF_{{ROLE}}_PASSPHRASE - -Options: - --expires= Set the timestamp metadata file to expire days from now. -`) -} - -func cmdTimestamp(args *docopt.Args, repo *tuf.Repo) error { - if arg := args.String["--expires"]; arg != "" { - expires, err := parseExpires(arg) - if err != nil { - return err - } - return repo.TimestampWithExpires(expires) - } - return repo.Timestamp() -} diff --git a/data/hex_bytes.go b/data/hex_bytes.go deleted file mode 100644 index 36e5a5a3..00000000 --- a/data/hex_bytes.go +++ /dev/null @@ -1,51 +0,0 @@ -package data - -import ( - "crypto/sha256" - "encoding/hex" - "errors" -) - -type HexBytes []byte - -func (b *HexBytes) UnmarshalJSON(data []byte) error { - if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { - return errors.New("tuf: invalid JSON hex bytes") - } - res := make([]byte, hex.DecodedLen(len(data)-2)) - _, err := hex.Decode(res, data[1:len(data)-1]) - if err != nil { - return err - } - *b = res - return nil -} -func (b *HexBytes) FromString(data []byte) error { - res := make([]byte, hex.DecodedLen(len(data))) - _, err := hex.Decode(res, data) - if err != nil { - return err - } - *b = res - return nil -} - -func (b HexBytes) MarshalJSON() ([]byte, error) { - res := make([]byte, hex.EncodedLen(len(b))+2) - res[0] = '"' - res[len(res)-1] = '"' - hex.Encode(res[1:], b) - return res, nil -} - -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/hex_bytes_test.go b/data/hex_bytes_test.go deleted file mode 100644 index 8c11623e..00000000 --- a/data/hex_bytes_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package data - -import ( - "encoding/json" - "testing" - - . "gopkg.in/check.v1" -) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type HexBytesSuite struct{} - -var _ = Suite(&HexBytesSuite{}) - -func (HexBytesSuite) TestUnmarshalJSON(c *C) { - var data HexBytes - err := json.Unmarshal([]byte(`"666f6f"`), &data) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, "foo") -} - -func (HexBytesSuite) TestUnmarshalJSONError(c *C) { - var data HexBytes - - // uneven length - err := json.Unmarshal([]byte(`"a"`), &data) - c.Assert(err, Not(IsNil)) - - // invalid hex - err = json.Unmarshal([]byte(`"zz"`), &data) - c.Assert(err, Not(IsNil)) - - // wrong type - err = json.Unmarshal([]byte("6"), &data) - c.Assert(err, Not(IsNil)) -} - -func (HexBytesSuite) TestMarshalJSON(c *C) { - data, err := json.Marshal(HexBytes("foo")) - c.Assert(err, IsNil) - c.Assert(data, DeepEquals, []byte(`"666f6f"`)) -} diff --git a/data/types.go b/data/types.go deleted file mode 100644 index eb00489b..00000000 --- a/data/types.go +++ /dev/null @@ -1,348 +0,0 @@ -package data - -import ( - "bytes" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "path" - "strings" - "sync" - "time" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" -) - -type KeyType string - -type KeyScheme string - -type HashAlgorithm string - -const ( - KeyIDLength = sha256.Size * 2 - - KeyTypeEd25519 KeyType = "ed25519" - // From version 1.0.32, the reference implementation defines 'ecdsa', - // not 'ecdsa-sha2-nistp256' for NIST P-256 curves. - KeyTypeECDSA_SHA2_P256 KeyType = "ecdsa" - KeyTypeECDSA_SHA2_P256_OLD_FMT KeyType = "ecdsa-sha2-nistp256" - KeyTypeRSASSA_PSS_SHA256 KeyType = "rsa" - - KeySchemeEd25519 KeyScheme = "ed25519" - KeySchemeECDSA_SHA2_P256 KeyScheme = "ecdsa-sha2-nistp256" - KeySchemeRSASSA_PSS_SHA256 KeyScheme = "rsassa-pss-sha256" - - HashAlgorithmSHA256 HashAlgorithm = "sha256" - HashAlgorithmSHA512 HashAlgorithm = "sha512" -) - -var ( - HashAlgorithms = []HashAlgorithm{HashAlgorithmSHA256, HashAlgorithmSHA512} - ErrPathsAndPathHashesSet = errors.New("tuf: failed validation of delegated target: paths and path_hash_prefixes are both set") -) - -type Signed struct { - Signed json.RawMessage `json:"signed"` - Signatures []Signature `json:"signatures"` -} - -type Signature struct { - KeyID string `json:"keyid"` - Signature HexBytes `json:"sig"` -} - -type PublicKey struct { - Type KeyType `json:"keytype"` - Scheme KeyScheme `json:"scheme"` - Algorithms []HashAlgorithm `json:"keyid_hash_algorithms,omitempty"` - Value json.RawMessage `json:"keyval"` - - ids []string - idOnce sync.Once -} - -type PrivateKey struct { - Type KeyType `json:"keytype"` - Scheme KeyScheme `json:"scheme,omitempty"` - Algorithms []HashAlgorithm `json:"keyid_hash_algorithms,omitempty"` - Value json.RawMessage `json:"keyval"` -} - -func (k *PublicKey) IDs() []string { - k.idOnce.Do(func() { - data, err := cjson.EncodeCanonical(k) - if err != nil { - panic(fmt.Errorf("tuf: error creating key ID: %w", err)) - } - digest := sha256.Sum256(data) - k.ids = []string{hex.EncodeToString(digest[:])} - }) - return k.ids -} - -func (k *PublicKey) ContainsID(id string) bool { - for _, keyid := range k.IDs() { - if id == keyid { - return true - } - } - return false -} - -func DefaultExpires(role string) time.Time { - var t time.Time - switch role { - case "root": - t = time.Now().AddDate(1, 0, 0) - case "snapshot": - t = time.Now().AddDate(0, 0, 7) - case "timestamp": - t = time.Now().AddDate(0, 0, 1) - default: - // targets and delegated targets - t = time.Now().AddDate(0, 3, 0) - } - return t.UTC().Round(time.Second) -} - -type Root struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Keys map[string]*PublicKey `json:"keys"` - Roles map[string]*Role `json:"roles"` - Custom *json.RawMessage `json:"custom,omitempty"` - - ConsistentSnapshot bool `json:"consistent_snapshot"` -} - -func NewRoot() *Root { - return &Root{ - Type: "root", - SpecVersion: "1.0", - Expires: DefaultExpires("root"), - Keys: make(map[string]*PublicKey), - Roles: make(map[string]*Role), - ConsistentSnapshot: true, - } -} - -func (r *Root) AddKey(key *PublicKey) bool { - changed := false - for _, id := range key.IDs() { - if _, ok := r.Keys[id]; !ok { - changed = true - r.Keys[id] = key - } - } - return changed -} - -type Role struct { - KeyIDs []string `json:"keyids"` - Threshold int `json:"threshold"` -} - -func (r *Role) AddKeyIDs(ids []string) bool { - roleIDs := make(map[string]struct{}) - for _, id := range r.KeyIDs { - roleIDs[id] = struct{}{} - } - changed := false - for _, id := range ids { - if _, ok := roleIDs[id]; !ok { - changed = true - r.KeyIDs = append(r.KeyIDs, id) - } - } - return changed -} - -type Files map[string]TargetFileMeta - -type Hashes map[string]HexBytes - -func (f Hashes) HashAlgorithms() []string { - funcs := make([]string, 0, len(f)) - for name := range f { - funcs = append(funcs, name) - } - return funcs -} - -type metapathFileMeta struct { - Length int64 `json:"length,omitempty"` - Hashes Hashes `json:"hashes,omitempty"` - Version int64 `json:"version"` - Custom *json.RawMessage `json:"custom,omitempty"` -} - -// SnapshotFileMeta is the meta field of a snapshot -// Note: Contains a `custom` field -type SnapshotFileMeta metapathFileMeta - -type SnapshotFiles map[string]SnapshotFileMeta - -type Snapshot struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta SnapshotFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` -} - -func NewSnapshot() *Snapshot { - return &Snapshot{ - Type: "snapshot", - SpecVersion: "1.0", - Expires: DefaultExpires("snapshot"), - Meta: make(SnapshotFiles), - } -} - -type FileMeta struct { - Length int64 `json:"length"` - Hashes Hashes `json:"hashes"` -} - -type TargetFiles map[string]TargetFileMeta - -type TargetFileMeta struct { - FileMeta - Custom *json.RawMessage `json:"custom,omitempty"` -} - -func (f TargetFileMeta) HashAlgorithms() []string { - return f.FileMeta.Hashes.HashAlgorithms() -} - -type Targets struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Targets TargetFiles `json:"targets"` - Delegations *Delegations `json:"delegations,omitempty"` - Custom *json.RawMessage `json:"custom,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]*PublicKey `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, _ := path.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 - - // Prepare decoder - dec := json.NewDecoder(bytes.NewReader(b)) - - // Unmarshal delegated role - if err := dec.Decode((*delegatedRoleAlias)(d)); err != nil { - return err - } - - return d.validatePaths() -} - -func NewTargets() *Targets { - return &Targets{ - Type: "targets", - SpecVersion: "1.0", - Expires: DefaultExpires("targets"), - Targets: make(TargetFiles), - } -} - -type TimestampFileMeta metapathFileMeta - -type TimestampFiles map[string]TimestampFileMeta - -type Timestamp struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta TimestampFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` -} - -func NewTimestamp() *Timestamp { - return &Timestamp{ - Type: "timestamp", - SpecVersion: "1.0", - Expires: DefaultExpires("timestamp"), - Meta: make(TimestampFiles), - } -} diff --git a/data/types_test.go b/data/types_test.go deleted file mode 100644 index b9523fa4..00000000 --- a/data/types_test.go +++ /dev/null @@ -1,287 +0,0 @@ -package data - -import ( - "encoding/json" - "testing" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" - "github.com/stretchr/testify/assert" - . "gopkg.in/check.v1" -) - -const ( - // This public key is from the TUF specs: - // - // https://github.com/theupdateframework/specification - // - public = `"72378e5bc588793e58f81c8533da64a2e8f1565c1fcc7f253496394ffc52542c"` - keyid10 = "1bf1c6e3cdd3d3a8420b19199e27511999850f4b376c4547b2f32fba7e80fca3" - keyid10algos = "506a349b85945d0d99c7289c3f0f1f6c550218089d1d38a3f64824db31e827ac" -) - -type TypesSuite struct{} - -var _ = Suite(&TypesSuite{}) - -type ed25519Public struct { - PublicKey HexBytes `json:"public"` -} - -func (TypesSuite) TestKeyIDs(c *C) { - var hexbytes HexBytes - err := json.Unmarshal([]byte(public), &hexbytes) - c.Assert(err, IsNil) - keyValBytes, err := json.Marshal(ed25519Public{PublicKey: hexbytes}) - c.Assert(err, IsNil) - - key := PublicKey{ - Type: KeyTypeEd25519, - Scheme: KeySchemeEd25519, - Value: keyValBytes, - } - c.Assert(key.IDs(), DeepEquals, []string{keyid10}) - - key = PublicKey{ - Type: KeyTypeEd25519, - Scheme: KeySchemeEd25519, - Algorithms: HashAlgorithms, - Value: keyValBytes, - } - c.Assert(key.IDs(), DeepEquals, []string{keyid10algos}) -} - -func (TypesSuite) TestRootAddKey(c *C) { - var hexbytes HexBytes - err := json.Unmarshal([]byte(public), &hexbytes) - c.Assert(err, IsNil) - keyValBytes, err := json.Marshal(ed25519Public{PublicKey: hexbytes}) - c.Assert(err, IsNil) - - key := &PublicKey{ - Type: KeyTypeEd25519, - Scheme: KeySchemeEd25519, - Value: keyValBytes, - } - - root := NewRoot() - - c.Assert(root.AddKey(key), Equals, true) - c.Assert(root.AddKey(key), Equals, false) -} - -func (TypesSuite) TestRoleAddKeyIDs(c *C) { - var hexbytes HexBytes - err := json.Unmarshal([]byte(public), &hexbytes) - c.Assert(err, IsNil) - keyValBytes, err := json.Marshal(ed25519Public{PublicKey: hexbytes}) - c.Assert(err, IsNil) - - key := &PublicKey{ - Type: KeyTypeEd25519, - Scheme: KeySchemeEd25519, - Value: keyValBytes, - } - - role := &Role{} - c.Assert(role.KeyIDs, HasLen, 0) - - c.Assert(role.AddKeyIDs(key.IDs()), Equals, true) - c.Assert(role.KeyIDs, DeepEquals, []string{keyid10}) - - // Adding the key again doesn't modify the array. - c.Assert(role.AddKeyIDs(key.IDs()), Equals, false) - c.Assert(role.KeyIDs, DeepEquals, []string{keyid10}) - - // Add another key. - key = &PublicKey{ - Type: KeyTypeEd25519, - Scheme: KeySchemeEd25519, - Algorithms: HashAlgorithms, - Value: keyValBytes, - } - - // Adding the key again doesn't modify the array. - 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.EncodeCanonical(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) -} - -func TestCustomField(t *testing.T) { - testCustomJSON := json.RawMessage([]byte(`{"test":true}`)) - - root := Root{ - Type: "root", - SpecVersion: "1.0", - Keys: make(map[string]*PublicKey), - Roles: make(map[string]*Role), - ConsistentSnapshot: true, - Custom: &testCustomJSON, - } - rootJSON, err := json.Marshal(&root) - assert.NoError(t, err) - assert.Equal(t, []byte("{\"_type\":\"root\",\"spec_version\":\"1.0\",\"version\":0,\"expires\":\"0001-01-01T00:00:00Z\",\"keys\":{},\"roles\":{},\"custom\":{\"test\":true},\"consistent_snapshot\":true}"), rootJSON) - - targets := Targets{ - Type: "targets", - SpecVersion: "1.0", - Targets: make(TargetFiles), - Custom: &testCustomJSON, - } - targetsJSON, err := json.Marshal(&targets) - assert.NoError(t, err) - assert.Equal(t, []byte("{\"_type\":\"targets\",\"spec_version\":\"1.0\",\"version\":0,\"expires\":\"0001-01-01T00:00:00Z\",\"targets\":{},\"custom\":{\"test\":true}}"), targetsJSON) - - snapshot := Snapshot{ - Type: "snapshot", - SpecVersion: "1.0", - Meta: make(SnapshotFiles), - Custom: &testCustomJSON, - } - snapshotJSON, err := json.Marshal(&snapshot) - assert.NoError(t, err) - assert.Equal(t, []byte("{\"_type\":\"snapshot\",\"spec_version\":\"1.0\",\"version\":0,\"expires\":\"0001-01-01T00:00:00Z\",\"meta\":{},\"custom\":{\"test\":true}}"), snapshotJSON) - - timestamp := Timestamp{ - Type: "timestamp", - SpecVersion: "1.0", - Meta: make(TimestampFiles), - Custom: &testCustomJSON, - } - timestampJSON, err := json.Marshal(×tamp) - assert.NoError(t, err) - assert.Equal(t, []byte("{\"_type\":\"timestamp\",\"spec_version\":\"1.0\",\"version\":0,\"expires\":\"0001-01-01T00:00:00Z\",\"meta\":{},\"custom\":{\"test\":true}}"), timestampJSON) -} diff --git a/docs/ALUMNI b/docs/ALUMNI deleted file mode 100644 index 294df413..00000000 --- a/docs/ALUMNI +++ /dev/null @@ -1,4 +0,0 @@ -Christian Rebischke (github: shibumi) -Erick Tryzelaar (github: erickt) -Jonathan Rudenberg (github: titanous) -Lewis Marshall (github: lmars) \ No newline at end of file diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md deleted file mode 100644 index e9fdc17c..00000000 --- a/docs/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -## The Update Framework Community Code of Conduct - -The Update Framework follows the [CNCF Code of -Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md deleted file mode 100644 index 4336fec1..00000000 --- a/docs/CONTRIBUTING.md +++ /dev/null @@ -1,62 +0,0 @@ -# Contributing Guide - -We welcome and encourage community contributions to go-tuf. - -Please familiarize yourself with these Contribution Guidelines before contributing. - -There are many ways to help go-tuf besides contributing code: - -- Fix bugs or file issues. -- Provide feedback on the CLI experience or suggest feature enhancements. -- Improve documentation. - -Please follow the [code of conduct](CODE_OF_CONDUCT.md) when contributing to this project. - -## Contributing Code - -Unless you are fixing a known bug, we strongly recommend discussing it with the community via a GitHub issue or Slack (see [Communication](#communication) below for details) before getting started to ensure that your work is consistent with TUF's specification. - -All contributions are made via pull request. All patches from all contributors get reviewed. See the [Pull Request procedure](#pull-request-procedure). - - -## Pull Request Procedure - -To make a pull request, you will need a GitHub account. See GitHub's documentation on [forking](https://help.github.com/articles/fork-a-repo) and [pull requests](https://help.github.com/articles/using-pull-requests). - -Pull requests should be targeted at the `master` branch. Before creating a pull request, go through this checklist: - -1. Create a feature branch off of `master` so that changes do not get mixed up. -2. If your PR adds new code, it should include tests covering the new code. If your PR fixes a bug, it should include a regression test. -3. PRs that change user-facing behavior or the command-line interface must have associated documentation. -4. All code comments and documentation are expected to have proper English grammar and punctuation. -5. [Rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) your local changes against the `master` branch. -6. Run the full project test suite with the `go test ./...` command and confirm that it passes (see [TESTING.md](TESTING.md) for details). -7. Run `go fmt ./...`. -8. You must agree to the [Developer Certificate of Origin](https://developercertificate.org/) for your contributions; use `git commit -s` ([detailed information here](https://wiki.linuxfoundation.org/dco)). - -When creating a PR: - -1. Your PR title should be descriptive, and follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification (start with `fix:`, `feat:`, or similar). -2. Your PR commit message will be used as the commit message when your PR is merged. Update this field if your PR diverges during review. -3. Your PR description should have details on what the PR does. If it fixes an existing issue, include a line like "Fixes #XXXX". - -When all of the tests are passing, maintainer(s) will be assigned to review and merge the PR. If you're having trouble getting tests to pass, feel free to tag in [MAINTAINERS](MAINTAINERS) for help, or ask in Slack (see [Communication](#communication) below). - - -## Communication - -We use the [#tuf](https://cloud-native.slack.com/archives/C8NMD3QJ3) and [#go-tuf](https://cloud-native.slack.com/archives/C02D577GX54) channel on [CNCF Slack](https://slack.cncf.io/). You are welcome to drop in and ask questions, discuss bugs, etc. - -You might also be interested in the TUF community beyond go-tuf; good places to start include: - -- [TUF mailing list](https://groups.google.com/g/theupdateframework) -- TUF community meetings (monthly; join the mailing list or watch the Slack channel to see invitations) - - -## Pull Request Review Policy - -* Anyone is welcome to review any PR, whether they are a maintainer or not! -* Maintainers should aim to turn around reviews within five business days; feel free to ping, or tag in specific maintainers if a PR is taking longer than that. -* See [MAINTAINERS](MAINTAINERS) for the current list of maintainers. - -Maintainers should look in [MAINTAINERS.md](MAINTAINERS.md) for detailed quidelines. diff --git a/docs/MAINTAINERS b/docs/MAINTAINERS deleted file mode 100644 index 41d0f366..00000000 --- a/docs/MAINTAINERS +++ /dev/null @@ -1,7 +0,0 @@ -Trishank Karthik Kuppusamy (github: trishankatdatadog) -Joshua Lock (github: joshuagl) -Marina Moore (github: mnm678) -Zack Newman (github: znewman01) -Radoslav Dimitrov (github: rdimitrov) -Fredrik Skogman (github: kommendorkapten) -Marvin Drees (github: MDr164) diff --git a/docs/MAINTAINERS.md b/docs/MAINTAINERS.md deleted file mode 100644 index eb8d8a0a..00000000 --- a/docs/MAINTAINERS.md +++ /dev/null @@ -1,57 +0,0 @@ -# go-tuf maintainer guidelines - -These are expectations for the [MAINTAINERS](MAINTAINERS) of go-tuf; if you are not able to meet these requirements, please remove yourself from the list of maintainers. - -## Process - -Speedy communication makes contributors happy! - -- You should get notifications for all activity in this repository (using the "Watch" feature) and quickly triage each issue/PR as it comes in. - - (non-draft) PRs should have assigned reviewers. - - Important bugs and questions should have assignees. -- If you are assigned to review a PR, please try to *acknowledge* it within one business day (no need if you are OOO). -- Please review all PRs within five business days (of course, it's okay if you're OOO). -- Please use the review checklist below. -- We should make sure there's an assigned reviewer for every PR which has passing tests. - -Versioning: - -- go-tuf releases follow [SemVer](https://semver.org/) with the following modification: - - While go-tuf is pre-1.0, increment the minor version for any breaking changes (in SemVer, there are no guarantees about API stability before 1.0). -- Releases should be tagged in this repository as usual in Go (e.g. `v0.3.1`; see [Publishing a module](https://go.dev/doc/modules/publishing)). - - All maintainers should have permissions to push an appropriately-named `tag`, which will trigger the full release process. - - A patch release can happen at any point, but give the other maintainers 1 day's notice via Slack or GitHub first. - - For a minor release, see the "Project management" tag below. - - We may revisit this policy post-1.0. - -Project management: - -- Try to keep issues up-to-date with status updates! - - Feel free to ping open issues to check on them. - - Use the "assignee" field to indicate when you are working on an issue. - - Use GitHub issue labels to describe the issue (exact labels are still changing, so just look through and add those that seem like a good fit). -- Before publishing a new minor release, there should be an associated [GitHub project](https://github.com/theupdateframework/go-tuf/projects?type=beta) to track issues. -- We will develop more process around project management after we get through the v0.4.0 release. - -## Review checklist - -Code review: - -- [ ] Tests pass (enforced by CI). -- [ ] There should be tests for any new functionality, and regression tests for any bugs. -- [ ] Any user-facing functionality changes/additions (public APIs, command-line interface) should be documented. -- [ ] Changes should be compliant with the [TUF specification](https://theupdateframework.github.io/specification/latest/). - -Pre-merge (check everything again before hitting the merge button!): - -- [ ] Approvals from two different organizations. - - This is *not* currently enforced by CI, though PRs must have at least 2 approvals. - - This may be waived for PRs which only update docs or comments, or trivial changes to tests. -- Make sure that the PR title, commit message, and description are updated if the PR changes significantly during review. - -New version of the TUF specification: - -- There's an automated workflow which monitors and opens an issue in case there's newer version of the [TUF specification](https://theupdateframework.github.io/specification/latest/) -- Closing the issue should happen after completing the following steps: - - Review the changes to the specification and make sure they're addressed (possibly requires breaking out a few relevant issues). - - Bump the `tuf-version` in the `.github/workflows/specification-version-check.yml` workflow. diff --git a/docs/SECURITY.md b/docs/SECURITY.md deleted file mode 100644 index eb26fed7..00000000 --- a/docs/SECURITY.md +++ /dev/null @@ -1,21 +0,0 @@ -# Security Policy - -The go-tuf community is committed to maintaining a reliable and consistent TUF client implementation. If you believe you have identified a security issue in go-tuf's client protocol, please follow these guidelines for responsible disclosure. - -## Supported Versions - -You may report issues for the most recent version of go-tuf. We will not retroactively make changes to older versions. - -## Reporting a Vulnerability - -If you discover a potential security issue in this project we ask that you notify the go-tuf maintainers via [Github's private reporting feature](https://github.com/theupdateframework/go-tuf/security/advisories/new) (requires being signed in to GitHub). At the minimum, the report must contain the following: - -* A description of the issue. -* A specific version or commit SHA of `go-tuf` where the issue reproduces. -* Instructions to reproduce the issue. - -Please do **not** create a public GitHub issue or pull request to submit vulnerability reports. These public trackers are intended for non-time-sensitive and non-security-related bug reports and feature requests. Major feature requests, such as design changes to the specification, should be proposed via a [TUF Augmentation Protocol](https://theupdateframework.github.io/specification/latest/#tuf-augmentation-proposal-tap-support) (TAP). - -## Disclosure - -This project follows a 90 day disclosure timeline. diff --git a/docs/TESTING.md b/docs/TESTING.md deleted file mode 100644 index 5549853c..00000000 --- a/docs/TESTING.md +++ /dev/null @@ -1,18 +0,0 @@ -# Testing - -The [Python interoperability tests](../client/python_interop/) require Python 3 -(available as `python` on the `$PATH`) and the [`python-tuf` -package](https://github.com/theupdateframework/python-tuf) installed. To use the correct versions of the packages, it is recommended to use a [virtual environment](https://docs.python.org/3/library/venv.html#module-venv) and install the dependencies via: - -``` -python -m pip install --upgrade -r requirements-test.txt -``` - -You may run the full set of tests using -``` -go test ./... -``` - - -To update the data for these tests requires Docker and make (see -test data [README.md](../client/python_interop/testdata/README.md) for details). diff --git a/docs/audit/X41-go-tuf-Audit-2023-Final-Report-PUBLIC.pdf b/docs/audit/X41-go-tuf-Audit-2023-Final-Report-PUBLIC.pdf deleted file mode 100644 index 0ac12c37f332f212f5f1a1d3cd9cb7983e4707f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319663 zcmbrlV~}P+lr7q&uBxwW+qP}HzOvD!F59+k+qP|W*+!Rbyq=jGFK)ay5qBbP{>YOj zGvoZ&d#yaNcJ584C@N0JM9&5wn_C=S1u!u&5;79n8d(B(c>xTvrZ#3y=7j9*%!L2d z01V<5znx4S2pPnG8#GG=RwS+_{UpBpu`5&~}lU@$1kUI2A8q!}xBVR%?GsBwRfxhz)2z31>CvU# zA_QcVY5HiI%5|pWs(-DH4OhuVO9)ltfOw;_ac-Qvl@iJyP@sMhw)ie#;eW+7nI`L&F`#HpPLE-0hKUw9lCyTkTP4$R^)d z1P<7sekvK#8BN-^4n4D@r_|X(6NK9N5jqjOZi#U)E!Eh^1|GRj2NktW%dPfa=2L*FjmiH4=)ci_fSZYt^M8Z6s=J*jA%lj3k)^4z6M#X* z*~sZXXT)tCtp6eYU;m#wm;emI!nSUN+W$cjW)4PrW@dIaMkYcgCKh@|7Di?^CS3r7 zgoCZK-M=ZOe|wYx49cdCw$2X5rjCUF!6z{{CkYj&f5iFEH$%q%e254U{`<1A;lKVL zk@)|$|Ce}7Y;6BW#${Q@%D@jOLW!MJ1;DvM;9n0i>jWgWfZ>(BD-4-0VB^KvA?WaP zAY;OaiyypCjW*tV5T4hadLf2U>T51P3>catS7{NFHCqxESsT3CD@ZxSKK^D7@@$Cq z`hBcP%~K7)+r-nmES?lZD~+c09g#1}cvM^C5tbo#7PD;$=;EYSy|~2QG4ZZ&hAnUU zJ~O)!rSJfCbQC!F@668ne`$7B4pw?rc6K&q=KnN1GZP2L|7Q08u zst$%Wj&_C)rZ&dz00t>SCkJO!0E5WC6;V?c3u9Ad3E}^+`~RhT^HcvJX3zmbG)v z)|FeW-wj;dSZjUO$9S<{1Tm}hvc+w;rn#BO(tGWI{gUg9s73&L1*Cp9VDtE7 ztONC3a{A?k$;Ds1|NiHj;qhm01cDg-;UvD@hsKS_X2Qm^e@9Ko5~m+-taBFH{9Mbm zSP$IhYuoev(hLT?Sc4JFliohQ+k5@aD?6bMXP^@ysXoWcfw@x6@}05lxHXs?UYu3m z%xM{0RlpKzd)w@6O|Z4GfW;^^VO0 zQ4jQOQM928sH}vD@oJEHO5K;UIspIBx*hGDq6Y+lB#a}>W_A6geyewuU1_lR6VA1N z_bz^0Z^#c&j8+a4Km670^ILSv*!3N4s<5F(rCrbbKY9wdbyFFa&?;azAPYQEa8^;} zf3be`L9u-t7U`p(e`FP4Ho->S zZE@f*f?6oYGb-?*$DdL%3iL;R;a3!gUEF`@qo^n8T5cPh0p(;R5CvTxst7U~%)xX^ zyEz{pWM}G5sWiaw++E?b`ys-U{+`_0&A~$N;diA# zrWhBS;?#Kz#0{PmZ#?r*GLJGL0{S3zyT{M zl|DxM-tE60ZDsA2ua&*h@g7KF5xMglN=)Z1*a^pF`b3DKHc09?ca5_k8#tbW2G&KG zK@=F^S$CFYT%@v&jfe8fi4hgJq5VpUt=dO*oK7 ztenk=vHUHyPDHF-Iv5>@T<}J-@Vb25le)vx1 z*hBJgz;UVpm$@TAz2e;=CjDm&*(-5=qQqCy%L&cJZTbBP?n89+i0D&Iz!T*Dq1?>b zV$NWGZy>kWk1YzJ0oQ3D6Fzrmz@xI3*J4_e%okGpw(3-H{fh0UGk`F?P3gX<_Rrd!Tx}D&a{O^`v#ij1>C*g+sZ$NkpN%e3(v4_rhJRYwSiVf< z>xZ`C?9?eJpUr)7l!W#5Nr{gvw6IGy>`%6Ibwhi3wub`0)^I45W^ySxRdqp4kfnj; z2UVUmDi8rwyoAVXq~@%V5^Pg*hw&CNIB-*84;V7|PQTFIp9O^3eVwYZH%5ww_6EwZ zbuqg7Mzn@+?1hsT**n~v4L{ik&roM^to$r!$_O)17Q3c5CAxCO1Hfz1m*FnrMK4ou z^6Qx4$6mur7|U&U8^*IlYA9}*@}O?)$xkt_F~P%C0Tpb0eJZTUOVayd&F#peawJ4h z+%PDbN%4d~_SW5U3ScQtp0>deLGLa2i&~{}k&ngtOxix&GNF_ozeD^W4-N(PI*=hh!#DM{)`P1YJ!OKCAHhaKuXDuSSyi zHX?j?T9ZUctClHD8qdr%FhJcaFJ$%;`7{rvI-7ba7CMeWW$8X0eM{vSV^7ZEN)lRH zeu=##ZX5XpxuBg2Qfm$Q+#2j0IPV_Mo#O@F_=He@zsD1)GhOW6B@x?$+`8ap-FG}b z5<}v;&^qQe-|h=pD5E zYvI;Hy6keRTBYk_CD=yij_WD5 zaP1-d&~#)rS;&){W*EEq(U0w*r*YA%AD{q{i1$25R!2`3tXLtAaeS9eyv+Q_!4R2* zVkApDwifwTG;T~MhI|k%tDk{90#xU8f*zO9mE)?FDaGmE3Z#Z_M*0O2Q$_2I7N#Tx=_$#Mc7lWeEB`sesQ&c85}OkWT0qjU z1;DtiIHeC0m@TV-)YT@9^!~+VPec_C*-u}6qkY@Dc!P|YI!4laAxKa7O0?+sGIx=5)r8Y)KrY1W2y|e#CGjFfYbyX|1QVQ3$U^y zj<{v=yLi_!4vPBcobw@iHYWMBrV8%+uD{Vd?HXgKNkKqG+5HTP0_yn!kNFSqgk>3a z=b=xhU$y3%sM*{!i?S}g7barfa@iFK%`0bT%dF0NPT{!n*VLxUbg?r{Xy1sDd!z-K zz%(ST+|tsLumm~7l>Cz-itDaX>kU;OZV&U;XYgATx$I0gh#8vk-SUWqKnis+hd*1p z;j>MA6$-eO&PIb*+U$9l<$HbvIlTdY#7@tOt_9bEwJe@m14*bqleNe?b^{u86tiMq zon}4r!mTZ8%->T^;yiyN7@V!OJXe<`H*IcOUhqJK8JkP~vM?ot3nqGx8_$N*oo2e& zdbNAbmUsCjfCB!;FBvuzKhNzxLKuwC00-;k5^)IyY0N-1@wM0u)3qtNH}6n<{MY@Y z$rF)Q@%HvgsqfTn9plG#M7hY)J$-1YNOYHlFZZIs10`XjSai}>r-*&|t`t{rwWWVh z6G!WvN!ohs967^!PqiXxNVx==TIkoa5FY@fc$=PM!KMDmMj4OQ5E0}ZRW51yIp5>J zju$Kds|frZ)i5q$$;oqcJep0Yx1=WEe5))fjk=@WyXL2t6zIIVG^q)=5Ekn3m57!Z8V1D3F#(owqkSI+}aB{-SWI0 z)cxcY{B=@*`>hM1LeD0vE%s{Vm?00jC9s7i@x4nMc=*k^Rb6q9e&E(hO&%NY=EFBoPkE?YnEVT=urhN37$i+C%*>tsYb<3#vxUBvdc zt%Hi4q47U;`d?y2!ol#Li1}Y(874+{R@VQF%lscj;`*hos{yJQhQ3EUx}snPst~ty zA~9aS0wQ8k4Jfs;C?X;%$Y0_-N@X+%S;~A45Q_*@2vAH91xgTMWM!zouJ`d1Th^Hz zrmjy{KEC7}EVkR%Hm=9OAX@#mm?B7u)Tdhd_(Ho# zh8CU3d+G!R{A}&@!k{52XYtFn#ET^=$f4ZV9-vD&m-N$)+vxEUJx`GJUlqmuu(L#Y zH-d0jyV=@o6Yv~-mzQ|;jl;0@Wld(}*%+P!Z~yqLrx{;8Rc4TAb#b?31fk6<_yqTx zbh~L85PYNM#bnvhzJ=|De0=K;;5ad3AjrGQTp3@KjJ44l8k zBM{FN(gg)y+o%iznv!d}+Q`_2SME~MA}^^4FJ;|3p7f%nT9WAfxU)}QWbYWsv_br> zyeZ|YSP4sWyG3R_B_Wb(qJOvWT}65pbQ`DvRnKL{Bh?(FG$bd~v4-a^660rM_3I?7 z9p5R3@ME28m+2AslKq_hdq?O^VwzVxgri$53ZSvb2rNg8^+z9SzqXqIew{E8o3qcM`Q^7xRE%! z)`_IELVqjOO3v8OzAqFs1i!|)(9iH%X1QW5qC7>D~c1$3e?(`(mYm$?=&=~ z8l6S&OdjML=JNMt#v7I9m`k6>uoFg&)1P0>@VZQcPj*+xsmm1Gwd6K>*WSCI1u$>) zYB}_+lq+?J7EEs2>9|#(t)rHuT26SPwe5EuG^#Ay17F@#5oifk{<;^EZBVfTIbbl$ zBG*MeK!qUS6G%WmLl&9k`)-LAkA208s8jB%D>i1#=^Z4lFGhe@ zJ41!kqzt2xSE? zqhi?|skK#Pilh?+Zr6+<^b1vX2;Ndo>f;L#g7PhqF-pioG8)nq>Ct}M0ECwe@LR_U zkHzfPVp~jliHQFAUf4G7tg<%3sENrtjz*?j0*`IWvx!A*)?6BV952~CWya+&uTO#Y z3H0=gU)VNmt~^pvli5!gm3gb(U$U;PGpZG<+?e9x&}K2=Z%Ic#)iWi5aw#}iB){2F~ruWh9 z$(+`(c1eZ)!$MP`O8i3;1f&Yv7LQfu!Btb~$SU1QP+y$qYu2D$f+@kXE*V>47|y8C z!gwQj%8%u-GuLB!sy^Nx>Fk8U_e#d%EdR#1W8k8zRdi2 zQnqZJ9vgao6dm?zwZJqrzUQP_zhDFNqNkb3Gs2*M@jL)4X~rjMRH-XLrCBCXe7AgHD`(~wTr;KdMQHZkQ*h1&8E4AuUP?m6QNUW# zKs^~l;VYT8d~xy!Z%c|`I;^WK>pKDA&pprS@R<4GK*v?=EfBU|yJFAp;IP`yg6_mz zaW;u`+e-}Uii+U~aWrbkc;BEWo%$v7q`^07uk4u$dc6~?-D*9GMZ(~byX~aQnFQ~$ z0O~k5bA*in29NvsAft~lCo_USifm$n75o04l!ZJbazwvU3@P3%%Csm6fj5?-Zx%=} z~VTomYn`(Y9m)2$2wPqE^q~BfPnC_TdM9%kM(Aao zx+jiL(judUy-DmpX@3bxc+g>-pUZq%5&JWTR)7!2mG1(MqZwdIF^I79^i29EciHG` zHbP#UlX8r^=!A`=-|6@um?k(b>SE+mQz)elWWk7d4P`FNW6Q!_l@xLSwMw*AiM2uZ z@LHbu{P;OgN<6HoDB}%Wj0L&U!S(7xus~9>M4T512q)W!36U7$O4_`*v8dkE5U&b> z50mCgjigS#OcyCjW4BI+&wmG#Ek{>~7ENh_@ST7yA-aUlVqFhyp}XgRsPpzcUejL5 zy;xvPHg{xxu~wR>xHPXb*nT<9N<}`Xa4mJf6&ldpe;X=x48z3d$ke^>?F{Ou_@Gh4 zlu{4AKGd8vMV2q^cYNJA=3P1NspSZ(M-DwQT)CDdD-84`{lOgJfItp-s@u^L= zrZxH*&>TwR#J)TvD$mTseen@bFKcm!86a_29XvOQCYGm!i&K<6gxm%i?td`Uawgl= zN9L2Z`yP9syCWwEG$jSln@X|9}jZQ^GozCIUBYK6Jf;cLXO1wz*>rd4gfhq(lVD9B?dU+2@pJ4Dfiz!6DRoy!2Y6#EU0L`qzQIa}@pM*ug`?cES=}yd3XV z;>iA;Iu)t+8}u#@+?a)pL%2fE0~Ldkgmyum>`My}UEQCllIFbabS z&_KH%Jeguut2+7inhE?cPy}9TEedMDy8bJ#X37*zgNl)`zEHliuWA~z7`)YH_vt$_ z0UsX6x5HX;`Lvg%LkpIZDea3Jv7P|F1B!-d8w0WnOz{>qyHAnvtS>?&ArKy)bmlUZ z!MotT+3x`~Y!__S$5cEJA*3^yk71HiVmv0r@D&<)FxPrm*0{W~Jdqw0&t+e6qwsw= z4+SlE($!|#l+7c(pf!Ge&g^K+rH`#b8u4a2x?Az~Z||NvQS;;M)Km5> zFMIn~OEHHddbN}8od6&Li6Je0oy*Oa-ieg*#Uq{yPf9|RcssrRH&Pa*Lh`cb8rk>! zl)GSRA@!)W`I2`rIHudcAsRjD8gUH6g{C|*?0V~8&SG#s9T_y^oxIDKq^Nj;Gy+5v zl(xgm{e-x=yZ1GW@@x}St1;n0lL0JVP|c^&=HPFxD>5kqRJGL4mJr8+A=1mGTge{O zEHeWyWD>xr-B`&KVq;>wI4EAs^D!Js`6awj$&4iEmgg!QTKE8{)WnQjHR!=SAMe@_1O4llz%pK;zDE&gis_vGVX~!=>MH{e}A1^x@O$H zw@tPEV%Zg*+p=4_xEm^~i#s=qz0zzodAq@uTYynd_88L^iX`Sx8q+CQ7fV3|H7zH9B;B$%2I}lNG{^HH*^4_~qiQnOW8+IbrN& zRs+D&3yf|dKL+C=7tk8BJ;g9 z3MfBWTgZ4y=%;u@T#(=^=jh=>h|JcrATBbfJw*1Q!;DN~s;R~K*x@gOXJ`m*gsER~ zzmUw~wHNEl(l0$J6^hNann(g`+Jghx^x^=r3u zR+k{E-@W_z7Uj9xw4khe|FC}DuVW9Y+_R~rsI3gu6*|bUi51y5jBboe#QP$%6}oUz z4FZbKR@Sj!1Se}fK&(oUTg^Y_HNGypk&^3psM31f5xDD;pOg-4AVN$5wRi|jLK-M5 z71`;xXTl21Lj;O80r8avZQ%ViD($qBpTX*3IpQ&=Ab+~xbV$btEa!9W5TK(;F*Y>R zb`O=R)t#w-q$U$Z$kakue1Qm~8R!(Z;6;!6s5JBak|-Et)3}bZ4C|G_x;k&tE7~BO zhV*khOhDpJg;}uq(uHjRm8bN=Lo<%owL&s-_52bWK7s!8L2OQz_(vLT3Qg&|4o?%D zJ|^TMo;r08zb1C}Bh3}9IatWs-%~^-dPia49?i=RQWJ_^j6#}}5@+Dt%ClcJ|4jS^ z(IhocO-?rw2y3E7+kkpOk45mfAREYBxWm%muaR$jh9@EPj1R5nE`!nTBO|UBc-~1x z$5MzMasq!a;wb8^snO-QSs9h?VOa>LiCAOkdVtC|2+-CpEk&#*US!-DwQhlkx%=Hj zVm0u1+&NWWV@947#jxHUEoNg`1CY+(8B3xTz-gfU*?w{4C!Ex41UGQ1rX|62DTX85 z)R{)4(wGnzZ0LCD|gCr@Rgers$(K4sn8Qk2|dr0z=tYSTBe-iDkPf4tWqP-lLZyWqW>Dh%gYQouC&(J zCuzi;EE)PxbNcHMGdx2lB|S6Ogg0 z-*SU6kfhh9Z77y_SbBOTx^S0jqhk^fGiq`#&+AQLR9TP$H`v6&fy{(i#% zEc&&j_Oig`3wBEtnpL%vkUA3!aivA0e_^q~GVBryrH&fI-V7pYb*bQ{Zr7+iTU6jV z>+qZnxu(KmV_}L}&yV}17;MocE;%alGl<$?t()XwuX+QKv^(g+W~XpzH8bb4=I2psw0a>Tr`S0RgEg~vMkBcDd%BI@Frvph}2q(exg$2enRGk_fG z4fR7!ZWsJm#=i6n0#5WXO<#)AZ z1lGU&JS|$@uK+)I`@K2i&v{~HAm&Te+T51FZ`wJ+lT|k1-}u6`TU1OplKfChc7d*u zAJyug*n*TwgGR!-fNgNeX}|Qt>=t~tNI!fsIf9^uW|9s2HX^iNtDErmACY~BVwca= z89O*VyypnxYW^SW<$bS$?_rlKFO>b^mAtG9?r2G9snks}a;It+%e&~d{>>iD<`ZI| zj>X$}E_97-ZRu$@!dQ?ZC0>M#>e%Tk@lh$e7zAM$_^yzQ#%BKIf2emC0_KrF_HCG0 zBtfiI0>qBbDB$`z>NJTHaMW9G!24`v_ykQVn(pt`lJ23{>DFmc95;9SzA#mqMX$$9 z!i_iE)=q2qMXr?GG&JYoOdL#88Gy0B|PufBuZX+UPhBr0ns| zIPpN7RCKny1Y*+8hv=Kbe!U-Y&Ny)l9ZNHir|?&Vn?>hphW%xrvCW#(`3vEhS~T;R zImB{?K9|Y`S}5&Hl0WHo<`S35a3RNuwg8f_T6#MB96qM=7sJ1>DK7eCA{iAV{-~yB z<(|X8{ZFmpr^KK=@M$pvN4b;_Y~YV1=TX7bLJfmvd87 zrZaB6dnZ2yK~+In_0#gp_(dg-u=RQ`cx&>c@{x#&)Dnlq{c!AuyKDV*cxf*T@Z-;& zLCr*>Px2zM0}hl2W|F?o$R*hm-7=tN zt;-#C!kR81enSju?azd+&c|{s~~(GAu`{CiTC)iAK{~UBD6z4Q$@dCu_b#- ziP?He^bS(i&TnVc=Op%$Pp?Ul~!@YiIH{5L}|5}%oNzjVC{ zbE%2OEMKcY7~N9aWNxH|^fU9nrR&rpvUSmh+Hzkv(yuRNWRdLEXtLcs`YIY;#6(s;jP1V)IuDH|GlR6Rf5M+aP5B3XBY6^$~7L7GfT z?0UWC;An2nBl2oQJ3HP$7rG4YO%p>-&5{|V?Y^<159iFu8&a^EKZN3dtr*uSv(P>I z40yMlkuptXEXQp&nePBwlDD{jvTOTkeMCv8*6dm2d%v*2*~sy8(qe2&u`G=mF^4*Q z;=kL@`n$+J{wvg^FLJx;3ga7r4TDq{*U|QbBK+KY*(fQU@z@I=hf#PcV4>9j|Mj8M zI)pCW2kv40CY|6x$j8dT!i{Z(2#iF=U@~uW&W*d&!QJSfqFW zX?OAbpOyJxvyx<8Wn_GObybR`b`aXEjum&M8#bQHA%sgjV&`>?+M*O;Ns^ZFq@0*r zYI!FL(k~ePCu`;Uc`IW1C&GYy?>Ac`)R#!0XL%(}{jaxA!-BUo#}G%fs`Fc@XKSeK z_p%31WysYs?3#h2fSOFh(yoPsK1_idg3;WSU09V&aoK@hamQxh!UX>J^{&^Ab?cN{ znn-8+=NUC_o0*zg-DY?LsqJdS0)vSMxw@%ZB7WtUeW6UjxJu^tOjE9Ynp(Wcps50< zjm4W!|zO?3K+O5rxW36OK1aB^0o=I}N$znr1$p2aH8n(aH05XduE z2~;M>U3J=XdLI-i``q#Sh%c@PduvVm{{jBX_J}?AoCaaFeaWZMQ&M znstn-&poSU7h-K3@FpRSEt&k0ER4jKGRW1C&u!;crqk7EfR!cEW^I*QU{q=H{m7BX zwr@&W-f2JXRJyjN3sdFD4l0P(DJ`e7i_i~W!*byr<6vK^W`2Orw_&B*Vi8f7#1>Ma2 zo|unfHPW+{OV zm8(JA|kB<{4#kTJ@+ug?k;Wj{{`ZIKdY3o2aOKTSm1`psn zkJy^)+UG=I-l_nu7$Gr4VQax~lR8MkN%~!s`3*I#GUH zRAtHAy^j0x^arO0l{Qn6;%tdb0=2~WhXJ|JhGs1@XU}&FS(Ma@ouf(46xYL*C92f} zaeDcw{fP#F-r&lH&(_5#Z9ala;_S(Y$3h*8MO%MjbA%?W1^pFj9CsL6i0(2 z$UIkMf)v5^q@CB|6@ip=B6e(__dNzFXB;PvTkH`~Jpvh(NM4j=u-kc`|9!H~}m zAd_XU7$J)b?zjkX@?6PQ(Gt>JIeVe*QRNNrtuwIeSet+rAv>UP=++-(X!Hd%mWVjA zLC{z$OUpJJ0q+m`o`hBfD!kfz{ZDjNo+gRJGGs)3*{4BE>C%#icawyf(klxBCTztN z4Nl=VVl}9GnVkt5@C;lKBzI6G&B(IFB%2>g)?RT%iPoLb(qY>TuhhG6ABsmaQmSVF zCvCE-FyZGO$;srJ!teIAbz!Gs%Kf67_5R;)6^diK@Jb1OJ+bp>CS=YqC& z4`DMhGTf510mAccQ}DcitMbTL0#MQB>jNo#Ndv`Z9GTvA*^w8MH2DH`U*TA6Y-txG z->5+cs+a^;FLExzYGRUe4(x`AeXSkE2>BrMC*Lq|#W9SJxDSkWNTlTW8F(8NQwmta zcG3PN(moW~+EjCagn}HvFq9n*0pw(;O^;+zznon=LV|sA;=pp!wtWTvapMFErmGFI7i0B)S zSV5bCaO0`DLruuQ0Ed%4WTlkNfjp-l&l5aJp@S#$bi513Ln$A#ap{IWLlud1wRYT5 zXXP3`qg^19dJta(etZpvo?ZdQbBDF?ZNH)Jmsc}-XOl0KO7K63fQ{2%K#}% zPz*NBhb^awZ328jltmzR)Mh^J;NI8WArF(p zky?p>bRu28gT;8TSA_1~=P@Nd!2RarR;R?=MAMHLr!BJ#puFM#TVabrpB8W6h0aQ; zC~#;I`9;feR2XwGITsG0{%qbxTq7v|@6KB20Yc`YkY@J&@8&G zxh2}oaKOVCtAx&+YhU02;taKfOXNo~MYdRFVF5dLjUvl_aVknR2ZOgA&uJTGRD~`{ z^M$_kVJ^ae{ueq}OYJ*JQp&7FPycB&<= zEEN1L7cH^jI3E@C145sk%lMRrv_ZVNAF-lOjb~=92+d&Ya#7XWFU{{*Q}$*OTl}$N z_>Y#qT+MHwvQxitAh!n(N9A1|E0AjUx@wBt6$ni?(_QCuaB?WxRj?}!iAfe%=Bq}5 zrBsYs6&)MBdql0$b*XF*TieuYY_`R5_?-i-QO`#QG)81mo@sKaeKEMf2lQ1e(F?2-Dh1>hjL(^`4psJAv;q+c3yYqAf&BhQFGN z`n%9#rgFs6Gd<;M_|50%3>^8eaOFfV|cuYNlOtz|#e&N_qnwIiBd(hRDI% zxF&-)Afv)148|uP)rz!-tS<#kZ!<*eLVLPD!KFX*_1bGu^(gXW5baEiN<-v><>gP6 zkoMoBFNAdi`x#&qR4pJe?kg>_Knf zvke)_ytU8Ja>p?kIh|Iw^XN5Bsy9m+#Nfn{9HRP%Fx{?-`i+_c)Jo^%DN>IxG5})# z#i2M(31$TJ6rmEAhQ(<@I)1`8#I6LemiY%}4eI=D-!2+&M%HWNn7Bak5n(?D9KCt3 zWiTc{R=bM8O%JLYqpI}4ES7PrAJWFF-a$w}Ex=06!iC<_ zJw5-UbGq=1nHf7|0W!gF0mvvST5}1^69KqrVd-r!%+ogY}!Lm7DJOVQIf6Qre}k z7b;HH%=t3D`%ZxiiEvjl&884Kid|OStB?OPFNu3`;_UvriSJg>-8EyzsUXX%we6be{rHjM*B`X!SWr~53W(6 zn?|Y7B}T@`C!11NJQcGE?{B&l zUrrPor)?Ct!L)S2?x0TExnfm$0ev_V_BmvoHqi>!&O`jx1_|_GKLlxeFL_LVqk?dU z67JB*EFT^p3$$xZH4UHWnJP?^_Oyj-CRGt*Uyp+%b_qF3^VlQ2Qzfmvtw&a|)e*;! zMvl7uBJyd_z^uE4Y&9AZ!7}eT}5V2Z5%MW z{RyIm>(wMneHu0v2ZY59wVQ^;?ws#>J`2)Fe)?J`DcSS+h~YWJ1K~JJA#6_qDm>AM^}s7LG3P0EA2{zOqh$y#QI{FZ^c<{kt zJLV_0Qa;?6%_!l8G~!I~&}$c>iE?z$fq_Z%_?n^2rtv7)&7_GFKQO@jEUJ#wooHDp zhOH0{0*q8Me$-s2x}hw{#k;En#jIU!Rskq z6J{3zFz0d}+d&`qT1OYpP4v$KgO*PYPB}e5A)%?#jZf($v)!5rkepNPeA1Ce2U{v_ z#Gno@ly}?$I0O8{_Cln0bL1**R+yvxSN^IfvoCOZ_5t+Or&ZV zMEFSU1^3?_)9*U4&Enc;Sn~I|9_7iHQnm^%g_exKLbo3gn-Ya3N6fLAWF4(+{aM_l z=6rC_r1QE)~> z?4?x#=P@6+wMf$xSHCvqB(89O5w2yCI}$Exbi~8WtJK%0cH1sq8P`+4qxI~DQ`pmN z{=X+0D*Z}De^xp7Kz$`|PAG1PVFc39CK>SHJtVb7&e;AAcBb3r_?FGJFkN@PJbm4H z@PCCtXf)|Y4Ej6aZNuXBlG(&6)|G#O(q7(V{5P0l{ckYE!O8MJ#?+;{jLHTh;(ye0 zpW@O!G*uZx2ZdO`$O&&?g@}ZS-LSTl8G{|IxSFnoi(p}{r{hbLLsEHM)b!|Hx5^;- z6Nm{*q>17V2N~30Wtepn@J*43iFp^WRJWQt)@rWenBwBCZkxRzHTew}KE~H2P!G|VcP%b9&CL4kZ>e$M&9EW=6fl0X~@MPv91?>tp3z+f2o-p~d9t~L|&)-}Ry6wf2Ch-pEa zenVj)uowj%`us~T`ERvn!)|}kM1$sSBY{H!1dQmXcpJ1On}rjjuVYebuw2C}Hb4k^ zIjL1qG#akUSY)g@NB}z+6+B`DH6)u!6r4cL-5RB{38sz^-QMp#pVWlI=_iJ^wPN0V z9Q8QwVkYoU-=wx%dZ=sKu~Y_w8h@ICjoevg4bZ@ z%ZJ%2OzdZ$FzhTkywB_L9){L8*X}KhpA5pw>Xh|Q@U*lcig-id4_$OPg$y)C1x)DA zU!XwSYJQ_l^g+6(!yLX*Md3pjg%0he6ZD$j^K(pbj`1necd3@?B3=3=lTEU4gmTH~ z%z1~LU z+dcpq6oM?(x>;mx;RwDTwW6JlAH5of-3u0ND+cy!r1)a(gKQa1@$sf^9QX)H8NO~m zeBKwM|D&@!N}TJkzG{Z7u~_0Wkxq9z!nrAO8!j)Zo0~`~H*Q;Zz2f2UMov+H3(BAE z48?& zX;^U$&oAp3UcQZQMr>ZQpV9fLXy@p6O*NNUS}j`zjhBc)dhZyNvB2{GhF@&V|Nk?a zgXO={@(Bt5&x!fTsxk^2g8#vo{-u}0Q! zmuHcA`UxgPGv_U2eTCial7fY-YGk3+i%RzsxG_Lk0P0AzR>wTTxHL7=8&*+jij-W* z9y-%+K$8CZ5^PtLBv+=Yhy|h00cB+-1>raJ9Z>?(0MfFmbNukp>Wb{Wck-yq|HIom z26+~4Yo3+1ZQHhO+qUhj^gnH*(yX*?+o-f{YwDc7xBGVYnK?ZX6Z36Htk_@ni@o0W zSM@yT*J5?oYVk@r8P{5+ zo#KFrh9|D9Gvd~`NE+cPJIV}+=@ky%YYcAln{JtPTQuuR>055V=tzR^K|VK$xF)kP z_O2cKJrZJkzjVi>(PN4CiEkNM(XT$hpzyA(yb4wf*xo9@9aoQH#_E7}I@Re-e^p2- zXVbNdUOFC(Ww3Bk-~Q(S@w3L94na23uwTD#$sb(Q0Uvm`=f1FyP%*sXWybOfa`(31 zQ6+L(lKp(kaH88|jF_LAia!$939Dh@Wq1Bo6iH)s;63d@YzRGU7(q}OQKz5qeZkPa zI4<=j8HpGz!7^V`AhRk*HtUq3BZ7`6pkDo{&LGPwvE>nSjLW_9w!I!ggO9kt80|cq zRrb7}cMIH*?~xLmul9*Zs~@4g*2R+fLeFJ$K=%l(6+5_bKD#!C*-P}J?V$!JTt47BMB z<4u_vS7NEox-r`$AnlxKTG#%|(U$3s<}Tr39F|mL*1`LQtI!o9q{0W7GYcjclD)3vWzLHllaAXWu~FJEn?TpsNH<*iOS?pVgE($>i*(lA z`m~~}uo!9iCx|jQKy|S$A5PBSP+^V)zMez}HZ^<@)MU8#E?f-8&*PYV+d&Nqne9y_ zC(pLmep}Wl7!y1F`7AF=b*f)rzh`msXW(R)OcS+p=WpTP|~BSC(N#X@dNy~g#+t@OG1F3H3sa+z7Bk#_Hw_5;d=|E@Al7Rh6&x%J&9Embl)yf&eT#^m(zgSpo z|8-&gr$LO3>mRf4-%mEZ#3}n=M%a;SFKB`eks%2yOR^AFHw^gq*;V{N@)9v@BIt+S zjhWa=`E{U=sQZ?jRVn!?nf)-Z#5l$bbc_=S3y|prI?NCjeelwH+zZ3hcj~XHRj(99 z$Bt>3*qCz)HMMx(`J>JdH1-*H?)@a-zym%_*x-)dqxZ$g$}X?(V3Kw)WwjNDDg zoPcxj5K?dl9GUlldV8u1h1(|Y5Z-DQuEY%5>24NGZVw@~Vk62%UPbz8_xxw^r_c>temS9y~jL&$b;&IzW7hw0Z*!OWptBh zp;lorMW#=|;iPG6-7~y%)GHmYxrIH^?CM@H;C@dE4xYeaTp_n`?-@qHyYls4jnjVx z&-~{&vHyc8^M5l=|KavyBIMv;W&Fo3^Pi}t>`P4_PgJqynu>)bz6BO3@4xA<067#C zC}ald0oYHh{`Z(2;~zf*krLQ~h^Yr9lW~5^F}7O*r?Y9HBh9AJTEmJaK?(^9ni3K2 zR8Ndo!-zk$6SXr@U7hCM*1ex@30x68zh8NDl%6lCx&5^QH-sw+M@WxDBCg;KMXBpj z`|xKVUOI%-wt4Wr1fE;R7?Y8D!ai-vsQ*#>n2rP@3gIO9TSw}#+2B2PE+T$x@@}S^ z)bcPbCWbL?aH0SyPef`%1+U51TbmdB=`RyS;Q8Vd<&OQ{V)C8qle%3;S?c(Lu__Sx znY|~5P_v_x{7p)#YH+RX^qoT!hG(Txdrd3~AdRL)Tbfty25D21yvPzQfX}8>ksx8a zb(1A7zqH_4h;VPdw=LyaMYoWNZWy9Vk-V0UxcH1JQwQ$(y7TAK+QyT7or)`_`hYPO za)wfU6z_#G_mPWkBCp~$w-Kv3!oQKkze?bX964a}QH?X>&X6x{I6ZTn5U!7>H-%XW zP32aWIM>8mlyd8ouU0vebvxp2nyyc~DE3*?U!}P`^f~Mr*I&@T*LSNaPHCK1Uxxmz zOyiKElcKIt*`{XK6#Y(R{!wI@-x$x3j6n?}2Q$UJo3~!J?aQ49KQ%6i;KY3p@=~

XESsA4_lgmWHW3i5^ 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

^v!v|?n=2+Jxxns;59;?c)?yoG~npD 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 SkP+I%42=ct-D~gW0Qv{AED;_6 diff --git a/docs/audit/blog-post.md b/docs/audit/blog-post.md deleted file mode 100644 index 2b6d127d..00000000 --- a/docs/audit/blog-post.md +++ /dev/null @@ -1,33 +0,0 @@ -# Security audit of go-tuf - -## The Update Framework - -## Radoslav Dimitrov - 06/13/2023 - -go-tuf, a Go implementation of The Update Framework (TUF), plays a critical role in securely managing -software updates. Recently, a security assessment conducted by X41 D-Sec GmbH uncovered a few -security-related findings in go-tuf. The following blog post provides a concise overview of the -assessment's key findings and recommendations. - -The assessment identified two vulnerabilities of medium and low severity in go-tuf, along with -four additional issues without immediate security implications. Even though there are no -high-severity issues, these vulnerabilities still pose risks in update integrity and local file -overwrite scenarios. - -To address the vulnerabilities, it was recommended to implement measures such as linking versions -and making root metadata project-specific. Additionally, validating signatures for all files -processed by go-tuf will enhance protection against file manipulation during transit. Alongside -the identified vulnerabilities, the security assessment highlighted that the “keys” directory had -been assigned with world-readable permissions. Although this does not directly expose key files to -local attackers, it is considered a best practice to assign only the minimum necessary permissions. - -Despite the discovery of only a few vulnerabilities and weaknesses, go-tuf demonstrates a high level -of maturity in terms of security. The security assessment conducted by X41 D-Sec GmbH underscores -the importance of continuously improving the project's security posture and implementing best practices. -Alongside maintaining the project, the maintainers of go-tuf are also working on a new code base -which is based on the positive redesign of python-tuf. This new code base is designed to be more -efficient, user-friendly, and easier to maintain. The ongoing efforts of the maintainers to improve -the project's design and simplicity will contribute to the overall health and long-term success -of go-tuf. By implementing the recommended measures, adhering to best practices, and leveraging -the advancements in the new code base, go-tuf will continue to provide a reliable and secure solution -for managing software updates. diff --git a/encrypted/encrypted.go b/encrypted/encrypted.go deleted file mode 100644 index b884d611..00000000 --- a/encrypted/encrypted.go +++ /dev/null @@ -1,294 +0,0 @@ -// Package encrypted provides a simple, secure system for encrypting data -// symmetrically with a passphrase. -// -// It uses scrypt derive a key from the passphrase and the NaCl secret box -// cipher for authenticated encryption. -// -// Deprecated: The encrypted package from go-tuf is already moved to -// https://github.com/secure-systems-lab/go-securesystemslib and will be deprecated here. -// Use github.com/secure-systems-lab/go-securesystemslib/encrypted instead. -package encrypted - -import ( - "crypto/rand" - "encoding/json" - "errors" - "fmt" - "io" - - "golang.org/x/crypto/nacl/secretbox" - "golang.org/x/crypto/scrypt" -) - -const saltSize = 32 - -const ( - boxKeySize = 32 - boxNonceSize = 24 -) - -// KDFParameterStrength defines the KDF parameter strength level to be used for -// encryption key derivation. -type KDFParameterStrength uint8 - -const ( - // Legacy defines legacy scrypt parameters (N:2^15, r:8, p:1) - Legacy KDFParameterStrength = iota + 1 - // Standard defines standard scrypt parameters which is focusing 100ms of computation (N:2^16, r:8, p:1) - Standard - // OWASP defines OWASP recommended scrypt parameters (N:2^17, r:8, p:1) - OWASP -) - -var ( - // legacyParams represents old scrypt derivation parameters for backward - // compatibility. - legacyParams = scryptParams{ - N: 32768, // 2^15 - R: 8, - P: 1, - } - - // standardParams defines scrypt parameters based on the scrypt creator - // recommendation to limit key derivation in time boxed to 100ms. - standardParams = scryptParams{ - N: 65536, // 2^16 - R: 8, - P: 1, - } - - // owaspParams defines scrypt parameters recommended by OWASP - owaspParams = scryptParams{ - N: 131072, // 2^17 - R: 8, - P: 1, - } - - // defaultParams defines scrypt parameters which will be used to generate a - // new key. - defaultParams = standardParams -) - -const ( - nameScrypt = "scrypt" - nameSecretBox = "nacl/secretbox" -) - -type data struct { - KDF scryptKDF `json:"kdf"` - Cipher secretBoxCipher `json:"cipher"` - Ciphertext []byte `json:"ciphertext"` -} - -type scryptParams struct { - N int `json:"N"` - R int `json:"r"` - P int `json:"p"` -} - -func (sp *scryptParams) Equal(in *scryptParams) bool { - return in != nil && sp.N == in.N && sp.P == in.P && sp.R == in.R -} - -func newScryptKDF(level KDFParameterStrength) (scryptKDF, error) { - salt := make([]byte, saltSize) - if err := fillRandom(salt); err != nil { - return scryptKDF{}, fmt.Errorf("unable to generate a random salt: %w", err) - } - - var params scryptParams - switch level { - case Legacy: - params = legacyParams - case Standard: - params = standardParams - case OWASP: - params = owaspParams - default: - // Fallback to default parameters - params = defaultParams - } - - return scryptKDF{ - Name: nameScrypt, - Params: params, - Salt: salt, - }, nil -} - -type scryptKDF struct { - Name string `json:"name"` - Params scryptParams `json:"params"` - Salt []byte `json:"salt"` -} - -func (s *scryptKDF) Key(passphrase []byte) ([]byte, error) { - return scrypt.Key(passphrase, s.Salt, s.Params.N, s.Params.R, s.Params.P, boxKeySize) -} - -// CheckParams checks that the encoded KDF parameters are what we expect them to -// be. If we do not do this, an attacker could cause a DoS by tampering with -// them. -func (s *scryptKDF) CheckParams() error { - switch { - case legacyParams.Equal(&s.Params): - case standardParams.Equal(&s.Params): - case owaspParams.Equal(&s.Params): - default: - return errors.New("unsupported scrypt parameters") - } - - return nil -} - -func newSecretBoxCipher() (secretBoxCipher, error) { - nonce := make([]byte, boxNonceSize) - if err := fillRandom(nonce); err != nil { - return secretBoxCipher{}, err - } - return secretBoxCipher{ - Name: nameSecretBox, - Nonce: nonce, - }, nil -} - -type secretBoxCipher struct { - Name string `json:"name"` - Nonce []byte `json:"nonce"` - - encrypted bool -} - -func (s *secretBoxCipher) Encrypt(plaintext, key []byte) []byte { - var keyBytes [boxKeySize]byte - var nonceBytes [boxNonceSize]byte - - if len(key) != len(keyBytes) { - panic("incorrect key size") - } - if len(s.Nonce) != len(nonceBytes) { - panic("incorrect nonce size") - } - - copy(keyBytes[:], key) - copy(nonceBytes[:], s.Nonce) - - // ensure that we don't re-use nonces - if s.encrypted { - panic("Encrypt must only be called once for each cipher instance") - } - s.encrypted = true - - return secretbox.Seal(nil, plaintext, &nonceBytes, &keyBytes) -} - -func (s *secretBoxCipher) Decrypt(ciphertext, key []byte) ([]byte, error) { - var keyBytes [boxKeySize]byte - var nonceBytes [boxNonceSize]byte - - if len(key) != len(keyBytes) { - panic("incorrect key size") - } - if len(s.Nonce) != len(nonceBytes) { - // return an error instead of panicking since the nonce is user input - return nil, errors.New("encrypted: incorrect nonce size") - } - - copy(keyBytes[:], key) - copy(nonceBytes[:], s.Nonce) - - res, ok := secretbox.Open(nil, ciphertext, &nonceBytes, &keyBytes) - if !ok { - return nil, errors.New("encrypted: decryption failed") - } - return res, nil -} - -// Encrypt takes a passphrase and plaintext, and returns a JSON object -// containing ciphertext and the details necessary to decrypt it. -func Encrypt(plaintext, passphrase []byte) ([]byte, error) { - return EncryptWithCustomKDFParameters(plaintext, passphrase, Standard) -} - -// EncryptWithCustomKDFParameters takes a passphrase, the plaintext and a KDF -// parameter level (Legacy, Standard, or OWASP), and returns a JSON object -// containing ciphertext and the details necessary to decrypt it. -func EncryptWithCustomKDFParameters(plaintext, passphrase []byte, kdfLevel KDFParameterStrength) ([]byte, error) { - k, err := newScryptKDF(kdfLevel) - if err != nil { - return nil, err - } - key, err := k.Key(passphrase) - if err != nil { - return nil, err - } - - c, err := newSecretBoxCipher() - if err != nil { - return nil, err - } - - data := &data{ - KDF: k, - Cipher: c, - } - data.Ciphertext = c.Encrypt(plaintext, key) - - return json.Marshal(data) -} - -// Marshal encrypts the JSON encoding of v using passphrase. -func Marshal(v interface{}, passphrase []byte) ([]byte, error) { - return MarshalWithCustomKDFParameters(v, passphrase, Standard) -} - -// MarshalWithCustomKDFParameters encrypts the JSON encoding of v using passphrase. -func MarshalWithCustomKDFParameters(v interface{}, passphrase []byte, kdfLevel KDFParameterStrength) ([]byte, error) { - data, err := json.MarshalIndent(v, "", "\t") - if err != nil { - return nil, err - } - return EncryptWithCustomKDFParameters(data, passphrase, kdfLevel) -} - -// Decrypt takes a JSON-encoded ciphertext object encrypted using Encrypt and -// tries to decrypt it using passphrase. If successful, it returns the -// plaintext. -func Decrypt(ciphertext, passphrase []byte) ([]byte, error) { - data := &data{} - if err := json.Unmarshal(ciphertext, data); err != nil { - return nil, err - } - - if data.KDF.Name != nameScrypt { - return nil, fmt.Errorf("encrypted: unknown kdf name %q", data.KDF.Name) - } - if data.Cipher.Name != nameSecretBox { - return nil, fmt.Errorf("encrypted: unknown cipher name %q", data.Cipher.Name) - } - if err := data.KDF.CheckParams(); err != nil { - return nil, err - } - - key, err := data.KDF.Key(passphrase) - if err != nil { - return nil, err - } - - return data.Cipher.Decrypt(data.Ciphertext, key) -} - -// Unmarshal decrypts the data using passphrase and unmarshals the resulting -// plaintext into the value pointed to by v. -func Unmarshal(data []byte, v interface{}, passphrase []byte) error { - decrypted, err := Decrypt(data, passphrase) - if err != nil { - return err - } - return json.Unmarshal(decrypted, v) -} - -func fillRandom(b []byte) error { - _, err := io.ReadFull(rand.Reader, b) - return err -} diff --git a/encrypted/encrypted_test.go b/encrypted/encrypted_test.go deleted file mode 100644 index bdffff9e..00000000 --- a/encrypted/encrypted_test.go +++ /dev/null @@ -1,158 +0,0 @@ -package encrypted - -import ( - "encoding/json" - "strings" - "testing" - - . "gopkg.in/check.v1" -) - -var ( - kdfVectors = map[KDFParameterStrength][]byte{ - Legacy: []byte(`{"kdf":{"name":"scrypt","params":{"N":32768,"r":8,"p":1},"salt":"WO3mVvyTwJ9vwT5/Tk5OW5WPIBUofMjcpEfrLnfY4uA="},"cipher":{"name":"nacl/secretbox","nonce":"tCy7HcTFr4uxv4Nrg/DWmncuZ148U1MX"},"ciphertext":"08n43p5G5yviPEZpO7tPPF4aZQkWiWjkv4taFdhDBA0tamKH4nw="}`), - Standard: []byte(`{"kdf":{"name":"scrypt","params":{"N":65536,"r":8,"p":1},"salt":"FhzPOt9/bJG4PTq6lQ6ecG6GzaOuOy/ynG5+yRiFlNs="},"cipher":{"name":"nacl/secretbox","nonce":"aw1ng1jHaDz/tQ7V2gR9O2+IGQ8xJEuE"},"ciphertext":"HycvuLZL4sYH0BrYTh4E/H20VtAW6u5zL5Pr+IBjYLYnCPzDkq8="}`), - OWASP: []byte(`{"kdf":{"name":"scrypt","params":{"N":131072,"r":8,"p":1},"salt":"m38E3kouJTtiheLQN22NQ8DTito5hrjpUIskqcd375k="},"cipher":{"name":"nacl/secretbox","nonce":"Y6PM13yA+o44pE/W1ZBwczeGnTV/m9Zc"},"ciphertext":"6H8sqj1K6B6yDjtH5AQ6lbFigg/C2yDDJc4rYJ79w9aVPImFIPI="}`), - } -) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type EncryptedSuite struct{} - -var _ = Suite(&EncryptedSuite{}) - -var plaintext = []byte("reallyimportant") - -func (EncryptedSuite) TestRoundtrip(c *C) { - passphrase := []byte("supersecret") - - enc, err := Encrypt(plaintext, passphrase) - c.Assert(err, IsNil) - - // successful decrypt - dec, err := Decrypt(enc, passphrase) - c.Assert(err, IsNil) - c.Assert(dec, DeepEquals, plaintext) - - // wrong passphrase - passphrase[0] = 0 - dec, err = Decrypt(enc, passphrase) - c.Assert(err, NotNil) - c.Assert(dec, IsNil) -} - -func (EncryptedSuite) TestTamperedRoundtrip(c *C) { - passphrase := []byte("supersecret") - - enc, err := Encrypt(plaintext, passphrase) - c.Assert(err, IsNil) - - data := &data{} - err = json.Unmarshal(enc, data) - c.Assert(err, IsNil) - - data.Ciphertext[0] = ^data.Ciphertext[0] - - enc, _ = json.Marshal(data) - - dec, err := Decrypt(enc, passphrase) - c.Assert(err, NotNil) - c.Assert(dec, IsNil) -} - -func (EncryptedSuite) TestDecrypt(c *C) { - enc := []byte(`{"kdf":{"name":"scrypt","params":{"N":32768,"r":8,"p":1},"salt":"N9a7x5JFGbrtB2uBR81jPwp0eiLR4A7FV3mjVAQrg1g="},"cipher":{"name":"nacl/secretbox","nonce":"2h8HxMmgRfuYdpswZBQaU3xJ1nkA/5Ik"},"ciphertext":"SEW6sUh0jf2wfdjJGPNS9+bkk2uB+Cxamf32zR8XkQ=="}`) - passphrase := []byte("supersecret") - - dec, err := Decrypt(enc, passphrase) - c.Assert(err, IsNil) - c.Assert(dec, DeepEquals, plaintext) -} - -func (EncryptedSuite) TestMarshalUnmarshal(c *C) { - passphrase := []byte("supersecret") - - wrapped, err := Marshal(plaintext, passphrase) - c.Assert(err, IsNil) - c.Assert(wrapped, NotNil) - - var protected []byte - err = Unmarshal(wrapped, &protected, passphrase) - c.Assert(err, IsNil) - c.Assert(protected, DeepEquals, plaintext) -} - -func (EncryptedSuite) TestInvalidKDFSettings(c *C) { - passphrase := []byte("supersecret") - - wrapped, err := MarshalWithCustomKDFParameters(plaintext, passphrase, 0) - c.Assert(err, IsNil) - c.Assert(wrapped, NotNil) - - var protected []byte - err = Unmarshal(wrapped, &protected, passphrase) - c.Assert(err, IsNil) - c.Assert(protected, DeepEquals, plaintext) -} - -func (EncryptedSuite) TestLegacyKDFSettings(c *C) { - passphrase := []byte("supersecret") - - wrapped, err := MarshalWithCustomKDFParameters(plaintext, passphrase, Legacy) - c.Assert(err, IsNil) - c.Assert(wrapped, NotNil) - - var protected []byte - err = Unmarshal(wrapped, &protected, passphrase) - c.Assert(err, IsNil) - c.Assert(protected, DeepEquals, plaintext) -} - -func (EncryptedSuite) TestStandardKDFSettings(c *C) { - passphrase := []byte("supersecret") - - wrapped, err := MarshalWithCustomKDFParameters(plaintext, passphrase, Standard) - c.Assert(err, IsNil) - c.Assert(wrapped, NotNil) - - var protected []byte - err = Unmarshal(wrapped, &protected, passphrase) - c.Assert(err, IsNil) - c.Assert(protected, DeepEquals, plaintext) -} - -func (EncryptedSuite) TestOWASPKDFSettings(c *C) { - passphrase := []byte("supersecret") - - wrapped, err := MarshalWithCustomKDFParameters(plaintext, passphrase, OWASP) - c.Assert(err, IsNil) - c.Assert(wrapped, NotNil) - - var protected []byte - err = Unmarshal(wrapped, &protected, passphrase) - c.Assert(err, IsNil) - c.Assert(protected, DeepEquals, plaintext) -} - -func (EncryptedSuite) TestKDFSettingVectors(c *C) { - passphrase := []byte("supersecret") - - for _, v := range kdfVectors { - var protected []byte - err := Unmarshal(v, &protected, passphrase) - c.Assert(err, IsNil) - c.Assert(protected, DeepEquals, plaintext) - } -} - -func (EncryptedSuite) TestUnsupportedKDFParameters(c *C) { - enc := []byte(`{"kdf":{"name":"scrypt","params":{"N":99,"r":99,"p":99},"salt":"cZFcQJdwPhPyhU1R4qkl0qVOIjZd4V/7LYYAavq166k="},"cipher":{"name":"nacl/secretbox","nonce":"7vhRS7j0hEPBWV05skAdgLj81AkGeE7U"},"ciphertext":"6WYU/YSXVbYzl/NzaeAzmjLyfFhOOjLc0d8/GFV0aBFdJvyCcXc="}`) - passphrase := []byte("supersecret") - - dec, err := Decrypt(enc, passphrase) - c.Assert(err, NotNil) - c.Assert(dec, IsNil) - c.Assert(strings.Contains(err.Error(), "unsupported scrypt parameters"), Equals, true) -} diff --git a/errors.go b/errors.go deleted file mode 100644 index 0051c439..00000000 --- a/errors.go +++ /dev/null @@ -1,98 +0,0 @@ -package tuf - -import ( - "errors" - "fmt" - "time" -) - -var ( - ErrInitNotAllowed = errors.New("tuf: repository already initialized") - ErrNewRepository = errors.New("tuf: repository not yet committed") - ErrChangePassphraseNotSupported = errors.New("tuf: store does not support changing passphrase") -) - -type ErrMissingMetadata struct { - Name string -} - -func (e ErrMissingMetadata) Error() string { - return fmt.Sprintf("tuf: missing metadata file %s", e.Name) -} - -type ErrFileNotFound struct { - Path string -} - -func (e ErrFileNotFound) Error() string { - return fmt.Sprintf("tuf: file not found %s", e.Path) -} - -type ErrNoKeys struct { - Name string -} - -func (e ErrNoKeys) Error() string { - return fmt.Sprintf("tuf: no keys available to sign %s", e.Name) -} - -type ErrInsufficientSignatures struct { - Name string - Err error -} - -func (e ErrInsufficientSignatures) Error() string { - return fmt.Sprintf("tuf: insufficient signatures for %s: %s", e.Name, e.Err) -} - -type ErrInvalidRole struct { - Role string - Reason string -} - -func (e ErrInvalidRole) Error() string { - return fmt.Sprintf("tuf: invalid role %s: %s", e.Role, e.Reason) -} - -type ErrInvalidExpires struct { - Expires time.Time -} - -func (e ErrInvalidExpires) Error() string { - return fmt.Sprintf("tuf: invalid expires: %s", e.Expires) -} - -type ErrKeyNotFound struct { - Role string - KeyID string -} - -func (e ErrKeyNotFound) Error() string { - return fmt.Sprintf(`tuf: no key with id "%s" exists for the %s role`, e.KeyID, e.Role) -} - -type ErrNotEnoughKeys struct { - Role string - Keys int - Threshold int -} - -func (e ErrNotEnoughKeys) Error() string { - return fmt.Sprintf("tuf: %s role has insufficient keys for threshold (has %d keys, threshold is %d)", e.Role, e.Keys, e.Threshold) -} - -type ErrPassphraseRequired struct { - Role string -} - -func (e ErrPassphraseRequired) Error() string { - return fmt.Sprintf("tuf: a passphrase is required to access the encrypted %s keys file", e.Role) -} - -type ErrNoDelegatedTarget struct { - Path string -} - -func (e ErrNoDelegatedTarget) Error() string { - return fmt.Sprintf("tuf: no delegated target for path %s", e.Path) -} diff --git a/go.mod b/go.mod deleted file mode 100644 index c77ac70c..00000000 --- a/go.mod +++ /dev/null @@ -1,25 +0,0 @@ -module github.com/theupdateframework/go-tuf - -go 1.20 - -require ( - github.com/dustin/go-humanize v1.0.1 - github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e - github.com/google/gofuzz v1.2.0 - github.com/secure-systems-lab/go-securesystemslib v0.8.0 - github.com/stretchr/testify v1.8.4 - github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d - golang.org/x/crypto v0.18.0 - golang.org/x/term v0.16.0 - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/kr/pretty v0.2.1 // indirect - github.com/kr/text v0.1.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.16.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/go.sum b/go.sum deleted file mode 100644 index 880d2e0e..00000000 --- a/go.sum +++ /dev/null @@ -1,140 +0,0 @@ -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e h1:Ss/B3/5wWRh8+emnK0++g5zQzwDTi30W10pKxKc4JXI= -github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e/go.mod h1:HyVoz1Mz5Co8TFO8EupIdlcpwShBmY98dkT2xeHkvEI= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -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/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA= -github.com/secure-systems-lab/go-securesystemslib v0.8.0/go.mod h1:UH2VZVuJfCYR8WgMlCU1uFsOUU+KeyrTWcSS73NBOzU= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -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.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/fsutil/fsutil.go b/internal/fsutil/fsutil.go deleted file mode 100644 index 138f2103..00000000 --- a/internal/fsutil/fsutil.go +++ /dev/null @@ -1,23 +0,0 @@ -// Package fsutil defiens a set of internal utility functions used to -// interact with the file system. -package fsutil - -import ( - "fmt" - "os" - "path/filepath" -) - -// IsMetaFile tests wheter a DirEntry appears to be a metadata file or not. -func IsMetaFile(e os.DirEntry) (bool, error) { - if e.IsDir() || filepath.Ext(e.Name()) != ".json" { - return false, nil - } - - info, err := e.Info() - if err != nil { - return false, fmt.Errorf("error retrieving FileInfo for %s: %w", e.Name(), err) - } - - return info.Mode().IsRegular(), nil -} diff --git a/internal/fsutil/perm.go b/internal/fsutil/perm.go deleted file mode 100644 index f94add60..00000000 --- a/internal/fsutil/perm.go +++ /dev/null @@ -1,30 +0,0 @@ -//go:build !windows -// +build !windows - -package fsutil - -import ( - "fmt" - "os" -) - -// EnsureMaxPermissions tests the provided file info, returning an error if the -// file's permission bits contain excess permissions not set in maxPerms. -// -// For example, a file with permissions -rw------- will successfully validate -// with maxPerms -rw-r--r-- or -rw-rw-r--, but will not validate with maxPerms -// -r-------- (due to excess --w------- permission) or --w------- (due to -// excess -r-------- permission). -// -// Only permission bits of the file modes are considered. -func EnsureMaxPermissions(fi os.FileInfo, maxPerms os.FileMode) error { - gotPerm := fi.Mode().Perm() - forbiddenPerms := (^maxPerms).Perm() - excessPerms := gotPerm & forbiddenPerms - - if excessPerms != 0 { - return fmt.Errorf("permission bits for file %v failed validation: want at most %v, got %v with excess perms %v", fi.Name(), maxPerms.Perm(), gotPerm, excessPerms) - } - - return nil -} diff --git a/internal/fsutil/perm_test.go b/internal/fsutil/perm_test.go deleted file mode 100644 index f80ef94a..00000000 --- a/internal/fsutil/perm_test.go +++ /dev/null @@ -1,69 +0,0 @@ -//go:build !windows -// +build !windows - -package fsutil - -import ( - "os" - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestEnsureMaxPermissions(t *testing.T) { - tmp := t.TempDir() - p := filepath.Join(tmp, "file.txt") - - // Start with 0644 and change using os.Chmod so umask doesn't interfere. - err := os.WriteFile(p, []byte(`AAA`), 0644) - assert.NoError(t, err) - - // Check matching (1) - err = os.Chmod(p, 0464) - assert.NoError(t, err) - fi, err := os.Stat(p) - assert.NoError(t, err) - err = EnsureMaxPermissions(fi, os.FileMode(0464)) - assert.NoError(t, err) - - // Check matching (2) - err = os.Chmod(p, 0642) - assert.NoError(t, err) - fi, err = os.Stat(p) - assert.NoError(t, err) - err = EnsureMaxPermissions(fi, os.FileMode(0642)) - assert.NoError(t, err) - - // Check matching with file mode bits - err = os.Chmod(p, 0444) - assert.NoError(t, err) - fi, err = os.Stat(p) - assert.NoError(t, err) - err = EnsureMaxPermissions(fi, os.ModeSymlink|os.ModeAppend|os.FileMode(0444)) - assert.NoError(t, err) - - // Check not matching (1) - err = os.Chmod(p, 0444) - assert.NoError(t, err) - fi, err = os.Stat(p) - assert.NoError(t, err) - err = EnsureMaxPermissions(fi, os.FileMode(0400)) - assert.Error(t, err) - - // Check not matching (2) - err = os.Chmod(p, 0444) - assert.NoError(t, err) - fi, err = os.Stat(p) - assert.NoError(t, err) - err = EnsureMaxPermissions(fi, os.FileMode(0222)) - assert.Error(t, err) - - // Check matching due to more restrictive perms on file - err = os.Chmod(p, 0444) - assert.NoError(t, err) - fi, err = os.Stat(p) - assert.NoError(t, err) - err = EnsureMaxPermissions(fi, os.FileMode(0666)) - assert.NoError(t, err) -} diff --git a/internal/fsutil/perm_windows.go b/internal/fsutil/perm_windows.go deleted file mode 100644 index cecfee65..00000000 --- a/internal/fsutil/perm_windows.go +++ /dev/null @@ -1,17 +0,0 @@ -package fsutil - -import ( - "os" -) - -// EnsureMaxPermissions tests the provided file info to make sure the -// permission bits matches the provided. -// On Windows system the permission bits are not really compatible with -// UNIX-like permission bits. By setting the UNIX-like permission bits -// on a Windows system only read/write by all users can be achieved. -// See this issue for tracking and more details: -// https://github.com/theupdateframework/go-tuf/issues/360 -// Currently this method will always return nil. -func EnsureMaxPermissions(fi os.FileInfo, perm os.FileMode) error { - return nil -} diff --git a/internal/roles/roles.go b/internal/roles/roles.go deleted file mode 100644 index 0b134b2a..00000000 --- a/internal/roles/roles.go +++ /dev/null @@ -1,48 +0,0 @@ -package roles - -import ( - "strconv" - "strings" -) - -var TopLevelRoles = map[string]struct{}{ - "root": {}, - "targets": {}, - "snapshot": {}, - "timestamp": {}, -} - -func IsTopLevelRole(name string) bool { - _, ok := TopLevelRoles[name] - return ok -} - -func IsDelegatedTargetsRole(name string) bool { - return !IsTopLevelRole(name) -} - -func IsTopLevelManifest(name string) bool { - if IsVersionedManifest(name) { - var found bool - _, name, found = strings.Cut(name, ".") - if !found { - panic("expected a versioned manifest of the form x.role.json") - } - } - return IsTopLevelRole(strings.TrimSuffix(name, ".json")) -} - -func IsDelegatedTargetsManifest(name string) bool { - return !IsTopLevelManifest(name) -} - -func IsVersionedManifest(name string) bool { - parts := strings.Split(name, ".") - // Versioned manifests have the form "x.role.json" - if len(parts) < 3 { - return false - } - - _, err := strconv.Atoi(parts[0]) - return err == nil -} diff --git a/internal/roles/roles_test.go b/internal/roles/roles_test.go deleted file mode 100644 index 8af1b02c..00000000 --- a/internal/roles/roles_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package roles - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestIsTopLevelRole(t *testing.T) { - assert.True(t, IsTopLevelRole("root")) - assert.True(t, IsTopLevelRole("targets")) - assert.True(t, IsTopLevelRole("timestamp")) - assert.True(t, IsTopLevelRole("snapshot")) - assert.False(t, IsTopLevelRole("bins")) -} - -func TestIsDelegatedTargetsRole(t *testing.T) { - assert.False(t, IsDelegatedTargetsRole("root")) - assert.False(t, IsDelegatedTargetsRole("targets")) - assert.False(t, IsDelegatedTargetsRole("timestamp")) - assert.False(t, IsDelegatedTargetsRole("snapshot")) - assert.True(t, IsDelegatedTargetsRole("deleg")) -} - -func TestIsTopLevelManifest(t *testing.T) { - assert.True(t, IsTopLevelManifest("root.json")) - assert.True(t, IsTopLevelManifest("1.root.json")) - assert.True(t, IsTopLevelManifest("targets.json")) - assert.True(t, IsTopLevelManifest("timestamp.json")) - assert.True(t, IsTopLevelManifest("snapshot.json")) - assert.True(t, IsTopLevelManifest("2.snapshot.json")) - assert.False(t, IsTopLevelManifest("bins.json")) - assert.False(t, IsTopLevelManifest("3.bins.json")) -} - -func TestIsDelegatedTargetsManifest(t *testing.T) { - assert.False(t, IsDelegatedTargetsManifest("root.json")) - assert.False(t, IsDelegatedTargetsManifest("1.root.json")) - assert.False(t, IsDelegatedTargetsManifest("targets.json")) - assert.False(t, IsDelegatedTargetsManifest("2.targets.json")) - assert.False(t, IsDelegatedTargetsManifest("timestamp.json")) - assert.False(t, IsDelegatedTargetsManifest("snapshot.json")) - assert.True(t, IsDelegatedTargetsManifest("bins.json")) - assert.True(t, IsDelegatedTargetsManifest("2.bins.json")) -} - -func TestIsVersionedManifest(t *testing.T) { - assert.False(t, IsVersionedManifest("a.b")) - assert.False(t, IsVersionedManifest("a.b.c")) - assert.False(t, IsVersionedManifest("a.b.json")) - assert.False(t, IsVersionedManifest("1.a")) - assert.True(t, IsVersionedManifest("1.a.json")) - assert.True(t, IsVersionedManifest("2.a.json")) -} diff --git a/internal/sets/strings.go b/internal/sets/strings.go deleted file mode 100644 index 7eee57d0..00000000 --- a/internal/sets/strings.go +++ /dev/null @@ -1,24 +0,0 @@ -package sets - -func StringSliceToSet(items []string) map[string]struct{} { - s := map[string]struct{}{} - for _, item := range items { - s[item] = struct{}{} - } - return s -} - -func StringSetToSlice(items map[string]struct{}) []string { - ret := []string{} - - for k := range items { - ret = append(ret, k) - } - - return ret -} - -func DeduplicateStrings(items []string) []string { - s := StringSliceToSet(items) - return StringSetToSlice(s) -} diff --git a/internal/sets/strings_test.go b/internal/sets/strings_test.go deleted file mode 100644 index 6e0b91d0..00000000 --- a/internal/sets/strings_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package sets - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestStringSliceToSet(t *testing.T) { - assert.Equal(t, - map[string]struct{}{ - "a": {}, - "b": {}, - "c": {}, - }, - StringSliceToSet([]string{"a", "c", "b", "c", "b"})) -} - -func TestStringSetToSlice(t *testing.T) { - assert.ElementsMatch(t, - []string{"a", "b", "c"}, - StringSetToSlice(map[string]struct{}{ - "a": {}, - "b": {}, - "c": {}, - }), - ) -} - -func TestDeduplicateStrings(t *testing.T) { - assert.ElementsMatch(t, - []string{"a", "b", "c"}, - DeduplicateStrings([]string{"a", "c", "b", "c", "b"}), - ) -} diff --git a/internal/signer/sort.go b/internal/signer/sort.go deleted file mode 100644 index 777e201e..00000000 --- a/internal/signer/sort.go +++ /dev/null @@ -1,49 +0,0 @@ -package signer - -import ( - "sort" - - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -// ByIDs implements sort.Interface for []keys.Signer based on -// the sorted public IDs() for each Signer. This facilitates -// deterministic order of signatures, which prevents tests -// that use fixtures from being flaky. -type ByIDs []keys.Signer - -func (b ByIDs) Len() int { - return len(b) -} - -func (b ByIDs) Swap(i, j int) { - b[i], b[j] = b[j], b[i] -} - -func (b ByIDs) Less(i, j int) bool { - ids := b[i].PublicData().IDs() - iIDs := make([]string, len(ids)) - copy(iIDs, ids) - sort.Strings(iIDs) - - ids = b[j].PublicData().IDs() - jIDs := make([]string, len(ids)) - copy(jIDs, ids) - sort.Strings(jIDs) - - minLen := len(iIDs) - if len(jIDs) < minLen { - minLen = len(jIDs) - } - - // Compare iIDs[:minLen] to jIDs[:minLen] element-wise. - for c := 0; c < minLen; c++ { - if iIDs[c] == jIDs[c] { - continue - } - return iIDs[c] < jIDs[c] - } - - // iIDs[:minLen] is equal to jIDs[:minLen], so sort based on length. - return len(iIDs) < len(jIDs) -} diff --git a/internal/signer/sort_test.go b/internal/signer/sort_test.go deleted file mode 100644 index afda5f87..00000000 --- a/internal/signer/sort_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package signer_test - -import ( - "encoding/json" - "sort" - "testing" - - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/signer" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -type mockSigner struct { - value json.RawMessage -} - -func (s *mockSigner) MarshalPrivateKey() (*data.PrivateKey, error) { - panic("not implemented") -} - -func (s *mockSigner) UnmarshalPrivateKey(key *data.PrivateKey) error { - panic("not implemented") -} - -func (s *mockSigner) PublicData() *data.PublicKey { - return &data.PublicKey{ - Type: "mock", - Scheme: "mock", - Algorithms: []data.HashAlgorithm{"mock"}, - Value: s.value, - } -} -func (s *mockSigner) SignMessage(message []byte) ([]byte, error) { - panic("not implemented") -} - -func TestSignerSortByIDs(t *testing.T) { - s1 := &mockSigner{ - value: json.RawMessage(`{"mock": 1}`), - } - s2 := &mockSigner{ - value: json.RawMessage(`{"mock": 2}`), - } - s3 := &mockSigner{ - value: json.RawMessage(`{"mock": 3}`), - } - s4 := &mockSigner{ - value: json.RawMessage(`{"mock": 4}`), - } - s5 := &mockSigner{ - value: json.RawMessage(`{"mock": 5}`), - } - - s := []keys.Signer{ - s1, s2, s3, s4, s5, - } - - sort.Sort(signer.ByIDs(s)) - - signerIDs := []string{} - - for i, signer := range s { - ids := signer.PublicData().IDs() - if len(ids) != 1 { - t.Errorf("Signer %v IDs %v should have length 1", i, ids) - } - signerIDs = append(signerIDs, ids[0]) - } - - if !sort.StringsAreSorted(signerIDs) { - t.Errorf("Signers incorrectly sorted: %+v", signerIDs) - } -} diff --git a/local_store.go b/local_store.go deleted file mode 100644 index b59721e6..00000000 --- a/local_store.go +++ /dev/null @@ -1,741 +0,0 @@ -package tuf - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "io/fs" - "log" - "os" - "path/filepath" - "strings" - - "github.com/secure-systems-lab/go-securesystemslib/encrypted" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/fsutil" - "github.com/theupdateframework/go-tuf/internal/sets" - "github.com/theupdateframework/go-tuf/pkg/keys" - "github.com/theupdateframework/go-tuf/util" -) - -type LocalStore interface { - // GetMeta returns a map from metadata file names (e.g. root.json) to their raw JSON payload or an error. - GetMeta() (map[string]json.RawMessage, error) - - // SetMeta is used to update a metadata file name with a JSON payload. - SetMeta(name string, meta json.RawMessage) error - - // WalkStagedTargets calls targetsFn for each staged target file in paths. - // If paths is empty, all staged target files will be walked. - WalkStagedTargets(paths []string, targetsFn TargetsWalkFunc) error - - // FileIsStaged determines if a metadata file is currently staged, to avoid incrementing - // version numbers repeatedly while staged. - FileIsStaged(filename string) bool - - // Commit is used to publish staged files to the repository - // - // This will also reset the staged meta to signal incrementing version numbers. - // TUF 1.0 requires that the root metadata version numbers in the repository does not - // gaps. To avoid this, we will only increment the number once until we commit. - Commit(bool, map[string]int64, map[string]data.Hashes) error - - // GetSigners return a list of signers for a role. - // This may include revoked keys, so the signers should not - // be used without filtering. - GetSigners(role string) ([]keys.Signer, error) - - // SaveSigner adds a signer to a role. - SaveSigner(role string, signer keys.Signer) error - - // SignersForRole return a list of signing keys for a role. - SignersForKeyIDs(keyIDs []string) []keys.Signer - - // Clean is used to remove all staged manifests. - Clean() error -} - -type PassphraseChanger interface { - // ChangePassphrase changes the passphrase for a role keys file. - ChangePassphrase(string) error -} - -func MemoryStore(meta map[string]json.RawMessage, files map[string][]byte) LocalStore { - if meta == nil { - meta = make(map[string]json.RawMessage) - } - return &memoryStore{ - meta: meta, - stagedMeta: make(map[string]json.RawMessage), - files: files, - signerForKeyID: make(map[string]keys.Signer), - keyIDsForRole: make(map[string][]string), - } -} - -type memoryStore struct { - meta map[string]json.RawMessage - stagedMeta map[string]json.RawMessage - files map[string][]byte - - signerForKeyID map[string]keys.Signer - keyIDsForRole map[string][]string -} - -func (m *memoryStore) GetMeta() (map[string]json.RawMessage, error) { - meta := make(map[string]json.RawMessage, len(m.meta)+len(m.stagedMeta)) - for key, value := range m.meta { - meta[key] = value - } - for key, value := range m.stagedMeta { - meta[key] = value - } - return meta, nil -} - -func (m *memoryStore) SetMeta(name string, meta json.RawMessage) error { - m.stagedMeta[name] = meta - return nil -} - -func (m *memoryStore) FileIsStaged(name string) bool { - _, ok := m.stagedMeta[name] - return ok -} - -func (m *memoryStore) WalkStagedTargets(paths []string, targetsFn TargetsWalkFunc) error { - if len(paths) == 0 { - for path, data := range m.files { - if err := targetsFn(path, bytes.NewReader(data)); err != nil { - return err - } - } - return nil - } - - for _, path := range paths { - data, ok := m.files[path] - if !ok { - return ErrFileNotFound{path} - } - if err := targetsFn(path, bytes.NewReader(data)); err != nil { - return err - } - } - return nil -} - -func (m *memoryStore) Commit(consistentSnapshot bool, versions map[string]int64, hashes map[string]data.Hashes) error { - for name, meta := range m.stagedMeta { - paths := computeMetadataPaths(consistentSnapshot, name, versions) - for _, path := range paths { - m.meta[path] = meta - } - // Remove from staged metadata. - // This will prompt incrementing version numbers again now that we've - // successfully committed the metadata to the local store. - delete(m.stagedMeta, name) - } - return nil -} - -func (m *memoryStore) GetSigners(role string) ([]keys.Signer, error) { - keyIDs, ok := m.keyIDsForRole[role] - if ok { - return m.SignersForKeyIDs(keyIDs), nil - } - - return nil, nil -} - -func (m *memoryStore) SaveSigner(role string, signer keys.Signer) error { - keyIDs := signer.PublicData().IDs() - - for _, keyID := range keyIDs { - m.signerForKeyID[keyID] = signer - } - - mergedKeyIDs := sets.DeduplicateStrings(append(m.keyIDsForRole[role], keyIDs...)) - m.keyIDsForRole[role] = mergedKeyIDs - return nil -} - -func (m *memoryStore) SignersForKeyIDs(keyIDs []string) []keys.Signer { - signers := []keys.Signer{} - keyIDsSeen := map[string]struct{}{} - - for _, keyID := range keyIDs { - signer, ok := m.signerForKeyID[keyID] - if !ok { - continue - } - addSigner := false - - for _, skid := range signer.PublicData().IDs() { - if _, seen := keyIDsSeen[skid]; !seen { - addSigner = true - } - - keyIDsSeen[skid] = struct{}{} - } - - if addSigner { - signers = append(signers, signer) - } - } - - return signers -} - -func (m *memoryStore) Clean() error { - return nil -} - -type persistedKeys struct { - Encrypted bool `json:"encrypted"` - Data json.RawMessage `json:"data"` -} - -type StoreOpts struct { - Logger *log.Logger - PassFunc util.PassphraseFunc -} - -func FileSystemStore(dir string, p util.PassphraseFunc) LocalStore { - return &fileSystemStore{ - dir: dir, - passphraseFunc: p, - logger: log.New(io.Discard, "", 0), - signerForKeyID: make(map[string]keys.Signer), - keyIDsForRole: make(map[string][]string), - } -} - -func FileSystemStoreWithOpts(dir string, opts ...StoreOpts) LocalStore { - store := &fileSystemStore{ - dir: dir, - passphraseFunc: nil, - logger: log.New(io.Discard, "", 0), - signerForKeyID: make(map[string]keys.Signer), - keyIDsForRole: make(map[string][]string), - } - for _, opt := range opts { - if opt.Logger != nil { - store.logger = opt.Logger - } - if opt.PassFunc != nil { - store.passphraseFunc = opt.PassFunc - } - } - return store -} - -type fileSystemStore struct { - dir string - passphraseFunc util.PassphraseFunc - logger *log.Logger - - signerForKeyID map[string]keys.Signer - keyIDsForRole map[string][]string -} - -func (f *fileSystemStore) repoDir() string { - return filepath.Join(f.dir, "repository") -} - -func (f *fileSystemStore) stagedDir() string { - return filepath.Join(f.dir, "staged") -} - -func (f *fileSystemStore) GetMeta() (map[string]json.RawMessage, error) { - // Build a map of metadata names (e.g. root.json) to their full paths - // (whether in the committed repo dir, or in the staged repo dir). - metaPaths := map[string]string{} - - rd := f.repoDir() - committed, err := os.ReadDir(f.repoDir()) - if err != nil && !errors.Is(err, fs.ErrNotExist) { - return nil, fmt.Errorf("could not list repo dir: %w", err) - } - - for _, e := range committed { - imf, err := fsutil.IsMetaFile(e) - if err != nil { - return nil, err - } - if imf { - name := e.Name() - metaPaths[name] = filepath.Join(rd, name) - } - } - - sd := f.stagedDir() - staged, err := os.ReadDir(sd) - if err != nil && !errors.Is(err, fs.ErrNotExist) { - return nil, fmt.Errorf("could not list staged dir: %w", err) - } - - for _, e := range staged { - imf, err := fsutil.IsMetaFile(e) - if err != nil { - return nil, err - } - if imf { - name := e.Name() - metaPaths[name] = filepath.Join(sd, name) - } - } - - meta := make(map[string]json.RawMessage) - for name, path := range metaPaths { - f, err := os.ReadFile(path) - if err != nil { - return nil, err - } - meta[name] = f - } - return meta, nil -} - -func (f *fileSystemStore) SetMeta(name string, meta json.RawMessage) error { - if err := f.createDirs(); err != nil { - return err - } - if err := util.AtomicallyWriteFile(filepath.Join(f.stagedDir(), name), meta, 0644); err != nil { - return err - } - return nil -} - -func (f *fileSystemStore) FileIsStaged(name string) bool { - _, err := os.Stat(filepath.Join(f.stagedDir(), name)) - return err == nil -} - -func (f *fileSystemStore) createDirs() error { - for _, dir := range []string{"keys", "repository", "staged/targets"} { - if err := os.MkdirAll(filepath.Join(f.dir, dir), 0755); err != nil { - return err - } - } - return nil -} - -func (f *fileSystemStore) WalkStagedTargets(paths []string, targetsFn TargetsWalkFunc) error { - if len(paths) == 0 { - walkFunc := func(fpath string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.IsDir() || !info.Mode().IsRegular() { - return nil - } - rel, err := filepath.Rel(filepath.Join(f.stagedDir(), "targets"), fpath) - if err != nil { - return err - } - file, err := os.Open(fpath) - if err != nil { - return err - } - defer file.Close() - return targetsFn(filepath.ToSlash(rel), file) - } - return filepath.Walk(filepath.Join(f.stagedDir(), "targets"), walkFunc) - } - - // check all the files exist before processing any files - for _, path := range paths { - realFilepath := filepath.Join(f.stagedDir(), "targets", path) - if _, err := os.Stat(realFilepath); err != nil { - if os.IsNotExist(err) { - return ErrFileNotFound{realFilepath} - } - return err - } - } - - for _, path := range paths { - realFilepath := filepath.Join(f.stagedDir(), "targets", path) - file, err := os.Open(realFilepath) - if err != nil { - if os.IsNotExist(err) { - return ErrFileNotFound{realFilepath} - } - return err - } - err = targetsFn(path, file) - file.Close() - if err != nil { - return err - } - } - return nil -} - -func (f *fileSystemStore) createRepoFile(path string) (*os.File, error) { - dst := filepath.Join(f.repoDir(), path) - if err := os.MkdirAll(filepath.Dir(dst), 0755); err != nil { - return nil, err - } - return os.Create(dst) -} - -func (f *fileSystemStore) Commit(consistentSnapshot bool, versions map[string]int64, hashes map[string]data.Hashes) error { - isTarget := func(path string) bool { - return strings.HasPrefix(path, "targets/") - } - copyToRepo := func(fpath string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.IsDir() || !info.Mode().IsRegular() { - return nil - } - rel, err := filepath.Rel(f.stagedDir(), fpath) - if err != nil { - return err - } - relpath := filepath.ToSlash(rel) - - var paths []string - if isTarget(relpath) { - paths = computeTargetPaths(consistentSnapshot, relpath, hashes) - } else { - paths = computeMetadataPaths(consistentSnapshot, relpath, versions) - } - var files []io.Writer - for _, path := range paths { - file, err := f.createRepoFile(path) - if err != nil { - return err - } - defer file.Close() - files = append(files, file) - } - staged, err := os.Open(fpath) - if err != nil { - return err - } - defer staged.Close() - if _, err = io.Copy(io.MultiWriter(files...), staged); err != nil { - return err - } - return nil - } - // Checks if target file should be deleted - needsRemoval := func(fpath string) bool { - if consistentSnapshot { - // strip out the hash - name := strings.SplitN(filepath.Base(fpath), ".", 2) - if len(name) != 2 || name[1] == "" { - return false - } - fpath = filepath.Join(filepath.Dir(fpath), name[1]) - } - _, ok := hashes[filepath.ToSlash(fpath)] - return !ok - } - // Checks if folder is empty - folderNeedsRemoval := func(fpath string) bool { - f, err := os.Open(fpath) - if err != nil { - return false - } - defer f.Close() - _, err = f.Readdirnames(1) - return err == io.EOF - } - removeFile := func(fpath string, info os.FileInfo, err error) error { - if err != nil { - return err - } - rel, err := filepath.Rel(f.repoDir(), fpath) - if err != nil { - return err - } - relpath := filepath.ToSlash(rel) - if !info.IsDir() && isTarget(relpath) && needsRemoval(rel) { - // Delete the target file - if err := os.Remove(fpath); err != nil { - return err - } - // Delete the target folder too if it's empty - targetFolder := filepath.Dir(fpath) - if folderNeedsRemoval(targetFolder) { - if err := os.Remove(targetFolder); err != nil { - return err - } - } - } - return nil - } - if err := filepath.Walk(f.stagedDir(), copyToRepo); err != nil { - return err - } - if err := filepath.Walk(f.repoDir(), removeFile); err != nil { - return err - } - return f.Clean() -} - -func (f *fileSystemStore) GetSigners(role string) ([]keys.Signer, error) { - keyIDs, ok := f.keyIDsForRole[role] - if ok { - return f.SignersForKeyIDs(keyIDs), nil - } - - privKeys, _, err := f.loadPrivateKeys(role) - if err != nil { - if os.IsNotExist(err) { - return nil, nil - } - return nil, err - } - - signers := []keys.Signer{} - for _, key := range privKeys { - signer, err := keys.GetSigner(key) - if err != nil { - return nil, err - } - - // Cache the signers. - for _, keyID := range signer.PublicData().IDs() { - f.keyIDsForRole[role] = append(f.keyIDsForRole[role], keyID) - f.signerForKeyID[keyID] = signer - } - signers = append(signers, signer) - } - - return signers, nil -} - -func (f *fileSystemStore) SignersForKeyIDs(keyIDs []string) []keys.Signer { - signers := []keys.Signer{} - keyIDsSeen := map[string]struct{}{} - - for _, keyID := range keyIDs { - signer, ok := f.signerForKeyID[keyID] - if !ok { - continue - } - - addSigner := false - - for _, skid := range signer.PublicData().IDs() { - if _, seen := keyIDsSeen[skid]; !seen { - addSigner = true - } - - keyIDsSeen[skid] = struct{}{} - } - - if addSigner { - signers = append(signers, signer) - } - } - - return signers -} - -// ChangePassphrase changes the passphrase for a role keys file. Implements -// PassphraseChanger interface. -func (f *fileSystemStore) ChangePassphrase(role string) error { - // No need to proceed if passphrase func is not set - if f.passphraseFunc == nil { - return ErrPassphraseRequired{role} - } - // Read the existing keys (if any) - // If encrypted, will prompt for existing passphrase - keys, _, err := f.loadPrivateKeys(role) - if err != nil { - if os.IsNotExist(err) { - f.logger.Printf("Failed to change passphrase. Missing keys file for %s role. \n", role) - } - return err - } - // Prompt for new passphrase - pass, err := f.passphraseFunc(role, true, true) - if err != nil { - return err - } - // Proceed saving the keys - pk := &persistedKeys{Encrypted: true} - pk.Data, err = encrypted.Marshal(keys, pass) - if err != nil { - return err - } - data, err := json.MarshalIndent(pk, "", "\t") - if err != nil { - return err - } - if err := util.AtomicallyWriteFile(f.keysPath(role), append(data, '\n'), 0600); err != nil { - return err - } - f.logger.Printf("Successfully changed passphrase for %s keys file\n", role) - return nil -} - -func (f *fileSystemStore) SaveSigner(role string, signer keys.Signer) error { - if err := f.createDirs(); err != nil { - return err - } - - // add the key to the existing keys (if any) - privKeys, pass, err := f.loadPrivateKeys(role) - if err != nil && !os.IsNotExist(err) { - return err - } - key, err := signer.MarshalPrivateKey() - if err != nil { - return err - } - privKeys = append(privKeys, key) - - // if loadPrivateKeys didn't return a passphrase (because no keys yet exist) - // and passphraseFunc is set, get the passphrase so the keys file can - // be encrypted later (passphraseFunc being nil indicates the keys file - // should not be encrypted) - if pass == nil && f.passphraseFunc != nil { - pass, err = f.passphraseFunc(role, true, false) - if err != nil { - return err - } - } - - pk := &persistedKeys{} - if pass != nil { - pk.Data, err = encrypted.Marshal(privKeys, pass) - if err != nil { - return err - } - pk.Encrypted = true - } else { - pk.Data, err = json.MarshalIndent(privKeys, "", "\t") - if err != nil { - return err - } - } - data, err := json.MarshalIndent(pk, "", "\t") - if err != nil { - return err - } - if err := util.AtomicallyWriteFile(f.keysPath(role), append(data, '\n'), 0600); err != nil { - return err - } - - // Merge privKeys into f.keyIDsForRole and register signers with - // f.signerForKeyID. - keyIDsForRole := f.keyIDsForRole[role] - for _, key := range privKeys { - signer, err := keys.GetSigner(key) - if err != nil { - return err - } - - keyIDs := signer.PublicData().IDs() - - for _, keyID := range keyIDs { - f.signerForKeyID[keyID] = signer - } - - keyIDsForRole = append(keyIDsForRole, keyIDs...) - } - - f.keyIDsForRole[role] = sets.DeduplicateStrings(keyIDsForRole) - - return nil -} - -// loadPrivateKeys loads keys for the given role and returns them along with the -// passphrase (if read) so that callers don't need to re-read it. -func (f *fileSystemStore) loadPrivateKeys(role string) ([]*data.PrivateKey, []byte, error) { - file, err := os.Open(f.keysPath(role)) - if err != nil { - return nil, nil, err - } - defer file.Close() - - pk := &persistedKeys{} - if err := json.NewDecoder(file).Decode(pk); err != nil { - return nil, nil, err - } - - var keys []*data.PrivateKey - if !pk.Encrypted { - if err := json.Unmarshal(pk.Data, &keys); err != nil { - return nil, nil, err - } - return keys, nil, nil - } - - // the keys are encrypted so cannot be loaded if passphraseFunc is not set - if f.passphraseFunc == nil { - return nil, nil, ErrPassphraseRequired{role} - } - - // try the empty string as the password first - pass := []byte("") - if err := encrypted.Unmarshal(pk.Data, &keys, pass); err != nil { - pass, err = f.passphraseFunc(role, false, false) - if err != nil { - return nil, nil, err - } - if err = encrypted.Unmarshal(pk.Data, &keys, pass); err != nil { - return nil, nil, err - } - } - return keys, pass, nil -} - -func (f *fileSystemStore) keysPath(role string) string { - return filepath.Join(f.dir, "keys", role+".json") -} - -func (f *fileSystemStore) Clean() error { - _, err := os.Stat(filepath.Join(f.repoDir(), "root.json")) - if os.IsNotExist(err) { - return ErrNewRepository - } else if err != nil { - return err - } - if err := os.RemoveAll(f.stagedDir()); err != nil { - return err - } - return os.MkdirAll(filepath.Join(f.stagedDir(), "targets"), 0755) -} - -func computeTargetPaths(consistentSnapshot bool, name string, hashes map[string]data.Hashes) []string { - if consistentSnapshot { - return util.HashedPaths(name, hashes[name]) - } else { - return []string{name} - } -} - -func computeMetadataPaths(consistentSnapshot bool, name string, versions map[string]int64) []string { - copyVersion := false - - switch name { - case "root.json": - copyVersion = true - case "timestamp.json": - copyVersion = false - default: - if consistentSnapshot { - copyVersion = true - } else { - copyVersion = false - } - } - - paths := []string{name} - if copyVersion { - paths = append(paths, util.VersionedPath(name, versions[name])) - } - - return paths -} diff --git a/local_store_test.go b/local_store_test.go deleted file mode 100644 index 8badcfc8..00000000 --- a/local_store_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package tuf - -import ( - "os" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -func TestLocalStoreSigners(t *testing.T) { - tmpdir, err := os.MkdirTemp("", "") - if err != nil { - t.Fatal(err) - } - defer func() { - os.RemoveAll(tmpdir) - }() - - stores := map[string]LocalStore{ - "MemoryStore": MemoryStore(nil, nil), - "FileSystemStore": FileSystemStore(tmpdir, nil), - } - - for name, store := range stores { - t.Run(name, func(t *testing.T) { - signers, err := store.GetSigners("abc") - assert.NoError(t, err) - assert.Equal(t, len(signers), 0) - - // Add two signers to role "a". - aSigner1, err := keys.GenerateEd25519Key() - assert.NoError(t, err) - err = store.SaveSigner("a", aSigner1) - assert.NoError(t, err) - - aSigner2, err := keys.GenerateEd25519Key() - assert.NoError(t, err) - err = store.SaveSigner("a", aSigner2) - assert.NoError(t, err) - - // Add one signer to role "b". - bSigner, err := keys.GenerateEd25519Key() - assert.NoError(t, err) - err = store.SaveSigner("b", bSigner) - assert.NoError(t, err) - - // Add to b again to test deduplication. - err = store.SaveSigner("b", bSigner) - assert.NoError(t, err) - - signers, err = store.GetSigners("a") - assert.NoError(t, err) - assert.ElementsMatch(t, []keys.Signer{aSigner1, aSigner2}, signers) - - signers, err = store.GetSigners("b") - assert.NoError(t, err) - assert.ElementsMatch(t, []keys.Signer{bSigner}, signers) - - a1KeyIDs := aSigner1.PublicData().IDs() - a2KeyIDs := aSigner2.PublicData().IDs() - bKeyIDs := bSigner.PublicData().IDs() - - assert.Equal(t, []keys.Signer{aSigner1}, store.SignersForKeyIDs(a1KeyIDs)) - assert.Equal(t, []keys.Signer{aSigner2}, store.SignersForKeyIDs(a2KeyIDs)) - assert.ElementsMatch(t, []keys.Signer{aSigner1, aSigner2}, store.SignersForKeyIDs(append(a1KeyIDs, a2KeyIDs...))) - assert.Equal(t, []keys.Signer{bSigner}, store.SignersForKeyIDs(bKeyIDs)) - }) - } -} diff --git a/pkg/deprecated/deprecated_repo_test.go b/pkg/deprecated/deprecated_repo_test.go deleted file mode 100644 index e65cb9e9..00000000 --- a/pkg/deprecated/deprecated_repo_test.go +++ /dev/null @@ -1,107 +0,0 @@ -package deprecated - -import ( - "crypto" - "crypto/elliptic" - "crypto/rand" - "crypto/sha256" - "encoding/json" - "testing" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" - repo "github.com/theupdateframework/go-tuf" - "github.com/theupdateframework/go-tuf/data" - _ "github.com/theupdateframework/go-tuf/pkg/deprecated/set_ecdsa" - "github.com/theupdateframework/go-tuf/pkg/keys" - . "gopkg.in/check.v1" -) - -func Test(t *testing.T) { TestingT(t) } - -type RepoSuite struct{} - -var _ = Suite(&RepoSuite{}) - -func genKey(c *C, r *repo.Repo, role string) []string { - keyids, err := r.GenKey(role) - c.Assert(err, IsNil) - c.Assert(len(keyids) > 0, Equals, true) - return keyids -} - -// Deprecated ecdsa key support: Support verification against roots that were -// signed with hex-encoded ecdsa keys. -func (rs *RepoSuite) TestDeprecatedHexEncodedKeysSucceed(c *C) { - type deprecatedP256Verifier struct { - PublicKey data.HexBytes `json:"public"` - } - files := map[string][]byte{"foo.txt": []byte("foo")} - local := repo.MemoryStore(make(map[string]json.RawMessage), files) - r, err := repo.NewRepo(local) - c.Assert(err, IsNil) - - r.Init(false) - - // Add a root key with hex-encoded ecdsa format - compliant "ecdsa" - signer, err := keys.GenerateEcdsaKey() - c.Assert(err, IsNil) - pub := signer.PublicKey - keyValBytes, err := json.Marshal(&deprecatedP256Verifier{PublicKey: elliptic.Marshal(pub.Curve, pub.X, pub.Y)}) - c.Assert(err, IsNil) - publicData := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } - err = r.AddVerificationKey("root", publicData) - c.Assert(err, IsNil) - - // Add a root key with hex-encoded ecdsa format - deprecated "ecdsa-sha2-nistp256" - signerDeprecated, err := keys.GenerateEcdsaKey() - c.Assert(err, IsNil) - pubDeprecated := signerDeprecated.PublicKey - keyValBytesDeprecated, err := json.Marshal(&deprecatedP256Verifier{PublicKey: elliptic.Marshal(pubDeprecated.Curve, pubDeprecated.X, pubDeprecated.Y)}) - c.Assert(err, IsNil) - publicDataDeprecated := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256_OLD_FMT, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytesDeprecated, - } - err = r.AddVerificationKey("root", publicDataDeprecated) - c.Assert(err, IsNil) - - // Add other keys as normal - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - - // Sign the root role manually - rootMeta, err := r.SignedMeta("root.json") - c.Assert(err, IsNil) - rootCanonical, err := cjson.EncodeCanonical(rootMeta.Signed) - c.Assert(err, IsNil) - hash := sha256.Sum256(rootCanonical) - rootSig, err := signer.PrivateKey.Sign(rand.Reader, hash[:], crypto.SHA256) - c.Assert(err, IsNil) - for _, id := range publicData.IDs() { - c.Assert(r.AddOrUpdateSignature("root.json", data.Signature{ - KeyID: id, - Signature: rootSig}), IsNil) - } - - rootSigDeprecated, err := signerDeprecated.PrivateKey.Sign(rand.Reader, hash[:], crypto.SHA256) - c.Assert(err, IsNil) - for _, id := range publicDataDeprecated.IDs() { - c.Assert(r.AddOrUpdateSignature("root.json", data.Signature{ - KeyID: id, - Signature: rootSigDeprecated}), IsNil) - } - - // Committing should succeed because the deprecated key pkg is added. - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) -} diff --git a/pkg/deprecated/set_ecdsa/set_ecdsa.go b/pkg/deprecated/set_ecdsa/set_ecdsa.go deleted file mode 100644 index 13967e2f..00000000 --- a/pkg/deprecated/set_ecdsa/set_ecdsa.go +++ /dev/null @@ -1,26 +0,0 @@ -package set_ecdsa - -import ( - "errors" - - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -/* - Importing this package will allow support for both hex-encoded ECDSA - verifiers and PEM-encoded ECDSA verifiers. - Note that this package imports "github.com/theupdateframework/go-tuf/pkg/keys" - and overrides the ECDSA verifier loaded at init time in that package. -*/ - -func init() { - _, ok := keys.VerifierMap.Load(data.KeyTypeECDSA_SHA2_P256) - if !ok { - panic(errors.New("expected to override previously loaded PEM-only ECDSA verifier")) - } - // store a mapping for both data.KeyTypeECDSA_SHA2_P256_OLD_FMT and data.KeyTypeECDSA_SHA2_P256 - // in case a client is verifying using both the old non-compliant format and a newly generated root - keys.VerifierMap.Store(data.KeyTypeECDSA_SHA2_P256, keys.NewDeprecatedEcdsaVerifier) // compliant format - keys.VerifierMap.Store(data.KeyTypeECDSA_SHA2_P256_OLD_FMT, keys.NewDeprecatedEcdsaVerifier) // deprecated format -} diff --git a/pkg/keys/deprecated_ecdsa.go b/pkg/keys/deprecated_ecdsa.go deleted file mode 100644 index 6d48c9d6..00000000 --- a/pkg/keys/deprecated_ecdsa.go +++ /dev/null @@ -1,101 +0,0 @@ -package keys - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/sha256" - "encoding/json" - "errors" - "fmt" - "io" - - "github.com/theupdateframework/go-tuf/data" -) - -func NewDeprecatedEcdsaVerifier() Verifier { - return &ecdsaVerifierWithDeprecatedSupport{} -} - -type ecdsaVerifierWithDeprecatedSupport struct { - key *data.PublicKey - // This will switch based on whether this is a PEM-encoded key - // or a deprecated hex-encoded key. - Verifier -} - -func (p *ecdsaVerifierWithDeprecatedSupport) UnmarshalPublicKey(key *data.PublicKey) error { - p.key = key - pemVerifier := &EcdsaVerifier{} - if err := pemVerifier.UnmarshalPublicKey(key); err != nil { - // Try the deprecated hex-encoded verifier - hexVerifier := &deprecatedP256Verifier{} - if err := hexVerifier.UnmarshalPublicKey(key); err != nil { - return err - } - p.Verifier = hexVerifier - return nil - } - p.Verifier = pemVerifier - return nil -} - -/* - Deprecated ecdsaVerifier that used hex-encoded public keys. - This MAY be used to verify existing metadata that used this - old format. This will be deprecated soon, ensure that repositories - are re-signed and clients receieve a fully compliant root. -*/ - -type deprecatedP256Verifier struct { - PublicKey data.HexBytes `json:"public"` - key *data.PublicKey -} - -func (p *deprecatedP256Verifier) Public() string { - return p.PublicKey.String() -} - -func (p *deprecatedP256Verifier) Verify(msg, sigBytes []byte) error { - x, y := elliptic.Unmarshal(elliptic.P256(), p.PublicKey) - k := &ecdsa.PublicKey{ - Curve: elliptic.P256(), - X: x, - Y: y, - } - - hash := sha256.Sum256(msg) - - if !ecdsa.VerifyASN1(k, hash[:], sigBytes) { - return errors.New("tuf: deprecated ecdsa signature verification failed") - } - return nil -} - -func (p *deprecatedP256Verifier) MarshalPublicKey() *data.PublicKey { - return p.key -} - -func (p *deprecatedP256Verifier) UnmarshalPublicKey(key *data.PublicKey) error { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(p); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - curve := elliptic.P256() - - // Parse as uncompressed marshalled point. - x, _ := elliptic.Unmarshal(curve, p.PublicKey) - if x == nil { - return errors.New("tuf: invalid ecdsa public key point") - } - - p.key = key - return nil -} diff --git a/pkg/keys/deprecated_ecdsa_test.go b/pkg/keys/deprecated_ecdsa_test.go deleted file mode 100644 index ddfaa84d..00000000 --- a/pkg/keys/deprecated_ecdsa_test.go +++ /dev/null @@ -1,129 +0,0 @@ -package keys - -import ( - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/sha256" - "encoding/json" - "errors" - - "github.com/theupdateframework/go-tuf/data" - . "gopkg.in/check.v1" -) - -type DeprecatedECDSASuite struct{} - -var _ = Suite(DeprecatedECDSASuite{}) - -type deprecatedEcdsaSigner struct { - *ecdsa.PrivateKey -} - -type deprecatedEcdsaPublic struct { - PublicKey data.HexBytes `json:"public"` -} - -func (s deprecatedEcdsaSigner) PublicData() *data.PublicKey { - pub := s.Public().(*ecdsa.PublicKey) - keyValBytes, _ := json.Marshal(deprecatedEcdsaPublic{ - PublicKey: elliptic.Marshal(pub.Curve, pub.X, pub.Y)}) - return &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} - -func (s deprecatedEcdsaSigner) SignMessage(message []byte) ([]byte, error) { - hash := sha256.Sum256(message) - return s.PrivateKey.Sign(rand.Reader, hash[:], crypto.SHA256) -} - -func (s deprecatedEcdsaSigner) ContainsID(id string) bool { - return s.PublicData().ContainsID(id) -} - -func (deprecatedEcdsaSigner) MarshalPrivateKey() (*data.PrivateKey, error) { - return nil, errors.New("not implemented for test") -} - -func (deprecatedEcdsaSigner) UnmarshalPrivateKey(key *data.PrivateKey) error { - return errors.New("not implemented for test") -} - -func generatedDeprecatedSigner() (*deprecatedEcdsaSigner, error) { - privkey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - return nil, err - } - return &deprecatedEcdsaSigner{privkey}, nil -} - -func (DeprecatedECDSASuite) TestSignVerifyDeprecatedFormat(c *C) { - // Create an ecdsa key with a deprecated format. - signer, err := generatedDeprecatedSigner() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - - pub := signer.PublicKey - - keyValBytes, err := json.Marshal(&deprecatedP256Verifier{PublicKey: elliptic.Marshal(pub.Curve, pub.X, pub.Y)}) - c.Assert(err, IsNil) - publicData := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } - - deprecatedEcdsa := NewDeprecatedEcdsaVerifier() - err = deprecatedEcdsa.UnmarshalPublicKey(publicData) - c.Assert(err, IsNil) - c.Assert(deprecatedEcdsa.Verify(msg, sig), IsNil) -} - -func (DeprecatedECDSASuite) TestECDSAVerifyMismatchMessage(c *C) { - signer, err := generatedDeprecatedSigner() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - publicData := signer.PublicData() - deprecatedEcdsa := NewDeprecatedEcdsaVerifier() - err = deprecatedEcdsa.UnmarshalPublicKey(publicData) - c.Assert(err, IsNil) - c.Assert(deprecatedEcdsa.Verify([]byte("notfoo"), sig), ErrorMatches, "tuf: deprecated ecdsa signature verification failed") -} - -func (DeprecatedECDSASuite) TestECDSAVerifyMismatchPubKey(c *C) { - signer, err := generatedDeprecatedSigner() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - - signerNew, err := generatedDeprecatedSigner() - c.Assert(err, IsNil) - deprecatedEcdsa := NewDeprecatedEcdsaVerifier() - err = deprecatedEcdsa.UnmarshalPublicKey(signerNew.PublicData()) - c.Assert(err, IsNil) - c.Assert(deprecatedEcdsa.Verify([]byte("notfoo"), sig), ErrorMatches, "tuf: deprecated ecdsa signature verification failed") -} - -func (DeprecatedECDSASuite) TestMarshalUnmarshalPublicKey(c *C) { - signer, err := generatedDeprecatedSigner() - c.Assert(err, IsNil) - - pub := signer.PublicData() - - deprecatedEcdsa := NewDeprecatedEcdsaVerifier() - err = deprecatedEcdsa.UnmarshalPublicKey(pub) - c.Assert(err, IsNil) - - c.Assert(deprecatedEcdsa.MarshalPublicKey(), DeepEquals, pub) -} diff --git a/pkg/keys/ecdsa.go b/pkg/keys/ecdsa.go deleted file mode 100644 index 9740d1f3..00000000 --- a/pkg/keys/ecdsa.go +++ /dev/null @@ -1,173 +0,0 @@ -package keys - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/sha256" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" - - "github.com/theupdateframework/go-tuf/data" -) - -func init() { - // Note: we use LoadOrStore here to prevent accidentally overriding the - // an explicit deprecated ECDSA verifier. - // TODO: When deprecated ECDSA is removed, this can switch back to Store. - VerifierMap.LoadOrStore(data.KeyTypeECDSA_SHA2_P256_OLD_FMT, NewEcdsaVerifier) - VerifierMap.LoadOrStore(data.KeyTypeECDSA_SHA2_P256, NewEcdsaVerifier) - SignerMap.Store(data.KeyTypeECDSA_SHA2_P256_OLD_FMT, newEcdsaSigner) - SignerMap.Store(data.KeyTypeECDSA_SHA2_P256, newEcdsaSigner) -} - -func NewEcdsaVerifier() Verifier { - return &EcdsaVerifier{} -} - -func newEcdsaSigner() Signer { - return &ecdsaSigner{} -} - -type EcdsaVerifier struct { - PublicKey *PKIXPublicKey `json:"public"` - ecdsaKey *ecdsa.PublicKey - key *data.PublicKey -} - -func (p *EcdsaVerifier) Public() string { - // This is already verified to succeed when unmarshalling a public key. - r, err := x509.MarshalPKIXPublicKey(p.ecdsaKey) - if err != nil { - // TODO: Gracefully handle these errors. - // See https://github.com/theupdateframework/go-tuf/issues/363 - panic(err) - } - return string(r) -} - -func (p *EcdsaVerifier) Verify(msg, sigBytes []byte) error { - hash := sha256.Sum256(msg) - - if !ecdsa.VerifyASN1(p.ecdsaKey, hash[:], sigBytes) { - return errors.New("tuf: ecdsa signature verification failed") - } - return nil -} - -func (p *EcdsaVerifier) MarshalPublicKey() *data.PublicKey { - return p.key -} - -func (p *EcdsaVerifier) UnmarshalPublicKey(key *data.PublicKey) error { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(p); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - ecdsaKey, ok := p.PublicKey.PublicKey.(*ecdsa.PublicKey) - if !ok { - return fmt.Errorf("invalid public key") - } - - if _, err := x509.MarshalPKIXPublicKey(ecdsaKey); err != nil { - return fmt.Errorf("marshalling to PKIX key: invalid public key") - } - - p.ecdsaKey = ecdsaKey - p.key = key - return nil -} - -type ecdsaSigner struct { - *ecdsa.PrivateKey -} - -type ecdsaPrivateKeyValue struct { - Private string `json:"private"` - Public *PKIXPublicKey `json:"public"` -} - -func (s *ecdsaSigner) PublicData() *data.PublicKey { - // This uses a trusted public key JSON format with a trusted Public value. - keyValBytes, _ := json.Marshal(EcdsaVerifier{PublicKey: &PKIXPublicKey{PublicKey: s.Public()}}) - return &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} - -func (s *ecdsaSigner) SignMessage(message []byte) ([]byte, error) { - hash := sha256.Sum256(message) - return ecdsa.SignASN1(rand.Reader, s.PrivateKey, hash[:]) -} - -func (s *ecdsaSigner) MarshalPrivateKey() (*data.PrivateKey, error) { - priv, err := x509.MarshalECPrivateKey(s.PrivateKey) - if err != nil { - return nil, err - } - pemKey := pem.EncodeToMemory(&pem.Block{Type: "EC PRIVATE KEY", Bytes: priv}) - val, err := json.Marshal(ecdsaPrivateKeyValue{ - Private: string(pemKey), - Public: &PKIXPublicKey{PublicKey: s.Public()}, - }) - if err != nil { - return nil, err - } - return &data.PrivateKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: val, - }, nil -} - -func (s *ecdsaSigner) UnmarshalPrivateKey(key *data.PrivateKey) error { - val := ecdsaPrivateKeyValue{} - if err := json.Unmarshal(key.Value, &val); err != nil { - return err - } - block, _ := pem.Decode([]byte(val.Private)) - if block == nil { - return errors.New("invalid PEM value") - } - if block.Type != "EC PRIVATE KEY" { - return fmt.Errorf("invalid block type: %s", block.Type) - } - k, err := x509.ParseECPrivateKey(block.Bytes) - if err != nil { - return err - } - if k.Curve != elliptic.P256() { - return errors.New("unsupported ecdsa curve") - } - if _, err := json.Marshal(EcdsaVerifier{ - PublicKey: &PKIXPublicKey{PublicKey: k.Public()}}); err != nil { - return fmt.Errorf("invalid public key: %s", err) - } - - s.PrivateKey = k - return nil -} - -func GenerateEcdsaKey() (*ecdsaSigner, error) { - privkey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - return nil, err - } - return &ecdsaSigner{privkey}, nil -} diff --git a/pkg/keys/ecdsa_test.go b/pkg/keys/ecdsa_test.go deleted file mode 100644 index 2fe6348e..00000000 --- a/pkg/keys/ecdsa_test.go +++ /dev/null @@ -1,163 +0,0 @@ -package keys - -import ( - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "encoding/hex" - "encoding/json" - "errors" - "io" - "strings" - - fuzz "github.com/google/gofuzz" - "github.com/theupdateframework/go-tuf/data" - . "gopkg.in/check.v1" -) - -type ECDSASuite struct{} - -var _ = Suite(ECDSASuite{}) - -func (ECDSASuite) TestSignVerify(c *C) { - signer, err := GenerateEcdsaKey() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - publicData := signer.PublicData() - pubKey, err := GetVerifier(publicData) - c.Assert(err, IsNil) - c.Assert(pubKey.Verify(msg, sig), IsNil) -} - -func (ECDSASuite) TestECDSAVerifyMismatchMessage(c *C) { - signer, err := GenerateEcdsaKey() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - publicData := signer.PublicData() - pubKey, err := GetVerifier(publicData) - c.Assert(err, IsNil) - c.Assert(pubKey.Verify([]byte("notfoo"), sig), ErrorMatches, "tuf: ecdsa signature verification failed") -} - -func (ECDSASuite) TestECDSAVerifyMismatchPubKey(c *C) { - signer, err := GenerateEcdsaKey() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - - signerNew, err := GenerateEcdsaKey() - c.Assert(err, IsNil) - pubKey, err := GetVerifier(signerNew.PublicData()) - c.Assert(err, IsNil) - c.Assert(pubKey.Verify([]byte("notfoo"), sig), ErrorMatches, "tuf: ecdsa signature verification failed") -} - -func (ECDSASuite) TestSignVerifyDeprecatedFails(c *C) { - // Create an ecdsa key with a deprecated format. - signer, err := GenerateEcdsaKey() - c.Assert(err, IsNil) - - type deprecatedP256Verifier struct { - PublicKey data.HexBytes `json:"public"` - } - pub := signer.PublicKey - keyValBytes, err := json.Marshal(&deprecatedP256Verifier{PublicKey: elliptic.Marshal(pub.Curve, pub.X, pub.Y)}) - c.Assert(err, IsNil) - publicData := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } - - _, err = GetVerifier(publicData) - c.Assert(err, ErrorMatches, "tuf: error unmarshalling key: invalid PEM value") -} - -func (ECDSASuite) TestMarshalUnmarshalPublicKey(c *C) { - signer, err := GenerateEcdsaKey() - c.Assert(err, IsNil) - publicData := signer.PublicData() - pubKey, err := GetVerifier(publicData) - c.Assert(err, IsNil) - c.Assert(pubKey.MarshalPublicKey(), DeepEquals, publicData) -} - -func (ECDSASuite) TestMarshalUnmarshalPrivateKey(c *C) { - signer, err := GenerateEcdsaKey() - c.Assert(err, IsNil) - privateData, err := signer.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(privateData.Type, Equals, data.KeyTypeECDSA_SHA2_P256) - c.Assert(privateData.Scheme, Equals, data.KeySchemeECDSA_SHA2_P256) - c.Assert(privateData.Algorithms, DeepEquals, data.HashAlgorithms) - s, err := GetSigner(privateData) - c.Assert(err, IsNil) - c.Assert(s, DeepEquals, signer) -} - -func (ECDSASuite) TestUnmarshalECDSA(c *C) { - priv, err := ecdsa.GenerateKey(elliptic.P256(), strings.NewReader("00001-deterministic-buffer-for-key-generation")) - c.Assert(err, IsNil) - - signer := &ecdsaSigner{priv} - goodKey := signer.PublicData() - - verifier := NewEcdsaVerifier() - c.Assert(verifier.UnmarshalPublicKey(goodKey), IsNil) -} - -func (ECDSASuite) TestUnmarshalECDSA_Invalid(c *C) { - badKeyValue, err := json.Marshal(true) - c.Assert(err, IsNil) - - badKey := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: badKeyValue, - } - verifier := NewEcdsaVerifier() - c.Assert(verifier.UnmarshalPublicKey(badKey), ErrorMatches, "json: cannot unmarshal.*") -} - -func (ECDSASuite) TestUnmarshalECDSA_FastFuzz(c *C) { - verifier := NewEcdsaVerifier() - for i := 0; i < 50; i++ { - // Ensure no basic panic - - f := fuzz.New() - var publicData data.PublicKey - f.Fuzz(&publicData) - - verifier.UnmarshalPublicKey(&publicData) - } -} - -func (ECDSASuite) TestUnmarshalECDSA_TooLongContent(c *C) { - randomSeed := make([]byte, MaxJSONKeySize) - _, err := io.ReadFull(rand.Reader, randomSeed) - c.Assert(err, IsNil) - - tooLongPayload, err := json.Marshal( - &ed25519Verifier{ - PublicKey: data.HexBytes(hex.EncodeToString(randomSeed)), - }, - ) - c.Assert(err, IsNil) - - badKey := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: tooLongPayload, - } - verifier := NewEcdsaVerifier() - err = verifier.UnmarshalPublicKey(badKey) - c.Assert(errors.Is(err, io.ErrUnexpectedEOF), Equals, true) -} diff --git a/pkg/keys/ed25519.go b/pkg/keys/ed25519.go deleted file mode 100644 index 1e4c66cc..00000000 --- a/pkg/keys/ed25519.go +++ /dev/null @@ -1,161 +0,0 @@ -package keys - -import ( - "bytes" - "crypto" - "crypto/ed25519" - "crypto/rand" - "crypto/subtle" - "encoding/json" - "errors" - "fmt" - "io" - - "github.com/theupdateframework/go-tuf/data" -) - -func init() { - SignerMap.Store(data.KeyTypeEd25519, NewEd25519Signer) - VerifierMap.Store(data.KeyTypeEd25519, NewEd25519Verifier) -} - -func NewEd25519Signer() Signer { - return &ed25519Signer{} -} - -func NewEd25519Verifier() Verifier { - return &ed25519Verifier{} -} - -type ed25519Verifier struct { - PublicKey data.HexBytes `json:"public"` - key *data.PublicKey -} - -func (e *ed25519Verifier) Public() string { - return string(e.PublicKey) -} - -func (e *ed25519Verifier) Verify(msg, sig []byte) error { - if !ed25519.Verify([]byte(e.PublicKey), msg, sig) { - return errors.New("tuf: ed25519 signature verification failed") - } - return nil -} - -func (e *ed25519Verifier) MarshalPublicKey() *data.PublicKey { - return e.key -} - -func (e *ed25519Verifier) UnmarshalPublicKey(key *data.PublicKey) error { - e.key = key - - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(e); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - if n := len(e.PublicKey); n != ed25519.PublicKeySize { - return fmt.Errorf("tuf: unexpected public key length for ed25519 key, expected %d, got %d", ed25519.PublicKeySize, n) - } - return nil -} - -type Ed25519PrivateKeyValue struct { - Public data.HexBytes `json:"public"` - Private data.HexBytes `json:"private"` -} - -type ed25519Signer struct { - ed25519.PrivateKey -} - -func GenerateEd25519Key() (*ed25519Signer, error) { - _, private, err := ed25519.GenerateKey(rand.Reader) - if err != nil { - return nil, err - } - if err != nil { - return nil, err - } - return &ed25519Signer{ - PrivateKey: ed25519.PrivateKey(data.HexBytes(private)), - }, nil -} - -func NewEd25519SignerFromKey(keyValue Ed25519PrivateKeyValue) *ed25519Signer { - return &ed25519Signer{ - PrivateKey: ed25519.PrivateKey(data.HexBytes(keyValue.Private)), - } -} - -func (e *ed25519Signer) SignMessage(message []byte) ([]byte, error) { - return e.Sign(rand.Reader, message, crypto.Hash(0)) -} - -func (e *ed25519Signer) MarshalPrivateKey() (*data.PrivateKey, error) { - valueBytes, err := json.Marshal(Ed25519PrivateKeyValue{ - Public: data.HexBytes([]byte(e.PrivateKey.Public().(ed25519.PublicKey))), - Private: data.HexBytes(e.PrivateKey), - }) - if err != nil { - return nil, err - } - return &data.PrivateKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: valueBytes, - }, nil -} - -func (e *ed25519Signer) UnmarshalPrivateKey(key *data.PrivateKey) error { - keyValue := &Ed25519PrivateKeyValue{} - - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(keyValue); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the private key is truncated or too large: %w", err) - } - } - - // Check private key length - if n := len(keyValue.Private); n != ed25519.PrivateKeySize { - return fmt.Errorf("tuf: invalid ed25519 private key length, expected %d, got %d", ed25519.PrivateKeySize, n) - } - - // Generate public key from private key - pub, _, err := ed25519.GenerateKey(bytes.NewReader(keyValue.Private)) - if err != nil { - return fmt.Errorf("tuf: unable to derive public key from private key: %w", err) - } - - // Compare keys - if subtle.ConstantTimeCompare(keyValue.Public, pub) != 1 { - return errors.New("tuf: public and private keys don't match") - } - - // Prepare signer - *e = ed25519Signer{ - PrivateKey: ed25519.PrivateKey(data.HexBytes(keyValue.Private)), - } - return nil -} - -func (e *ed25519Signer) PublicData() *data.PublicKey { - keyValBytes, _ := json.Marshal(ed25519Verifier{PublicKey: []byte(e.PrivateKey.Public().(ed25519.PublicKey))}) - return &data.PublicKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} diff --git a/pkg/keys/ed25519_test.go b/pkg/keys/ed25519_test.go deleted file mode 100644 index a17cc147..00000000 --- a/pkg/keys/ed25519_test.go +++ /dev/null @@ -1,99 +0,0 @@ -package keys - -import ( - "crypto/ed25519" - "crypto/rand" - "encoding/hex" - "encoding/json" - "errors" - "io" - "strings" - - fuzz "github.com/google/gofuzz" - "github.com/theupdateframework/go-tuf/data" - . "gopkg.in/check.v1" -) - -type Ed25519Suite struct{} - -var _ = Suite(&Ed25519Suite{}) - -func (Ed25519Suite) TestUnmarshalEd25519(c *C) { - pub, _, err := ed25519.GenerateKey(strings.NewReader("00001-deterministic-buffer-for-key-generation")) - c.Assert(err, IsNil) - - publicKey, err := json.Marshal(map[string]string{ - "public": hex.EncodeToString(pub), - }) - c.Assert(err, IsNil) - - badKey := &data.PublicKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: publicKey, - } - verifier := NewEd25519Verifier() - c.Assert(verifier.UnmarshalPublicKey(badKey), IsNil) -} - -func (Ed25519Suite) TestUnmarshalEd25519_Invalid(c *C) { - badKeyValue, err := json.Marshal(true) - c.Assert(err, IsNil) - badKey := &data.PublicKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: badKeyValue, - } - verifier := NewEd25519Verifier() - c.Assert(verifier.UnmarshalPublicKey(badKey), ErrorMatches, "json: cannot unmarshal.*") -} - -func (Ed25519Suite) TestUnmarshalEd25519_FastFuzz(c *C) { - verifier := NewEd25519Verifier() - for i := 0; i < 50; i++ { - // Ensure no basic panic - - f := fuzz.New() - var publicData data.PublicKey - f.Fuzz(&publicData) - - verifier.UnmarshalPublicKey(&publicData) - } -} - -func (Ed25519Suite) TestUnmarshalEd25519_TooLongContent(c *C) { - randomSeed := make([]byte, MaxJSONKeySize) - _, err := io.ReadFull(rand.Reader, randomSeed) - c.Assert(err, IsNil) - - tooLongPayload, err := json.Marshal( - &ed25519Verifier{ - PublicKey: data.HexBytes(hex.EncodeToString(randomSeed)), - }, - ) - c.Assert(err, IsNil) - - badKey := &data.PublicKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: tooLongPayload, - } - verifier := NewEd25519Verifier() - err = verifier.UnmarshalPublicKey(badKey) - c.Assert(errors.Is(err, io.ErrUnexpectedEOF), Equals, true) -} - -func (Ed25519Suite) TestSignVerify(c *C) { - signer, err := GenerateEd25519Key() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - publicData := signer.PublicData() - pubKey, err := GetVerifier(publicData) - c.Assert(err, IsNil) - c.Assert(pubKey.Verify(msg, sig), IsNil) -} diff --git a/pkg/keys/keys.go b/pkg/keys/keys.go deleted file mode 100644 index dc5f3ea2..00000000 --- a/pkg/keys/keys.go +++ /dev/null @@ -1,82 +0,0 @@ -package keys - -import ( - "errors" - "fmt" - "sync" - - "github.com/theupdateframework/go-tuf/data" -) - -// MaxJSONKeySize defines the maximum length of a JSON payload. -const MaxJSONKeySize = 512 * 1024 // 512Kb - -// SignerMap stores mapping between key type strings and signer constructors. -var SignerMap sync.Map - -// Verifier stores mapping between key type strings and verifier constructors. -var VerifierMap sync.Map - -var ( - ErrInvalid = errors.New("tuf: signature verification failed") - ErrInvalidKey = errors.New("invalid key") -) - -// A Verifier verifies public key signatures. -type Verifier interface { - // UnmarshalPublicKey takes key data to a working verifier implementation for the key type. - // This performs any validation over the data.PublicKey to ensure that the verifier is usable - // to verify signatures. - UnmarshalPublicKey(key *data.PublicKey) error - - // MarshalPublicKey returns the data.PublicKey object associated with the verifier. - MarshalPublicKey() *data.PublicKey - - // This is the public string used as a unique identifier for the verifier instance. - Public() string - - // Verify takes a message and signature, all as byte slices, - // and determines whether the signature is valid for the given - // key and message. - Verify(msg, sig []byte) error -} - -type Signer interface { - // MarshalPrivateKey returns the private key data. - MarshalPrivateKey() (*data.PrivateKey, error) - - // UnmarshalPrivateKey takes private key data to a working Signer implementation for the key type. - UnmarshalPrivateKey(key *data.PrivateKey) error - - // Returns the public data.PublicKey from the private key - PublicData() *data.PublicKey - - // Sign returns the signature of the message. - // The signer is expected to do its own hashing, so the full message will be - // provided as the message to Sign with a zero opts.HashFunc(). - SignMessage(message []byte) ([]byte, error) -} - -func GetVerifier(key *data.PublicKey) (Verifier, error) { - st, ok := VerifierMap.Load(key.Type) - if !ok { - return nil, ErrInvalidKey - } - s := st.(func() Verifier)() - if err := s.UnmarshalPublicKey(key); err != nil { - return nil, fmt.Errorf("tuf: error unmarshalling key: %w", err) - } - return s, nil -} - -func GetSigner(key *data.PrivateKey) (Signer, error) { - st, ok := SignerMap.Load(key.Type) - if !ok { - return nil, ErrInvalidKey - } - s := st.(func() Signer)() - if err := s.UnmarshalPrivateKey(key); err != nil { - return nil, fmt.Errorf("tuf: error unmarshalling key: %w", err) - } - return s, nil -} diff --git a/pkg/keys/keys_test.go b/pkg/keys/keys_test.go deleted file mode 100644 index c1a7d018..00000000 --- a/pkg/keys/keys_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package keys - -import ( - "testing" - - "github.com/theupdateframework/go-tuf/data" - . "gopkg.in/check.v1" -) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type KeysSuite struct{} - -var _ = Suite(&KeysSuite{}) - -func (KeysSuite) TestSignerKeyIDs(c *C) { - _, err := GenerateEd25519Key() - c.Assert(err, IsNil) - - // If we have a TUF-0.9 key, we won't have a scheme. - signer, err := GenerateEd25519Key() - c.Assert(err, IsNil) - privKey, err := signer.MarshalPrivateKey() - c.Assert(err, IsNil) - privKey.Scheme = "" - err = signer.UnmarshalPrivateKey(privKey) - c.Assert(err, IsNil) - - // Make sure we preserve ids if we don't have any - // keyid_hash_algorithms. - signer, err = GenerateEd25519Key() - c.Assert(err, IsNil) - privKey, err = signer.MarshalPrivateKey() - c.Assert(err, IsNil) - privKey.Algorithms = []data.HashAlgorithm{} - err = signer.UnmarshalPrivateKey(privKey) - c.Assert(err, IsNil) -} diff --git a/pkg/keys/pkix.go b/pkg/keys/pkix.go deleted file mode 100644 index e58d4c9f..00000000 --- a/pkg/keys/pkix.go +++ /dev/null @@ -1,56 +0,0 @@ -package keys - -import ( - "bytes" - "crypto" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" -) - -type PKIXPublicKey struct { - crypto.PublicKey -} - -func (p *PKIXPublicKey) MarshalJSON() ([]byte, error) { - bytes, err := x509.MarshalPKIXPublicKey(p.PublicKey) - if err != nil { - return nil, err - } - pemBytes := pem.EncodeToMemory(&pem.Block{ - Type: "PUBLIC KEY", - Bytes: bytes, - }) - return json.Marshal(string(pemBytes)) -} - -func (p *PKIXPublicKey) UnmarshalJSON(b []byte) error { - var pemValue string - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(b), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(&pemValue); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - block, _ := pem.Decode([]byte(pemValue)) - if block == nil { - return errors.New("invalid PEM value") - } - if block.Type != "PUBLIC KEY" { - return fmt.Errorf("invalid block type: %s", block.Type) - } - pub, err := x509.ParsePKIXPublicKey(block.Bytes) - if err != nil { - return err - } - p.PublicKey = pub - return nil -} diff --git a/pkg/keys/pkix_test.go b/pkg/keys/pkix_test.go deleted file mode 100644 index 4debddeb..00000000 --- a/pkg/keys/pkix_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package keys - -import ( - "crypto/ecdsa" - "crypto/rand" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "io" - - . "gopkg.in/check.v1" -) - -const ecdsaKey = `-----BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEftgasQA68yvumeXZmcOTSIHKfbmx -WT1oYuRF0Un3tKxnzip6xAYwlz0Dt96DUh+0P7BruHH2O6s4MiRR9/TuNw== ------END PUBLIC KEY----- -` - -type PKIXSuite struct{} - -var _ = Suite(&PKIXSuite{}) - -func (PKIXSuite) TestMarshalJSON(c *C) { - block, _ := pem.Decode([]byte(ecdsaKey)) - key, err := x509.ParsePKIXPublicKey(block.Bytes) - c.Assert(err, IsNil) - k := PKIXPublicKey{PublicKey: key} - buf, err := json.Marshal(&k) - c.Assert(err, IsNil) - var val string - err = json.Unmarshal(buf, &val) - c.Assert(err, IsNil) - c.Assert(val, Equals, ecdsaKey) -} - -func (PKIXSuite) TestUnmarshalJSON(c *C) { - buf, err := json.Marshal(ecdsaKey) - c.Assert(err, IsNil) - var k PKIXPublicKey - err = json.Unmarshal(buf, &k) - c.Assert(err, IsNil) - c.Assert(k.PublicKey, FitsTypeOf, (*ecdsa.PublicKey)(nil)) -} - -func (PKIXSuite) TestUnmarshalPKIX_TooLongContent(c *C) { - randomSeed := make([]byte, MaxJSONKeySize) - _, err := io.ReadFull(rand.Reader, randomSeed) - c.Assert(err, IsNil) - - pemBytes := pem.EncodeToMemory(&pem.Block{ - Type: "PUBLIC KEY", - Bytes: randomSeed, - }) - tooLongPayload, err := json.Marshal(string(pemBytes)) - c.Assert(err, IsNil) - - var k PKIXPublicKey - err = json.Unmarshal(tooLongPayload, &k) - c.Assert(errors.Is(err, io.ErrUnexpectedEOF), Equals, true) -} diff --git a/pkg/keys/rsa.go b/pkg/keys/rsa.go deleted file mode 100644 index 07a4cd6b..00000000 --- a/pkg/keys/rsa.go +++ /dev/null @@ -1,162 +0,0 @@ -package keys - -import ( - "bytes" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" - - "github.com/theupdateframework/go-tuf/data" -) - -func init() { - VerifierMap.Store(data.KeyTypeRSASSA_PSS_SHA256, NewRsaVerifier) - SignerMap.Store(data.KeyTypeRSASSA_PSS_SHA256, newRsaSigner) -} - -func NewRsaVerifier() Verifier { - return &rsaVerifier{} -} - -func newRsaSigner() Signer { - return &rsaSigner{} -} - -type rsaVerifier struct { - PublicKey *PKIXPublicKey `json:"public"` - rsaKey *rsa.PublicKey - key *data.PublicKey -} - -func (p *rsaVerifier) Public() string { - // This is already verified to succeed when unmarshalling a public key. - r, err := x509.MarshalPKIXPublicKey(p.rsaKey) - if err != nil { - // TODO: Gracefully handle these errors. - // See https://github.com/theupdateframework/go-tuf/issues/363 - panic(err) - } - return string(r) -} - -func (p *rsaVerifier) Verify(msg, sigBytes []byte) error { - hash := sha256.Sum256(msg) - - return rsa.VerifyPSS(p.rsaKey, crypto.SHA256, hash[:], sigBytes, &rsa.PSSOptions{}) -} - -func (p *rsaVerifier) MarshalPublicKey() *data.PublicKey { - return p.key -} - -func (p *rsaVerifier) UnmarshalPublicKey(key *data.PublicKey) error { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(p); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - rsaKey, ok := p.PublicKey.PublicKey.(*rsa.PublicKey) - if !ok { - return fmt.Errorf("invalid public key") - } - - if _, err := x509.MarshalPKIXPublicKey(rsaKey); err != nil { - return fmt.Errorf("marshalling to PKIX key: invalid public key") - } - - p.rsaKey = rsaKey - p.key = key - return nil -} - -type rsaSigner struct { - *rsa.PrivateKey -} - -type rsaPrivateKeyValue struct { - Private string `json:"private"` - Public *PKIXPublicKey `json:"public"` -} - -func (s *rsaSigner) PublicData() *data.PublicKey { - keyValBytes, _ := json.Marshal(rsaVerifier{PublicKey: &PKIXPublicKey{PublicKey: s.Public()}}) - return &data.PublicKey{ - Type: data.KeyTypeRSASSA_PSS_SHA256, - Scheme: data.KeySchemeRSASSA_PSS_SHA256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} - -func (s *rsaSigner) SignMessage(message []byte) ([]byte, error) { - hash := sha256.Sum256(message) - return rsa.SignPSS(rand.Reader, s.PrivateKey, crypto.SHA256, hash[:], &rsa.PSSOptions{}) -} - -func (s *rsaSigner) ContainsID(id string) bool { - return s.PublicData().ContainsID(id) -} - -func (s *rsaSigner) MarshalPrivateKey() (*data.PrivateKey, error) { - priv := x509.MarshalPKCS1PrivateKey(s.PrivateKey) - pemKey := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: priv}) - val, err := json.Marshal(rsaPrivateKeyValue{ - Private: string(pemKey), - Public: &PKIXPublicKey{PublicKey: s.Public()}, - }) - if err != nil { - return nil, err - } - return &data.PrivateKey{ - Type: data.KeyTypeRSASSA_PSS_SHA256, - Scheme: data.KeySchemeRSASSA_PSS_SHA256, - Algorithms: data.HashAlgorithms, - Value: val, - }, nil -} - -func (s *rsaSigner) UnmarshalPrivateKey(key *data.PrivateKey) error { - val := rsaPrivateKeyValue{} - if err := json.Unmarshal(key.Value, &val); err != nil { - return err - } - block, _ := pem.Decode([]byte(val.Private)) - if block == nil { - return errors.New("invalid PEM value") - } - if block.Type != "RSA PRIVATE KEY" { - return fmt.Errorf("invalid block type: %s", block.Type) - } - k, err := x509.ParsePKCS1PrivateKey(block.Bytes) - if err != nil { - return err - } - if _, err := json.Marshal(rsaVerifier{ - PublicKey: &PKIXPublicKey{PublicKey: k.Public()}}); err != nil { - return fmt.Errorf("invalid public key: %s", err) - } - - s.PrivateKey = k - return nil -} - -func GenerateRsaKey() (*rsaSigner, error) { - privkey, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - return nil, err - } - return &rsaSigner{privkey}, nil -} diff --git a/pkg/keys/rsa_test.go b/pkg/keys/rsa_test.go deleted file mode 100644 index e5406c1a..00000000 --- a/pkg/keys/rsa_test.go +++ /dev/null @@ -1,125 +0,0 @@ -package keys - -import ( - "crypto/rand" - "encoding/hex" - "encoding/json" - "errors" - "io" - - "github.com/theupdateframework/go-tuf/data" - . "gopkg.in/check.v1" -) - -type RsaSuite struct{} - -var _ = Suite(&RsaSuite{}) - -func (RsaSuite) TestSignVerify(c *C) { - signer, err := GenerateRsaKey() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - publicData := signer.PublicData() - pubKey, err := GetVerifier(publicData) - c.Assert(err, IsNil) - c.Assert(pubKey.Verify(msg, sig), IsNil) -} - -func (RsaSuite) TestRSAVerifyMismatchMessage(c *C) { - signer, err := GenerateRsaKey() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - publicData := signer.PublicData() - pubKey, err := GetVerifier(publicData) - c.Assert(err, IsNil) - c.Assert(pubKey.Verify([]byte("notfoo"), sig), ErrorMatches, "crypto/rsa: verification error") -} - -func (RsaSuite) TestRSAVerifyMismatchPubKey(c *C) { - signer, err := GenerateRsaKey() - c.Assert(err, IsNil) - msg := []byte("foo") - sig, err := signer.SignMessage(msg) - c.Assert(err, IsNil) - - signerNew, err := GenerateRsaKey() - c.Assert(err, IsNil) - - pubKey, err := GetVerifier(signerNew.PublicData()) - c.Assert(err, IsNil) - c.Assert(pubKey.Verify([]byte("notfoo"), sig), ErrorMatches, "crypto/rsa: verification error") -} - -func (RsaSuite) TestMarshalUnmarshalPublicKey(c *C) { - signer, err := GenerateRsaKey() - c.Assert(err, IsNil) - publicData := signer.PublicData() - pubKey, err := GetVerifier(publicData) - c.Assert(err, IsNil) - c.Assert(pubKey.MarshalPublicKey(), DeepEquals, publicData) -} - -func (RsaSuite) TestMarshalUnmarshalPrivateKey(c *C) { - signer, err := GenerateRsaKey() - c.Assert(err, IsNil) - privateData, err := signer.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(privateData.Type, Equals, data.KeyTypeRSASSA_PSS_SHA256) - c.Assert(privateData.Scheme, Equals, data.KeySchemeRSASSA_PSS_SHA256) - c.Assert(privateData.Algorithms, DeepEquals, data.HashAlgorithms) - s, err := GetSigner(privateData) - c.Assert(err, IsNil) - c.Assert(s, DeepEquals, signer) -} - -func (ECDSASuite) TestUnmarshalRSA_Invalid(c *C) { - badKeyValue, err := json.Marshal(true) - c.Assert(err, IsNil) - - badKey := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: badKeyValue, - } - verifier := NewEcdsaVerifier() - c.Assert(verifier.UnmarshalPublicKey(badKey), ErrorMatches, "json: cannot unmarshal.*") -} - -func (ECDSASuite) TestUnmarshalRSAPublicKey(c *C) { - priv, err := GenerateRsaKey() - c.Assert(err, IsNil) - - signer := &rsaSigner{priv.PrivateKey} - goodKey := signer.PublicData() - - verifier := NewRsaVerifier() - c.Assert(verifier.UnmarshalPublicKey(goodKey), IsNil) -} - -func (ECDSASuite) TestUnmarshalRSA_TooLongContent(c *C) { - randomSeed := make([]byte, MaxJSONKeySize) - _, err := io.ReadFull(rand.Reader, randomSeed) - c.Assert(err, IsNil) - - tooLongPayload, err := json.Marshal( - &ed25519Verifier{ - PublicKey: data.HexBytes(hex.EncodeToString(randomSeed)), - }, - ) - c.Assert(err, IsNil) - - badKey := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: tooLongPayload, - } - verifier := NewRsaVerifier() - err = verifier.UnmarshalPublicKey(badKey) - c.Assert(errors.Is(err, io.ErrUnexpectedEOF), Equals, true) -} diff --git a/pkg/targets/delegation.go b/pkg/targets/delegation.go deleted file mode 100644 index dce61710..00000000 --- a/pkg/targets/delegation.go +++ /dev/null @@ -1,102 +0,0 @@ -package targets - -import ( - "errors" - - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/sets" - "github.com/theupdateframework/go-tuf/verify" -) - -type Delegation struct { - Delegator string - Delegatee data.DelegatedRole - DB *verify.DB -} - -type delegationsIterator struct { - stack []Delegation - target string - visitedRoles map[string]struct{} - parents map[string]string -} - -var ErrTopLevelTargetsRoleMissing = errors.New("tuf: top level targets role missing from top level keys DB") - -// NewDelegationsIterator initialises an iterator with a first step -// on top level targets. -func NewDelegationsIterator(target string, topLevelKeysDB *verify.DB) (*delegationsIterator, error) { - targetsRole := topLevelKeysDB.GetRole("targets") - if targetsRole == nil { - return nil, ErrTopLevelTargetsRoleMissing - } - - i := &delegationsIterator{ - target: target, - stack: []Delegation{ - { - Delegatee: data.DelegatedRole{ - Name: "targets", - KeyIDs: sets.StringSetToSlice(targetsRole.KeyIDs), - Threshold: targetsRole.Threshold, - }, - DB: topLevelKeysDB, - }, - }, - visitedRoles: make(map[string]struct{}), - parents: make(map[string]string), - } - return i, nil -} - -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, db *verify.DB) 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, - DB: db, - } - d.stack = append(d.stack, delegation) - d.parents[r.Name] = delegator - } - } - - return nil -} - -func (d *delegationsIterator) Parent(role string) string { - return d.parents[role] -} diff --git a/pkg/targets/delegation_test.go b/pkg/targets/delegation_test.go deleted file mode 100644 index 2e0c42b6..00000000 --- a/pkg/targets/delegation_test.go +++ /dev/null @@ -1,252 +0,0 @@ -package targets - -import ( - "testing" - - "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) { - topTargetsPubKey := &data.PublicKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: []byte(`{"public":"aaaaec567e5901ba3976c34f7cd5169704292439bf71e6aa19c64b96706f95ef"}`), - } - delTargetsPubKey := &data.PublicKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: []byte(`{"public":"bbbbec567e5901ba3976c34f7cd5169704292439bf71e6aa19c64b96706f95ef"}`), - } - - defaultKeyIDs := delTargetsPubKey.IDs() - var iteratorTests = []struct { - testName string - roles map[string][]data.DelegatedRole - file string - resultOrder []string - err error - }{ - { - testName: "no delegation", - roles: map[string][]data.DelegatedRole{ - "targets": {}, - }, - file: "test.txt", - resultOrder: []string{"targets"}, - }, - { - testName: "no termination", - roles: map[string][]data.DelegatedRole{ - "targets": { - {Name: "b", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "e", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "b": { - {Name: "c", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "c": { - {Name: "d", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "e": { - {Name: "f", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "g", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "g": { - {Name: "h", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "i", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "j", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - 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, Threshold: 1, KeyIDs: defaultKeyIDs, Terminating: true}, - {Name: "e", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "b": { - {Name: "c", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "d", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - file: "", - resultOrder: []string{"targets", "b", "c", "d"}, - }, - { - testName: "path does not match b", - roles: map[string][]data.DelegatedRole{ - "targets": { - {Name: "b", Paths: noMatchPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "e", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "b": { - {Name: "c", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "d", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - file: "", - resultOrder: []string{"targets", "e"}, - }, - { - testName: "path does not match b - path prefixes", - roles: map[string][]data.DelegatedRole{ - "targets": { - {Name: "b", PathHashPrefixes: []string{"33472a4909"}, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "c", PathHashPrefixes: []string{"34c85d1ee84f61f10d7dc633"}, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "c": { - - {Name: "d", PathHashPrefixes: []string{"8baf"}, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "e", PathHashPrefixes: []string{"34c85d1ee84f61f10d7dc633472a49096ed87f8f764bd597831eac371f40ac39"}, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - 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, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "b": {}, - }, - file: "", - resultOrder: []string{"targets"}, - err: data.ErrPathsAndPathHashesSet, - }, - { - testName: "cycle avoided 1", - roles: map[string][]data.DelegatedRole{ - "targets": { - {Name: "a", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "a": { - {Name: "b", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "e", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "b": { - {Name: "a", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "d", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - file: "", - resultOrder: []string{"targets", "a", "b", "d", "e"}, - }, - { - testName: "cycle avoided 2", - roles: map[string][]data.DelegatedRole{ - "targets": { - {Name: "a", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "a": { - {Name: "a", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "b", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "b": { - {Name: "a", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "b", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "c", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "c": { - {Name: "c", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - file: "", - resultOrder: []string{"targets", "a", "b", "c"}, - }, - { - testName: "diamond delegation", - roles: map[string][]data.DelegatedRole{ - "targets": { - {Name: "b", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - {Name: "c", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "b": { - {Name: "d", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "c": { - {Name: "d", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - file: "", - resultOrder: []string{"targets", "b", "d", "c"}, - }, - { - testName: "simple cycle", - roles: map[string][]data.DelegatedRole{ - "targets": { - {Name: "a", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - "a": { - {Name: "a", Paths: defaultPathPatterns, Threshold: 1, KeyIDs: defaultKeyIDs}, - }, - }, - file: "", - resultOrder: []string{"targets", "a"}, - }, - } - - for _, tt := range iteratorTests { - t.Run(tt.testName, func(t *testing.T) { - topLevelDB := verify.NewDB() - topLevelDB.AddKey(topTargetsPubKey.IDs()[0], topTargetsPubKey) - topLevelDB.AddRole("targets", &data.Role{ - KeyIDs: topTargetsPubKey.IDs(), - Threshold: 1, - }) - - d, err := NewDelegationsIterator(tt.file, topLevelDB) - assert.NoError(t, err) - - var iterationOrder []string - for { - r, ok := d.Next() - if !ok { - break - } - - // A delegation should have associated keys. Testing the exact keys - // isn't useful in this module since the keys are supplied by the - // caller in the arguments to Add(). - assert.Greater(t, len(r.Delegatee.KeyIDs), 0) - - iterationOrder = append(iterationOrder, r.Delegatee.Name) - delegations, ok := tt.roles[r.Delegatee.Name] - if !ok { - continue - } - - db, err := verify.NewDBFromDelegations(&data.Delegations{ - Roles: delegations, - }) - assert.NoError(t, err) - - err = d.Add(delegations, r.Delegatee.Name, db) - assert.Equal(t, tt.err, err) - } - assert.Equal(t, tt.resultOrder, iterationOrder) - }) - } -} - -func TestNewDelegationsIteratorError(t *testing.T) { - // Empty DB. It is supposed to have at least the top-level targets role and - // keys. - tldb := verify.NewDB() - - _, err := NewDelegationsIterator("targets", tldb) - assert.ErrorIs(t, err, ErrTopLevelTargetsRoleMissing) -} diff --git a/pkg/targets/hash_bins.go b/pkg/targets/hash_bins.go deleted file mode 100644 index 95f4405d..00000000 --- a/pkg/targets/hash_bins.go +++ /dev/null @@ -1,113 +0,0 @@ -package targets - -import ( - "fmt" - "strconv" - "strings" -) - -const MinDelegationHashPrefixBitLen = 1 -const MaxDelegationHashPrefixBitLen = 32 - -// hexEncode formats x as a hex string. The hex string is left padded with -// zeros to padWidth, if necessary. -func hexEncode(x uint64, padWidth int) string { - // Benchmarked to be more than 10x faster than padding with Sprintf. - s := strconv.FormatUint(x, 16) - if len(s) >= padWidth { - return s - } - return strings.Repeat("0", padWidth-len(s)) + s -} - -const bitsPerHexDigit = 4 - -// numHexDigits returns the number of hex digits required to encode the given -// number of bits. -func numHexDigits(numBits int) int { - // ceil(numBits / bitsPerHexDigit) - return ((numBits - 1) / bitsPerHexDigit) + 1 -} - -// HashBins represents an ordered list of hash bin target roles, which together -// partition the space of target path hashes equal-sized buckets based on path -// has prefix. -type HashBins struct { - rolePrefix string - bitLen int - hexDigitLen int - - numBins uint64 - numPrefixesPerBin uint64 -} - -// NewHashBins creates a HashBins partitioning with 2^bitLen buckets. -func NewHashBins(rolePrefix string, bitLen int) (*HashBins, error) { - if bitLen < MinDelegationHashPrefixBitLen || bitLen > MaxDelegationHashPrefixBitLen { - return nil, fmt.Errorf("bitLen is out of bounds, should be between %v and %v inclusive", MinDelegationHashPrefixBitLen, MaxDelegationHashPrefixBitLen) - } - - hexDigitLen := numHexDigits(bitLen) - numBins := uint64(1) << bitLen - - numPrefixesTotal := uint64(1) << (bitsPerHexDigit * hexDigitLen) - numPrefixesPerBin := numPrefixesTotal / numBins - - return &HashBins{ - rolePrefix: rolePrefix, - bitLen: bitLen, - hexDigitLen: hexDigitLen, - numBins: numBins, - numPrefixesPerBin: numPrefixesPerBin, - }, nil -} - -// NumBins returns the number of hash bin partitions. -func (hb *HashBins) NumBins() uint64 { - return hb.numBins -} - -// GetBin returns the HashBin at index i, or nil if i is out of bounds. -func (hb *HashBins) GetBin(i uint64) *HashBin { - if i >= hb.numBins { - return nil - } - - return &HashBin{ - rolePrefix: hb.rolePrefix, - hexDigitLen: hb.hexDigitLen, - first: i * hb.numPrefixesPerBin, - last: ((i + 1) * hb.numPrefixesPerBin) - 1, - } -} - -// HashBin represents a hex prefix range. First should be less than Last. -type HashBin struct { - rolePrefix string - hexDigitLen int - first uint64 - last uint64 -} - -// RoleName returns the name of the role that signs for the HashBin. -func (b *HashBin) RoleName() string { - if b.first == b.last { - return b.rolePrefix + hexEncode(b.first, b.hexDigitLen) - } - - return b.rolePrefix + hexEncode(b.first, b.hexDigitLen) + "-" + hexEncode(b.last, b.hexDigitLen) -} - -// HashPrefixes returns a slice of all hash prefixes in the bin. -func (b *HashBin) HashPrefixes() []string { - n := int(b.last - b.first + 1) - ret := make([]string, int(n)) - - x := b.first - for i := 0; i < n; i++ { - ret[i] = hexEncode(x, b.hexDigitLen) - x++ - } - - return ret -} diff --git a/pkg/targets/hash_bins_test.go b/pkg/targets/hash_bins_test.go deleted file mode 100644 index dce2ab86..00000000 --- a/pkg/targets/hash_bins_test.go +++ /dev/null @@ -1,119 +0,0 @@ -package targets - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func BenchmarkHexEncode1(b *testing.B) { - for n := 0; n <= b.N; n++ { - for x := uint64(0); x <= 0xf; x += 1 { - hexEncode(x, 1) - } - } -} - -func BenchmarkHexEncode4(b *testing.B) { - for n := 0; n <= b.N; n++ { - for x := uint64(0); x <= 0xffff; x += 1 { - hexEncode(x, 4) - } - } -} - -func TestHashBin(t *testing.T) { - tcs := []struct { - hb *HashBin - roleName string - hashPrefixes []string - }{ - { - hb: &HashBin{ - rolePrefix: "abc_", - hexDigitLen: 1, - first: 0x0, - last: 0x7, - }, - roleName: "abc_0-7", - hashPrefixes: []string{ - "0", "1", "2", "3", "4", "5", "6", "7", - }, - }, - { - hb: &HashBin{ - rolePrefix: "abc_", - hexDigitLen: 2, - first: 0x0, - last: 0xf, - }, - roleName: "abc_00-0f", - hashPrefixes: []string{ - "00", "01", "02", "03", "04", "05", "06", "07", - "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", - }, - }, - { - hb: &HashBin{ - rolePrefix: "cba_", - hexDigitLen: 4, - first: 0xcd, - last: 0xcf, - }, - roleName: "cba_00cd-00cf", - hashPrefixes: []string{"00cd", "00ce", "00cf"}, - }, - { - hb: &HashBin{ - rolePrefix: "cba_", - hexDigitLen: 3, - first: 0xc1, - last: 0xc1, - }, - roleName: "cba_0c1", - hashPrefixes: []string{"0c1"}, - }, - } - - for i, tc := range tcs { - assert.Equalf(t, tc.roleName, tc.hb.RoleName(), "test case %v: RoleName()", i) - assert.Equalf(t, tc.hashPrefixes, tc.hb.HashPrefixes(), "test case %v: HashPrefixes()", i) - } -} - -func TestHashBins(t *testing.T) { - tcs := []struct { - bitLen int - roleNames []string - }{ - {1, []string{"0-7", "8-f"}}, - {2, []string{"0-3", "4-7", "8-b", "c-f"}}, - {3, []string{"0-1", "2-3", "4-5", "6-7", "8-9", "a-b", "c-d", "e-f"}}, - {4, []string{ - "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "a", "b", "c", "d", "e", "f", - }}, - {5, []string{ - "00-07", "08-0f", "10-17", "18-1f", "20-27", "28-2f", "30-37", "38-3f", - "40-47", "48-4f", "50-57", "58-5f", "60-67", "68-6f", "70-77", "78-7f", - "80-87", "88-8f", "90-97", "98-9f", "a0-a7", "a8-af", "b0-b7", "b8-bf", - "c0-c7", "c8-cf", "d0-d7", "d8-df", "e0-e7", "e8-ef", "f0-f7", "f8-ff", - }}, - } - for i, tc := range tcs { - got := []string{} - hbs, err := NewHashBins("", tc.bitLen) - assert.NoError(t, err) - n := hbs.NumBins() - for i := uint64(0); i < n; i += 1 { - hb := hbs.GetBin(i) - got = append(got, hb.RoleName()) - } - assert.Equalf(t, tc.roleNames, got, "test case %v", i) - } - - _, err := NewHashBins("", 0) - assert.Error(t, err) - _, err = NewHashBins("", 33) - assert.Error(t, err) -} diff --git a/repo.go b/repo.go deleted file mode 100644 index e9382ddb..00000000 --- a/repo.go +++ /dev/null @@ -1,1738 +0,0 @@ -package tuf - -import ( - "bytes" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - "log" - "path" - "sort" - "strings" - "time" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/roles" - "github.com/theupdateframework/go-tuf/internal/sets" - "github.com/theupdateframework/go-tuf/internal/signer" - "github.com/theupdateframework/go-tuf/pkg/keys" - "github.com/theupdateframework/go-tuf/pkg/targets" - "github.com/theupdateframework/go-tuf/sign" - "github.com/theupdateframework/go-tuf/util" - "github.com/theupdateframework/go-tuf/verify" -) - -const ( - // The maximum number of delegations to visit while traversing the delegations graph. - defaultMaxDelegations = 32 -) - -// topLevelMetadata determines the order signatures are verified when committing. -var topLevelMetadata = []string{ - "root.json", - "targets.json", - "snapshot.json", - "timestamp.json", -} - -// TargetsWalkFunc is a function of a target path name and a target payload used to -// execute some function on each staged target file. For example, it may normalize path -// names and generate target file metadata with additional custom metadata. -type TargetsWalkFunc func(path string, target io.Reader) error - -type Repo struct { - local LocalStore - hashAlgorithms []string - meta map[string]json.RawMessage - prefix string - indent string - logger *log.Logger -} - -type RepoOpts func(r *Repo) - -func WithLogger(logger *log.Logger) RepoOpts { - return func(r *Repo) { - r.logger = logger - } -} - -func WithHashAlgorithms(hashAlgorithms ...string) RepoOpts { - return func(r *Repo) { - r.hashAlgorithms = hashAlgorithms - } -} - -func WithPrefix(prefix string) RepoOpts { - return func(r *Repo) { - r.prefix = prefix - } -} - -func WithIndex(indent string) RepoOpts { - return func(r *Repo) { - r.indent = indent - } -} - -func NewRepo(local LocalStore, hashAlgorithms ...string) (*Repo, error) { - return NewRepoIndent(local, "", "", hashAlgorithms...) -} - -func NewRepoIndent(local LocalStore, prefix string, indent string, - hashAlgorithms ...string) (*Repo, error) { - r := &Repo{ - local: local, - hashAlgorithms: hashAlgorithms, - prefix: prefix, - indent: indent, - logger: log.New(io.Discard, "", 0), - } - - var err error - r.meta, err = local.GetMeta() - if err != nil { - return nil, err - } - return r, nil -} - -func NewRepoWithOpts(local LocalStore, opts ...RepoOpts) (*Repo, error) { - r, err := NewRepo(local) - if err != nil { - return nil, err - } - for _, opt := range opts { - opt(r) - } - return r, nil -} - -func (r *Repo) Init(consistentSnapshot bool) error { - t, err := r.topLevelTargets() - if err != nil { - return err - } - if len(t.Targets) > 0 { - return ErrInitNotAllowed - } - root := data.NewRoot() - root.ConsistentSnapshot = consistentSnapshot - // Set root version to 1 for a new root. - root.Version = 1 - if err = r.setMeta("root.json", root); err != nil { - return err - } - - t.Version = 1 - if err = r.setMeta("targets.json", t); err != nil { - return err - } - - r.logger.Println("Repository initialized") - return nil -} - -func (r *Repo) topLevelKeysDB() (*verify.DB, error) { - db := verify.NewDB() - root, err := r.root() - if err != nil { - return nil, err - } - for id, k := range root.Keys { - if err := db.AddKey(id, k); err != nil { - return nil, err - } - } - for name, role := range root.Roles { - if err := db.AddRole(name, role); err != nil { - return nil, err - } - } - return db, nil -} - -func (r *Repo) root() (*data.Root, error) { - rootJSON, ok := r.meta["root.json"] - if !ok { - return data.NewRoot(), nil - } - s := &data.Signed{} - if err := json.Unmarshal(rootJSON, s); err != nil { - return nil, err - } - root := &data.Root{} - if err := json.Unmarshal(s.Signed, root); err != nil { - return nil, err - } - return root, nil -} - -func (r *Repo) snapshot() (*data.Snapshot, error) { - snapshotJSON, ok := r.meta["snapshot.json"] - if !ok { - return data.NewSnapshot(), nil - } - s := &data.Signed{} - if err := json.Unmarshal(snapshotJSON, s); err != nil { - return nil, err - } - snapshot := &data.Snapshot{} - if err := json.Unmarshal(s.Signed, snapshot); err != nil { - return nil, err - } - return snapshot, nil -} - -func (r *Repo) RootVersion() (int64, error) { - root, err := r.root() - if err != nil { - return -1, err - } - return root.Version, nil -} - -func (r *Repo) GetThreshold(keyRole string) (int, error) { - if roles.IsDelegatedTargetsRole(keyRole) { - // The signature threshold for a delegated targets role - // depends on the incoming delegation edge. - return -1, ErrInvalidRole{keyRole, "only thresholds for top-level roles supported"} - } - root, err := r.root() - if err != nil { - return -1, err - } - role, ok := root.Roles[keyRole] - if !ok { - return -1, ErrInvalidRole{keyRole, "role missing from root metadata"} - } - - return role.Threshold, nil -} - -func (r *Repo) SetThreshold(keyRole string, t int) error { - if roles.IsDelegatedTargetsRole(keyRole) { - // The signature threshold for a delegated targets role - // depends on the incoming delegation edge. - return ErrInvalidRole{keyRole, "only thresholds for top-level roles supported"} - } - root, err := r.root() - if err != nil { - return err - } - role, ok := root.Roles[keyRole] - if !ok { - return ErrInvalidRole{keyRole, "role missing from root metadata"} - } - if role.Threshold == t { - // Change was a no-op. - return nil - } - role.Threshold = t - if !r.local.FileIsStaged("root.json") { - root.Version++ - } - return r.setMeta("root.json", root) -} - -func (r *Repo) Targets() (data.TargetFiles, error) { - targets, err := r.topLevelTargets() - if err != nil { - return nil, err - } - return targets.Targets, nil -} - -func (r *Repo) SetTargetsVersion(v int64) error { - t, err := r.topLevelTargets() - if err != nil { - return err - } - t.Version = v - return r.setMeta("targets.json", t) -} - -func (r *Repo) TargetsVersion() (int64, error) { - t, err := r.topLevelTargets() - if err != nil { - return -1, err - } - return t.Version, nil -} - -func (r *Repo) SetTimestampVersion(v int64) error { - ts, err := r.timestamp() - if err != nil { - return err - } - ts.Version = v - return r.setMeta("timestamp.json", ts) -} - -func (r *Repo) TimestampVersion() (int64, error) { - ts, err := r.timestamp() - if err != nil { - return -1, err - } - return ts.Version, nil -} - -func (r *Repo) SetSnapshotVersion(v int64) error { - s, err := r.snapshot() - if err != nil { - return err - } - - s.Version = v - return r.setMeta("snapshot.json", s) -} - -func (r *Repo) SnapshotVersion() (int64, error) { - s, err := r.snapshot() - if err != nil { - return -1, err - } - return s.Version, nil -} - -func (r *Repo) topLevelTargets() (*data.Targets, error) { - return r.targets("targets") -} - -func (r *Repo) targets(metaName string) (*data.Targets, error) { - targetsJSON, ok := r.meta[metaName+".json"] - if !ok { - return data.NewTargets(), nil - } - s := &data.Signed{} - if err := json.Unmarshal(targetsJSON, s); err != nil { - return nil, fmt.Errorf("error unmarshalling for targets %q: %w", metaName, err) - } - targets := &data.Targets{} - if err := json.Unmarshal(s.Signed, targets); err != nil { - return nil, fmt.Errorf("error unmarshalling signed data for targets %q: %w", metaName, err) - } - return targets, nil -} - -func (r *Repo) timestamp() (*data.Timestamp, error) { - timestampJSON, ok := r.meta["timestamp.json"] - if !ok { - return data.NewTimestamp(), nil - } - s := &data.Signed{} - if err := json.Unmarshal(timestampJSON, s); err != nil { - return nil, err - } - timestamp := &data.Timestamp{} - if err := json.Unmarshal(s.Signed, timestamp); err != nil { - return nil, err - } - return timestamp, nil -} - -func (r *Repo) ChangePassphrase(keyRole string) error { - if p, ok := r.local.(PassphraseChanger); ok { - return p.ChangePassphrase(keyRole) - } - - return ErrChangePassphraseNotSupported -} - -func (r *Repo) GenKey(role string) ([]string, error) { - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - return r.GenKeyWithExpires(role, data.DefaultExpires(role)) -} - -func (r *Repo) GenKeyWithExpires(keyRole string, expires time.Time) (keyids []string, err error) { - return r.GenKeyWithSchemeAndExpires(keyRole, expires, data.KeySchemeEd25519) -} - -func (r *Repo) GenKeyWithSchemeAndExpires(role string, expires time.Time, keyScheme data.KeyScheme) ([]string, error) { - var signer keys.Signer - var err error - switch keyScheme { - case data.KeySchemeEd25519: - signer, err = keys.GenerateEd25519Key() - case data.KeySchemeECDSA_SHA2_P256: - signer, err = keys.GenerateEcdsaKey() - case data.KeySchemeRSASSA_PSS_SHA256: - signer, err = keys.GenerateRsaKey() - default: - return nil, errors.New("unknown key type") - } - if err != nil { - return nil, err - } - - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - if err = r.AddPrivateKeyWithExpires(role, signer, expires); err != nil { - return nil, err - } - return signer.PublicData().IDs(), nil -} - -func (r *Repo) AddKeyWithSchemeAndExpires(role string, expires time.Time, keyScheme data.KeyScheme, publicValue string) ([]string, error) { - var verifier keys.Verifier - var keyType data.KeyType - switch keyScheme { - case data.KeySchemeEd25519: - verifier = keys.NewEd25519Verifier() - keyType = data.KeyTypeEd25519 - case data.KeySchemeECDSA_SHA2_P256: - verifier = keys.NewEcdsaVerifier() - keyType = data.KeyTypeECDSA_SHA2_P256 - case data.KeySchemeRSASSA_PSS_SHA256: - verifier = keys.NewRsaVerifier() - keyType = data.KeyTypeRSASSA_PSS_SHA256 - default: - return nil, errors.New("unknown key type") - } - - publicValueData, err := json.Marshal(map[string]string{ - "public": publicValue, - }) - if err != nil { - return nil, err - } - - if err := verifier.UnmarshalPublicKey(&data.PublicKey{ - Type: keyType, - Scheme: keyScheme, - Algorithms: data.HashAlgorithms, - Value: publicValueData, - }); err != nil { - return nil, err - } - - publicKey := verifier.MarshalPublicKey() - - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - if err := r.AddVerificationKeyWithExpiration(role, publicKey, expires); err != nil { - return nil, err - } - return publicKey.IDs(), nil -} - -func (r *Repo) AddPrivateKey(role string, signer keys.Signer) error { - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - return r.AddPrivateKeyWithExpires(role, signer, data.DefaultExpires(role)) -} - -func (r *Repo) AddPrivateKeyWithExpires(keyRole string, signer keys.Signer, expires time.Time) error { - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - if roles.IsDelegatedTargetsRole(keyRole) { - return ErrInvalidRole{keyRole, "only support adding keys for top-level roles"} - } - - if !validExpires(expires) { - return ErrInvalidExpires{expires} - } - - // Must add signer before adding verification key, so - // root.json can be signed when a new root key is added. - if err := r.local.SaveSigner(keyRole, signer); err != nil { - return err - } - - if err := r.AddVerificationKeyWithExpiration(keyRole, signer.PublicData(), expires); err != nil { - return err - } - - return nil -} - -func (r *Repo) AddVerificationKey(keyRole string, pk *data.PublicKey) error { - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - return r.AddVerificationKeyWithExpiration(keyRole, pk, data.DefaultExpires(keyRole)) -} - -func (r *Repo) AddVerificationKeyWithExpiration(keyRole string, pk *data.PublicKey, expires time.Time) error { - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - if roles.IsDelegatedTargetsRole(keyRole) { - return ErrInvalidRole{ - Role: keyRole, - Reason: "only top-level targets roles are supported", - } - } - - if !validExpires(expires) { - return ErrInvalidExpires{expires} - } - - root, err := r.root() - if err != nil { - return err - } - - role, ok := root.Roles[keyRole] - if !ok { - role = &data.Role{KeyIDs: []string{}, Threshold: 1} - root.Roles[keyRole] = role - } - changed := false - if role.AddKeyIDs(pk.IDs()) { - changed = true - } - - if root.AddKey(pk) { - changed = true - } - - if !changed { - return nil - } - - root.Expires = expires.Round(time.Second) - if !r.local.FileIsStaged("root.json") { - root.Version++ - } - - return r.setMeta("root.json", root) -} - -func validExpires(expires time.Time) bool { - return time.Until(expires) > 0 -} - -func (r *Repo) RootKeys() ([]*data.PublicKey, error) { - root, err := r.root() - if err != nil { - return nil, err - } - role, ok := root.Roles["root"] - if !ok { - return nil, nil - } - - // We might have multiple key ids that correspond to the same key, so - // make sure we only return unique keys. - seen := make(map[string]struct{}) - rootKeys := []*data.PublicKey{} - for _, id := range role.KeyIDs { - key, ok := root.Keys[id] - if !ok { - return nil, fmt.Errorf("tuf: invalid root metadata") - } - found := false - if _, ok := seen[id]; ok { - found = true - break - } - if !found { - for _, id := range key.IDs() { - seen[id] = struct{}{} - } - rootKeys = append(rootKeys, key) - } - } - return rootKeys, nil -} - -func (r *Repo) RevokeKey(role, id string) error { - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - return r.RevokeKeyWithExpires(role, id, data.DefaultExpires("root")) -} - -func (r *Repo) RevokeKeyWithExpires(keyRole, id string, expires time.Time) error { - // Not compatible with delegated targets roles, since delegated targets keys - // are associated with a delegation (edge), not a role (node). - - if roles.IsDelegatedTargetsRole(keyRole) { - return ErrInvalidRole{keyRole, "only revocations for top-level roles supported"} - } - - if !validExpires(expires) { - return ErrInvalidExpires{expires} - } - - root, err := r.root() - if err != nil { - return err - } - - key, ok := root.Keys[id] - if !ok { - return ErrKeyNotFound{keyRole, id} - } - - role, ok := root.Roles[keyRole] - if !ok { - return ErrKeyNotFound{keyRole, id} - } - - // Create a list of filtered key IDs that do not contain the revoked key IDs. - filteredKeyIDs := make([]string, 0, len(role.KeyIDs)) - - // There may be multiple keyids that correspond to this key, so - // filter all of them out. - for _, keyID := range role.KeyIDs { - if !key.ContainsID(keyID) { - filteredKeyIDs = append(filteredKeyIDs, keyID) - } - } - if len(filteredKeyIDs) == len(role.KeyIDs) { - return ErrKeyNotFound{keyRole, id} - } - role.KeyIDs = filteredKeyIDs - root.Roles[keyRole] = role - - // Only delete the key from root.Keys if the key is no longer in use by - // any other role. - key_in_use := false - for _, role := range root.Roles { - for _, keyID := range role.KeyIDs { - if key.ContainsID(keyID) { - key_in_use = true - } - } - } - if !key_in_use { - for _, keyID := range key.IDs() { - delete(root.Keys, keyID) - } - } - root.Expires = expires.Round(time.Second) - if !r.local.FileIsStaged("root.json") { - root.Version++ - } - - err = r.setMeta("root.json", root) - if err == nil { - r.logger.Println("Revoked", keyRole, "key with ID", id, "in root metadata") - } - return err -} - -// AddDelegatedRole is equivalent to AddDelegatedRoleWithExpires, but -// with a default expiration time. -func (r *Repo) AddDelegatedRole(delegator string, delegatedRole data.DelegatedRole, keys []*data.PublicKey) error { - return r.AddDelegatedRoleWithExpires(delegator, delegatedRole, keys, data.DefaultExpires("targets")) -} - -// AddDelegatedRoleWithExpires adds a delegation from the delegator to the -// role specified in the role argument. Key IDs referenced in role.KeyIDs -// should have corresponding Key entries in the keys argument. New metadata is -// written with the given expiration time. -func (r *Repo) AddDelegatedRoleWithExpires(delegator string, delegatedRole data.DelegatedRole, keys []*data.PublicKey, expires time.Time) error { - expires = expires.Round(time.Second) - - t, err := r.targets(delegator) - if err != nil { - return fmt.Errorf("error getting delegator (%q) metadata: %w", delegator, err) - } - - if t.Delegations == nil { - t.Delegations = &data.Delegations{} - t.Delegations.Keys = make(map[string]*data.PublicKey) - } - - for _, keyID := range delegatedRole.KeyIDs { - for _, key := range keys { - if key.ContainsID(keyID) { - t.Delegations.Keys[keyID] = key - break - } - } - } - - for _, r := range t.Delegations.Roles { - if r.Name == delegatedRole.Name { - return fmt.Errorf("role: %s is already delegated to by %s", delegatedRole.Name, r.Name) - } - } - t.Delegations.Roles = append(t.Delegations.Roles, delegatedRole) - t.Expires = expires - - delegatorFile := delegator + ".json" - if !r.local.FileIsStaged(delegatorFile) { - t.Version++ - } - - err = r.setMeta(delegatorFile, t) - if err != nil { - return fmt.Errorf("error setting metadata for %q: %w", delegatorFile, err) - } - - delegatee := delegatedRole.Name - dt, err := r.targets(delegatee) - if err != nil { - return fmt.Errorf("error getting delegatee (%q) metadata: %w", delegatee, err) - } - dt.Expires = expires - - delegateeFile := delegatee + ".json" - if !r.local.FileIsStaged(delegateeFile) { - dt.Version++ - } - - err = r.setMeta(delegateeFile, dt) - if err != nil { - return fmt.Errorf("error setting metadata for %q: %w", delegateeFile, err) - } - - return nil -} - -// AddDelegatedRolesForPathHashBins is equivalent to -// AddDelegatedRolesForPathHashBinsWithExpires, but with a default -// expiration time. -func (r *Repo) AddDelegatedRolesForPathHashBins(delegator string, bins *targets.HashBins, keys []*data.PublicKey, threshold int) error { - return r.AddDelegatedRolesForPathHashBinsWithExpires(delegator, bins, keys, threshold, data.DefaultExpires("targets")) -} - -// AddDelegatedRolesForPathHashBinsWithExpires adds delegations to the -// delegator role for the given hash bins configuration. New metadata is -// written with the given expiration time. -func (r *Repo) AddDelegatedRolesForPathHashBinsWithExpires(delegator string, bins *targets.HashBins, keys []*data.PublicKey, threshold int, expires time.Time) error { - keyIDs := []string{} - for _, key := range keys { - keyIDs = append(keyIDs, key.IDs()...) - } - - n := bins.NumBins() - for i := uint64(0); i < n; i += 1 { - bin := bins.GetBin(i) - name := bin.RoleName() - err := r.AddDelegatedRoleWithExpires(delegator, data.DelegatedRole{ - Name: name, - KeyIDs: sets.DeduplicateStrings(keyIDs), - PathHashPrefixes: bin.HashPrefixes(), - Threshold: threshold, - }, keys, expires) - if err != nil { - return fmt.Errorf("error adding delegation from %v to %v: %w", delegator, name, err) - } - } - - return nil -} - -// ResetTargetsDelegation is equivalent to ResetTargetsDelegationsWithExpires -// with a default expiry time. -func (r *Repo) ResetTargetsDelegations(delegator string) error { - return r.ResetTargetsDelegationsWithExpires(delegator, data.DefaultExpires("targets")) -} - -// ResetTargetsDelegationsWithExpires removes all targets delegations from the -// given delegator role. New metadata is written with the given expiration -// time. -func (r *Repo) ResetTargetsDelegationsWithExpires(delegator string, expires time.Time) error { - t, err := r.targets(delegator) - if err != nil { - return fmt.Errorf("error getting delegator (%q) metadata: %w", delegator, err) - } - - t.Delegations = nil - - t.Expires = expires.Round(time.Second) - - delegatorFile := delegator + ".json" - if !r.local.FileIsStaged(delegatorFile) { - t.Version++ - } - - err = r.setMeta(delegatorFile, t) - if err != nil { - return fmt.Errorf("error setting metadata for %q: %w", delegatorFile, err) - } - - return nil -} - -func (r *Repo) jsonMarshal(v interface{}) ([]byte, error) { - if r.prefix == "" && r.indent == "" { - return json.Marshal(v) - } - return json.MarshalIndent(v, r.prefix, r.indent) -} - -func (r *Repo) dbsForRole(role string) ([]*verify.DB, error) { - dbs := []*verify.DB{} - - if roles.IsTopLevelRole(role) { - db, err := r.topLevelKeysDB() - if err != nil { - return nil, err - } - dbs = append(dbs, db) - } else { - ddbs, err := r.delegatorDBs(role) - if err != nil { - return nil, err - } - - dbs = append(dbs, ddbs...) - } - - return dbs, nil -} - -func (r *Repo) signersForRole(role string) ([]keys.Signer, error) { - dbs, err := r.dbsForRole(role) - if err != nil { - return nil, err - } - - signers := []keys.Signer{} - for _, db := range dbs { - ss, err := r.getSignersInDB(role, db) - if err != nil { - return nil, err - } - - signers = append(signers, ss...) - } - - return signers, nil -} - -func (r *Repo) setMeta(roleFilename string, meta interface{}) error { - role := strings.TrimSuffix(roleFilename, ".json") - - signers, err := r.signersForRole(role) - if err != nil { - return err - } - - s, err := sign.Marshal(meta, signers...) - if err != nil { - return err - } - b, err := r.jsonMarshal(s) - if err != nil { - return err - } - r.meta[roleFilename] = b - return r.local.SetMeta(roleFilename, b) -} - -// CanonicalizeAndSign canonicalizes the signed portion of signed, then signs it using the key(s) associated with role. -// -// It appends the signature to signed. -// -// It returns the total number of keys used for signing, 0 (along with -// ErrNoKeys) if no keys were found, or -1 (along with an error) in error cases. -func (r *Repo) CanonicalizeAndSign(role string, signed *data.Signed) (int, error) { - keys, err := r.signersForRole(role) - if err != nil { - return -1, err - } - if len(keys) == 0 { - return 0, ErrNoKeys{role} - } - for _, k := range keys { - if err = sign.Sign(signed, k); err != nil { - return -1, err - } - } - return len(keys), nil -} - -// SignPayload canonicalizes the signed portion of payload, then signs it using the key(s) associated with role. -// -// It returns the total number of keys used for signing, 0 (along with -// ErrNoKeys) if no keys were found, or -1 (along with an error) in error cases. -// -// DEPRECATED: please use CanonicalizeAndSign instead. -func (r *Repo) SignPayload(role string, payload *data.Signed) (int, error) { - return r.CanonicalizeAndSign(role, payload) -} - -// SignRaw signs the given (pre-canonicalized) payload using the key(s) associated with role. -// -// It returns the new data.Signatures. -func (r *Repo) SignRaw(role string, payload []byte) ([]data.Signature, error) { - keys, err := r.signersForRole(role) - if err != nil { - return nil, err - } - if len(keys) == 0 { - return nil, ErrNoKeys{role} - } - - allSigs := make([]data.Signature, 0, len(keys)) - for _, k := range keys { - sigs, err := sign.MakeSignatures(payload, k) - if err != nil { - return nil, err - } - allSigs = append(allSigs, sigs...) - } - return allSigs, nil -} - -func (r *Repo) Sign(roleFilename string) error { - signed, err := r.SignedMeta(roleFilename) - if err != nil { - return err - } - - role := strings.TrimSuffix(roleFilename, ".json") - numKeys, err := r.SignPayload(role, signed) - if errors.Is(err, ErrNoKeys{role}) { - return ErrNoKeys{roleFilename} - } else if err != nil { - return err - } - - b, err := r.jsonMarshal(signed) - if err != nil { - return err - } - r.meta[roleFilename] = b - err = r.local.SetMeta(roleFilename, b) - if err == nil { - r.logger.Println("Signed", roleFilename, "with", numKeys, "key(s)") - } - return err -} - -// AddOrUpdateSignature allows users to add or update a signature generated with an external tool. -// The name must be a valid metadata file name, like root.json. -func (r *Repo) AddOrUpdateSignature(roleFilename string, signature data.Signature) error { - role := strings.TrimSuffix(roleFilename, ".json") - - // Check key ID is in valid for the role. - dbs, err := r.dbsForRole(role) - if err != nil { - return err - } - - if len(dbs) == 0 { - return ErrInvalidRole{role, "no trusted keys for role"} - } - - s, err := r.SignedMeta(roleFilename) - if err != nil { - return err - } - - keyInDB := false - validSig := false - for _, db := range dbs { - roleData := db.GetRole(role) - if roleData == nil { - return ErrInvalidRole{role, "role is not in verifier DB"} - } - if roleData.ValidKey(signature.KeyID) { - keyInDB = true - - verifier, err := db.GetVerifier(signature.KeyID) - if err != nil { - continue - } - - // Now check if this validly signed the metadata. - if err := verify.VerifySignature(s.Signed, signature.Signature, - verifier); err == nil { - validSig = true - break - } - } - } - if !keyInDB { - // This key was not delegated for the role in any delegatee. - return verify.ErrInvalidKey - } - if !validSig { - // The signature was invalid. - return verify.ErrInvalid - } - - // Add or update signature. - signatures := make([]data.Signature, 0, len(s.Signatures)+1) - for _, sig := range s.Signatures { - if sig.KeyID != signature.KeyID { - signatures = append(signatures, sig) - } - } - signatures = append(signatures, signature) - s.Signatures = signatures - - b, err := r.jsonMarshal(s) - if err != nil { - return err - } - r.meta[roleFilename] = b - - return r.local.SetMeta(roleFilename, b) -} - -// getSignersInDB returns available signing interfaces, sorted by key ID. -// -// Only keys contained in the keys db are returned (i.e. local keys which have -// been revoked are omitted), except for the root role in which case all local -// keys are returned (revoked root keys still need to sign new root metadata so -// clients can verify the new root.json and update their keys db accordingly). -func (r *Repo) getSignersInDB(roleName string, db *verify.DB) ([]keys.Signer, error) { - signers, err := r.local.GetSigners(roleName) - if err != nil { - return nil, err - } - - if roleName == "root" { - sorted := make([]keys.Signer, len(signers)) - copy(sorted, signers) - sort.Sort(signer.ByIDs(sorted)) - return sorted, nil - } - - role := db.GetRole(roleName) - if role == nil { - return nil, nil - } - if len(role.KeyIDs) == 0 { - return nil, nil - } - - signersInDB := []keys.Signer{} - for _, s := range signers { - for _, id := range s.PublicData().IDs() { - if _, ok := role.KeyIDs[id]; ok { - signersInDB = append(signersInDB, s) - } - } - } - - sort.Sort(signer.ByIDs(signersInDB)) - - return signersInDB, nil -} - -// Used to retrieve the signable portion of the metadata when using an external signing tool. -func (r *Repo) SignedMeta(roleFilename string) (*data.Signed, error) { - b, ok := r.meta[roleFilename] - if !ok { - return nil, ErrMissingMetadata{roleFilename} - } - s := &data.Signed{} - if err := json.Unmarshal(b, s); err != nil { - return nil, err - } - return s, nil -} - -// delegatorDBs returns a list of key DBs for all incoming delegations. -func (r *Repo) delegatorDBs(delegateeRole string) ([]*verify.DB, error) { - delegatorDBs := []*verify.DB{} - for metaName := range r.meta { - if roles.IsTopLevelManifest(metaName) && metaName != "targets.json" { - continue - } - roleName := strings.TrimSuffix(metaName, ".json") - - t, err := r.targets(roleName) - if err != nil { - return nil, err - } - - if t.Delegations == nil { - continue - } - - delegatesToRole := false - for _, d := range t.Delegations.Roles { - if d.Name == delegateeRole { - delegatesToRole = true - break - } - } - if !delegatesToRole { - continue - } - - db, err := verify.NewDBFromDelegations(t.Delegations) - if err != nil { - return nil, err - } - - delegatorDBs = append(delegatorDBs, db) - } - - return delegatorDBs, nil -} - -// targetDelegationForPath finds the targets metadata for the role that should -// sign the given path. The final delegation that led to the returned target -// metadata is also returned. -// -// Since there may be multiple targets roles that are able to sign a specific -// path, we must choose which roles's metadata to return. If preferredRole is -// specified (non-empty string) and eligible to sign the given path by way of -// some delegation chain, targets metadata for that role is returned. If -// preferredRole is not specified (""), we return targets metadata for the -// final role visited in the depth-first delegation traversal. -func (r *Repo) targetDelegationForPath(path string, preferredRole string) (*data.Targets, *targets.Delegation, error) { - topLevelKeysDB, err := r.topLevelKeysDB() - if err != nil { - return nil, nil, err - } - - iterator, err := targets.NewDelegationsIterator(path, topLevelKeysDB) - if err != nil { - return nil, nil, err - } - d, ok := iterator.Next() - if !ok { - return nil, nil, ErrNoDelegatedTarget{Path: path} - } - - for i := 0; i < defaultMaxDelegations; i++ { - targetsMeta, err := r.targets(d.Delegatee.Name) - if err != nil { - return nil, nil, err - } - - if preferredRole != "" && d.Delegatee.Name == preferredRole { - // The preferredRole is eligible to sign for the given path, and we've - // found its metadata. Return it. - return targetsMeta, &d, nil - } - - if targetsMeta.Delegations != nil && len(targetsMeta.Delegations.Roles) > 0 { - db, err := verify.NewDBFromDelegations(targetsMeta.Delegations) - if err != nil { - return nil, nil, err - } - - // Add delegations to the iterator that are eligible to sign for the - // given path (there may be none). - iterator.Add(targetsMeta.Delegations.Roles, d.Delegatee.Name, db) - } - - next, ok := iterator.Next() - if !ok { // No more roles to traverse. - if preferredRole == "" { - // No preferredRole was given, so return metadata for the final role in the traversal. - return targetsMeta, &d, nil - } else { - // There are no more roles to traverse, so preferredRole is either an - // invalid role, or not eligible to sign the given path. - return nil, nil, ErrNoDelegatedTarget{Path: path} - } - } - - d = next - } - - return nil, nil, ErrNoDelegatedTarget{Path: path} -} - -func (r *Repo) AddTarget(path string, custom json.RawMessage) error { - return r.AddTargets([]string{path}, custom) -} - -func (r *Repo) AddTargetToPreferredRole(path string, custom json.RawMessage, preferredRole string) error { - return r.AddTargetsToPreferredRole([]string{path}, custom, preferredRole) -} - -func (r *Repo) AddTargets(paths []string, custom json.RawMessage) error { - return r.AddTargetsToPreferredRole(paths, custom, "") -} - -func (r *Repo) AddTargetsToPreferredRole(paths []string, custom json.RawMessage, preferredRole string) error { - return r.AddTargetsWithExpiresToPreferredRole(paths, custom, data.DefaultExpires("targets"), preferredRole) -} - -func (r *Repo) AddTargetsWithDigest(digest string, digestAlg string, length int64, path string, custom json.RawMessage) error { - // TODO: Rename this to AddTargetWithDigest - // https://github.com/theupdateframework/go-tuf/issues/242 - - expires := data.DefaultExpires("targets") - path = util.NormalizeTarget(path) - - targetsMeta, delegation, err := r.targetDelegationForPath(path, "") - if err != nil { - return err - } - // This is the targets role that needs to sign the target file. - targetsRoleName := delegation.Delegatee.Name - - meta := data.TargetFileMeta{FileMeta: data.FileMeta{Length: length, Hashes: make(data.Hashes, 1)}} - meta.Hashes[digestAlg], err = hex.DecodeString(digest) - if err != nil { - return err - } - - // If custom is provided, set custom, otherwise maintain existing custom - // metadata - if len(custom) > 0 { - meta.Custom = &custom - } else if t, ok := targetsMeta.Targets[path]; ok { - meta.Custom = t.Custom - } - - // What does G2 mean? Copying and pasting this comment from elsewhere in this file. - // G2 -> we no longer desire any readers to ever observe non-prefix targets. - delete(targetsMeta.Targets, "/"+path) - targetsMeta.Targets[path] = meta - - targetsMeta.Expires = expires.Round(time.Second) - - manifestName := targetsRoleName + ".json" - if !r.local.FileIsStaged(manifestName) { - targetsMeta.Version++ - } - - err = r.setMeta(manifestName, targetsMeta) - if err != nil { - return fmt.Errorf("error setting metadata for %q: %w", manifestName, err) - } - - return nil -} - -func (r *Repo) AddTargetWithExpires(path string, custom json.RawMessage, expires time.Time) error { - return r.AddTargetsWithExpires([]string{path}, custom, expires) -} - -func (r *Repo) AddTargetsWithExpires(paths []string, custom json.RawMessage, expires time.Time) error { - return r.AddTargetsWithExpiresToPreferredRole(paths, custom, expires, "") -} - -func (r *Repo) AddTargetWithExpiresToPreferredRole(path string, custom json.RawMessage, expires time.Time, preferredRole string) error { - return r.AddTargetsWithExpiresToPreferredRole([]string{path}, custom, expires, preferredRole) -} - -// AddTargetsWithExpiresToPreferredRole signs the staged targets at `paths`. -// -// If preferredRole is not the empty string, the target is added to the given -// role's manifest if delegations allow it. If delegations do not allow the -// preferredRole to sign the given path, an error is returned. -func (r *Repo) AddTargetsWithExpiresToPreferredRole(paths []string, custom json.RawMessage, expires time.Time, preferredRole string) error { - if !validExpires(expires) { - return ErrInvalidExpires{expires} - } - - normalizedPaths := make([]string, len(paths)) - for i, path := range paths { - normalizedPaths[i] = util.NormalizeTarget(path) - } - - // As we iterate through staged targets files, we accumulate changes to their - // corresponding targets metadata. - updatedTargetsMeta := map[string]*data.Targets{} - - if err := r.local.WalkStagedTargets(normalizedPaths, func(path string, target io.Reader) (err error) { - originalMeta, delegation, err := r.targetDelegationForPath(path, preferredRole) - if err != nil { - return err - } - - // This is the targets role that needs to sign the target file. - targetsRoleName := delegation.Delegatee.Name - - targetsMeta := originalMeta - if tm, ok := updatedTargetsMeta[targetsRoleName]; ok { - // Metadata in updatedTargetsMeta overrides staged/commited metadata. - targetsMeta = tm - } - - fileMeta, err := util.GenerateTargetFileMeta(target, r.hashAlgorithms...) - if err != nil { - return err - } - - // If we have custom metadata, set it, otherwise maintain - // existing metadata if present - if len(custom) > 0 { - fileMeta.Custom = &custom - } else if tf, ok := targetsMeta.Targets[path]; ok { - fileMeta.Custom = tf.Custom - } - - // G2 -> we no longer desire any readers to ever observe non-prefix targets. - delete(targetsMeta.Targets, "/"+path) - targetsMeta.Targets[path] = fileMeta - - updatedTargetsMeta[targetsRoleName] = targetsMeta - - return nil - }); err != nil { - return err - } - - if len(updatedTargetsMeta) == 0 { - // This is potentially unexpected behavior kept for backwards compatibility. - // See https://github.com/theupdateframework/go-tuf/issues/243 - t, err := r.topLevelTargets() - if err != nil { - return err - } - - updatedTargetsMeta["targets"] = t - } - - exp := expires.Round(time.Second) - for roleName, targetsMeta := range updatedTargetsMeta { - targetsMeta.Expires = exp - - manifestName := roleName + ".json" - if !r.local.FileIsStaged(manifestName) { - targetsMeta.Version++ - } - - err := r.setMeta(manifestName, targetsMeta) - if err != nil { - return fmt.Errorf("error setting metadata for %q: %w", manifestName, err) - } - } - - return nil -} - -func (r *Repo) RemoveTarget(path string) error { - return r.RemoveTargets([]string{path}) -} - -func (r *Repo) RemoveTargets(paths []string) error { - return r.RemoveTargetsWithExpires(paths, data.DefaultExpires("targets")) -} - -func (r *Repo) RemoveTargetWithExpires(path string, expires time.Time) error { - return r.RemoveTargetsWithExpires([]string{path}, expires) -} - -// If paths is empty, all targets will be removed. -func (r *Repo) RemoveTargetsWithExpires(paths []string, expires time.Time) error { - if !validExpires(expires) { - return ErrInvalidExpires{expires} - } - - for metaName := range r.meta { - if metaName != "targets.json" && !roles.IsDelegatedTargetsManifest(metaName) { - continue - } - - err := r.removeTargetsWithExpiresFromMeta(metaName, paths, expires) - if err != nil { - return fmt.Errorf("could not remove %v from %v: %w", paths, metaName, err) - } - } - - return nil -} - -func (r *Repo) removeTargetsWithExpiresFromMeta(metaName string, paths []string, expires time.Time) error { - roleName := strings.TrimSuffix(metaName, ".json") - t, err := r.targets(roleName) - if err != nil { - return err - } - removed_targets := []string{} - if len(paths) == 0 { - for rt := range t.Targets { - removed_targets = append(removed_targets, rt) - } - t.Targets = make(data.TargetFiles) - } else { - removed := false - for _, path := range paths { - path = util.NormalizeTarget(path) - if _, ok := t.Targets[path]; !ok { - r.logger.Printf("[%v] The following target is not present: %v\n", metaName, path) - continue - } - removed = true - // G2 -> we no longer desire any readers to ever observe non-prefix targets. - delete(t.Targets, "/"+path) - delete(t.Targets, path) - removed_targets = append(removed_targets, path) - } - if !removed { - return nil - } - } - t.Expires = expires.Round(time.Second) - if !r.local.FileIsStaged(metaName) { - t.Version++ - } - - err = r.setMeta(metaName, t) - if err == nil { - r.logger.Printf("[%v] Removed targets:\n", metaName) - for _, v := range removed_targets { - r.logger.Println("*", v) - } - if len(t.Targets) != 0 { - r.logger.Printf("[%v] Added/staged targets:\n", metaName) - for k := range t.Targets { - r.logger.Println("*", k) - } - } else { - r.logger.Printf("[%v] There are no added/staged targets\n", metaName) - } - } - return err -} - -func (r *Repo) Snapshot() error { - return r.SnapshotWithExpires(data.DefaultExpires("snapshot")) -} - -func (r *Repo) snapshotMetadata() []string { - ret := []string{"targets.json"} - - for name := range r.meta { - if !roles.IsVersionedManifest(name) && - roles.IsDelegatedTargetsManifest(name) { - ret = append(ret, name) - } - } - - return ret -} - -func (r *Repo) SnapshotWithExpires(expires time.Time) error { - if !validExpires(expires) { - return ErrInvalidExpires{expires} - } - - snapshot, err := r.snapshot() - if err != nil { - return err - } - - // Verify root metadata before verifying signatures on role metadata. - if err := r.verifySignatures("root.json"); err != nil { - return err - } - - for _, metaName := range r.snapshotMetadata() { - if err := r.verifySignatures(metaName); err != nil { - return err - } - var err error - snapshot.Meta[metaName], err = r.snapshotFileMeta(metaName) - if err != nil { - return err - } - } - snapshot.Expires = expires.Round(time.Second) - if !r.local.FileIsStaged("snapshot.json") { - snapshot.Version++ - } - err = r.setMeta("snapshot.json", snapshot) - if err == nil { - r.logger.Println("Staged snapshot.json metadata with expiration date:", snapshot.Expires) - } - return err -} - -func (r *Repo) Timestamp() error { - return r.TimestampWithExpires(data.DefaultExpires("timestamp")) -} - -func (r *Repo) TimestampWithExpires(expires time.Time) error { - if !validExpires(expires) { - return ErrInvalidExpires{expires} - } - - if err := r.verifySignatures("snapshot.json"); err != nil { - return err - } - timestamp, err := r.timestamp() - if err != nil { - return err - } - timestamp.Meta["snapshot.json"], err = r.timestampFileMeta("snapshot.json") - if err != nil { - return err - } - timestamp.Expires = expires.Round(time.Second) - if !r.local.FileIsStaged("timestamp.json") { - timestamp.Version++ - } - - err = r.setMeta("timestamp.json", timestamp) - if err == nil { - r.logger.Println("Staged timestamp.json metadata with expiration date:", timestamp.Expires) - } - return err -} - -func (r *Repo) fileVersions() (map[string]int64, error) { - versions := make(map[string]int64) - - for fileName := range r.meta { - if roles.IsVersionedManifest(fileName) { - continue - } - - roleName := strings.TrimSuffix(fileName, ".json") - - var version int64 - - switch roleName { - case "root": - root, err := r.root() - if err != nil { - return nil, err - } - version = root.Version - case "snapshot": - snapshot, err := r.snapshot() - if err != nil { - return nil, err - } - version = snapshot.Version - case "timestamp": - continue - default: - // Targets or delegated targets manifest. - targets, err := r.targets(roleName) - if err != nil { - return nil, err - } - - version = targets.Version - } - - versions[fileName] = version - } - - return versions, nil -} - -func (r *Repo) fileHashes() (map[string]data.Hashes, error) { - hashes := make(map[string]data.Hashes) - - for fileName := range r.meta { - if roles.IsVersionedManifest(fileName) { - continue - } - - roleName := strings.TrimSuffix(fileName, ".json") - - switch roleName { - case "snapshot": - timestamp, err := r.timestamp() - if err != nil { - return nil, err - } - - if m, ok := timestamp.Meta[fileName]; ok { - hashes[fileName] = m.Hashes - } - case "timestamp": - continue - default: - snapshot, err := r.snapshot() - if err != nil { - return nil, err - } - if m, ok := snapshot.Meta[fileName]; ok { - hashes[fileName] = m.Hashes - } - - if roleName != "root" { - // Scalability issue: Commit/fileHashes loads all targets metadata into memory - // https://github.com/theupdateframework/go-tuf/issues/245 - t, err := r.targets(roleName) - if err != nil { - return nil, err - } - for name, m := range t.Targets { - hashes[path.Join("targets", name)] = m.Hashes - } - } - - } - - } - - return hashes, nil -} - -func (r *Repo) Commit() error { - // check we have all the metadata - for _, name := range topLevelMetadata { - if _, ok := r.meta[name]; !ok { - return ErrMissingMetadata{name} - } - } - - // check roles are valid - root, err := r.root() - if err != nil { - return err - } - for name, role := range root.Roles { - if len(role.KeyIDs) < role.Threshold { - return ErrNotEnoughKeys{name, len(role.KeyIDs), role.Threshold} - } - } - - // verify hashes in snapshot.json are up to date - snapshot, err := r.snapshot() - if err != nil { - return err - } - for _, name := range r.snapshotMetadata() { - expected, ok := snapshot.Meta[name] - if !ok { - return fmt.Errorf("tuf: snapshot.json missing hash for %s", name) - } - actual, err := r.snapshotFileMeta(name) - if err != nil { - return err - } - if err := util.SnapshotFileMetaEqual(actual, expected); err != nil { - return fmt.Errorf("tuf: invalid %s in snapshot.json: %s", name, err) - } - } - - // verify hashes in timestamp.json are up to date - timestamp, err := r.timestamp() - if err != nil { - return err - } - snapshotMeta, err := r.timestampFileMeta("snapshot.json") - if err != nil { - return err - } - if err := util.TimestampFileMetaEqual(snapshotMeta, timestamp.Meta["snapshot.json"]); err != nil { - return fmt.Errorf("tuf: invalid snapshot.json in timestamp.json: %s", err) - } - - for _, name := range topLevelMetadata { - if err := r.verifySignatures(name); err != nil { - return err - } - } - - versions, err := r.fileVersions() - if err != nil { - return err - } - hashes, err := r.fileHashes() - if err != nil { - return err - } - - err = r.local.Commit(root.ConsistentSnapshot, versions, hashes) - if err == nil { - r.logger.Println("Committed successfully") - } - return err -} - -func (r *Repo) Clean() error { - err := r.local.Clean() - if err == nil { - r.logger.Println("Removed all staged metadata and target files") - } - return err -} - -func (r *Repo) verifySignatures(metaFilename string) error { - s, err := r.SignedMeta(metaFilename) - if err != nil { - return err - } - - role := strings.TrimSuffix(metaFilename, ".json") - - dbs, err := r.dbsForRole(role) - if err != nil { - return err - } - - for _, db := range dbs { - if err := db.Verify(s, role, 0); err != nil { - return ErrInsufficientSignatures{metaFilename, err} - } - } - - return nil -} - -func (r *Repo) snapshotFileMeta(roleFilename string) (data.SnapshotFileMeta, error) { - b, ok := r.meta[roleFilename] - if !ok { - return data.SnapshotFileMeta{}, ErrMissingMetadata{roleFilename} - } - return util.GenerateSnapshotFileMeta(bytes.NewReader(b), r.hashAlgorithms...) -} - -func (r *Repo) timestampFileMeta(roleFilename string) (data.TimestampFileMeta, error) { - b, ok := r.meta[roleFilename] - if !ok { - return data.TimestampFileMeta{}, ErrMissingMetadata{roleFilename} - } - return util.GenerateTimestampFileMeta(bytes.NewReader(b), r.hashAlgorithms...) -} - -func (r *Repo) Payload(roleFilename string) ([]byte, error) { - s, err := r.SignedMeta(roleFilename) - if err != nil { - return nil, err - } - - p, err := cjson.EncodeCanonical(s.Signed) - if err != nil { - return nil, err - } - - return p, nil -} - -func (r *Repo) CheckRoleUnexpired(role string, validAt time.Time) error { - var expires time.Time - switch role { - case "root": - root, err := r.root() - if err != nil { - return err - } - expires = root.Expires - case "snapshot": - snapshot, err := r.snapshot() - if err != nil { - return err - } - expires = snapshot.Expires - case "timestamp": - timestamp, err := r.timestamp() - if err != nil { - return err - } - expires = timestamp.Expires - case "targets": - targets, err := r.topLevelTargets() - if err != nil { - return err - } - expires = targets.Expires - default: - return fmt.Errorf("invalid role: %s", role) - } - if expires.Before(validAt) || expires.Equal(validAt) { - return fmt.Errorf("role expired on: %s", expires) - } - return nil -} - -// GetMeta returns the underlying meta file map from the store. -func (r *Repo) GetMeta() (map[string]json.RawMessage, error) { - return r.local.GetMeta() -} diff --git a/repo_test.go b/repo_test.go deleted file mode 100644 index 01ae3416..00000000 --- a/repo_test.go +++ /dev/null @@ -1,2752 +0,0 @@ -package tuf - -import ( - "bytes" - "crypto" - "crypto/elliptic" - "crypto/rand" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "log" - "os" - "path" - "path/filepath" - "reflect" - "sort" - "strings" - "testing" - "time" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" - "github.com/secure-systems-lab/go-securesystemslib/encrypted" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/sets" - "github.com/theupdateframework/go-tuf/pkg/keys" - "github.com/theupdateframework/go-tuf/pkg/targets" - "github.com/theupdateframework/go-tuf/util" - "github.com/theupdateframework/go-tuf/verify" - "golang.org/x/crypto/ed25519" - . "gopkg.in/check.v1" -) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type RepoSuite struct{} - -var _ = Suite(&RepoSuite{}) - -func (RepoSuite) TestNewRepo(c *C) { - testNewRepo(c, NewRepo) -} - -func (RepoSuite) TestNewRepoIndent(c *C) { - testNewRepo(c, func(local LocalStore, hashAlgorithms ...string) (*Repo, error) { - return NewRepoIndent(local, "", "\t") - }) -} - -// UniqueKeys returns the unique keys for each associated role. -// We might have multiple key IDs that correspond to the same key. -func UniqueKeys(r *data.Root) map[string][]*data.PublicKey { - keysByRole := make(map[string][]*data.PublicKey) - for name, role := range r.Roles { - seen := make(map[string]struct{}) - roleKeys := []*data.PublicKey{} - for _, id := range role.KeyIDs { - // Double-check that there is actually a key with that ID. - if key, ok := r.Keys[id]; ok { - verifier, err := keys.GetVerifier(key) - if err != nil { - continue - } - val := verifier.Public() - if _, ok := seen[val]; ok { - continue - } - seen[val] = struct{}{} - roleKeys = append(roleKeys, key) - } - } - keysByRole[name] = roleKeys - } - return keysByRole -} - -// AssertNumUniqueKeys verifies that the number of unique root keys for a given role is as expected. -func (*RepoSuite) assertNumUniqueKeys(c *C, root *data.Root, role string, num int) { - c.Assert(UniqueKeys(root)[role], HasLen, num) -} - -func testNewRepo(c *C, newRepo func(local LocalStore, hashAlgorithms ...string) (*Repo, error)) { - meta := map[string]json.RawMessage{ - "root.json": []byte(`{ - "signed": { - "_type": "root", - "version": 1, - "expires": "2015-12-26T03:26:55.821520874Z", - "keys": {}, - "roles": {} - }, - "signatures": [] - }`), - "targets.json": []byte(`{ - "signed": { - "_type": "targets", - "version": 1, - "expires": "2015-03-26T03:26:55.82155686Z", - "targets": {} - }, - "signatures": [] - }`), - "snapshot.json": []byte(`{ - "signed": { - "_type": "snapshot", - "version": 1, - "expires": "2015-01-02T03:26:55.821585981Z", - "meta": {} - }, - "signatures": [] - }`), - "timestamp.json": []byte(`{ - "signed": { - "_type": "timestamp", - "version": 1, - "expires": "2014-12-27T03:26:55.821599702Z", - "meta": {} - }, - "signatures": [] - }`), - } - local := MemoryStore(meta, nil) - r, err := newRepo(local) - c.Assert(err, IsNil) - - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.Type, Equals, "root") - c.Assert(root.Version, Equals, int64(1)) - c.Assert(root.Keys, NotNil) - c.Assert(root.Keys, HasLen, 0) - - targets, err := r.topLevelTargets() - c.Assert(err, IsNil) - c.Assert(targets.Type, Equals, "targets") - c.Assert(targets.Version, Equals, int64(1)) - c.Assert(targets.Targets, NotNil) - c.Assert(targets.Targets, HasLen, 0) - - snapshot, err := r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Type, Equals, "snapshot") - c.Assert(snapshot.Version, Equals, int64(1)) - c.Assert(snapshot.Meta, NotNil) - c.Assert(snapshot.Meta, HasLen, 0) - - timestamp, err := r.timestamp() - c.Assert(err, IsNil) - c.Assert(timestamp.Type, Equals, "timestamp") - c.Assert(timestamp.Version, Equals, int64(1)) - c.Assert(timestamp.Meta, NotNil) - c.Assert(timestamp.Meta, HasLen, 0) -} - -func (rs *RepoSuite) TestInit(c *C) { - local := MemoryStore( - make(map[string]json.RawMessage), - map[string][]byte{"foo.txt": []byte("foo")}, - ) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Init() sets root.ConsistentSnapshot - for _, v := range []bool{true, false} { - c.Assert(r.Init(v), IsNil) - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.ConsistentSnapshot, Equals, v) - } - - // Add a target. - generateAndAddPrivateKey(c, r, "targets") - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - - // Init() fails if targets have been added - c.Assert(r.Init(true), Equals, ErrInitNotAllowed) -} - -func genKey(c *C, r *Repo, role string) []string { - keyids, err := r.GenKey(role) - c.Assert(err, IsNil) - c.Assert(len(keyids) > 0, Equals, true) - return keyids -} - -func (rs *RepoSuite) TestGenKey(c *C) { - local := MemoryStore(make(map[string]json.RawMessage), nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // generate a key for an unknown role - _, err = r.GenKey("foo") - c.Assert(err, Equals, ErrInvalidRole{"foo", "only support adding keys for top-level roles"}) - - // generate a root key - ids := genKey(c, r, "root") - - // check root metadata is correct - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.Roles, NotNil) - c.Assert(root.Roles, HasLen, 1) - rs.assertNumUniqueKeys(c, root, "root", 1) - rootRole, ok := root.Roles["root"] - if !ok { - c.Fatal("missing root role") - } - c.Assert(rootRole.KeyIDs, HasLen, 1) - c.Assert(rootRole.KeyIDs, DeepEquals, ids) - for _, keyID := range ids { - k, ok := root.Keys[keyID] - if !ok { - c.Fatal("missing key") - } - c.Assert(k.IDs(), DeepEquals, ids) - pk, err := keys.GetVerifier(k) - c.Assert(err, IsNil) - c.Assert(pk.Public(), HasLen, ed25519.PublicKeySize) - } - - // check root key + role are in db - db, err := r.topLevelKeysDB() - c.Assert(err, IsNil) - for _, keyID := range ids { - rootKey, err := db.GetVerifier(keyID) - c.Assert(err, IsNil) - c.Assert(rootKey.MarshalPublicKey().IDs(), DeepEquals, ids) - role := db.GetRole("root") - c.Assert(role.KeyIDs, DeepEquals, sets.StringSliceToSet(ids)) - - // check the key was saved correctly - localKeys, err := local.GetSigners("root") - c.Assert(err, IsNil) - c.Assert(localKeys, HasLen, 1) - c.Assert(localKeys[0].PublicData().IDs(), DeepEquals, ids) - - // check RootKeys() is correct - rootKeys, err := r.RootKeys() - c.Assert(err, IsNil) - c.Assert(rootKeys, HasLen, 1) - c.Assert(rootKeys[0].IDs(), DeepEquals, rootKey.MarshalPublicKey().IDs()) - pk, err := keys.GetVerifier(rootKeys[0]) - c.Assert(err, IsNil) - c.Assert(pk.Public(), DeepEquals, rootKey.Public()) - } - - rootKey, err := db.GetVerifier(ids[0]) - c.Assert(err, IsNil) - - // generate two targets keys - genKey(c, r, "targets") - genKey(c, r, "targets") - - // check root metadata is correct - root, err = r.root() - c.Assert(err, IsNil) - c.Assert(root.Roles, HasLen, 2) - rs.assertNumUniqueKeys(c, root, "root", 1) - rs.assertNumUniqueKeys(c, root, "targets", 2) - targetsRole, ok := root.Roles["targets"] - if !ok { - c.Fatal("missing targets role") - } - c.Assert(targetsRole.KeyIDs, HasLen, 2) - targetKeyIDs := make(map[string]struct{}, 2) - db, err = r.topLevelKeysDB() - c.Assert(err, IsNil) - for _, id := range targetsRole.KeyIDs { - targetKeyIDs[id] = struct{}{} - _, ok = root.Keys[id] - if !ok { - c.Fatal("missing key") - } - verifier, err := db.GetVerifier(id) - c.Assert(err, IsNil) - c.Assert(verifier.MarshalPublicKey().ContainsID(id), Equals, true) - } - role := db.GetRole("targets") - c.Assert(role.KeyIDs, DeepEquals, targetKeyIDs) - - // check RootKeys() is unchanged - rootKeys, err := r.RootKeys() - c.Assert(err, IsNil) - c.Assert(rootKeys, HasLen, 1) - c.Assert(rootKeys[0].IDs(), DeepEquals, rootKey.MarshalPublicKey().IDs()) - - // check the keys were saved correctly - localKeys, err := local.GetSigners("targets") - c.Assert(err, IsNil) - c.Assert(localKeys, HasLen, 2) - for _, key := range localKeys { - found := false - for _, id := range targetsRole.KeyIDs { - if key.PublicData().ContainsID(id) { - found = true - break - } - } - if !found { - c.Fatal("missing key") - } - } - - // check root.json got staged - meta, err := local.GetMeta() - c.Assert(err, IsNil) - rootJSON, ok := meta["root.json"] - if !ok { - c.Fatal("missing root metadata") - } - s := &data.Signed{} - c.Assert(json.Unmarshal(rootJSON, s), IsNil) - stagedRoot := &data.Root{} - c.Assert(json.Unmarshal(s.Signed, stagedRoot), IsNil) - c.Assert(stagedRoot.Type, Equals, root.Type) - c.Assert(stagedRoot.Version, Equals, root.Version) - c.Assert(stagedRoot.Expires.UnixNano(), Equals, root.Expires.UnixNano()) - - // make sure both root and stagedRoot have evaluated IDs(), otherwise - // DeepEquals will fail because those values might not have been - // computed yet. - for _, key := range root.Keys { - key.IDs() - } - for _, key := range stagedRoot.Keys { - key.IDs() - } - c.Assert(stagedRoot.Keys, DeepEquals, root.Keys) - c.Assert(stagedRoot.Roles, DeepEquals, root.Roles) -} - -func addPrivateKey(c *C, r *Repo, role string, key keys.Signer) []string { - err := r.AddPrivateKey(role, key) - c.Assert(err, IsNil) - keyids := key.PublicData().IDs() - c.Assert(len(keyids) > 0, Equals, true) - return keyids -} - -func generateAndAddPrivateKey(c *C, r *Repo, role string) []string { - signer, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - return addPrivateKey(c, r, role, signer) -} - -func (rs *RepoSuite) TestAddPrivateKey(c *C) { - local := MemoryStore(make(map[string]json.RawMessage), nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // generate a key for an unknown role - signer, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - err = r.AddPrivateKey("foo", signer) - c.Assert(err, Equals, ErrInvalidRole{"foo", "only support adding keys for top-level roles"}) - - // add a root key - ids := addPrivateKey(c, r, "root", signer) - - // check root metadata is correct - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.Version, Equals, int64(1)) - c.Assert(root.Roles, NotNil) - c.Assert(root.Roles, HasLen, 1) - rs.assertNumUniqueKeys(c, root, "root", 1) - rootRole, ok := root.Roles["root"] - if !ok { - c.Fatal("missing root role") - } - c.Assert(rootRole.KeyIDs, HasLen, 1) - c.Assert(rootRole.KeyIDs, DeepEquals, ids) - for _, keyID := range ids { - k, ok := root.Keys[keyID] - if !ok { - c.Fatalf("missing key %s", keyID) - } - c.Assert(k.IDs(), DeepEquals, ids) - pk, err := keys.GetVerifier(k) - c.Assert(err, IsNil) - c.Assert(pk.Public(), HasLen, ed25519.PublicKeySize) - } - - // check root key + role are in db - db, err := r.topLevelKeysDB() - c.Assert(err, IsNil) - for _, keyID := range ids { - rootKey, err := db.GetVerifier(keyID) - c.Assert(err, IsNil) - c.Assert(rootKey.MarshalPublicKey().IDs(), DeepEquals, ids) - role := db.GetRole("root") - c.Assert(role.KeyIDs, DeepEquals, sets.StringSliceToSet(ids)) - - // check the key was saved correctly - localKeys, err := local.GetSigners("root") - c.Assert(err, IsNil) - c.Assert(localKeys, HasLen, 1) - c.Assert(localKeys[0].PublicData().IDs(), DeepEquals, ids) - - // check RootKeys() is correct - rootKeys, err := r.RootKeys() - c.Assert(err, IsNil) - c.Assert(rootKeys, HasLen, 1) - c.Assert(rootKeys[0].IDs(), DeepEquals, rootKey.MarshalPublicKey().IDs()) - pk, err := keys.GetVerifier(rootKeys[0]) - c.Assert(err, IsNil) - c.Assert(pk.Public(), DeepEquals, rootKey.Public()) - } - - rootKey, err := db.GetVerifier(ids[0]) - c.Assert(err, IsNil) - - // generate two targets keys - generateAndAddPrivateKey(c, r, "targets") - generateAndAddPrivateKey(c, r, "targets") - - // check root metadata is correct - root, err = r.root() - c.Assert(err, IsNil) - c.Assert(root.Roles, HasLen, 2) - rs.assertNumUniqueKeys(c, root, "root", 1) - rs.assertNumUniqueKeys(c, root, "targets", 2) - targetsRole, ok := root.Roles["targets"] - if !ok { - c.Fatal("missing targets role") - } - c.Assert(targetsRole.KeyIDs, HasLen, 2) - targetKeyIDs := make(map[string]struct{}, 2) - db, err = r.topLevelKeysDB() - c.Assert(err, IsNil) - for _, id := range targetsRole.KeyIDs { - targetKeyIDs[id] = struct{}{} - _, ok = root.Keys[id] - if !ok { - c.Fatal("missing key") - } - verifier, err := db.GetVerifier(id) - c.Assert(err, IsNil) - c.Assert(verifier.MarshalPublicKey().ContainsID(id), Equals, true) - } - role := db.GetRole("targets") - c.Assert(role.KeyIDs, DeepEquals, targetKeyIDs) - - // check RootKeys() is unchanged - rootKeys, err := r.RootKeys() - c.Assert(err, IsNil) - c.Assert(rootKeys, HasLen, 1) - c.Assert(rootKeys[0].IDs(), DeepEquals, rootKey.MarshalPublicKey().IDs()) - - // check the keys were saved correctly - localKeys, err := local.GetSigners("targets") - c.Assert(err, IsNil) - c.Assert(localKeys, HasLen, 2) - for _, key := range localKeys { - found := false - for _, id := range targetsRole.KeyIDs { - if key.PublicData().ContainsID(id) { - found = true - break - } - } - if !found { - c.Fatal("missing key") - } - } - - // check root.json got staged - meta, err := local.GetMeta() - c.Assert(err, IsNil) - rootJSON, ok := meta["root.json"] - if !ok { - c.Fatal("missing root metadata") - } - s := &data.Signed{} - c.Assert(json.Unmarshal(rootJSON, s), IsNil) - stagedRoot := &data.Root{} - c.Assert(json.Unmarshal(s.Signed, stagedRoot), IsNil) - c.Assert(stagedRoot.Type, Equals, root.Type) - c.Assert(stagedRoot.Version, Equals, root.Version) - c.Assert(stagedRoot.Expires.UnixNano(), Equals, root.Expires.UnixNano()) - - // make sure both root and stagedRoot have evaluated IDs(), otherwise - // DeepEquals will fail because those values might not have been - // computed yet. - for _, key := range root.Keys { - key.IDs() - } - for _, key := range stagedRoot.Keys { - key.IDs() - } - c.Assert(stagedRoot.Keys, DeepEquals, root.Keys) - c.Assert(stagedRoot.Roles, DeepEquals, root.Roles) - - // commit to make sure we don't modify metadata after committing metadata. - generateAndAddPrivateKey(c, r, "snapshot") - generateAndAddPrivateKey(c, r, "timestamp") - c.Assert(r.AddTargets([]string{}, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - // add the same root key to make sure the metadata is unmodified. - oldRoot, err := r.root() - c.Assert(err, IsNil) - addPrivateKey(c, r, "root", signer) - newRoot, err := r.root() - c.Assert(err, IsNil) - c.Assert(oldRoot, DeepEquals, newRoot) - if r.local.FileIsStaged("root.json") { - c.Fatal("root should not be marked dirty") - } -} - -func (rs *RepoSuite) TestRevokeKey(c *C) { - local := MemoryStore(make(map[string]json.RawMessage), nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // revoking a key for an unknown role returns ErrInvalidRole - c.Assert(r.RevokeKey("foo", ""), DeepEquals, ErrInvalidRole{"foo", "only revocations for top-level roles supported"}) - - // revoking a key which doesn't exist returns ErrKeyNotFound - c.Assert(r.RevokeKey("root", "nonexistent"), DeepEquals, ErrKeyNotFound{"root", "nonexistent"}) - - // generate keys - genKey(c, r, "root") - target1IDs := genKey(c, r, "targets") - target2IDs := genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.Roles, NotNil) - c.Assert(root.Roles, HasLen, 4) - c.Assert(root.Keys, NotNil) - rs.assertNumUniqueKeys(c, root, "root", 1) - rs.assertNumUniqueKeys(c, root, "targets", 2) - rs.assertNumUniqueKeys(c, root, "snapshot", 1) - rs.assertNumUniqueKeys(c, root, "timestamp", 1) - - // revoke a key - targetsRole, ok := root.Roles["targets"] - if !ok { - c.Fatal("missing targets role") - } - c.Assert(targetsRole.KeyIDs, HasLen, len(target1IDs)+len(target2IDs)) - id := targetsRole.KeyIDs[0] - c.Assert(r.RevokeKey("targets", id), IsNil) - - // make sure all the other key ids were also revoked - for _, id := range target1IDs { - c.Assert(r.RevokeKey("targets", id), DeepEquals, ErrKeyNotFound{"targets", id}) - } - - // check root was updated - root, err = r.root() - c.Assert(err, IsNil) - c.Assert(root.Roles, NotNil) - c.Assert(root.Roles, HasLen, 4) - c.Assert(root.Keys, NotNil) - rs.assertNumUniqueKeys(c, root, "root", 1) - rs.assertNumUniqueKeys(c, root, "targets", 1) - rs.assertNumUniqueKeys(c, root, "snapshot", 1) - rs.assertNumUniqueKeys(c, root, "timestamp", 1) - targetsRole, ok = root.Roles["targets"] - if !ok { - c.Fatal("missing targets role") - } - c.Assert(targetsRole.KeyIDs, HasLen, 1) - c.Assert(targetsRole.KeyIDs, DeepEquals, target2IDs) -} - -func (rs *RepoSuite) TestRevokeKeyInMultipleRoles(c *C) { - local := MemoryStore(make(map[string]json.RawMessage), nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // generate keys. add a root key that is shared with the targets role - rootSigner, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("root", rootSigner.PublicData()), IsNil) - sharedSigner, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - sharedIDs := sharedSigner.PublicData().IDs() - c.Assert(r.AddVerificationKey("root", sharedSigner.PublicData()), IsNil) - c.Assert(r.AddVerificationKey("targets", sharedSigner.PublicData()), IsNil) - targetIDs := genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.Roles, NotNil) - c.Assert(root.Roles, HasLen, 4) - c.Assert(root.Keys, NotNil) - rs.assertNumUniqueKeys(c, root, "root", 2) - rs.assertNumUniqueKeys(c, root, "targets", 2) - rs.assertNumUniqueKeys(c, root, "snapshot", 1) - rs.assertNumUniqueKeys(c, root, "timestamp", 1) - - // revoke a key - targetsRole, ok := root.Roles["targets"] - if !ok { - c.Fatal("missing targets role") - } - c.Assert(targetsRole.KeyIDs, HasLen, len(targetIDs)+len(sharedIDs)) - id := targetsRole.KeyIDs[0] - c.Assert(r.RevokeKey("targets", id), IsNil) - - // make sure all the other key ids were also revoked - for _, id := range sharedIDs { - c.Assert(r.RevokeKey("targets", id), DeepEquals, ErrKeyNotFound{"targets", id}) - } - - // check root was updated - root, err = r.root() - c.Assert(err, IsNil) - c.Assert(root.Roles, NotNil) - c.Assert(root.Roles, HasLen, 4) - c.Assert(root.Keys, NotNil) - // the shared root/targets signer should still be present in root keys - c.Assert(UniqueKeys(root)["root"], DeepEquals, - []*data.PublicKey{rootSigner.PublicData(), sharedSigner.PublicData()}) - rs.assertNumUniqueKeys(c, root, "root", 2) - rs.assertNumUniqueKeys(c, root, "targets", 1) - rs.assertNumUniqueKeys(c, root, "snapshot", 1) - rs.assertNumUniqueKeys(c, root, "timestamp", 1) - targetsRole, ok = root.Roles["targets"] - if !ok { - c.Fatal("missing targets role") - } - c.Assert(targetsRole.KeyIDs, HasLen, 1) - c.Assert(targetsRole.KeyIDs, DeepEquals, targetIDs) -} - -func (rs *RepoSuite) TestSign(c *C) { - meta := map[string]json.RawMessage{"root.json": []byte(`{"signed":{},"signatures":[]}`)} - local := MemoryStore(meta, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - c.Assert(r.Sign("foo.json"), Equals, ErrMissingMetadata{"foo.json"}) - - // signing with no keys returns ErrNoKeys - c.Assert(r.Sign("root.json"), Equals, ErrNoKeys{"root.json"}) - - checkSigIDs := func(keyIDs ...string) { - meta, err := local.GetMeta() - c.Assert(err, IsNil) - rootJSON, ok := meta["root.json"] - if !ok { - c.Fatal("missing root.json") - } - s := &data.Signed{} - c.Assert(json.Unmarshal(rootJSON, s), IsNil) - c.Assert(s.Signatures, HasLen, len(keyIDs)) - - // Signatures may be in any order, so must sort key IDs before comparison. - wantKeyIDs := append([]string{}, keyIDs...) - sort.Strings(wantKeyIDs) - - gotKeyIDs := []string{} - for _, sig := range s.Signatures { - gotKeyIDs = append(gotKeyIDs, sig.KeyID) - } - sort.Strings(gotKeyIDs) - - c.Assert(wantKeyIDs, DeepEquals, gotKeyIDs) - } - - // signing with an available key generates a signature - signer, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(local.SaveSigner("root", signer), IsNil) - c.Assert(r.Sign("root.json"), IsNil) - checkSigIDs(signer.PublicData().IDs()...) - - // signing again does not generate a duplicate signature - c.Assert(r.Sign("root.json"), IsNil) - checkSigIDs(signer.PublicData().IDs()...) - - // signing with a new available key generates another signature - newKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(local.SaveSigner("root", newKey), IsNil) - c.Assert(r.Sign("root.json"), IsNil) - checkSigIDs(append(signer.PublicData().IDs(), newKey.PublicData().IDs()...)...) - - // attempt to sign missing metadata - c.Assert(r.Sign("targets.json"), Equals, ErrMissingMetadata{"targets.json"}) -} - -func (rs *RepoSuite) TestStatus(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - c.Assert(r.SnapshotWithExpires(time.Now().Add(24*time.Hour)), IsNil) - c.Assert(r.TimestampWithExpires(time.Now().Add(1*time.Hour)), IsNil) - c.Assert(r.Commit(), IsNil) - - expires := time.Now().Add(2 * time.Hour) - c.Assert(r.CheckRoleUnexpired("timestamp", expires), ErrorMatches, "role expired on.*") - c.Assert(r.CheckRoleUnexpired("snapshot", expires), IsNil) - c.Assert(r.CheckRoleUnexpired("targets", expires), IsNil) - c.Assert(r.CheckRoleUnexpired("root", expires), IsNil) -} - -func (rs *RepoSuite) TestCommit(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo"), "bar.txt": []byte("bar")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // commit without root.json - c.Assert(r.Commit(), DeepEquals, ErrMissingMetadata{"root.json"}) - - // Init should create targets.json, but not signed yet - r.Init(false) - c.Assert(r.Commit(), DeepEquals, ErrMissingMetadata{"snapshot.json"}) - - genKey(c, r, "root") - - // commit without snapshot.json - genKey(c, r, "targets") - c.Assert(r.Sign("targets.json"), IsNil) - c.Assert(r.Commit(), DeepEquals, ErrMissingMetadata{"snapshot.json"}) - - // commit without timestamp.json - genKey(c, r, "snapshot") - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Commit(), DeepEquals, ErrMissingMetadata{"timestamp.json"}) - - // commit with timestamp.json but no timestamp key - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), DeepEquals, ErrInsufficientSignatures{"timestamp.json", verify.ErrNoSignatures}) - - // commit success - genKey(c, r, "timestamp") - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - // commit with an invalid root hash in snapshot.json due to new key creation - genKey(c, r, "targets") - c.Assert(r.Sign("targets.json"), IsNil) - c.Assert(r.Commit(), DeepEquals, errors.New("tuf: invalid targets.json in snapshot.json: wrong length, expected 338 got 552")) - - // commit with an invalid targets hash in snapshot.json - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.AddTarget("bar.txt", nil), IsNil) - c.Assert(r.Commit(), DeepEquals, errors.New("tuf: invalid targets.json in snapshot.json: wrong length, expected 552 got 725")) - - // commit with an invalid timestamp - c.Assert(r.Snapshot(), IsNil) - err = r.Commit() - c.Assert(err, NotNil) - c.Assert(err.Error()[0:44], Equals, "tuf: invalid snapshot.json in timestamp.json") - - // commit with a role's threshold greater than number of keys - root, err := r.root() - c.Assert(err, IsNil) - role, ok := root.Roles["timestamp"] - if !ok { - c.Fatal("missing timestamp role") - } - c.Assert(role.KeyIDs, HasLen, 1) - c.Assert(role.Threshold, Equals, 1) - c.Assert(r.RevokeKey("timestamp", role.KeyIDs[0]), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), DeepEquals, ErrNotEnoughKeys{"timestamp", 0, 1}) -} - -func (rs *RepoSuite) TestCommitVersions(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - // on initial commit everything should be at version 1. - rootVersion, err := r.RootVersion() - c.Assert(err, IsNil) - c.Assert(rootVersion, Equals, int64(1)) - - targetsVersion, err := r.TargetsVersion() - c.Assert(err, IsNil) - c.Assert(targetsVersion, Equals, int64(1)) - - snapshotVersion, err := r.SnapshotVersion() - c.Assert(err, IsNil) - c.Assert(snapshotVersion, Equals, int64(1)) - - timestampVersion, err := r.SnapshotVersion() - c.Assert(err, IsNil) - c.Assert(timestampVersion, Equals, int64(1)) - - // taking a snapshot should only increment snapshot and timestamp. - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - rootVersion, err = r.RootVersion() - c.Assert(err, IsNil) - c.Assert(rootVersion, Equals, int64(1)) - - targetsVersion, err = r.TargetsVersion() - c.Assert(err, IsNil) - c.Assert(targetsVersion, Equals, int64(1)) - - snapshotVersion, err = r.SnapshotVersion() - c.Assert(err, IsNil) - c.Assert(snapshotVersion, Equals, int64(2)) - - timestampVersion, err = r.SnapshotVersion() - c.Assert(err, IsNil) - c.Assert(timestampVersion, Equals, int64(2)) - - // rotating multiple keys should increment the root once. - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - rootVersion, err = r.RootVersion() - c.Assert(err, IsNil) - c.Assert(rootVersion, Equals, int64(2)) - - targetsVersion, err = r.TargetsVersion() - c.Assert(err, IsNil) - c.Assert(targetsVersion, Equals, int64(1)) - - snapshotVersion, err = r.SnapshotVersion() - c.Assert(err, IsNil) - c.Assert(snapshotVersion, Equals, int64(3)) - - timestampVersion, err = r.TimestampVersion() - c.Assert(err, IsNil) - c.Assert(timestampVersion, Equals, int64(3)) -} - -type tmpDir struct { - path string - c *C -} - -func newTmpDir(c *C) *tmpDir { - return &tmpDir{path: c.MkDir(), c: c} -} - -func (t *tmpDir) assertExists(path string) { - if _, err := os.Stat(filepath.Join(t.path, path)); os.IsNotExist(err) { - t.c.Fatalf("expected path to exist but it doesn't: %s", path) - } -} - -func (t *tmpDir) assertNotExist(path string) { - if _, err := os.Stat(filepath.Join(t.path, path)); !os.IsNotExist(err) { - t.c.Fatalf("expected path to not exist but it does: %s", path) - } -} - -func (t *tmpDir) assertHashedFilesExist(path string, hashes data.Hashes) { - t.c.Assert(len(hashes) > 0, Equals, true) - for _, path := range util.HashedPaths(path, hashes) { - t.assertExists(path) - } -} - -func (t *tmpDir) assertHashedFilesNotExist(path string, hashes data.Hashes) { - for _, path := range util.HashedPaths(path, hashes) { - t.assertNotExist(path) - } -} - -func (t *tmpDir) assertVersionedFileExist(path string, version int64) { - t.assertExists(util.VersionedPath(path, version)) -} - -func (t *tmpDir) assertVersionedFileNotExist(path string, version int64) { - t.assertNotExist(util.VersionedPath(path, version)) -} - -func (t *tmpDir) assertEmpty(dir string) { - path := filepath.Join(t.path, dir) - f, err := os.Stat(path) - if os.IsNotExist(err) { - t.c.Fatalf("expected dir to exist but it doesn't: %s", dir) - } - t.c.Assert(err, IsNil) - t.c.Assert(f.IsDir(), Equals, true) - - entries, err := os.ReadDir(path) - t.c.Assert(err, IsNil) - // check that all (if any) entries are also empty - for _, e := range entries { - t.assertEmpty(filepath.Join(dir, e.Name())) - } -} - -func (t *tmpDir) assertFileContent(path, content string) { - actual := t.readFile(path) - t.c.Assert(string(actual), Equals, content) -} - -func (t *tmpDir) stagedTargetPath(path string) string { - return filepath.Join(t.path, "staged", "targets", path) -} - -func (t *tmpDir) writeStagedTarget(path, data string) { - path = t.stagedTargetPath(path) - t.c.Assert(os.MkdirAll(filepath.Dir(path), 0755), IsNil) - t.c.Assert(os.WriteFile(path, []byte(data), 0644), IsNil) -} - -func (t *tmpDir) readFile(path string) []byte { - t.assertExists(path) - data, err := os.ReadFile(filepath.Join(t.path, path)) - t.c.Assert(err, IsNil) - return data -} - -func (rs *RepoSuite) TestCommitFileSystem(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // don't use consistent snapshots to make the checks simpler - c.Assert(r.Init(false), IsNil) - - // cleaning with nothing staged or committed should fail - c.Assert(r.Clean(), Equals, ErrNewRepository) - - // generating keys should stage root.json and create repo dirs - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - tmp.assertExists("staged/root.json") - tmp.assertEmpty("repository") - tmp.assertEmpty("staged/targets") - - // cleaning with nothing committed should fail - c.Assert(r.Clean(), Equals, ErrNewRepository) - - // adding a non-existent file fails - c.Assert(r.AddTarget("foo.txt", nil), Equals, ErrFileNotFound{tmp.stagedTargetPath("foo.txt")}) - tmp.assertEmpty("repository") - - // adding a file stages targets.json - tmp.writeStagedTarget("foo.txt", "foo") - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - tmp.assertExists("staged/targets.json") - tmp.assertEmpty("repository") - t, err := r.topLevelTargets() - c.Assert(err, IsNil) - c.Assert(t.Targets, HasLen, 1) - if _, ok := t.Targets["foo.txt"]; !ok { - c.Fatal("missing target file: foo.txt") - } - - // Snapshot() stages snapshot.json - c.Assert(r.Snapshot(), IsNil) - tmp.assertExists("staged/snapshot.json") - tmp.assertEmpty("repository") - - // Timestamp() stages timestamp.json - c.Assert(r.Timestamp(), IsNil) - tmp.assertExists("staged/timestamp.json") - tmp.assertEmpty("repository") - - // committing moves files from staged -> repository - c.Assert(r.Commit(), IsNil) - tmp.assertExists("repository/root.json") - tmp.assertExists("repository/targets.json") - tmp.assertExists("repository/snapshot.json") - tmp.assertExists("repository/timestamp.json") - tmp.assertFileContent("repository/targets/foo.txt", "foo") - tmp.assertEmpty("staged/targets") - tmp.assertEmpty("staged") - - // adding and committing another file moves it into repository/targets - tmp.writeStagedTarget("path/to/bar.txt", "bar") - c.Assert(r.AddTarget("path/to/bar.txt", nil), IsNil) - tmp.assertExists("staged/targets.json") - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - tmp.assertFileContent("repository/targets/foo.txt", "foo") - tmp.assertFileContent("repository/targets/path/to/bar.txt", "bar") - tmp.assertEmpty("staged/targets") - tmp.assertEmpty("staged") - - // removing and committing a file removes it from repository/targets - c.Assert(r.RemoveTarget("foo.txt"), IsNil) - tmp.assertExists("staged/targets.json") - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - tmp.assertNotExist("repository/targets/foo.txt") - tmp.assertFileContent("repository/targets/path/to/bar.txt", "bar") - tmp.assertEmpty("staged/targets") - tmp.assertEmpty("staged") -} - -func (rs *RepoSuite) TestCommitFileSystemWithNewRepositories(c *C) { - tmp := newTmpDir(c) - - newRepo := func() *Repo { - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - return r - } - - genKey(c, newRepo(), "root") - genKey(c, newRepo(), "targets") - genKey(c, newRepo(), "snapshot") - genKey(c, newRepo(), "timestamp") - - tmp.writeStagedTarget("foo.txt", "foo") - c.Assert(newRepo().AddTarget("foo.txt", nil), IsNil) - c.Assert(newRepo().Snapshot(), IsNil) - c.Assert(newRepo().Timestamp(), IsNil) - c.Assert(newRepo().Commit(), IsNil) -} - -func (rs *RepoSuite) TestConsistentSnapshot(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local, "sha512", "sha256") - c.Assert(err, IsNil) - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - tmp.writeStagedTarget("foo.txt", "foo") - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - tmp.writeStagedTarget("dir/bar.txt", "bar") - c.Assert(r.AddTarget("dir/bar.txt", nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - versions, err := r.fileVersions() - c.Assert(err, IsNil) - c.Assert(versions["root.json"], Equals, int64(1)) - c.Assert(versions["targets.json"], Equals, int64(1)) - c.Assert(versions["snapshot.json"], Equals, int64(1)) - - hashes, err := r.fileHashes() - c.Assert(err, IsNil) - - // root.json, targets.json and snapshot.json should exist at both versioned and unversioned paths - for _, meta := range []string{"root.json", "targets.json", "snapshot.json"} { - repoPath := path.Join("repository", meta) - if meta != "root.json" { - c.Assert(len(hashes[meta]) > 0, Equals, true) - } - tmp.assertHashedFilesNotExist(repoPath, hashes[meta]) - tmp.assertVersionedFileExist(repoPath, versions[meta]) - tmp.assertExists(repoPath) - } - - // target files should exist at hashed but not unhashed paths - for _, target := range []string{"targets/foo.txt", "targets/dir/bar.txt"} { - repoPath := path.Join("repository", target) - tmp.assertHashedFilesExist(repoPath, hashes[target]) - tmp.assertNotExist(repoPath) - } - - // timestamp.json should exist at an unversioned and unhashed path (it doesn't have a hash) - c.Assert(hashes["repository/timestamp.json"], IsNil) - tmp.assertVersionedFileNotExist("repository/timestamp.json", versions["repository/timestamp.json"]) - tmp.assertExists("repository/timestamp.json") - - // removing a file should remove the hashed files - c.Assert(r.RemoveTarget("foo.txt"), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - versions, err = r.fileVersions() - c.Assert(err, IsNil) - c.Assert(versions["root.json"], Equals, int64(1)) - c.Assert(versions["targets.json"], Equals, int64(2)) - c.Assert(versions["snapshot.json"], Equals, int64(2)) - - // Save the old hashes for foo.txt to make sure we can assert it doesn't exist later. - fooHashes := hashes["targets/foo.txt"] - hashes, err = r.fileHashes() - c.Assert(err, IsNil) - - // root.json, targets.json and snapshot.json should exist at both versioned and unversioned paths - for _, meta := range []string{"root.json", "targets.json", "snapshot.json"} { - repoPath := path.Join("repository", meta) - if meta != "root.json" { - c.Assert(len(hashes[meta]) > 0, Equals, true) - } - tmp.assertHashedFilesNotExist(repoPath, hashes[meta]) - tmp.assertVersionedFileExist(repoPath, versions[meta]) - tmp.assertExists(repoPath) - } - - tmp.assertHashedFilesNotExist("repository/targets/foo.txt", fooHashes) - tmp.assertNotExist("repository/targets/foo.txt") - - // targets should be returned by new repo - newRepo, err := NewRepo(local, "sha512", "sha256") - c.Assert(err, IsNil) - t, err := newRepo.topLevelTargets() - c.Assert(err, IsNil) - c.Assert(t.Targets, HasLen, 1) - if _, ok := t.Targets["dir/bar.txt"]; !ok { - c.Fatal("missing targets file: dir/bar.txt") - } -} - -func (rs *RepoSuite) TestExpiresAndVersion(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - past := time.Now().Add(-1 * time.Second) - _, genKeyErr := r.GenKeyWithExpires("root", past) - for _, err := range []error{ - genKeyErr, - r.AddTargetWithExpires("foo.txt", nil, past), - r.RemoveTargetWithExpires("foo.txt", past), - r.SnapshotWithExpires(past), - r.TimestampWithExpires(past), - } { - c.Assert(err, Equals, ErrInvalidExpires{past}) - } - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - c.Assert(r.AddTargets([]string{}, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.Version, Equals, int64(1)) - - expires := time.Now().Add(24 * time.Hour) - _, err = r.GenKeyWithExpires("root", expires) - c.Assert(err, IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - root, err = r.root() - c.Assert(err, IsNil) - c.Assert(root.Expires.Unix(), DeepEquals, expires.Round(time.Second).Unix()) - c.Assert(root.Version, Equals, int64(2)) - - expires = time.Now().Add(12 * time.Hour) - role, ok := root.Roles["root"] - if !ok { - c.Fatal("missing root role") - } - c.Assert(role.KeyIDs, HasLen, 2) - c.Assert(r.RevokeKeyWithExpires("root", role.KeyIDs[0], expires), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - root, err = r.root() - c.Assert(err, IsNil) - c.Assert(root.Expires.Unix(), DeepEquals, expires.Round(time.Second).Unix()) - c.Assert(root.Version, Equals, int64(3)) - - expires = time.Now().Add(6 * time.Hour) - c.Assert(r.AddTargetWithExpires("foo.txt", nil, expires), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - targets, err := r.topLevelTargets() - c.Assert(err, IsNil) - c.Assert(targets.Expires.Unix(), Equals, expires.Round(time.Second).Unix()) - c.Assert(targets.Version, Equals, int64(2)) - - expires = time.Now().Add(2 * time.Hour) - c.Assert(r.RemoveTargetWithExpires("foo.txt", expires), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - targets, err = r.topLevelTargets() - c.Assert(err, IsNil) - c.Assert(targets.Expires.Unix(), Equals, expires.Round(time.Second).Unix()) - c.Assert(targets.Version, Equals, int64(3)) - - expires = time.Now().Add(time.Hour) - c.Assert(r.SnapshotWithExpires(expires), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - snapshot, err := r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Expires.Unix(), Equals, expires.Round(time.Second).Unix()) - c.Assert(snapshot.Version, Equals, int64(6)) - - _, snapshotHasRoot := snapshot.Meta["root.json"] - c.Assert(snapshotHasRoot, Equals, false) - c.Assert(snapshot.Meta["targets.json"].Version, Equals, targets.Version) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Version, Equals, int64(7)) - - expires = time.Now().Add(10 * time.Minute) - c.Assert(r.TimestampWithExpires(expires), IsNil) - c.Assert(r.Commit(), IsNil) - timestamp, err := r.timestamp() - c.Assert(err, IsNil) - c.Assert(timestamp.Expires.Unix(), Equals, expires.Round(time.Second).Unix()) - c.Assert(timestamp.Version, Equals, int64(8)) - - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - timestamp, err = r.timestamp() - c.Assert(err, IsNil) - c.Assert(timestamp.Version, Equals, int64(9)) - c.Assert(timestamp.Meta["snapshot.json"].Version, Equals, snapshot.Version) -} - -func (rs *RepoSuite) TestHashAlgorithm(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - type hashTest struct { - args []string - expected []string - } - for _, test := range []hashTest{ - {args: []string{}, expected: []string{"sha512"}}, - {args: []string{"sha256"}}, - {args: []string{"sha512", "sha256"}}, - } { - // generate metadata with specific hash functions - r, err := NewRepo(local, test.args...) - c.Assert(err, IsNil) - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - - // check metadata has correct hash functions - if test.expected == nil { - test.expected = test.args - } - targets, err := r.topLevelTargets() - c.Assert(err, IsNil) - snapshot, err := r.snapshot() - c.Assert(err, IsNil) - timestamp, err := r.timestamp() - c.Assert(err, IsNil) - for name, file := range map[string]data.FileMeta{ - "foo.txt": targets.Targets["foo.txt"].FileMeta, - "targets.json": {Length: snapshot.Meta["targets.json"].Length, Hashes: snapshot.Meta["targets.json"].Hashes}, - "snapshot.json": {Length: timestamp.Meta["snapshot.json"].Length, Hashes: timestamp.Meta["snapshot.json"].Hashes}, - } { - for _, hashAlgorithm := range test.expected { - if _, ok := file.Hashes[hashAlgorithm]; !ok { - c.Fatalf("expected %s hash to contain hash func %s, got %s", name, hashAlgorithm, file.Hashes.HashAlgorithms()) - } - } - } - } -} - -func (rs *RepoSuite) TestKeyPersistence(c *C) { - tmp := newTmpDir(c) - oldPassphrase := []byte("old_s3cr3t") - newPassphrase := []byte("new_s3cr3t") - // returnNewPassphrase is used to force the passphrase function to return the new passphrase when called by the SaveSigner() method - returnNewPassphrase := false - // passphrase mock function - testPassphraseFunc := func(a string, b, change bool) ([]byte, error) { - if change || returnNewPassphrase { - return newPassphrase, nil - } - return oldPassphrase, nil - } - store := FileSystemStore(tmp.path, testPassphraseFunc) - - assertKeys := func(role string, enc bool, expected []*data.PrivateKey) { - keysJSON := tmp.readFile("keys/" + role + ".json") - pk := &persistedKeys{} - c.Assert(json.Unmarshal(keysJSON, pk), IsNil) - - // check the persisted keys are correct - var actual []*data.PrivateKey - pass := oldPassphrase - if enc { - c.Assert(pk.Encrypted, Equals, true) - if returnNewPassphrase { - pass = newPassphrase - } - decrypted, err := encrypted.Decrypt(pk.Data, pass) - c.Assert(err, IsNil) - c.Assert(json.Unmarshal(decrypted, &actual), IsNil) - } else { - c.Assert(pk.Encrypted, Equals, false) - c.Assert(json.Unmarshal(pk.Data, &actual), IsNil) - } - - // Compare slices of unique elements disregarding order. - c.Assert(actual, HasLen, len(expected)) - for _, gotKey := range actual { - expectedNumMatches := 0 - for _, x := range actual { - if reflect.DeepEqual(gotKey, x) { - expectedNumMatches++ - } - } - - numMatches := 0 - for _, wantKey := range expected { - wantCanon, err := cjson.EncodeCanonical(wantKey) - c.Assert(err, IsNil) - - gotCanon, err := cjson.EncodeCanonical(gotKey) - c.Assert(err, IsNil) - - if string(wantCanon) == string(gotCanon) { - numMatches++ - } - } - - c.Assert(numMatches, Equals, expectedNumMatches, Commentf("actual: %+v, expected: %+v", actual, expected)) - } - - // check GetKeys is correct - signers, err := store.GetSigners(role) - c.Assert(err, IsNil) - - // Compare slices of unique elements disregarding order. - c.Assert(signers, HasLen, len(expected)) - for _, s := range signers { - expectedNumMatches := 0 - for _, x := range signers { - if reflect.DeepEqual(s, x) { - expectedNumMatches++ - } - } - - numMatches := 0 - for _, e := range expected { - v, err := keys.GetSigner(e) - c.Assert(err, IsNil) - - if reflect.DeepEqual(s.PublicData().IDs(), v.PublicData().IDs()) { - numMatches++ - } - } - - c.Assert(numMatches, Equals, expectedNumMatches, Commentf("signers: %+v, expected: %+v", signers, expected)) - } - } - - // save a key and check it gets encrypted - signer, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - privateKey, err := signer.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(store.SaveSigner("root", signer), IsNil) - assertKeys("root", true, []*data.PrivateKey{privateKey}) - - // save another key and check it gets added to the existing keys - newKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - newPrivateKey, err := newKey.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(store.SaveSigner("root", newKey), IsNil) - assertKeys("root", true, []*data.PrivateKey{privateKey, newPrivateKey}) - - // check saving a key to an encrypted file without a passphrase fails - insecureStore := FileSystemStore(tmp.path, nil) - signer, err = keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(insecureStore.SaveSigner("root", signer), Equals, ErrPassphraseRequired{"root"}) - - // save a key to an insecure store and check it is not encrypted - signer, err = keys.GenerateEd25519Key() - c.Assert(err, IsNil) - privateKey, err = signer.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(insecureStore.SaveSigner("targets", signer), IsNil) - assertKeys("targets", false, []*data.PrivateKey{privateKey}) - - c.Assert(insecureStore.SaveSigner("foo", signer), IsNil) - assertKeys("foo", false, []*data.PrivateKey{privateKey}) - - // Test changing the passphrase - // 1. Create a secure store with a passphrase (create new object and temp folder so we discard any previous state) - tmp = newTmpDir(c) - var logBytes bytes.Buffer - storeOpts := StoreOpts{ - Logger: log.New(&logBytes, "", 0), - PassFunc: testPassphraseFunc, - } - store = FileSystemStoreWithOpts(tmp.path, storeOpts) - - // 1.5. Changing passphrase works for top-level and delegated roles. - r, err := NewRepo(store) - c.Assert(err, IsNil) - - c.Assert(r.ChangePassphrase("targets"), NotNil) - c.Assert(r.ChangePassphrase("foo"), NotNil) - - // 2. Test changing the passphrase when the keys file does not exist - should FAIL - c.Assert(store.(PassphraseChanger).ChangePassphrase("root"), NotNil) - c.Assert(strings.Contains(logBytes.String(), "Missing keys file"), Equals, true) - - // 3. Generate a new key - signer, err = keys.GenerateEd25519Key() - c.Assert(err, IsNil) - privateKey, err = signer.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(store.SaveSigner("root", signer), IsNil) - - // 4. Verify the key file can be decrypted using the original passphrase - should SUCCEED - assertKeys("root", true, []*data.PrivateKey{privateKey}) - - // 5. Change the passphrase (our mock passphrase function is called with change=true thus returning the newPassphrase value) - c.Assert(store.(PassphraseChanger).ChangePassphrase("root"), IsNil) - - // 6. Try to add a key and implicitly decrypt the keys file using the OLD passphrase - should FAIL - newKey, err = keys.GenerateEd25519Key() - c.Assert(err, IsNil) - _, err = newKey.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(store.SaveSigner("root", newKey), NotNil) - - // 7. Try to add a key and implicitly decrypt the keys using the NEW passphrase - should SUCCEED - returnNewPassphrase = true - newKey, err = keys.GenerateEd25519Key() - c.Assert(err, IsNil) - newPrivateKey, err = newKey.MarshalPrivateKey() - c.Assert(err, IsNil) - c.Assert(store.SaveSigner("root", newKey), IsNil) - - // 8. Verify again that the key entries are what we expect after decrypting them using the NEW passphrase - assertKeys("root", true, []*data.PrivateKey{privateKey, newPrivateKey}) -} - -func (rs *RepoSuite) TestManageMultipleTargets(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - // don't use consistent snapshots to make the checks simpler - c.Assert(r.Init(false), IsNil) - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - assertRepoTargets := func(paths ...string) { - t, err := r.topLevelTargets() - c.Assert(err, IsNil) - for _, path := range paths { - if _, ok := t.Targets[path]; !ok { - c.Fatalf("missing target file: %s", path) - } - } - } - - // adding and committing multiple files moves correct targets from staged -> repository - tmp.writeStagedTarget("foo.txt", "foo") - tmp.writeStagedTarget("bar.txt", "bar") - c.Assert(r.AddTargets([]string{"foo.txt", "bar.txt"}, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - assertRepoTargets("foo.txt", "bar.txt") - tmp.assertExists("repository/targets/foo.txt") - tmp.assertExists("repository/targets/bar.txt") - - // adding all targets moves them all from staged -> repository - count := 10 - files := make([]string, count) - for i := 0; i < count; i++ { - files[i] = fmt.Sprintf("file%d.txt", i) - tmp.writeStagedTarget(files[i], "data") - } - c.Assert(r.AddTargets(nil, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - tmp.assertExists("repository/targets/foo.txt") - tmp.assertExists("repository/targets/bar.txt") - assertRepoTargets(files...) - for _, file := range files { - tmp.assertExists("repository/targets/" + file) - } - tmp.assertEmpty("staged/targets") - tmp.assertEmpty("staged") - - // removing all targets removes them from the repository and targets.json - c.Assert(r.RemoveTargets(nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - tmp.assertNotExist("repository/targets") - t, err := r.topLevelTargets() - c.Assert(err, IsNil) - c.Assert(t.Targets, HasLen, 0) -} - -func (rs *RepoSuite) TestCustomTargetMetadata(c *C) { - files := map[string][]byte{ - "foo.txt": []byte("foo"), - "bar.txt": []byte("bar"), - "baz.txt": []byte("baz"), - } - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - generateAndAddPrivateKey(c, r, "targets") - - custom := json.RawMessage(`{"foo":"bar"}`) - assertCustomMeta := func(file string, custom *json.RawMessage) { - t, err := r.topLevelTargets() - c.Assert(err, IsNil) - target, ok := t.Targets[file] - if !ok { - c.Fatalf("missing target file: %s", file) - } - c.Assert(target.Custom, DeepEquals, custom) - } - - // check custom metadata gets added to the target - c.Assert(r.AddTarget("foo.txt", custom), IsNil) - assertCustomMeta("foo.txt", &custom) - - // check adding bar.txt with no metadata doesn't affect foo.txt - c.Assert(r.AddTarget("bar.txt", nil), IsNil) - assertCustomMeta("bar.txt", nil) - assertCustomMeta("foo.txt", &custom) - - // check adding all files with no metadata doesn't reset existing metadata - c.Assert(r.AddTargets(nil, nil), IsNil) - assertCustomMeta("baz.txt", nil) - assertCustomMeta("bar.txt", nil) - assertCustomMeta("foo.txt", &custom) -} - -func (rs *RepoSuite) TestUnknownKeyIDs(c *C) { - // generate a repo - local := MemoryStore(make(map[string]json.RawMessage), nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - // add a new key to the root metadata with an unknown key id. - signer, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - - root, err := r.root() - c.Assert(err, IsNil) - c.Assert(root.Version, Equals, int64(1)) - - root.Keys["unknown-key-id"] = signer.PublicData() - r.setMeta("root.json", root) - - // commit the metadata to the store. - c.Assert(r.AddTargets([]string{}, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - // validate that the unknown key id wasn't stripped when written to the - // store. - meta, err := local.GetMeta() - c.Assert(err, IsNil) - - rootJSON, ok := meta["root.json"] - c.Assert(ok, Equals, true) - - var signedRoot struct { - Signed data.Root `json:"signed"` - Signatures []data.Signature `json:"signatures"` - } - c.Assert(json.Unmarshal(rootJSON, &signedRoot), IsNil) - c.Assert(signedRoot.Signed.Version, Equals, int64(1)) - - unknownKey, ok := signedRoot.Signed.Keys["unknown-key-id"] - c.Assert(ok, Equals, true) - c.Assert(unknownKey, DeepEquals, signer.PublicData()) - - // a new root should preserve the unknown key id. - root, err = r.root() - c.Assert(root, NotNil) - c.Assert(err, IsNil) - - genKey(c, r, "timestamp") - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - meta, err = local.GetMeta() - c.Assert(err, IsNil) - - rootJSON, ok = meta["root.json"] - c.Assert(ok, Equals, true) - - c.Assert(json.Unmarshal(rootJSON, &signedRoot), IsNil) - c.Assert(signedRoot.Signed.Version, Equals, int64(2)) - - unknownKey, ok = signedRoot.Signed.Keys["unknown-key-id"] - c.Assert(ok, Equals, true) - c.Assert(unknownKey, DeepEquals, signer.PublicData()) -} - -func (rs *RepoSuite) TestThreshold(c *C) { - local := MemoryStore(make(map[string]json.RawMessage), nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - _, err = r.GetThreshold("root") - c.Assert(err, DeepEquals, ErrInvalidRole{"root", "role missing from root metadata"}) - err = r.SetThreshold("root", 2) - c.Assert(err, DeepEquals, ErrInvalidRole{"root", "role missing from root metadata"}) - - // Add one key to each role - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - t, err := r.GetThreshold("root") - c.Assert(err, IsNil) - c.Assert(t, Equals, 1) - - _, err = r.GetThreshold("foo") - c.Assert(err, DeepEquals, ErrInvalidRole{"foo", "only thresholds for top-level roles supported"}) - err = r.SetThreshold("foo", 2) - c.Assert(err, DeepEquals, ErrInvalidRole{"foo", "only thresholds for top-level roles supported"}) - - // commit the metadata to the store. - c.Assert(r.AddTargets([]string{}, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - // Set a new threshold. Commit without threshold keys - c.Assert(r.SetThreshold("root", 2), IsNil) - t, err = r.GetThreshold("root") - c.Assert(err, IsNil) - c.Assert(t, Equals, 2) - c.Assert(r.Commit(), DeepEquals, ErrNotEnoughKeys{"root", 1, 2}) - - // Add a second root key and try again - genKey(c, r, "root") - c.Assert(r.Sign("root.json"), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - // Check versions updated - rootVersion, err := r.RootVersion() - c.Assert(err, IsNil) - c.Assert(rootVersion, Equals, int64(2)) - - targetsVersion, err := r.TargetsVersion() - c.Assert(err, IsNil) - c.Assert(targetsVersion, Equals, int64(1)) - - snapshotVersion, err := r.SnapshotVersion() - c.Assert(err, IsNil) - c.Assert(snapshotVersion, Equals, int64(2)) - - timestampVersion, err := r.TimestampVersion() - c.Assert(err, IsNil) - c.Assert(timestampVersion, Equals, int64(2)) -} - -func (rs *RepoSuite) TestAddOrUpdateSignatures(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // don't use consistent snapshots to make the checks simpler - c.Assert(r.Init(false), IsNil) - - // generate root key offline and add as a verification key - rootKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("root", rootKey.PublicData()), IsNil) - targetsKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("targets", targetsKey.PublicData()), IsNil) - snapshotKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("snapshot", snapshotKey.PublicData()), IsNil) - timestampKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("timestamp", timestampKey.PublicData()), IsNil) - - // generate signatures externally and append - rootMeta, err := r.SignedMeta("root.json") - c.Assert(err, IsNil) - rootCanonical, err := cjson.EncodeCanonical(rootMeta.Signed) - c.Assert(err, IsNil) - rootSig, err := rootKey.SignMessage(rootCanonical) - c.Assert(err, IsNil) - for _, id := range rootKey.PublicData().IDs() { - c.Assert(r.AddOrUpdateSignature("root.json", data.Signature{ - KeyID: id, - Signature: rootSig}), IsNil) - } - - // add targets and sign - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - targetsMeta, err := r.SignedMeta("targets.json") - c.Assert(err, IsNil) - targetsCanonical, err := cjson.EncodeCanonical(targetsMeta.Signed) - c.Assert(err, IsNil) - targetsSig, err := targetsKey.SignMessage(targetsCanonical) - c.Assert(err, IsNil) - for _, id := range targetsKey.PublicData().IDs() { - r.AddOrUpdateSignature("targets.json", data.Signature{ - KeyID: id, - Signature: targetsSig}) - } - - // snapshot and timestamp - c.Assert(r.Snapshot(), IsNil) - snapshotMeta, err := r.SignedMeta("snapshot.json") - c.Assert(err, IsNil) - snapshotCanonical, err := cjson.EncodeCanonical(snapshotMeta.Signed) - c.Assert(err, IsNil) - snapshotSig, err := snapshotKey.SignMessage(snapshotCanonical) - c.Assert(err, IsNil) - for _, id := range snapshotKey.PublicData().IDs() { - r.AddOrUpdateSignature("snapshot.json", data.Signature{ - KeyID: id, - Signature: snapshotSig}) - } - - c.Assert(r.Timestamp(), IsNil) - timestampMeta, err := r.SignedMeta("timestamp.json") - c.Assert(err, IsNil) - timestampCanonical, err := cjson.EncodeCanonical(timestampMeta.Signed) - c.Assert(err, IsNil) - timestampSig, err := timestampKey.SignMessage(timestampCanonical) - c.Assert(err, IsNil) - for _, id := range timestampKey.PublicData().IDs() { - r.AddOrUpdateSignature("timestamp.json", data.Signature{ - KeyID: id, - Signature: timestampSig}) - } - - // commit successfully! - c.Assert(r.Commit(), IsNil) -} - -func (rs *RepoSuite) TestBadAddOrUpdateSignatures(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // don't use consistent snapshots to make the checks simpler - c.Assert(r.Init(false), IsNil) - - c.Assert(r.AddOrUpdateSignature("targets.json", data.Signature{ - KeyID: "foo", - Signature: nil}), Equals, ErrInvalidRole{"targets", "role is not in verifier DB"}) - - // generate root key offline and add as a verification key - rootKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("root", rootKey.PublicData()), IsNil) - targetsKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("targets", targetsKey.PublicData()), IsNil) - snapshotKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("snapshot", snapshotKey.PublicData()), IsNil) - timestampKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - c.Assert(r.AddVerificationKey("timestamp", timestampKey.PublicData()), IsNil) - - // attempt to sign `root`, rather than `root.json` - for _, id := range rootKey.PublicData().IDs() { - c.Assert(r.AddOrUpdateSignature("root", data.Signature{ - KeyID: id, - Signature: nil}), Equals, ErrMissingMetadata{"root"}) - } - - // add a signature with a bad role - rootMeta, err := r.SignedMeta("root.json") - c.Assert(err, IsNil) - rootCanonical, err := cjson.EncodeCanonical(rootMeta.Signed) - c.Assert(err, IsNil) - rootSig, err := rootKey.Sign(rand.Reader, rootCanonical, crypto.Hash(0)) - c.Assert(err, IsNil) - for _, id := range rootKey.PublicData().IDs() { - c.Assert(r.AddOrUpdateSignature("invalid_root.json", data.Signature{ - KeyID: id, - Signature: rootSig}), Equals, ErrInvalidRole{"invalid_root", "no trusted keys for role"}) - } - - // add a root signature with an key ID that is for the targets role - for _, id := range targetsKey.PublicData().IDs() { - c.Assert(r.AddOrUpdateSignature("root.json", data.Signature{ - KeyID: id, - Signature: rootSig}), Equals, verify.ErrInvalidKey) - } - - // attempt to add a bad signature to root - badSig, err := rootKey.Sign(rand.Reader, []byte(""), crypto.Hash(0)) - c.Assert(err, IsNil) - for _, id := range rootKey.PublicData().IDs() { - c.Assert(r.AddOrUpdateSignature("root.json", data.Signature{ - KeyID: id, - Signature: badSig}), Equals, verify.ErrInvalid) - } - - // add the correct root signature - for _, id := range rootKey.PublicData().IDs() { - c.Assert(r.AddOrUpdateSignature("root.json", data.Signature{ - KeyID: id, - Signature: rootSig}), IsNil) - } - checkSigIDs := func(role string) { - s, err := r.SignedMeta(role) - c.Assert(err, IsNil) - db, err := r.topLevelKeysDB() - c.Assert(err, IsNil) - // keys is a map of key IDs. - keys := db.GetRole(strings.TrimSuffix(role, ".json")).KeyIDs - c.Assert(s.Signatures, HasLen, len(keys)) - // If the lengths are equal, and each signature key ID appears - // in the role keys, they Sig IDs are equal to keyIDs. - for _, sig := range s.Signatures { - if _, ok := keys[sig.KeyID]; !ok { - c.Fatal("missing key ID in signatures") - } - } - } - checkSigIDs("root.json") - - // re-adding should not duplicate. this is checked by verifying - // signature key IDs match with the map of role key IDs. - for _, id := range rootKey.PublicData().IDs() { - c.Assert(r.AddOrUpdateSignature("root.json", data.Signature{ - KeyID: id, - Signature: rootSig}), IsNil) - } - checkSigIDs("root.json") -} - -func (rs *RepoSuite) TestSignDigest(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - digest := "sha256:bc11b176a293bb341a0f2d0d226f52e7fcebd186a7c4dfca5fc64f305f06b94c" - hash := "bc11b176a293bb341a0f2d0d226f52e7fcebd186a7c4dfca5fc64f305f06b94c" - size := int64(42) - - c.Assert(r.AddTargetsWithDigest(hash, "sha256", size, digest, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - digest_bytes, err := hex.DecodeString("bc11b176a293bb341a0f2d0d226f52e7fcebd186a7c4dfca5fc64f305f06b94c") - hex_digest_bytes := data.HexBytes(digest_bytes) - c.Assert(err, IsNil) - - targets, err := r.topLevelTargets() - c.Assert(err, IsNil) - c.Assert(targets.Targets["sha256:bc11b176a293bb341a0f2d0d226f52e7fcebd186a7c4dfca5fc64f305f06b94c"].FileMeta.Length, Equals, size) - c.Assert(targets.Targets["sha256:bc11b176a293bb341a0f2d0d226f52e7fcebd186a7c4dfca5fc64f305f06b94c"].FileMeta.Hashes["sha256"], DeepEquals, hex_digest_bytes) -} - -func concat(ss ...[]string) []string { - ret := []string{} - for _, s := range ss { - ret = append(ret, s...) - } - return ret -} - -func checkSigKeyIDs(c *C, local LocalStore, fileToKeyIDs map[string][]string) { - metas, err := local.GetMeta() - c.Assert(err, IsNil) - - for f, keyIDs := range fileToKeyIDs { - meta, ok := metas[f] - c.Assert(ok, Equals, true, Commentf("meta file: %v", f)) - - s := &data.Signed{} - err = json.Unmarshal(meta, s) - c.Assert(err, IsNil) - - gotKeyIDs := []string{} - for _, sig := range s.Signatures { - gotKeyIDs = append(gotKeyIDs, sig.KeyID) - } - gotKeyIDs = sets.DeduplicateStrings(gotKeyIDs) - sort.Strings(gotKeyIDs) - - sort.Strings(keyIDs) - c.Assert(gotKeyIDs, DeepEquals, keyIDs) - } -} - -func (rs *RepoSuite) TestDelegations(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Add one key to each role - genKey(c, r, "root") - targetsKeyIDs := genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - // commit the metadata to the store. - c.Assert(r.AddTargets([]string{}, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err := r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 1) - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(1)) - - checkSigKeyIDs(c, local, map[string][]string{ - "1.targets.json": targetsKeyIDs, - }) - - saveNewKey := func(role string) keys.Signer { - key, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - - err = local.SaveSigner(role, key) - c.Assert(err, IsNil) - - return key - } - - // Delegate from targets -> role1 for A/*, B/* with one key, threshold 1. - role1ABKey := saveNewKey("role1") - role1AB := data.DelegatedRole{ - Name: "role1", - KeyIDs: role1ABKey.PublicData().IDs(), - Paths: []string{"A/*", "B/*"}, - Threshold: 1, - } - err = r.AddDelegatedRole("targets", role1AB, []*data.PublicKey{ - role1ABKey.PublicData(), - }) - c.Assert(err, IsNil) - - // Adding duplicate delegation should return an error. - err = r.AddDelegatedRole("targets", role1AB, []*data.PublicKey{ - role1ABKey.PublicData(), - }) - c.Assert(err, NotNil) - - // Delegate from targets -> role2 for C/*, D/* with three key, threshold 2. - role2CDKey1 := saveNewKey("role2") - role2CDKey2 := saveNewKey("role2") - role2CDKey3 := saveNewKey("role2") - role2CD := data.DelegatedRole{ - Name: "role2", - KeyIDs: concat( - role2CDKey1.PublicData().IDs(), - role2CDKey2.PublicData().IDs(), - role2CDKey3.PublicData().IDs(), - ), - Paths: []string{"C/*", "D/*"}, - Threshold: 2, - } - err = r.AddDelegatedRole("targets", role2CD, []*data.PublicKey{ - role2CDKey1.PublicData(), - role2CDKey2.PublicData(), - role2CDKey3.PublicData(), - }) - c.Assert(err, IsNil) - - // Delegate from role1 -> role2 for A/allium.txt with one key, threshold 1. - role1To2Key := saveNewKey("role2") - role1To2 := data.DelegatedRole{ - Name: "role2", - KeyIDs: role1To2Key.PublicData().IDs(), - Paths: []string{"A/allium.txt"}, - Threshold: 1, - Terminating: true, - } - err = r.AddDelegatedRole("role1", role1To2, []*data.PublicKey{ - role1To2Key.PublicData(), - }) - c.Assert(err, IsNil) - - checkDelegations := func(delegator string, delegatedRoles ...data.DelegatedRole) { - t, err := r.targets(delegator) - c.Assert(err, IsNil) - - // Check if there are no delegations. - if t.Delegations == nil { - if delegatedRoles != nil { - c.Fatal("expected delegated roles on delegator") - } - return - } - - // Check that delegated roles are copied verbatim. - c.Assert(t.Delegations.Roles, DeepEquals, delegatedRoles) - - // Check that public keys match key IDs in roles. - expectedKeyIDs := []string{} - for _, dr := range delegatedRoles { - expectedKeyIDs = append(expectedKeyIDs, dr.KeyIDs...) - } - expectedKeyIDs = sets.DeduplicateStrings(expectedKeyIDs) - sort.Strings(expectedKeyIDs) - - gotKeyIDs := []string{} - for _, k := range t.Delegations.Keys { - gotKeyIDs = append(gotKeyIDs, k.IDs()...) - } - gotKeyIDs = sets.DeduplicateStrings(gotKeyIDs) - sort.Strings(gotKeyIDs) - - c.Assert(gotKeyIDs, DeepEquals, expectedKeyIDs) - } - - checkDelegations("targets", role1AB, role2CD) - checkDelegations("role1", role1To2) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 3) - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(2)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["role2.json"].Version, Equals, int64(1)) - - checkSigKeyIDs(c, local, map[string][]string{ - "2.targets.json": targetsKeyIDs, - "1.role1.json": role1ABKey.PublicData().IDs(), - "1.role2.json": concat( - role2CDKey1.PublicData().IDs(), - role2CDKey2.PublicData().IDs(), - role2CDKey3.PublicData().IDs(), - role1To2Key.PublicData().IDs(), - ), - }) - - // Add a variety of targets. - files := map[string]string{ - // targets.json - "potato.txt": "potatoes can be starchy or waxy", - // role1.json - "A/apple.txt": "apples are sometimes red", - "B/banana.txt": "bananas are yellow and sometimes brown", - // role2.json - "C/clementine.txt": "clementines are a citrus fruit", - "D/durian.txt": "durians are spiky", - "A/allium.txt": "alliums include garlic and leeks", - } - for name, content := range files { - tmp.writeStagedTarget(name, content) - c.Assert(r.AddTarget(name, nil), IsNil) - } - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 3) - // All roles should have new targets. - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(3)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(2)) - c.Assert(snapshot.Meta["role2.json"].Version, Equals, int64(2)) - - checkSigKeyIDs(c, local, map[string][]string{ - "3.targets.json": targetsKeyIDs, - "2.role1.json": role1ABKey.PublicData().IDs(), - "2.role2.json": concat( - role2CDKey1.PublicData().IDs(), - role2CDKey2.PublicData().IDs(), - role2CDKey3.PublicData().IDs(), - role1To2Key.PublicData().IDs(), - ), - }) - - // Check that the given targets role has signed for the given filenames, with - // the correct file metadata. - checkTargets := func(role string, filenames ...string) { - t, err := r.targets(role) - c.Assert(err, IsNil) - c.Assert(t.Targets, HasLen, len(filenames)) - - for _, fn := range filenames { - content := files[fn] - - fm, err := util.GenerateTargetFileMeta(strings.NewReader(content)) - c.Assert(err, IsNil) - - c.Assert(util.TargetFileMetaEqual(t.Targets[fn], fm), IsNil) - } - } - - checkTargets("targets", "potato.txt") - checkTargets("role1", "A/apple.txt", "B/banana.txt") - checkTargets("role2", "C/clementine.txt", "D/durian.txt", "A/allium.txt") - - // Test AddTargetToPreferredRole. - // role2 is the default signer for A/allium.txt, but role1 is also eligible - // for A/*.txt according to the delegation from the top-level targets role. - c.Assert(r.RemoveTarget("A/allium.txt"), IsNil) - tmp.writeStagedTarget("A/allium.txt", files["A/allium.txt"]) - c.Assert(r.AddTargetToPreferredRole("A/allium.txt", nil, "role1"), IsNil) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 3) - // Only role1 and role2 should have bumped versions. - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(3)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(3)) - c.Assert(snapshot.Meta["role2.json"].Version, Equals, int64(3)) - - checkSigKeyIDs(c, local, map[string][]string{ - "3.targets.json": targetsKeyIDs, - "3.role1.json": role1ABKey.PublicData().IDs(), - "3.role2.json": concat( - role2CDKey1.PublicData().IDs(), - role2CDKey2.PublicData().IDs(), - role2CDKey3.PublicData().IDs(), - role1To2Key.PublicData().IDs(), - ), - }) - - // role1 now signs A/allium.txt. - checkTargets("targets", "potato.txt") - checkTargets("role1", "A/apple.txt", "B/banana.txt", "A/allium.txt") - checkTargets("role2", "C/clementine.txt", "D/durian.txt") - - // Remove the delegation from role1 to role2. - c.Assert(r.ResetTargetsDelegations("role1"), IsNil) - checkDelegations("targets", role1AB, role2CD) - checkDelegations("role1") - - // Try to sign A/allium.txt with role2. - // It should fail since we removed the role1 -> role2 delegation. - c.Assert(r.RemoveTarget("A/allium.txt"), IsNil) - tmp.writeStagedTarget("A/allium.txt", files["A/allium.txt"]) - c.Assert(r.AddTargetToPreferredRole("A/allium.txt", nil, "role2"), Equals, ErrNoDelegatedTarget{Path: "A/allium.txt"}) - - // Try to sign A/allium.txt with the default role (role1). - c.Assert(r.AddTarget("A/allium.txt", nil), IsNil) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 3) - // Only role1 should have a bumped version. - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(3)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(4)) - c.Assert(snapshot.Meta["role2.json"].Version, Equals, int64(3)) - - checkSigKeyIDs(c, local, map[string][]string{ - "3.targets.json": targetsKeyIDs, - "4.role1.json": role1ABKey.PublicData().IDs(), - "3.role2.json": concat( - // Metadata (and therefore signers) for role2.json shouldn't have - // changed, even though we revoked role1To2Key. Clients verify the - // signature using keys specified by 4.role1.json, so role1To2Key - // shouldn't contribute to the threshold. - role2CDKey1.PublicData().IDs(), - role2CDKey2.PublicData().IDs(), - role2CDKey3.PublicData().IDs(), - role1To2Key.PublicData().IDs(), - ), - }) - - // Re-sign target signed by role2 to test that role1To2Key is not used going - // forward. - c.Assert(r.RemoveTarget("C/clementine.txt"), IsNil) - tmp.writeStagedTarget("C/clementine.txt", files["C/clementine.txt"]) - c.Assert(r.AddTarget("C/clementine.txt", nil), IsNil) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 3) - // Only role2 should have a bumped version. - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(3)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(4)) - c.Assert(snapshot.Meta["role2.json"].Version, Equals, int64(4)) - - checkSigKeyIDs(c, local, map[string][]string{ - "3.targets.json": targetsKeyIDs, - "4.role1.json": role1ABKey.PublicData().IDs(), - "4.role2.json": concat( - role2CDKey1.PublicData().IDs(), - role2CDKey2.PublicData().IDs(), - role2CDKey3.PublicData().IDs(), - // Note that role1To2Key no longer signs since the role1 -> role2 - // delegation was removed. - ), - }) - - // Targets should still be signed by the same roles. - checkTargets("targets", "potato.txt") - checkTargets("role1", "A/apple.txt", "B/banana.txt", "A/allium.txt") - checkTargets("role2", "C/clementine.txt", "D/durian.txt") - - // Add back the role1 -> role2 delegation, and verify that it doesn't change - // existing targets in role2.json. - err = r.AddDelegatedRole("role1", role1To2, []*data.PublicKey{ - role1To2Key.PublicData(), - }) - c.Assert(err, IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 3) - // Both role1 and role2 should have a bumped version. - // role1 is bumped because the delegations changed. - // role2 is only bumped because its expiration is bumped. - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(3)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(5)) - c.Assert(snapshot.Meta["role2.json"].Version, Equals, int64(5)) - - checkTargets("targets", "potato.txt") - checkTargets("role1", "A/apple.txt", "B/banana.txt", "A/allium.txt") - checkTargets("role2", "C/clementine.txt", "D/durian.txt") -} - -func (rs *RepoSuite) TestHashBinDelegations(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Add one key to each role - genKey(c, r, "root") - targetsKeyIDs := genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - hb, err := targets.NewHashBins("bins_", 3) - if err != nil { - c.Assert(err, IsNil) - } - - // Generate key for the intermediate bins role. - binsKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - err = local.SaveSigner("bins", binsKey) - c.Assert(err, IsNil) - - // Generate key for the leaf bins role. - leafKey, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - for i := uint64(0); i < hb.NumBins(); i++ { - b := hb.GetBin(i) - err = local.SaveSigner(b.RoleName(), leafKey) - if err != nil { - c.Assert(err, IsNil) - } - } - - err = r.AddDelegatedRole("targets", data.DelegatedRole{ - Name: "bins", - KeyIDs: binsKey.PublicData().IDs(), - Paths: []string{"*.txt"}, - Threshold: 1, - }, []*data.PublicKey{ - binsKey.PublicData(), - }) - c.Assert(err, IsNil) - - err = r.AddDelegatedRolesForPathHashBins("bins", hb, []*data.PublicKey{leafKey.PublicData()}, 1) - c.Assert(err, IsNil) - targets, err := r.targets("bins") - c.Assert(err, IsNil) - c.Assert(targets.Delegations.Roles, HasLen, 8) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - tmp.writeStagedTarget("foo.txt", "foo") - err = r.AddTarget("foo.txt", nil) - c.Assert(err, IsNil) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err := r.snapshot() - c.Assert(err, IsNil) - // 1 targets.json, 1 bins.json, 8 bins_*.json. - c.Assert(snapshot.Meta, HasLen, 10) - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins_0-1.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins_2-3.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins_4-5.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins_6-7.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins_8-9.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins_a-b.json"].Version, Equals, int64(1)) - c.Assert(snapshot.Meta["bins_c-d.json"].Version, Equals, int64(2)) - c.Assert(snapshot.Meta["bins_e-f.json"].Version, Equals, int64(1)) - - targets, err = r.targets("bins_c-d") - c.Assert(err, IsNil) - c.Assert(targets.Targets, HasLen, 1) - - checkSigKeyIDs(c, local, map[string][]string{ - "targets.json": targetsKeyIDs, - "1.bins.json": binsKey.PublicData().IDs(), - "1.bins_0-1.json": leafKey.PublicData().IDs(), - "1.bins_2-3.json": leafKey.PublicData().IDs(), - "1.bins_4-5.json": leafKey.PublicData().IDs(), - "1.bins_6-7.json": leafKey.PublicData().IDs(), - "1.bins_8-9.json": leafKey.PublicData().IDs(), - "1.bins_a-b.json": leafKey.PublicData().IDs(), - "1.bins_c-d.json": leafKey.PublicData().IDs(), - "2.bins_c-d.json": leafKey.PublicData().IDs(), - "1.bins_e-f.json": leafKey.PublicData().IDs(), - }) -} - -func (rs *RepoSuite) TestResetTargetsDelegationsWithExpires(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Add one key to each role - genKey(c, r, "root") - targetsKeyIDs := genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - // commit the metadata to the store. - c.Assert(r.AddTargets([]string{}, nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err := r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 1) - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(1)) - - checkSigKeyIDs(c, local, map[string][]string{ - "1.targets.json": targetsKeyIDs, - }) - - role1Key, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - - err = local.SaveSigner("role1", role1Key) - c.Assert(err, IsNil) - - // Delegate from targets -> role1 for A/*, B/* with one key, threshold 1. - role1 := data.DelegatedRole{ - Name: "role1", - KeyIDs: role1Key.PublicData().IDs(), - Paths: []string{"A/*", "B/*"}, - Threshold: 1, - } - err = r.AddDelegatedRole("targets", role1, []*data.PublicKey{ - role1Key.PublicData(), - }) - c.Assert(err, IsNil) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 2) - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(2)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(1)) - - checkSigKeyIDs(c, local, map[string][]string{ - "1.targets.json": targetsKeyIDs, - "targets.json": targetsKeyIDs, - "1.role1.json": role1Key.PublicData().IDs(), - "role1.json": role1Key.PublicData().IDs(), - }) - - c.Assert(r.ResetTargetsDelegations("targets"), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - snapshot, err = r.snapshot() - c.Assert(err, IsNil) - c.Assert(snapshot.Meta, HasLen, 2) - c.Assert(snapshot.Meta["targets.json"].Version, Equals, int64(3)) - c.Assert(snapshot.Meta["role1.json"].Version, Equals, int64(1)) - - checkSigKeyIDs(c, local, map[string][]string{ - "2.targets.json": targetsKeyIDs, - "targets.json": targetsKeyIDs, - "1.role1.json": role1Key.PublicData().IDs(), - "role1.json": role1Key.PublicData().IDs(), - }) -} - -func (rs *RepoSuite) TestSignWithDelegations(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Add one key to each role - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - role1Key, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - - role1 := data.DelegatedRole{ - Name: "role1", - KeyIDs: role1Key.PublicData().IDs(), - Paths: []string{"A/*", "B/*"}, - Threshold: 1, - } - err = r.AddDelegatedRole("targets", role1, []*data.PublicKey{ - role1Key.PublicData(), - }) - c.Assert(err, IsNil) - - // targets.json should be signed, but role1.json is not signed because there - // is no key in the local store. - m, err := local.GetMeta() - c.Assert(err, IsNil) - targetsMeta := &data.Signed{} - c.Assert(json.Unmarshal(m["targets.json"], targetsMeta), IsNil) - c.Assert(len(targetsMeta.Signatures), Equals, 1) - role1Meta := &data.Signed{} - c.Assert(json.Unmarshal(m["role1.json"], role1Meta), IsNil) - c.Assert(len(role1Meta.Signatures), Equals, 0) - - c.Assert(r.Snapshot(), DeepEquals, ErrInsufficientSignatures{"role1.json", verify.ErrNoSignatures}) - - // Sign role1.json. - c.Assert(local.SaveSigner("role1", role1Key), IsNil) - c.Assert(r.Sign("role1.json"), IsNil) - - m, err = local.GetMeta() - c.Assert(err, IsNil) - targetsMeta = &data.Signed{} - c.Assert(json.Unmarshal(m["targets.json"], targetsMeta), IsNil) - c.Assert(len(targetsMeta.Signatures), Equals, 1) - role1Meta = &data.Signed{} - c.Assert(json.Unmarshal(m["role1.json"], role1Meta), IsNil) - c.Assert(len(role1Meta.Signatures), Equals, 1) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) -} - -func (rs *RepoSuite) TestAddOrUpdateSignatureWithDelegations(c *C) { - tmp := newTmpDir(c) - local := FileSystemStore(tmp.path, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Add one key to each role - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - - role1Key, err := keys.GenerateEd25519Key() - c.Assert(err, IsNil) - - role1 := data.DelegatedRole{ - Name: "role1", - KeyIDs: role1Key.PublicData().IDs(), - Paths: []string{"A/*", "B/*"}, - Threshold: 1, - } - err = r.AddDelegatedRole("targets", role1, []*data.PublicKey{ - role1Key.PublicData(), - }) - c.Assert(err, IsNil) - - // targets.json should be signed, but role1.json is not signed because there - // is no key in the local store. - m, err := local.GetMeta() - c.Assert(err, IsNil) - targetsMeta := &data.Signed{} - c.Assert(json.Unmarshal(m["targets.json"], targetsMeta), IsNil) - c.Assert(len(targetsMeta.Signatures), Equals, 1) - role1Meta := &data.Signed{} - c.Assert(json.Unmarshal(m["role1.json"], role1Meta), IsNil) - c.Assert(len(role1Meta.Signatures), Equals, 0) - - c.Assert(r.Snapshot(), DeepEquals, ErrInsufficientSignatures{"role1.json", verify.ErrNoSignatures}) - - // Sign role1.json. - canonical, err := cjson.EncodeCanonical(role1Meta.Signed) - c.Assert(err, IsNil) - sig, err := role1Key.SignMessage(canonical) - c.Assert(err, IsNil) - err = r.AddOrUpdateSignature("role1.json", data.Signature{ - KeyID: role1Key.PublicData().IDs()[0], - Signature: sig, - }) - c.Assert(err, IsNil) - - m, err = local.GetMeta() - c.Assert(err, IsNil) - targetsMeta = &data.Signed{} - c.Assert(json.Unmarshal(m["targets.json"], targetsMeta), IsNil) - c.Assert(len(targetsMeta.Signatures), Equals, 1) - role1Meta = &data.Signed{} - c.Assert(json.Unmarshal(m["role1.json"], role1Meta), IsNil) - c.Assert(len(role1Meta.Signatures), Equals, 1) - - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) -} - -// Test the offline signature flow: Payload -> SignPayload -> AddSignature -func (rs *RepoSuite) TestOfflineFlow(c *C) { - // Set up repo. - meta := make(map[string]json.RawMessage) - local := MemoryStore(meta, nil) - r, err := NewRepo(local) - c.Assert(err, IsNil) - c.Assert(r.Init(false), IsNil) - // Use ECDSA because it has a newline which is a difference between JSON and cJSON. - _, err = r.GenKeyWithSchemeAndExpires("root", data.DefaultExpires("root"), data.KeySchemeECDSA_SHA2_P256) - c.Assert(err, IsNil) - - // Get the payload to sign - _, err = r.Payload("badrole.json") - c.Assert(err, Equals, ErrMissingMetadata{"badrole.json"}) - _, err = r.Payload("root") - c.Assert(err, Equals, ErrMissingMetadata{"root"}) - payload, err := r.Payload("root.json") - c.Assert(err, IsNil) - - root, err := r.SignedMeta("root.json") - c.Assert(err, IsNil) - rootCanonical, err := cjson.EncodeCanonical(root.Signed) - c.Assert(err, IsNil) - if !bytes.Equal(payload, rootCanonical) { - c.Fatalf("Payload(): not canonical.\n%s\n%s", string(payload), string(rootCanonical)) - } - - // Sign the payload - _, err = r.SignRaw("targets", payload) - c.Assert(err, Equals, ErrNoKeys{"targets"}) - signatures, err := r.SignRaw("root", payload) - c.Assert(err, IsNil) - c.Assert(len(signatures), Equals, 1) - - // Add the payload signatures back - for _, sig := range signatures { - // This method checks that the signature verifies! - err = r.AddOrUpdateSignature("root.json", sig) - c.Assert(err, IsNil) - } -} - -// Regression test: Snapshotting an invalid root should fail. -func (rs *RepoSuite) TestSnapshotWithInvalidRoot(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Init should create targets.json, but not signed yet - r.Init(false) - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - - // Clear the root signature so that signature verification fails. - s, err := r.SignedMeta("root.json") - c.Assert(err, IsNil) - c.Assert(s.Signatures, HasLen, 1) - s.Signatures[0].Signature = data.HexBytes{} - b, err := r.jsonMarshal(s) - c.Assert(err, IsNil) - r.meta["root.json"] = b - local.SetMeta("root.json", b) - - // Snapshotting should fail. - c.Assert(r.Snapshot(), Equals, ErrInsufficientSignatures{ - "root.json", verify.ErrRoleThreshold{Expected: 1, Actual: 0}}) - - // Correctly sign root - c.Assert(r.Sign("root.json"), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) -} - -// Regression test: Do not omit length in target metadata files. -func (rs *RepoSuite) TestTargetMetadataLength(c *C) { - files := map[string][]byte{"foo.txt": []byte("")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - // Init should create targets.json, but not signed yet - r.Init(false) - - genKey(c, r, "root") - genKey(c, r, "targets") - genKey(c, r, "snapshot") - genKey(c, r, "timestamp") - c.Assert(r.AddTarget("foo.txt", nil), IsNil) - c.Assert(r.Snapshot(), IsNil) - c.Assert(r.Timestamp(), IsNil) - c.Assert(r.Commit(), IsNil) - - // Check length field of foo.txt exists. - meta, err := local.GetMeta() - c.Assert(err, IsNil) - targetsJSON, ok := meta["targets.json"] - if !ok { - c.Fatal("missing targets metadata") - } - s := &data.Signed{} - c.Assert(json.Unmarshal(targetsJSON, s), IsNil) - fmt.Fprint(os.Stderr, s.Signed) - var objMap map[string]json.RawMessage - c.Assert(json.Unmarshal(s.Signed, &objMap), IsNil) - targetsMap, ok := objMap["targets"] - if !ok { - c.Fatal("missing targets field in targets metadata") - } - c.Assert(json.Unmarshal(targetsMap, &objMap), IsNil) - targetsMap, ok = objMap["foo.txt"] - if !ok { - c.Fatal("missing foo.txt in targets") - } - c.Assert(json.Unmarshal(targetsMap, &objMap), IsNil) - lengthMsg, ok := objMap["length"] - if !ok { - c.Fatal("missing length field in foo.txt file meta") - } - var length int64 - c.Assert(json.Unmarshal(lengthMsg, &length), IsNil) - c.Assert(length, Equals, int64(0)) -} - -func (rs *RepoSuite) TestDeprecatedHexEncodedKeysFails(c *C) { - files := map[string][]byte{"foo.txt": []byte("foo")} - local := MemoryStore(make(map[string]json.RawMessage), files) - r, err := NewRepo(local) - c.Assert(err, IsNil) - - r.Init(false) - // Add a root key with hex-encoded ecdsa format - signer, err := keys.GenerateEcdsaKey() - c.Assert(err, IsNil) - type deprecatedP256Verifier struct { - PublicKey data.HexBytes `json:"public"` - } - pub := signer.PublicKey - keyValBytes, err := json.Marshal(&deprecatedP256Verifier{PublicKey: elliptic.Marshal(pub.Curve, pub.X, pub.Y)}) - c.Assert(err, IsNil) - publicData := &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } - err = r.AddVerificationKey("root", publicData) - c.Assert(err, IsNil) - // TODO: AddVerificationKey does no validation, so perform a sign operation. - c.Assert(r.Sign("root.json"), ErrorMatches, "tuf: error unmarshalling key: invalid PEM value") -} diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 964791d1..00000000 --- a/requirements-test.txt +++ /dev/null @@ -1,5 +0,0 @@ -iso8601==2.1.0 -requests==2.31.0 -securesystemslib==0.31.0 -six==1.16.0 -tuf==3.1.0 diff --git a/sign/sign.go b/sign/sign.go deleted file mode 100644 index aa6d958c..00000000 --- a/sign/sign.go +++ /dev/null @@ -1,80 +0,0 @@ -package sign - -import ( - "encoding/json" - "errors" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -const maxSignatures = 1024 - -// MakeSignatures creates data.Signatures for canonical using signer k. -// -// There will be one data.Signature for each of k's IDs, each wih the same -// signature data. -func MakeSignatures(canonical []byte, k keys.Signer) ([]data.Signature, error) { - sigData, err := k.SignMessage(canonical) - if err != nil { - return nil, err - } - - ids := k.PublicData().IDs() - signatures := make([]data.Signature, 0, len(ids)) - for _, id := range ids { - signatures = append(signatures, data.Signature{ - KeyID: id, - Signature: sigData, - }) - } - - return signatures, nil -} - -// Sign signs the to-be-signed part of s using the signer k. -// -// The new signature(s) (one for each of k's key IDs) are appended to -// s.Signatures. Existing signatures for the Key IDs are replaced. -func Sign(s *data.Signed, k keys.Signer) error { - canonical, err := cjson.EncodeCanonical(s.Signed) - if err != nil { - return err - } - - size := len(s.Signatures) - if size > maxSignatures-1 { - return errors.New("value too large") - } - signatures := make([]data.Signature, 0, size+1) - for _, oldSig := range s.Signatures { - if !k.PublicData().ContainsID(oldSig.KeyID) { - signatures = append(signatures, oldSig) - } - } - - newSigs, err := MakeSignatures(canonical, k) - if err != nil { - return err - } - signatures = append(signatures, newSigs...) - - s.Signatures = signatures - return nil -} - -func Marshal(v interface{}, keys ...keys.Signer) (*data.Signed, error) { - b, err := json.Marshal(v) - if err != nil { - return nil, err - } - s := &data.Signed{Signed: b, Signatures: make([]data.Signature, 0)} - for _, k := range keys { - if err := Sign(s, k); err != nil { - return nil, err - } - - } - return s, nil -} diff --git a/util/util.go b/util/util.go deleted file mode 100644 index 049169db..00000000 --- a/util/util.go +++ /dev/null @@ -1,332 +0,0 @@ -package util - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "crypto/sha512" - "encoding/hex" - "encoding/json" - "fmt" - "hash" - "io" - "os" - "path" - "path/filepath" - "strconv" - "strings" - - "github.com/theupdateframework/go-tuf/data" -) - -type ErrWrongLength struct { - Expected int64 - Actual int64 -} - -func (e ErrWrongLength) Error() string { - return fmt.Sprintf("wrong length, expected %d got %d", e.Expected, e.Actual) -} - -type ErrWrongVersion struct { - Expected int64 - Actual int64 -} - -func (e ErrWrongVersion) Error() string { - return fmt.Sprintf("wrong version, expected %d got %d", e.Expected, e.Actual) -} - -type ErrWrongHash struct { - Type string - Expected data.HexBytes - Actual data.HexBytes -} - -func (e ErrWrongHash) Error() string { - return fmt.Sprintf("wrong %s hash, expected %s got %s", e.Type, hex.EncodeToString(e.Expected), hex.EncodeToString(e.Actual)) -} - -type ErrNoCommonHash struct { - Expected data.Hashes - Actual data.Hashes -} - -func (e ErrNoCommonHash) Error() string { - types := func(a data.Hashes) []string { - t := make([]string, 0, len(a)) - for typ := range a { - t = append(t, typ) - } - return t - } - return fmt.Sprintf("no common hash function, expected one of %s, got %s", types(e.Expected), types(e.Actual)) -} - -type ErrUnknownHashAlgorithm struct { - Name string -} - -func (e ErrUnknownHashAlgorithm) Error() string { - return fmt.Sprintf("unknown hash algorithm: %s", e.Name) -} - -type PassphraseFunc func(role string, confirm bool, change bool) ([]byte, error) - -func FileMetaEqual(actual data.FileMeta, expected data.FileMeta) error { - if actual.Length != expected.Length { - return ErrWrongLength{expected.Length, actual.Length} - } - - if err := hashEqual(actual.Hashes, expected.Hashes); err != nil { - return err - } - - return nil -} - -func BytesMatchLenAndHashes(fetched []byte, length int64, hashes data.Hashes) error { - flen := int64(len(fetched)) - if length != 0 && flen != length { - return ErrWrongLength{length, flen} - } - - for alg, expected := range hashes { - var h hash.Hash - switch alg { - case "sha256": - h = sha256.New() - case "sha512": - h = sha512.New() - default: - return ErrUnknownHashAlgorithm{alg} - } - h.Write(fetched) - hash := h.Sum(nil) - if !hmac.Equal(hash, expected) { - return ErrWrongHash{alg, expected, hash} - } - } - - return nil -} - -func hashEqual(actual data.Hashes, expected data.Hashes) error { - hashChecked := false - for typ, hash := range expected { - if h, ok := actual[typ]; ok { - hashChecked = true - if !hmac.Equal(h, hash) { - return ErrWrongHash{typ, hash, h} - } - } - } - if !hashChecked { - return ErrNoCommonHash{expected, actual} - } - return nil -} - -func VersionEqual(actual int64, expected int64) error { - if actual != expected { - return ErrWrongVersion{expected, actual} - } - return nil -} - -func SnapshotFileMetaEqual(actual data.SnapshotFileMeta, expected data.SnapshotFileMeta) error { - // TUF-1.0 no longer considers the length and hashes to be a required - // member of snapshots. However they are considering requiring hashes - // for delegated roles to avoid an attack described in Section 5.6 of - // the Mercury paper: - // https://github.com/theupdateframework/specification/pull/40 - if expected.Length != 0 && actual.Length != expected.Length { - return ErrWrongLength{expected.Length, actual.Length} - } - // 5.6.2 - Check against snapshot role's targets hash - if len(expected.Hashes) != 0 { - if err := hashEqual(actual.Hashes, expected.Hashes); err != nil { - return err - } - } - // 5.6.4 - Check against snapshot role's snapshot version - if err := VersionEqual(actual.Version, expected.Version); err != nil { - return err - } - - return nil -} - -func TargetFileMetaEqual(actual data.TargetFileMeta, expected data.TargetFileMeta) error { - return FileMetaEqual(actual.FileMeta, expected.FileMeta) -} - -func TimestampFileMetaEqual(actual data.TimestampFileMeta, expected data.TimestampFileMeta) error { - // TUF no longer considers the length and hashes to be a required - // member of Timestamp. - if expected.Length != 0 && actual.Length != expected.Length { - return ErrWrongLength{expected.Length, actual.Length} - } - // 5.5.2 - Check against timestamp role's snapshot hash - if len(expected.Hashes) != 0 { - if err := hashEqual(actual.Hashes, expected.Hashes); err != nil { - return err - } - } - // 5.5.4 - Check against timestamp role's snapshot version - if err := VersionEqual(actual.Version, expected.Version); err != nil { - return err - } - - return nil -} - -const defaultHashAlgorithm = "sha512" - -func GenerateFileMeta(r io.Reader, hashAlgorithms ...string) (data.FileMeta, error) { - if len(hashAlgorithms) == 0 { - hashAlgorithms = []string{defaultHashAlgorithm} - } - hashes := make(map[string]hash.Hash, len(hashAlgorithms)) - for _, hashAlgorithm := range hashAlgorithms { - var h hash.Hash - switch hashAlgorithm { - case "sha256": - h = sha256.New() - case "sha512": - h = sha512.New() - default: - return data.FileMeta{}, ErrUnknownHashAlgorithm{hashAlgorithm} - } - hashes[hashAlgorithm] = h - r = io.TeeReader(r, h) - } - n, err := io.Copy(io.Discard, r) - if err != nil { - return data.FileMeta{}, err - } - m := data.FileMeta{Length: n, Hashes: make(data.Hashes, len(hashes))} - for hashAlgorithm, h := range hashes { - m.Hashes[hashAlgorithm] = h.Sum(nil) - } - return m, nil -} - -type versionedMeta struct { - Version int64 `json:"version"` -} - -func generateVersionedFileMeta(r io.Reader, hashAlgorithms ...string) (data.FileMeta, int64, error) { - b, err := io.ReadAll(r) - if err != nil { - return data.FileMeta{}, 0, err - } - - m, err := GenerateFileMeta(bytes.NewReader(b), hashAlgorithms...) - if err != nil { - return data.FileMeta{}, 0, err - } - - s := data.Signed{} - if err := json.Unmarshal(b, &s); err != nil { - return data.FileMeta{}, 0, err - } - - vm := versionedMeta{} - if err := json.Unmarshal(s.Signed, &vm); err != nil { - return data.FileMeta{}, 0, err - } - - return m, vm.Version, nil -} - -func GenerateSnapshotFileMeta(r io.Reader, hashAlgorithms ...string) (data.SnapshotFileMeta, error) { - m, v, err := generateVersionedFileMeta(r, hashAlgorithms...) - if err != nil { - return data.SnapshotFileMeta{}, err - } - return data.SnapshotFileMeta{ - Length: m.Length, - Hashes: m.Hashes, - Version: v, - }, nil -} - -func GenerateTargetFileMeta(r io.Reader, hashAlgorithms ...string) (data.TargetFileMeta, error) { - m, err := GenerateFileMeta(r, hashAlgorithms...) - if err != nil { - return data.TargetFileMeta{}, err - } - return data.TargetFileMeta{ - FileMeta: m, - }, nil -} - -func GenerateTimestampFileMeta(r io.Reader, hashAlgorithms ...string) (data.TimestampFileMeta, error) { - m, v, err := generateVersionedFileMeta(r, hashAlgorithms...) - if err != nil { - return data.TimestampFileMeta{}, err - } - return data.TimestampFileMeta{ - Length: m.Length, - Hashes: m.Hashes, - Version: v, - }, nil -} - -func NormalizeTarget(p string) string { - // FIXME(TUF-0.9) TUF-1.0 is considering banning paths that begin with - // a leading path separator, to avoid surprising behavior when joining - // target and delgated paths. python-tuf raises an exception if any - // path starts with '/', but since we need to be cross compatible with - // TUF-0.9 we still need to support leading slashes. For now, we will - // just strip them out, but eventually we should also consider turning - // them into an error. - return strings.TrimPrefix(path.Join("/", p), "/") -} - -func VersionedPath(p string, version int64) string { - return path.Join(path.Dir(p), strconv.FormatInt(version, 10)+"."+path.Base(p)) -} - -func HashedPaths(p string, hashes data.Hashes) []string { - paths := make([]string, 0, len(hashes)) - for _, hash := range hashes { - hashedPath := path.Join(path.Dir(p), hash.String()+"."+path.Base(p)) - paths = append(paths, hashedPath) - } - return paths -} - -func AtomicallyWriteFile(filename string, data []byte, perm os.FileMode) error { - dir, name := filepath.Split(filename) - f, err := os.CreateTemp(dir, name) - if err != nil { - return err - } - - _, err = f.Write(data) - if err != nil { - f.Close() - os.Remove(f.Name()) - return err - } - - if err = f.Chmod(perm); err != nil { - f.Close() - os.Remove(f.Name()) - return err - } - - if err := f.Close(); err != nil { - os.Remove(f.Name()) - return err - } - - if err := os.Rename(f.Name(), filename); err != nil { - os.Remove(f.Name()) - return err - } - - return nil -} diff --git a/util/util_test.go b/util/util_test.go deleted file mode 100644 index ca691efe..00000000 --- a/util/util_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package util - -import ( - "bytes" - "crypto/sha256" - "crypto/sha512" - "encoding/hex" - "hash" - "testing" - - "github.com/theupdateframework/go-tuf/data" - . "gopkg.in/check.v1" -) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type UtilSuite struct{} - -var _ = Suite(&UtilSuite{}) - -func (UtilSuite) TestGenerateTargetFileMetaDefault(c *C) { - // default is sha512 - r := bytes.NewReader([]byte("foo")) - meta, err := GenerateTargetFileMeta(r) - c.Assert(err, IsNil) - c.Assert(meta.Length, Equals, int64(3)) - hashes := meta.Hashes - c.Assert(hashes, HasLen, 1) - hash, ok := hashes["sha512"] - if !ok { - c.Fatal("missing sha512 hash") - } - c.Assert(hash.String(), DeepEquals, "f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc6638326e282c41be5e4254d8820772c5518a2c5a8c0c7f7eda19594a7eb539453e1ed7") -} - -func (UtilSuite) TestGenerateTargetFileMetaExplicit(c *C) { - r := bytes.NewReader([]byte("foo")) - meta, err := GenerateTargetFileMeta(r, "sha256", "sha512") - c.Assert(err, IsNil) - c.Assert(meta.Length, Equals, int64(3)) - hashes := meta.Hashes - c.Assert(hashes, HasLen, 2) - for name, val := range map[string]string{ - "sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae", - "sha512": "f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc6638326e282c41be5e4254d8820772c5518a2c5a8c0c7f7eda19594a7eb539453e1ed7", - } { - hash, ok := hashes[name] - if !ok { - c.Fatalf("missing %s hash", name) - } - c.Assert(hash.String(), DeepEquals, val) - } -} - -func makeHashes(c *C, hashes map[string]string) data.Hashes { - h := make(map[string]data.HexBytes, len(hashes)) - for typ, hash := range hashes { - v, err := hex.DecodeString(hash) - c.Assert(err, IsNil) - h[typ] = v - } - return h -} - -type testMetaFile struct { - name string - actual data.FileMeta - expected data.FileMeta - err func(testMetaFile) error -} - -func testMetaFileCases(c *C) []testMetaFile { - fileMeta := func(c *C, length int64, hashes map[string]string) data.FileMeta { - return data.FileMeta{ - Length: length, - Hashes: makeHashes(c, hashes), - } - } - - return []testMetaFile{ - { - name: "wrong length", - actual: data.FileMeta{Length: 1}, - expected: data.FileMeta{Length: 2}, - err: func(testMetaFile) error { return ErrWrongLength{Actual: 1, Expected: 2} }, - }, - { - name: "wrong sha512 hash", - actual: fileMeta(c, 10, map[string]string{"sha512": "111111"}), - expected: fileMeta(c, 10, map[string]string{"sha512": "222222"}), - err: func(t testMetaFile) error { - return ErrWrongHash{"sha512", t.expected.Hashes["sha512"], t.actual.Hashes["sha512"]} - }, - }, - { - name: "intersecting hashes", - actual: fileMeta(c, 10, map[string]string{"sha512": "111111", "md5": "222222"}), - expected: fileMeta(c, 10, map[string]string{"sha512": "111111", "sha256": "333333"}), - err: func(testMetaFile) error { return nil }, - }, - { - name: "no common hashes", - actual: fileMeta(c, 10, map[string]string{"sha512": "111111"}), - expected: fileMeta(c, 10, map[string]string{"sha256": "222222", "md5": "333333"}), - err: func(t testMetaFile) error { return ErrNoCommonHash{t.expected.Hashes, t.actual.Hashes} }, - }, - } -} - -func (UtilSuite) TestSnapshotFileMetaEqual(c *C) { - type test struct { - name string - actual data.SnapshotFileMeta - expected data.SnapshotFileMeta - err func(test) error - } - - fileMeta := func(version int64, length int64, hashes map[string]string) data.SnapshotFileMeta { - return data.SnapshotFileMeta{ - Length: length, - Hashes: makeHashes(c, hashes), - Version: version, - } - } - - tests := []test{ - { - name: "same version", - actual: fileMeta(1, 10, map[string]string{"sha512": "111111"}), - expected: fileMeta(1, 10, map[string]string{"sha512": "111111"}), - err: func(test) error { return nil }, - }, - { - name: "wrong version", - actual: fileMeta(0, 10, map[string]string{"sha512": "111111"}), - expected: fileMeta(1, 10, map[string]string{"sha512": "111111"}), - err: func(test) error { return ErrWrongVersion{Expected: 1, Actual: 0} }, - }, - { - name: "wrong version", - actual: fileMeta(1, 10, map[string]string{"sha512": "111111"}), - expected: fileMeta(0, 10, map[string]string{"sha512": "111111"}), - err: func(test) error { return ErrWrongVersion{Expected: 0, Actual: 1} }, - }, - { - name: "wrong version", - actual: fileMeta(1, 10, map[string]string{"sha512": "111111"}), - expected: fileMeta(2, 10, map[string]string{"sha512": "111111"}), - err: func(test) error { return ErrWrongVersion{Expected: 2, Actual: 1} }, - }, - } - - for _, t := range tests { - c.Assert(SnapshotFileMetaEqual(t.actual, t.expected), DeepEquals, t.err(t), Commentf("name = %s", t.name)) - } - - for _, t := range testMetaFileCases(c) { - actual := data.SnapshotFileMeta{Length: t.actual.Length, Hashes: t.actual.Hashes} - expected := data.SnapshotFileMeta{Length: t.expected.Length, Hashes: t.expected.Hashes} - c.Assert(SnapshotFileMetaEqual(actual, expected), DeepEquals, t.err(t), Commentf("name = %s %d %d", t.name, t.actual.Length, t.expected.Length)) - c.Assert(FileMetaEqual(t.actual, t.expected), DeepEquals, t.err(t), Commentf("name = %s", t.name)) - } -} - -func (UtilSuite) TestNormalizeTarget(c *C) { - for before, after := range map[string]string{ - "": "", - "foo.txt": "foo.txt", - "/bar.txt": "bar.txt", - "foo//bar.txt": "foo/bar.txt", - "/with/./a/dot": "with/a/dot", - "/with/double/../dot": "with/dot", - } { - c.Assert(NormalizeTarget(before), Equals, after) - } -} - -func (UtilSuite) TestHashedPaths(c *C) { - hexBytes := func(s string) data.HexBytes { - v, err := hex.DecodeString(s) - c.Assert(err, IsNil) - return v - } - hashes := data.Hashes{ - "sha512": hexBytes("abc123"), - "sha256": hexBytes("def456"), - } - paths := HashedPaths("foo/bar.txt", hashes) - // cannot use DeepEquals as the returned order is non-deterministic - c.Assert(paths, HasLen, 2) - expected := map[string]struct{}{"foo/abc123.bar.txt": {}, "foo/def456.bar.txt": {}} - for _, path := range paths { - if _, ok := expected[path]; !ok { - c.Fatalf("unexpected path: %s", path) - } - delete(expected, path) - } -} - -func (UtilSuite) TestVersionEqual(c *C) { - c.Assert(VersionEqual(1, 1), IsNil) - c.Assert(VersionEqual(1, 3), Equals, ErrWrongVersion{3, 1}) -} - -func makeHash(b []byte, alg string) []byte { - var h hash.Hash - - switch alg { - case "sha256": - h = sha256.New() - case "sha512": - h = sha512.New() - } - h.Write(b) - return h.Sum(nil) -} - -func (UtilSuite) TestBytesMatchLenAndHashes(c *C) { - type test struct { - name string - bytes []byte - length int64 - hashes data.Hashes - err func(test) error - } - - b := []byte{82, 253, 252, 7, 33, 130, 101, 79, 22, 63, 95, 15, 154, 98, 29, 114} - bhashes := data.Hashes{ - "sha512": makeHash(b, "sha512"), - "sha256": makeHash(b, "sha256"), - } - - tests := []test{ - { - name: "correct len and hashes", - bytes: b, - length: 16, - hashes: bhashes, - err: func(test) error { return nil }, - }, - { - name: "incorrect len", - bytes: b, - length: 32, - hashes: bhashes, - err: func(test) error { return ErrWrongLength{32, 16} }, - }, - { - name: "incorrect hashes sha512", - bytes: b, - length: 16, - hashes: data.Hashes{ - "sha512": makeHash(b, "sha256"), - }, - err: func(test) error { return ErrWrongHash{"sha512", bhashes["sha256"], bhashes["sha512"]} }, - }, - { - name: "incorrect hashes sha256", - bytes: b, - length: 16, - hashes: data.Hashes{ - "sha256": makeHash(b, "sha512"), - }, - err: func(test) error { return ErrWrongHash{"sha256", bhashes["sha512"], bhashes["sha256"]} }, - }, - { - name: "incorrect len and hashes", - bytes: b, - length: 32, - hashes: data.Hashes{ - "sha512": makeHash(b, "sha256"), - "sha256": makeHash(b, "sha512"), - }, - err: func(test) error { return ErrWrongLength{32, 16} }, - }, - } - - for _, t := range tests { - c.Assert(BytesMatchLenAndHashes(t.bytes, t.length, t.hashes), DeepEquals, t.err(t), Commentf("name = %s", t.name)) - } -} diff --git a/verify/db.go b/verify/db.go deleted file mode 100644 index 04f5bf1c..00000000 --- a/verify/db.go +++ /dev/null @@ -1,104 +0,0 @@ -package verify - -import ( - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/roles" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -type Role struct { - KeyIDs map[string]struct{} - Threshold int -} - -func (r *Role) ValidKey(id string) bool { - _, ok := r.KeyIDs[id] - return ok -} - -type DB struct { - roles map[string]*Role - verifiers map[string]keys.Verifier -} - -func NewDB() *DB { - return &DB{ - roles: make(map[string]*Role), - verifiers: make(map[string]keys.Verifier), - } -} - -// NewDBFromDelegations returns a DB that verifies delegations -// of a given Targets. -func NewDBFromDelegations(d *data.Delegations) (*DB, error) { - db := &DB{ - roles: make(map[string]*Role, len(d.Roles)), - verifiers: make(map[string]keys.Verifier, len(d.Keys)), - } - for _, r := range d.Roles { - if _, ok := roles.TopLevelRoles[r.Name]; ok { - return nil, ErrInvalidDelegatedRole - } - role := &data.Role{Threshold: r.Threshold, KeyIDs: r.KeyIDs} - if err := db.AddRole(r.Name, role); err != nil { - return nil, err - } - } - for id, k := range d.Keys { - if err := db.AddKey(id, k); err != nil { - return nil, err - } - } - return db, nil -} - -func (db *DB) AddKey(id string, k *data.PublicKey) error { - verifier, err := keys.GetVerifier(k) - if err != nil { - return err // ErrInvalidKey - } - - // 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 allow any key ID, rather than checking k.ContainsID(id) - // - // AddKey should be idempotent, so we allow re-adding the same PublicKey. - // - // TAP-12: https://github.com/theupdateframework/taps/blob/master/tap12.md - if oldVerifier, exists := db.verifiers[id]; exists && oldVerifier.Public() != verifier.Public() { - return ErrRepeatID{id} - } - - db.verifiers[id] = verifier - return nil -} - -func (db *DB) AddRole(name string, r *data.Role) error { - if r.Threshold < 1 { - return ErrInvalidThreshold - } - - role := &Role{ - KeyIDs: make(map[string]struct{}), - Threshold: r.Threshold, - } - for _, id := range r.KeyIDs { - role.KeyIDs[id] = struct{}{} - } - - db.roles[name] = role - return nil -} - -func (db *DB) GetVerifier(id string) (keys.Verifier, error) { - k, ok := db.verifiers[id] - if !ok { - return nil, ErrMissingKey - } - return k, nil -} - -func (db *DB) GetRole(name string) *Role { - return db.roles[name] -} diff --git a/verify/db_test.go b/verify/db_test.go deleted file mode 100644 index 01d7a308..00000000 --- a/verify/db_test.go +++ /dev/null @@ -1,131 +0,0 @@ -package verify - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -func TestDelegationsDB(t *testing.T) { - key, err := keys.GenerateEd25519Key() - assert.Nil(t, err, "generating key failed") - var dbTests = []struct { - testName string - delegations *data.Delegations - initErr error - unmarshalErr error - }{ - { - testName: "empty state", - delegations: &data.Delegations{}, - unmarshalErr: ErrNoSignatures, - }, - { - testName: "top level role", - delegations: &data.Delegations{Roles: []data.DelegatedRole{ - {Name: "root"}, - }}, - initErr: ErrInvalidDelegatedRole, - }, - { - testName: "invalid role", - delegations: &data.Delegations{Roles: []data.DelegatedRole{ - {Threshold: 0}, - }}, - initErr: ErrInvalidThreshold, - }, - { - testName: "standard (SHA256) key IDs supported", - delegations: &data.Delegations{ - Keys: map[string]*data.PublicKey{ - key.PublicData().IDs()[0]: key.PublicData(), - }, - Roles: []data.DelegatedRole{{ - Name: "rolename", - KeyIDs: key.PublicData().IDs(), - Threshold: 1, - }, - }, - }, - // If we get to ErrNoSignatures, we've passed key loading; see - // delegations_test.go to see tests that delegation DB *fully* works - // with valid signatures set up. - unmarshalErr: ErrNoSignatures, - }, - { - testName: "arbitrary (non-SHA256, per TAP-12) key IDs supported", - delegations: &data.Delegations{ - Keys: map[string]*data.PublicKey{ - "a": key.PublicData(), - }, - Roles: []data.DelegatedRole{{ - Name: "rolename", - KeyIDs: []string{"a"}, - Threshold: 1, - }, - }, - }, - // If we get to ErrNoSignatures, we've passed key loading; see - // delegations_test.go to see tests that delegation DB *fully* works - // with valid signatures set up. - unmarshalErr: ErrNoSignatures, - }, - } - - for _, tt := range dbTests { - t.Run(tt.testName, func(t *testing.T) { - db, err := NewDBFromDelegations(tt.delegations) - assert.Equal(t, tt.initErr, err) - if err == nil { - assert.NotNil(t, db) - var targets data.Targets - err = db.Unmarshal([]byte(`{"a":"b"}`), targets, "tree", 0) - assert.Equal(t, tt.unmarshalErr, err) - } - }) - } -} - -// Test key database for compliance with TAP-12. -// -// Previously, every key's key ID was the SHA256 of the public key. TAP-12 -// allows arbitrary key IDs, with no loss in security. -// -// TAP-12: https://github.com/theupdateframework/taps/blob/master/tap12.md -func TestTAP12(t *testing.T) { - db := NewDB() - // Need to use a signer type that supports random signatures. - key1, _ := keys.GenerateRsaKey() - key2, _ := keys.GenerateRsaKey() - msg := []byte("{}") - sig1, _ := key1.SignMessage(msg) - sig1Duplicate, _ := key1.SignMessage(msg) - assert.NotEqual(t, sig1, sig1Duplicate, "Signatures should be random") - sig2, _ := key2.SignMessage(msg) - - // Idempotent: adding the same key with the same ID is okay. - assert.Nil(t, db.AddKey("key1", key1.PublicData()), "initial add") - assert.Nil(t, db.AddKey("key1", key1.PublicData()), "re-add") - // Adding a different key is allowed, unless the key ID is the same. - assert.Nil(t, db.AddKey("key2", key2.PublicData()), "different key with different ID") - assert.ErrorIs(t, db.AddKey("key1", key2.PublicData()), ErrRepeatID{"key1"}, "different key with same key ID") - assert.Nil(t, db.AddKey("key1-duplicate", key1.PublicData()), "same key with different ID should succeed") - assert.Nil(t, db.AddRole("diffkeys", &data.Role{ - KeyIDs: []string{"key1", "key2"}, - Threshold: 2, - }), "adding role") - assert.Nil(t, db.AddRole("samekeys", &data.Role{ - KeyIDs: []string{"key1", "key1-alt"}, - Threshold: 2, - }), "adding role") - assert.Nil(t, db.VerifySignatures(&data.Signed{ - Signed: msg, - Signatures: []data.Signature{{KeyID: "key1", Signature: sig1}, {KeyID: "key2", Signature: sig2}}, - }, "diffkeys"), "Signature with different keys: ") - assert.ErrorIs(t, db.VerifySignatures(&data.Signed{ - Signed: msg, - Signatures: []data.Signature{{KeyID: "key1", Signature: sig1}, {KeyID: "key1-alt", Signature: sig1Duplicate}}, - }, "samekeys"), ErrRoleThreshold{2, 1}, "Threshold signing with repeat key") -} diff --git a/verify/errors.go b/verify/errors.go deleted file mode 100644 index f71d4bda..00000000 --- a/verify/errors.go +++ /dev/null @@ -1,73 +0,0 @@ -package verify - -import ( - "errors" - "fmt" - "time" -) - -var ( - ErrMissingKey = errors.New("tuf: missing key") - ErrNoSignatures = errors.New("tuf: data has no signatures") - ErrInvalid = errors.New("tuf: signature verification failed") - ErrWrongMethod = errors.New("tuf: invalid signature type") - ErrWrongMetaType = errors.New("tuf: meta file has wrong type") - ErrExists = errors.New("tuf: key already in db") - ErrInvalidKey = errors.New("tuf: invalid key") - ErrInvalidRole = errors.New("tuf: invalid role") - ErrInvalidDelegatedRole = errors.New("tuf: invalid delegated role") - ErrInvalidKeyID = errors.New("tuf: invalid key id") - ErrInvalidThreshold = errors.New("tuf: invalid role threshold") - ErrMissingTargetFile = errors.New("tuf: missing previously listed targets metadata file") -) - -type ErrRepeatID struct { - KeyID string -} - -func (e ErrRepeatID) Error() string { - return fmt.Sprintf("tuf: duplicate key id (%s)", e.KeyID) -} - -type ErrUnknownRole struct { - Role string -} - -func (e ErrUnknownRole) Error() string { - return fmt.Sprintf("tuf: unknown role %q", e.Role) -} - -type ErrExpired struct { - Expired time.Time -} - -func (e ErrExpired) Error() string { - return fmt.Sprintf("expired at %s", e.Expired) -} - -type ErrLowVersion struct { - Actual int64 - Current int64 -} - -func (e ErrLowVersion) Error() string { - return fmt.Sprintf("version %d is lower than current version %d", e.Actual, e.Current) -} - -type ErrWrongVersion struct { - Given int64 - Expected int64 -} - -func (e ErrWrongVersion) Error() string { - return fmt.Sprintf("version %d does not match the expected version %d", e.Given, e.Expected) -} - -type ErrRoleThreshold struct { - Expected int - Actual int -} - -func (e ErrRoleThreshold) Error() string { - return "tuf: valid signatures did not meet threshold" -} diff --git a/verify/verify.go b/verify/verify.go deleted file mode 100644 index e62042ee..00000000 --- a/verify/verify.go +++ /dev/null @@ -1,187 +0,0 @@ -package verify - -import ( - "encoding/json" - "strings" - "time" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/internal/roles" - "github.com/theupdateframework/go-tuf/pkg/keys" -) - -type signedMeta struct { - Type string `json:"_type"` - Expires time.Time `json:"expires"` - Version int64 `json:"version"` -} - -// VerifySignature takes a signed JSON message, a signature, and a -// verifier and verifies the given signature on the JSON message -// using the verifier. It returns an error if verification fails. -func VerifySignature(signed json.RawMessage, sig data.HexBytes, - verifier keys.Verifier) error { - var decoded map[string]interface{} - if err := json.Unmarshal(signed, &decoded); err != nil { - return err - } - msg, err := cjson.EncodeCanonical(decoded) - if err != nil { - return err - } - return verifier.Verify(msg, sig) -} - -func (db *DB) VerifyIgnoreExpiredCheck(s *data.Signed, role string, minVersion int64) error { - if err := db.VerifySignatures(s, role); err != nil { - return err - } - - sm := &signedMeta{} - if err := json.Unmarshal(s.Signed, sm); err != nil { - return err - } - - if roles.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.EqualFold(sm.Type, role) { - return ErrWrongMetaType - } - } else { - // Delegated (non-top-level) roles may only sign targets metadata. - if strings.ToLower(sm.Type) != "targets" { - return ErrWrongMetaType - } - } - - if sm.Version < minVersion { - return ErrLowVersion{sm.Version, minVersion} - } - - return nil -} - -func (db *DB) Verify(s *data.Signed, role string, minVersion int64) error { - // Verify signatures and versions - err := db.VerifyIgnoreExpiredCheck(s, role, minVersion) - - if err != nil { - return err - } - - sm := &signedMeta{} - if err := json.Unmarshal(s.Signed, sm); err != nil { - return err - } - // Verify expiration - if IsExpired(sm.Expires) { - return ErrExpired{sm.Expires} - } - - return nil -} - -var IsExpired = func(t time.Time) bool { - return time.Until(t) <= 0 -} - -func (db *DB) VerifySignatures(s *data.Signed, role string) error { - if len(s.Signatures) == 0 { - return ErrNoSignatures - } - - roleData := db.GetRole(role) - if roleData == nil { - return ErrUnknownRole{role} - } - - // Verify that a threshold of keys signed the data. Since keys can have - // multiple key ids, we need to protect against multiple attached - // signatures that just differ on the key id. - verifiedKeyIDs := make(map[string]struct{}) - numVerifiedKeys := 0 - for _, sig := range s.Signatures { - if !roleData.ValidKey(sig.KeyID) { - continue - } - verifier, err := db.GetVerifier(sig.KeyID) - if err != nil { - continue - } - - if err := VerifySignature(s.Signed, sig.Signature, verifier); err != nil { - // If a signature fails verification, don't count it towards the - // threshold but also return early and error out immediately. - // Note: Because of this, it is impossible to distinguish between - // an error of an invalid signature and a threshold not achieved. - // Invalid signatures lead to not achieving the threshold. - continue - } - - // Only consider this key valid if we haven't seen any of it's - // key ids before. - // Careful: we must not rely on the key IDs _declared in the file_, - // instead we get to decide what key IDs this key correspond to. - // XXX dangerous; better stop supporting multiple key IDs altogether. - keyIDs := verifier.MarshalPublicKey().IDs() - wasKeySeen := false - for _, keyID := range keyIDs { - if _, present := verifiedKeyIDs[keyID]; present { - wasKeySeen = true - } - } - if !wasKeySeen { - for _, id := range keyIDs { - verifiedKeyIDs[id] = struct{}{} - } - - numVerifiedKeys++ - } - } - if numVerifiedKeys < roleData.Threshold { - return ErrRoleThreshold{roleData.Threshold, numVerifiedKeys} - } - - return nil -} - -func (db *DB) Unmarshal(b []byte, v interface{}, role string, minVersion int64) error { - s := &data.Signed{} - if err := json.Unmarshal(b, s); err != nil { - return err - } - if err := db.Verify(s, role, minVersion); err != nil { - return err - } - return json.Unmarshal(s.Signed, v) -} - -// UnmarshalExpired is exactly like Unmarshal except ignores expired timestamp error. -func (db *DB) UnmarshalIgnoreExpired(b []byte, v interface{}, role string, minVersion int64) error { - s := &data.Signed{} - if err := json.Unmarshal(b, s); err != nil { - return err - } - // Note: If verification fails, then we wont attempt to unmarshal - // unless when verification error is errExpired. - verifyErr := db.Verify(s, role, minVersion) - if verifyErr != nil { - if _, ok := verifyErr.(ErrExpired); !ok { - return verifyErr - } - } - return json.Unmarshal(s.Signed, v) -} - -func (db *DB) UnmarshalTrusted(b []byte, v interface{}, role string) error { - s := &data.Signed{} - if err := json.Unmarshal(b, s); err != nil { - return err - } - if err := db.VerifySignatures(s, role); err != nil { - return err - } - return json.Unmarshal(s.Signed, v) -} diff --git a/verify/verify_test.go b/verify/verify_test.go deleted file mode 100644 index 191c1ed0..00000000 --- a/verify/verify_test.go +++ /dev/null @@ -1,302 +0,0 @@ -package verify - -import ( - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/sha256" - "encoding/json" - "errors" - "testing" - "time" - - "github.com/theupdateframework/go-tuf/data" - "github.com/theupdateframework/go-tuf/pkg/keys" - "github.com/theupdateframework/go-tuf/sign" - "golang.org/x/crypto/ed25519" - - . "gopkg.in/check.v1" -) - -// Hook up gocheck into the "go test" runner. -func Test(t *testing.T) { TestingT(t) } - -type VerifySuite struct{} - -var _ = Suite(&VerifySuite{}) - -type ecdsaSigner struct { - *ecdsa.PrivateKey -} - -type ecdsaPublic struct { - PublicKey *keys.PKIXPublicKey `json:"public"` -} - -func (s ecdsaSigner) PublicData() *data.PublicKey { - keyValBytes, _ := json.Marshal(ecdsaPublic{PublicKey: &keys.PKIXPublicKey{PublicKey: s.Public()}}) - return &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} - -func (s ecdsaSigner) SignMessage(message []byte) ([]byte, error) { - hash := sha256.Sum256(message) - return s.PrivateKey.Sign(rand.Reader, hash[:], crypto.SHA256) -} - -func (s ecdsaSigner) ContainsID(id string) bool { - return s.PublicData().ContainsID(id) -} - -func (ecdsaSigner) MarshalPrivateKey() (*data.PrivateKey, error) { - return nil, errors.New("not implemented for test") -} - -func (ecdsaSigner) UnmarshalPrivateKey(key *data.PrivateKey) error { - return errors.New("not implemented for test") -} - -func (VerifySuite) Test(c *C) { - type test struct { - name string - keys []*data.PublicKey - roles map[string]*data.Role - s *data.Signed - ver int64 - exp *time.Time - typ string - role string - err error - mut func(*test) - } - - expiredTime := time.Now().Add(-time.Hour) - minVer := int64(10) - tests := []test{ - { - name: "no signatures", - mut: func(t *test) { t.s.Signatures = []data.Signature{} }, - err: ErrNoSignatures, - }, - { - name: "unknown role", - role: "foo", - err: ErrUnknownRole{"foo"}, - }, - { - // It is impossible to distinguish between an error of an invalid - // signature and a threshold not achieved. Invalid signatures lead - // to not achieving the threshold. - name: "signature wrong length", - mut: func(t *test) { t.s.Signatures[0].Signature = []byte{0} }, - err: ErrRoleThreshold{1, 0}, - }, - { - name: "key missing from role", - mut: func(t *test) { t.roles["root"].KeyIDs = nil }, - err: ErrRoleThreshold{1, 0}, - }, - { - name: "invalid signature", - mut: func(t *test) { t.s.Signatures[0].Signature = make([]byte, ed25519.SignatureSize) }, - err: ErrRoleThreshold{1, 0}, - }, - { - name: "enough signatures with extra invalid signature", - mut: func(t *test) { - t.s.Signatures = append(t.s.Signatures, data.Signature{ - KeyID: t.s.Signatures[0].KeyID, - Signature: make([]byte, ed25519.SignatureSize)}) - }, - }, - { - name: "not enough signatures", - mut: func(t *test) { t.roles["root"].Threshold = 2 }, - err: ErrRoleThreshold{2, 1}, - }, - { - name: "exactly enough signatures", - }, - { - name: "more than enough signatures", - mut: func(t *test) { - k, _ := keys.GenerateEd25519Key() - sign.Sign(t.s, k) - t.keys = append(t.keys, k.PublicData()) - t.roles["root"].KeyIDs = append(t.roles["root"].KeyIDs, k.PublicData().IDs()...) - }, - }, - { - name: "duplicate key id", - mut: func(t *test) { - t.roles["root"].Threshold = 2 - t.s.Signatures = append(t.s.Signatures, t.s.Signatures[0]) - }, - err: ErrRoleThreshold{2, 1}, - }, - { - name: "unknown key", - mut: func(t *test) { - k, _ := keys.GenerateEd25519Key() - sign.Sign(t.s, k) - }, - }, - { - name: "unknown key below threshold", - mut: func(t *test) { - k, _ := keys.GenerateEd25519Key() - sign.Sign(t.s, k) - t.roles["root"].Threshold = 2 - }, - err: ErrRoleThreshold{2, 1}, - }, - { - name: "unknown keys in db", - mut: func(t *test) { - k, _ := keys.GenerateEd25519Key() - sign.Sign(t.s, k) - t.keys = append(t.keys, k.PublicData()) - }, - }, - { - name: "unknown keys in db below threshold", - mut: func(t *test) { - k, _ := keys.GenerateEd25519Key() - sign.Sign(t.s, k) - t.keys = append(t.keys, k.PublicData()) - t.roles["root"].Threshold = 2 - }, - err: ErrRoleThreshold{2, 1}, - }, - { - name: "wrong type", - typ: "bar", - err: ErrWrongMetaType, - }, - { - name: "low version", - ver: minVer - 1, - err: ErrLowVersion{minVer - 1, minVer}, - }, - { - name: "expired", - exp: &expiredTime, - err: ErrExpired{expiredTime}, - }, - { - name: "valid ecdsa signature", - mut: func(t *test) { - k, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - s := ecdsaSigner{k} - sign.Sign(t.s, s) - t.s.Signatures = t.s.Signatures[1:] - t.keys = []*data.PublicKey{s.PublicData()} - t.roles["root"].KeyIDs = s.PublicData().IDs() - }, - }, - { - // The threshold is still achieved. - name: "invalid second ecdsa signature", - mut: func(t *test) { - k, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - s := ecdsaSigner{k} - sign.Sign(t.s, s) - t.s.Signatures[1].Signature[0]++ - t.keys = append(t.keys, s.PublicData()) - t.roles["root"].KeyIDs = append(t.roles["root"].KeyIDs, s.PublicData().IDs()...) - }, - }, - } - for _, t := range tests { - if t.role == "" { - t.role = "root" - } - if t.ver == 0 { - t.ver = minVer - } - if t.exp == nil { - expires := time.Now().Add(time.Hour) - t.exp = &expires - } - if t.typ == "" { - t.typ = t.role - } - if t.keys == nil && t.s == nil { - k, _ := keys.GenerateEd25519Key() - t.s, _ = sign.Marshal(&signedMeta{Type: t.typ, Version: t.ver, Expires: *t.exp}, k) - t.keys = []*data.PublicKey{k.PublicData()} - } - if t.roles == nil { - t.roles = map[string]*data.Role{ - "root": { - KeyIDs: t.keys[0].IDs(), - Threshold: 1, - }, - } - } - if t.mut != nil { - t.mut(&t) - } - - db := NewDB() - for _, k := range t.keys { - for _, id := range k.IDs() { - err := db.AddKey(id, k) - c.Assert(err, IsNil) - } - } - for n, r := range t.roles { - err := db.AddRole(n, r) - c.Assert(err, IsNil) - } - - err := db.Verify(t.s, t.role, minVer) - if e, ok := t.err.(ErrExpired); ok { - assertErrExpired(c, err, e) - } else { - c.Assert(err, DeepEquals, t.err, Commentf("name = %s", t.name)) - } - } -} - -func (VerifySuite) TestVerifyIgnoreExpired(c *C) { - minVer := int64(10) - role := "root" - k, _ := keys.GenerateEd25519Key() - s, _ := sign.Marshal(&signedMeta{Type: role, Version: minVer, Expires: time.Now().Add(-time.Hour)}, k) - keys := []*data.PublicKey{k.PublicData()} - roles := map[string]*data.Role{ - "root": { - KeyIDs: keys[0].IDs(), - Threshold: 1, - }, - } - - db := NewDB() - for _, k := range keys { - for _, id := range k.IDs() { - err := db.AddKey(id, k) - c.Assert(err, IsNil) - } - } - for n, r := range roles { - err := db.AddRole(n, r) - c.Assert(err, IsNil) - } - - err := db.VerifyIgnoreExpiredCheck(s, role, minVer) - c.Assert(err, IsNil) -} - -func assertErrExpired(c *C, err error, expected ErrExpired) { - actual, ok := err.(ErrExpired) - if !ok { - c.Fatalf("expected err to have type ErrExpired, got %T", err) - } - c.Assert(actual.Expired.Unix(), Equals, expected.Expired.Unix()) -} From 2f22f0a4b9104866dedc2bc533a41181fda8cc28 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 14 Nov 2022 23:51:41 +0200 Subject: [PATCH 002/208] Initial commit Signed-off-by: Radoslav Dimitrov --- NOTES.md | 10 + README.md | 72 ++++ examples/basic_repo.go | 462 ++++++++++++++++++++++++ examples/testdata/1.python-scripts.json | 22 ++ examples/testdata/1.root.json | 83 +++++ examples/testdata/1.snapshot.json | 19 + examples/testdata/1.targets.json | 22 ++ examples/testdata/2.root.json | 87 +++++ examples/testdata/2.snapshot.json | 22 ++ examples/testdata/2.targets.json | 39 ++ examples/testdata/timestamp.json | 19 + go.mod | 31 ++ go.sum | 75 ++++ metadata/helpers.go | 131 +++++++ metadata/keys.go | 291 +++++++++++++++ metadata/metadata.go | 351 ++++++++++++++++++ metadata/types.go | 123 +++++++ repo/repo.go | 60 +++ 18 files changed, 1919 insertions(+) create mode 100644 NOTES.md create mode 100644 README.md create mode 100644 examples/basic_repo.go create mode 100755 examples/testdata/1.python-scripts.json create mode 100755 examples/testdata/1.root.json create mode 100755 examples/testdata/1.snapshot.json create mode 100755 examples/testdata/1.targets.json create mode 100755 examples/testdata/2.root.json create mode 100755 examples/testdata/2.snapshot.json create mode 100755 examples/testdata/2.targets.json create mode 100755 examples/testdata/timestamp.json create mode 100644 go.mod create mode 100644 go.sum create mode 100644 metadata/helpers.go create mode 100644 metadata/keys.go create mode 100644 metadata/metadata.go create mode 100644 metadata/types.go create mode 100644 repo/repo.go diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 00000000..70946fe2 --- /dev/null +++ b/NOTES.md @@ -0,0 +1,10 @@ +# Notes + +* Check fuzzing - https://go.dev/doc/tutorial/fuzz +* Add the option to set custom key ID +* Add creating a metadata from init struct +* Support for hashbin delegations and succint roles +* Make sure to not discard custom fields when converting, i.e. for keys and such +* Verify and fix how rsa and ecdsa keys are stored +* Revisit the design - should we use generics or just 4 different structs for each metadata type? +* Investigate whether depending on `sigstore/signatures` can cause dependency cycle and if so, how to avoid it? diff --git a/README.md b/README.md new file mode 100644 index 00000000..3602e0e2 --- /dev/null +++ b/README.md @@ -0,0 +1,72 @@ +# TUF A Framework for Securing Software Update Systems +---------------------------- +[The Update Framework (TUF)](https://theupdateframework.io/) is a framework for +secure content delivery and updates. It protects against various types of +supply chain attacks and provides resilience to compromise. + +NGO-TUF is started from the idea of providing a Go implementation of TUF that is heavily influenced by the +design decisions made in [python-tuf](https://github.com/theupdateframework/python-tuf). + +About The Update Framework +-------------------------- +The Update Framework (TUF) design helps developers maintain the security of a +software update system, even against attackers that compromise the repository +or signing keys. +TUF provides a flexible +[specification](https://github.com/theupdateframework/specification/blob/master/tuf-spec.md) +defining functionality that developers can use in any software update system or +re-implement to fit their needs. + +TUF is hosted by the [Linux Foundation](https://www.linuxfoundation.org/) as +part of the [Cloud Native Computing Foundation](https://www.cncf.io/) (CNCF) +and its design is [used in production](https://theupdateframework.io/adoptions/) +by various tech companies and open source organizations. + +Please see [TUF's website](https://theupdateframework.com/) for more information about TUF! + +How to use it +------------- +See the [basic_repo.go](examples/basic_repo.go) example which demonstrates how to *manually* create and +maintain repository metadata using the low-level Metadata API. + +The example highlights the following functionality supported by the metadata API: + +* creation of top-level metadata +* target file handling +* consistent snapshots +* key management +* top-level delegation and signing thresholds +* metadata verification +* target delegation +* in-band and out-of-band metadata signing +* writing and reading metadata files +* root key rotation + +Roadmap +------------- +[x] Bootstrap a metadata API implementation + +[x] Recreate the `basic_repo.py` example + +[] Verify the metadata API is complete + +[] Implement a client (standalone package built on top of metadata, to be split into several other parts) + +[] Implement a repository (standalone package built on top of metadata, to be split into several other parts) + +Documentation +------------- +* [Introduction to TUF's Design](https://theupdateframework.io/overview/) +* [The TUF Specification](https://theupdateframework.github.io/specification/latest/) + +Contact +------- +Questions, feedback, and suggestions are welcomed on the [#tuf] +(https://cloud-native.slack.com/archives/C8NMD3QJ3) channel on +[CNCF Slack](https://slack.cncf.io/). + +We strive to make the specification easy to implement, so if you come across +any inconsistencies or experience any difficulty, do let us know by sending an +email, or by reporting an issue in the GitHub [specification +repo](https://github.com/theupdateframework/specification/issues). + diff --git a/examples/basic_repo.go b/examples/basic_repo.go new file mode 100644 index 00000000..42e70544 --- /dev/null +++ b/examples/basic_repo.go @@ -0,0 +1,462 @@ +package main + +import ( + "crypto" + "fmt" + "os" + "path/filepath" + "time" + + "github.com/rdimitrov/ngo-tuf/metadata" + "github.com/rdimitrov/ngo-tuf/repo" + "github.com/sigstore/sigstore/pkg/signature" + "golang.org/x/crypto/ed25519" +) + +// A TUF repository example using the low-level TUF Metadata API. + +// The example code in this file demonstrates how to *manually* create and +// maintain repository metadata using the low-level Metadata API. +// Contents: +// * creation of top-level metadata +// * target file handling +// * consistent snapshots +// * key management +// * top-level delegation and signing thresholds +// * metadata verification +// * target delegation +// * in-band and out-of-band metadata signing +// * writing and reading metadata files +// * root key rotation + +// NOTE: Metadata files will be written to a 'tmp*'-directory in CWD. + +func main() { + // Create top-level metadata + // ========================= + // Every TUF repository has at least four roles, i.e. the top-level roles + // 'targets', 'snapshot', 'timestamp' and 'root'. Below we will discuss their + // purpose, show how to create the corresponding metadata, and how to use them + // to provide integrity, consistency and freshness for the files TUF aims to + // protect, i.e. target files. + + // Define containers for metadata objects and cryptographic keys created below. This + // allows us to sign and write metadata in a batch more easily. + roles := repo.New() + keys := map[string]ed25519.PrivateKey{} + + // Targets (integrity) + // ------------------- + // The targets role guarantees integrity for the files that TUF aims to protect, + // i.e. target files. It does so by listing the relevant target files, along + // with their hash and length. + targets := metadata.Targets(helperExpireIn(7)) + roles.SetTargets("targets", targets) + + // For the purpose of this example we use the top-level targets role to protect + // the integrity of this very example script. The metadata entry contains the + // hash and length of this file at the local path. In addition, it specifies the + // 'target path', which a client uses to locate the target file relative to a + // configured mirror base URL. + // |----base URL---||-----target path-----| + // e.g. tuf-examples.org/examples/basic_repo.py + targetPath, localPath := helperGetPathForTarget("basic_repo.go") + targetFileInfo, err := metadata.TargetFile().FromFile(targetPath, localPath) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "generating target file info failed", err)) + } + targets.Signed.Targets[targetPath] = *targetFileInfo + // Snapshot (consistency) + // ---------------------- + // The snapshot role guarantees consistency of the entire repository. It does so + // by listing all available targets metadata files at their latest version. This + // becomes relevant, when there are multiple targets metadata files in a + // repository and we want to protect the client against mix-and-match attacks. + snapshot := metadata.Snapshot(helperExpireIn(7)) + roles.SetSnapshot(snapshot) + // Timestamp (freshness) + // --------------------- + // The timestamp role guarantees freshness of the repository metadata. It does + // so by listing the latest snapshot (which in turn lists all the latest + // targets) metadata. A short expiration interval requires the repository to + // regularly issue new timestamp metadata and thus protects the client against + // freeze attacks. + // Note that snapshot and timestamp use the same generic wireline metadata + // format. + timestamp := metadata.Timestamp(helperExpireIn(1)) + roles.SetTimestamp(timestamp) + + // Root (root of trust) + // -------------------- + // The root role serves as root of trust for all top-level roles, including + // itself. It does so by mapping cryptographic keys to roles, i.e. the keys that + // are authorized to sign any top-level role metadata, and signing thresholds, + // i.e. how many authorized keys are required for a given role (see 'roles' + // field). This is called top-level delegation. + + // In addition, root provides all public keys to verify these signatures (see + // 'keys' field), and a configuration parameter that describes whether a + // repository uses consistent snapshots (see section 'Persist metadata' below + // for more details). + + // Create root metadata object + root := metadata.Root(helperExpireIn(365)) + roles.SetRoot(root) + + // For this example, we generate one private key of type 'ed25519' for each top-level role + for _, name := range []string{"targets", "snapshot", "timestamp", "root"} { + _, private, err := ed25519.GenerateKey(nil) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + } + keys[name] = private + key, err := metadata.KeyFromPublicKey(private.Public()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + } + err = roles.Root().Signed.AddKey(key, name) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "adding key to root failed", err)) + } + } + // NOTE: We only need the public part to populate root, so it is possible to use + // out-of-band mechanisms to generate key pairs and only expose the public part + // to whoever maintains the root role. As a matter of fact, the very purpose of + // signature thresholds is to avoid having private keys all in one place. + + // Signature thresholds + // -------------------- + // Given the importance of the root role, it is highly recommended to require a + // threshold of multiple keys to sign root metadata. For this example we + // generate another root key (you can pretend it's out-of-band) and increase the + // required signature threshold. + _, anotherRootKey, err := ed25519.GenerateKey(nil) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + } + // TODO: Extend the example to showcase a mixture of keys, i.e. + // anotherRootKey, _ := rsa.GenerateKey(rand.Reader, 2048) + // anotherRootKey, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + + anotherKey, err := metadata.KeyFromPublicKey(anotherRootKey.Public()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + } + err = roles.Root().Signed.AddKey(anotherKey, "root") + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "adding another key to root failed", err)) + } + roles.Root().Signed.Roles["root"].Threshold = 2 + + // Sign top-level metadata (in-band) + // ================================= + // In this example we have access to all top-level signing keys, so we can use + // them to create and add a signature for each role metadata. + for _, name := range []string{"targets", "snapshot", "timestamp", "root"} { + key := keys[name] + signer, err := signature.LoadSigner(key, crypto.Hash(0)) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + } + switch name { + case "targets": + _, err = roles.Targets("targets").Sign(signer) + case "snapshot": + _, err = roles.Snapshot().Sign(signer) + case "timestamp": + _, err = roles.Timestamp().Sign(signer) + case "root": + _, err = roles.Root().Sign(signer) + } + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "metadata signing failed", err)) + } + } + + // Persist metadata (consistent snapshot) + // ====================================== + // It is time to publish the first set of metadata for a client to safely + // download the target file that we have registered for this example repository. + + // For the purpose of this example we will follow the consistent snapshot naming + // convention for all metadata. This means that each metadata file, must be + // prefixed with its version number, except for timestamp. The naming convention + // also affects the target files, but we don't cover this in the example. See + // the TUF specification for more details: + // https://theupdateframework.github.io/specification/latest/#writing-consistent-snapshots + + // Also note that the TUF specification does not mandate a wireline format. In + // this demo we use a non-compact JSON format and store all metadata in + // temporary directory at CWD for review. + cwd, err := os.Getwd() + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "getting cwd failed", err)) + } + tmpDir, err := os.MkdirTemp(cwd, "tmp") + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "creating a temporary folder failed", err)) + } + + for _, name := range []string{"targets", "snapshot", "timestamp", "root"} { + switch name { + case "targets": + filename := fmt.Sprintf("%d.%s.json", roles.Targets("targets").Signed.Version, name) + err = roles.Targets("targets").ToFile(filepath.Join(tmpDir, filename), true) + case "snapshot": + filename := fmt.Sprintf("%d.%s.json", roles.Snapshot().Signed.Version, name) + err = roles.Snapshot().ToFile(filepath.Join(tmpDir, filename), true) + case "timestamp": + filename := fmt.Sprintf("%s.json", name) + err = roles.Timestamp().ToFile(filepath.Join(tmpDir, filename), true) + case "root": + filename := fmt.Sprintf("%d.%s.json", roles.Root().Signed.Version, name) + err = roles.Root().ToFile(filepath.Join(tmpDir, filename), true) + } + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "saving metadata to file failed", err)) + } + } + + // Threshold signing (out-of-band) + // =============================== + // As mentioned above, using signature thresholds usually entails that not all + // signing keys for a given role are in the same place. Let's briefly pretend + // this is the case for the second root key we registered above, and we are now + // on that key owner's computer. All the owner has to do is read the metadata + // file, sign it, and write it back to the same file, and this can be repeated + // until the threshold is satisfied. + outofbandRoot, err := metadata.Root().FromFile(filepath.Join(tmpDir, "1.root.json")) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading root metadata from file failed", err)) + } + outofbandSigner, err := signature.LoadSigner(anotherRootKey, crypto.Hash(0)) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + } + _, err = outofbandRoot.Sign(outofbandSigner) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + } + err = outofbandRoot.ToFile(filepath.Join(tmpDir, "1.root.json"), true) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "saving root metadata to file failed", err)) + } + + // Verify that metadata is signed correctly + // ==================================== + // Verify root + err = outofbandRoot.VerifyDelegate("root", outofbandRoot) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying root metadata failed", err)) + } + + // Verify targets + err = outofbandRoot.VerifyDelegate("targets", roles.Targets("targets")) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying targets metadata failed", err)) + } + + // Verify snapshot + err = outofbandRoot.VerifyDelegate("snapshot", roles.Snapshot()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying snapshot metadata failed", err)) + } + + // Verify timestamp + err = outofbandRoot.VerifyDelegate("timestamp", roles.Timestamp()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying timestamp metadata failed", err)) + } + + // Targets delegation + // ================== + // Similar to how the root role delegates responsibilities about integrity, + // consistency and freshness to the corresponding top-level roles, a targets + // role may further delegate its responsibility for target files (or a subset + // thereof) to other targets roles. This allows creation of a granular trust + // hierarchy, and further reduces the impact of a single role compromise. + + // In this example the top-level targets role trusts a new "go-scripts" + // targets role to provide integrity for any target file that ends with ".go". + delegateeName := "go-scripts" + _, delegateePrivateKey, err := ed25519.GenerateKey(nil) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + } + keys[delegateeName] = delegateePrivateKey + + // Delegatee + // --------- + // Create a new targets role, akin to how we created top-level targets above, and + // add target file info from above according to the delegatee's responsibility. + delegatee := metadata.Targets(helperExpireIn(7)) + delegatee.Signed.Targets[targetPath] = *targetFileInfo + roles.SetTargets(delegateeName, delegatee) + + // Delegator + // --------- + // Akin to top-level delegation, the delegator expresses its trust in the + // delegatee by authorizing a threshold of cryptographic keys to provide + // signatures for the delegatee metadata. It also provides the corresponding + // public key store. + // The delegation info defined by the delegator further requires the provision + // of a unique delegatee name and constraints about the target files the + // delegatee is responsible for, e.g. a list of path patterns. For details about + // all configuration parameters see + // https://theupdateframework.github.io/specification/latest/#delegations + delegateeKey, _ := metadata.KeyFromPublicKey(delegateePrivateKey.Public()) + roles.Targets("targets").Signed.Delegations = &metadata.Delegations{ + Keys: map[string]*metadata.Key{ + delegateeKey.ID(): delegateeKey, + }, + Roles: []metadata.DelegatedRole{ + { + Name: delegateeName, + KeyIDs: []string{delegateeKey.ID()}, + Threshold: 1, + Terminating: true, + Paths: []string{"*.go"}, + }, + }, + } + + // Remove target file info from top-level targets (delegatee is now responsible) + delete(roles.Targets("targets").Signed.Targets, targetPath) + + // Increase expiry (delegators should be less volatile) + roles.Targets("targets").Signed.Expires = helperExpireIn(365) + + // Snapshot + Timestamp + Sign + Persist + // ------------------------------------- + // In order to publish a new consistent set of metadata, we need to update + // dependent roles (snapshot, timestamp) accordingly, bumping versions of all + // changed metadata. + + // Bump targets version + roles.Targets("targets").Signed.Version += 1 + + // Update snapshot to account for changed and new targets(delegatee) metadata + roles.Snapshot().Signed.Meta["targets.json"] = *metadata.MetaFile(roles.Targets("targets").Signed.Version) + roles.Snapshot().Signed.Meta[delegateeName] = *metadata.MetaFile(1) + roles.Snapshot().Signed.Version += 1 + + // Update timestamp to account for changed snapshot metadata + roles.Timestamp().Signed.Meta["snapshot.json"] = *metadata.MetaFile(roles.Snapshot().Signed.Version) + roles.Timestamp().Signed.Version += 1 + + // Sign and write metadata for all changed roles, i.e. all but root + for _, name := range []string{"targets", "snapshot", "timestamp", delegateeName} { + key := keys[name] + signer, err := signature.LoadSigner(key, crypto.Hash(0)) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + } + switch name { + case "targets": + roles.Targets("targets").ClearSignatures() + _, err = roles.Targets("targets").Sign(signer) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + } + filename := fmt.Sprintf("%d.%s.json", roles.Targets("targets").Signed.Version, name) + err = roles.Targets("targets").ToFile(filepath.Join(tmpDir, filename), true) + case "snapshot": + roles.Snapshot().ClearSignatures() + _, err = roles.Snapshot().Sign(signer) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + } + filename := fmt.Sprintf("%d.%s.json", roles.Snapshot().Signed.Version, name) + err = roles.Snapshot().ToFile(filepath.Join(tmpDir, filename), true) + case "timestamp": + roles.Timestamp().ClearSignatures() + _, err = roles.Timestamp().Sign(signer) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + } + filename := fmt.Sprintf("%s.json", name) + err = roles.Timestamp().ToFile(filepath.Join(tmpDir, filename), true) + case delegateeName: + roles.Targets(delegateeName).ClearSignatures() + _, err = roles.Targets(delegateeName).Sign(signer) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + } + filename := fmt.Sprintf("%d.%s.json", roles.Targets(delegateeName).Signed.Version, name) + err = roles.Targets(delegateeName).ToFile(filepath.Join(tmpDir, filename), true) + } + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "saving metadata to file failed", err)) + } + } + + // Root key rotation (recover from a compromise / key loss) + // ======================================================== + // TUF makes it easy to recover from a key compromise in-band. Given the trust + // hierarchy through top-level and targets delegation you can easily + // replace compromised or lost keys for any role using the delegating role, even + // for the root role. + // However, since root authorizes its own keys, it always has to be signed with + // both the threshold of keys from the previous version and the threshold of + // keys from the new version. This establishes a trusted line of continuity. + + // In this example we will replace a root key, and sign a new version of root + // with the threshold of old and new keys. Since one of the previous root keys + // remains in place, it can be used to count towards the old and new threshold. + _, newRootKey, err := ed25519.GenerateKey(nil) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + } + oldRootKey, err := metadata.KeyFromPublicKey(keys["root"].Public()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + } + err = roles.Root().Signed.RevokeKey(oldRootKey.ID(), "root") + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "revoking key failed", err)) + } + // Add new key for root + newRootKeyTUF, err := metadata.KeyFromPublicKey(newRootKey.Public()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + } + err = roles.Root().Signed.AddKey(newRootKeyTUF, "root") + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "adding key to root failed", err)) + } + roles.Root().Signed.Version += 1 + roles.Root().ClearSignatures() + + // Sign root + for _, k := range []ed25519.PrivateKey{keys["root"], anotherRootKey, newRootKey} { + signer, err := signature.LoadSigner(k, crypto.Hash(0)) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + } + _, err = roles.Root().Sign(signer) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + } + } + filename := fmt.Sprintf("%d.%s.json", roles.Root().Signed.Version, "root") + err = roles.Root().ToFile(filepath.Join(tmpDir, filename), true) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "saving root to file failed", err)) + } + fmt.Println("Done! Metadata files location:", tmpDir) +} + +// helperExpireIn returns time offset by days +func helperExpireIn(days int) time.Time { + return time.Now().AddDate(0, 0, days).UTC() +} + +// helperGetPathForTarget returns local and target paths for target +func helperGetPathForTarget(name string) (string, string) { + cwd, err := os.Getwd() + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "getting cwd failed", err)) + } + _, dir := filepath.Split(cwd) + return filepath.Join(dir, name), filepath.Join(cwd, name) +} diff --git a/examples/testdata/1.python-scripts.json b/examples/testdata/1.python-scripts.json new file mode 100755 index 00000000..6b166923 --- /dev/null +++ b/examples/testdata/1.python-scripts.json @@ -0,0 +1,22 @@ +{ + "signatures": [ + { + "keyid": "322cf964acb4d34e57a7cd2ddfbdc75583a2baba04446338aea15febc4249c87", + "sig": "98b3dfed196e52b273cd44ef1367cb8dde0698a90e4d645fba7f2efa987e762d85645732d281d38f18f5f07af9287da69201b5f727555fcc8762a84cf7606a03" + } + ], + "signed": { + "_type": "targets", + "expires": "2022-11-28T17:14:43Z", + "spec_version": "1.0.30", + "targets": { + "repo_example/basic_repo.py": { + "hashes": { + "sha256": "f29be71d9f3e83945e5bc7ea5a187338e1a5a2ec5bb746481aa6faa59ebaf40e" + }, + "length": 14721 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/examples/testdata/1.root.json b/examples/testdata/1.root.json new file mode 100755 index 00000000..d81681a7 --- /dev/null +++ b/examples/testdata/1.root.json @@ -0,0 +1,83 @@ +{ + "signatures": [ + { + "keyid": "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142", + "sig": "e3a62de4dfc0b5b99b6ab4ef4060e54524e3bd2aed57bef9b54c3142d6f594e2094d9735c775f833c254f870c035e9c8622955defa4cefc130cb4a240959c50c" + }, + { + "keyid": "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5", + "sig": "7b0510b458e62bae4025632d7d60ec7a7fed98efbafb819ac40ead5bd70154bddf384385554dd2e4a609c163107cd3a0486c6cfa4bf5b68000bd81c2fd4d860b" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2023-11-21T17:14:43Z", + "keys": { + "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5": { + "keytype": "ed25519", + "keyval": { + "public": "0b470699f4ab18651379cb4916aaab55202ddf361b8476055280c437c60a3261" + }, + "scheme": "ed25519" + }, + "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5": { + "keytype": "ed25519", + "keyval": { + "public": "d3e4315f1ef5716b055573a09e85664c6c06191e7c3a005e2ffd87aeab6b6824" + }, + "scheme": "ed25519" + }, + "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed": { + "keytype": "ed25519", + "keyval": { + "public": "e026bf3eb3b73eb9e4e2376823478acb2edcc64326eaaa0ee7dac16b52e0f925" + }, + "scheme": "ed25519" + }, + "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142": { + "keytype": "ed25519", + "keyval": { + "public": "1d3da289035d44600cb74be0645e7c3f9fc8758038d602bf29d674110cc526f6" + }, + "scheme": "ed25519" + }, + "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd": { + "keytype": "ed25519", + "keyval": { + "public": "3a2c095be6f5d3a61581eeb5c2deb08c88e6c89831a065d0088e244accf4bdad" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142", + "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5" + ], + "threshold": 2 + }, + "snapshot": { + "keyids": [ + "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.30", + "version": 1 + } +} \ No newline at end of file diff --git a/examples/testdata/1.snapshot.json b/examples/testdata/1.snapshot.json new file mode 100755 index 00000000..c95e7ab4 --- /dev/null +++ b/examples/testdata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5", + "sig": "ce880634087e5cdd37967b7fe3ae74c5b0d757c8ad00c67d83ffa88e438db7a26f0cfd83dfd27042e88e116045b81be81b184356598f43e4951392680d8bb80b" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2022-11-28T17:14:43Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.30", + "version": 1 + } +} \ No newline at end of file diff --git a/examples/testdata/1.targets.json b/examples/testdata/1.targets.json new file mode 100755 index 00000000..5c095c8b --- /dev/null +++ b/examples/testdata/1.targets.json @@ -0,0 +1,22 @@ +{ + "signatures": [ + { + "keyid": "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed", + "sig": "cdfb73a25173d87701dcefd8ffdfc08acb86e190f31ac59b11dbbea9e03fcec1603904a7c7306af496e24f397664d373c960e46a80ed3d3570647a19bd981202" + } + ], + "signed": { + "_type": "targets", + "expires": "2022-11-28T17:14:43Z", + "spec_version": "1.0.30", + "targets": { + "repo_example/basic_repo.py": { + "hashes": { + "sha256": "f29be71d9f3e83945e5bc7ea5a187338e1a5a2ec5bb746481aa6faa59ebaf40e" + }, + "length": 14721 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/examples/testdata/2.root.json b/examples/testdata/2.root.json new file mode 100755 index 00000000..b2cf477e --- /dev/null +++ b/examples/testdata/2.root.json @@ -0,0 +1,87 @@ +{ + "signatures": [ + { + "keyid": "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142", + "sig": "97788ae96aa16e092689346140a88c2e1c74a1ad780b4851744f3cde969b0d84ff3d760b34aa0a4f708ff396775e7f7183a6c7e142d45d8004db1754edca9408" + }, + { + "keyid": "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5", + "sig": "b62226470fd616c1b3d1eef2b9cc33d9537b078d098c2085b7366f8737ffc2647f1a9df636341af2c9c5b934d3032b58edc66bc22a65d0485c46d51b3131ab02" + }, + { + "keyid": "24f316df9097265fdccbc9e37f4c5ab0480fa8bb4b80c378b8f90418cfa03ed1", + "sig": "3c62bd91a4c0967b38fd0217cec20ed7a7dfb0c6c98551a2c0561153b5a2d905ab5a6ca3121adde009ea35419b89dcec64e747d6929829ac79895110dbf3be08" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2023-11-21T17:14:43Z", + "keys": { + "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5": { + "keytype": "ed25519", + "keyval": { + "public": "0b470699f4ab18651379cb4916aaab55202ddf361b8476055280c437c60a3261" + }, + "scheme": "ed25519" + }, + "24f316df9097265fdccbc9e37f4c5ab0480fa8bb4b80c378b8f90418cfa03ed1": { + "keytype": "ed25519", + "keyval": { + "public": "fe60e6edc0e36a0dc7fbb75753bdf187739b2e360a4e5002922af25eaa785403" + }, + "scheme": "ed25519" + }, + "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5": { + "keytype": "ed25519", + "keyval": { + "public": "d3e4315f1ef5716b055573a09e85664c6c06191e7c3a005e2ffd87aeab6b6824" + }, + "scheme": "ed25519" + }, + "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed": { + "keytype": "ed25519", + "keyval": { + "public": "e026bf3eb3b73eb9e4e2376823478acb2edcc64326eaaa0ee7dac16b52e0f925" + }, + "scheme": "ed25519" + }, + "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd": { + "keytype": "ed25519", + "keyval": { + "public": "3a2c095be6f5d3a61581eeb5c2deb08c88e6c89831a065d0088e244accf4bdad" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5", + "24f316df9097265fdccbc9e37f4c5ab0480fa8bb4b80c378b8f90418cfa03ed1" + ], + "threshold": 2 + }, + "snapshot": { + "keyids": [ + "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.30", + "version": 2 + } +} \ No newline at end of file diff --git a/examples/testdata/2.snapshot.json b/examples/testdata/2.snapshot.json new file mode 100755 index 00000000..333f559e --- /dev/null +++ b/examples/testdata/2.snapshot.json @@ -0,0 +1,22 @@ +{ + "signatures": [ + { + "keyid": "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5", + "sig": "a0c2cd11a47a12e11fc563cafaec57531ce53dc5f9f65e222ec91c9904e8afa1e5a66198d8971c357c3f8cc154a53fcae34561c07b3aad1c97c7cb091058440f" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2022-11-28T17:14:43Z", + "meta": { + "python-scripts.json": { + "version": 1 + }, + "targets.json": { + "version": 2 + } + }, + "spec_version": "1.0.30", + "version": 2 + } +} \ No newline at end of file diff --git a/examples/testdata/2.targets.json b/examples/testdata/2.targets.json new file mode 100755 index 00000000..6e592b94 --- /dev/null +++ b/examples/testdata/2.targets.json @@ -0,0 +1,39 @@ +{ + "signatures": [ + { + "keyid": "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed", + "sig": "bad74a90c337cbf50bd3f103b29dca0f86848b87691e3d78cd45fb81aefe5af3ac0b19da4c7395d7ae3db08b0b616b429b93c7e968d2d159697701986b08ea03" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "322cf964acb4d34e57a7cd2ddfbdc75583a2baba04446338aea15febc4249c87": { + "keytype": "ed25519", + "keyval": { + "public": "2a2ce05007e88856d095cc882fdf580c821badaf3a4f9e84489ac8b09aca38c2" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "322cf964acb4d34e57a7cd2ddfbdc75583a2baba04446338aea15febc4249c87" + ], + "name": "python-scripts", + "paths": [ + "*.py" + ], + "terminating": true, + "threshold": 1 + } + ] + }, + "expires": "2023-11-21T17:14:43Z", + "spec_version": "1.0.30", + "targets": {}, + "version": 2 + } +} \ No newline at end of file diff --git a/examples/testdata/timestamp.json b/examples/testdata/timestamp.json new file mode 100755 index 00000000..b279a558 --- /dev/null +++ b/examples/testdata/timestamp.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd", + "sig": "b32389c852b4f1081bf08c5fdfaa493f4879c0a1e5a8a4f2f8d6acdd1936cc10786499f87c118fcc82e4e420d9f4abb30e05b4de0f0e4d50a0a1bbc0936d560c" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2022-11-22T17:14:43Z", + "meta": { + "snapshot.json": { + "version": 2 + } + }, + "spec_version": "1.0.30", + "version": 2 + } +} \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..8967939b --- /dev/null +++ b/go.mod @@ -0,0 +1,31 @@ +module github.com/rdimitrov/ngo-tuf + +go 1.19 + +require ( + github.com/secure-systems-lab/go-securesystemslib v0.4.0 + github.com/sigstore/sigstore v1.4.4 + golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be +) + +require ( + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-containerregistry v0.11.0 // indirect + github.com/letsencrypt/boulder v0.0.0-20220929215747-76583552c2be // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect + github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect + github.com/yuin/goldmark v1.4.13 // indirect + golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 // indirect + golang.org/x/mod v0.7.0 // indirect + golang.org/x/net v0.2.0 // indirect + golang.org/x/sys v0.2.0 // indirect + golang.org/x/term v0.2.0 // indirect + golang.org/x/text v0.4.0 // indirect + golang.org/x/tools v0.3.0 // indirect + google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect + google.golang.org/grpc v1.50.1 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/square/go-jose.v2 v2.6.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..d8aa2814 --- /dev/null +++ b/go.sum @@ -0,0 +1,75 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= +github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg= +github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-containerregistry v0.11.0 h1:Xt8x1adcREjFcmDoDK8OdOsjxu90PHkGuwNP8GiHMLM= +github.com/google/go-containerregistry v0.11.0/go.mod h1:BBaYtsHPHA42uEgAvd/NejvAfPSlz281sJWqupjSxfk= +github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= +github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= +github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= +github.com/klauspost/compress v1.15.8 h1:JahtItbkWjf2jzm/T+qgMxkP9EMHsqEUA6vCMGmXvhA= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/letsencrypt/boulder v0.0.0-20220929215747-76583552c2be h1:Cx2bsfM27RBF/45zP1xhFN9FHDxo40LdYdE5L+GWVTw= +github.com/letsencrypt/boulder v0.0.0-20220929215747-76583552c2be/go.mod h1:j/WMsOEcTSfy6VR1PkiIo20qH1V9iRRzb7ishoKkN0g= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= +github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= +github.com/sigstore/sigstore v1.4.4 h1:lVsnNTY8DUmy2hnwCPtimWfEqv+DIwleORkF8KyFsMs= +github.com/sigstore/sigstore v1.4.4/go.mod h1:wIqu9sN72+pds31MMu89GchxXHy17k+VZWc+HY1ZXMA= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 h1:1i/Afw3rmaR1gF3sfVkG2X6ldkikQwA9zY380LrR5YI= +github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY= +github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= +github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A= +golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 h1:yZNXmy+j/JpX19vZkVktWqAo7Gny4PBWYYK3zskGpx4= +golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= +gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/metadata/helpers.go b/metadata/helpers.go new file mode 100644 index 00000000..dd73a441 --- /dev/null +++ b/metadata/helpers.go @@ -0,0 +1,131 @@ +package metadata + +import ( + "crypto/sha256" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "os" + + "golang.org/x/exp/slices" +) + +func fromFile[T Roles](name string) (*Metadata[T], error) { + in, err := os.Open(name) + if err != nil { + return nil, fmt.Errorf("error opening metadata file - %s", name) + } + defer in.Close() + bytes, err := io.ReadAll(in) + if err != nil { + return nil, fmt.Errorf("error reading metadata bytes from file - %s", name) + } + meta, err := fromBytes[T](bytes) + if err != nil { + return nil, fmt.Errorf("error generating metadata from bytes - %s", name) + } + return meta, nil +} + +func fromBytes[T Roles](bytes []byte) (*Metadata[T], error) { + meta := &Metadata[T]{} + // verify that the type we used to create the object is the same as the type of the metadata file + if err := checkType[T](bytes); err != nil { + return nil, err + } + // if all is okay, unmarshal meta to the desired Metadata[T] type + if err := json.Unmarshal(bytes, meta); err != nil { + return nil, err + } + // Make sure signature key IDs are unique + if err := checkUniqueSignatures(*meta); err != nil { + return nil, err + } + return meta, nil +} + +// Verifies if the signature key IDs are unique for that metadata +func checkUniqueSignatures[T Roles](meta Metadata[T]) error { + signatures := []string{} + for _, sig := range meta.Signatures { + if slices.Contains(signatures, sig.KeyID) { + return fmt.Errorf("multiple signatures found for keyid %s", sig.KeyID) + } + signatures = append(signatures, sig.KeyID) + } + return nil +} + +// Verifies if the Generic type used to create the object is the same as the type of the metadata file in bytes +func checkType[T Roles](bytes []byte) error { + var m map[string]any + i := any(new(T)) + if err := json.Unmarshal(bytes, &m); err != nil { + return err + } + signedType := m["signed"].(map[string]any)["_type"].(string) + switch i.(type) { + case *RootType: + if ROOT != signedType { + return fmt.Errorf("expected type %s, got - %s", ROOT, signedType) + } + case *SnapshotType: + if SNAPSHOT != signedType { + return fmt.Errorf("expected type %s, got - %s", SNAPSHOT, signedType) + } + case *TimestampType: + if TIMESTAMP != signedType { + return fmt.Errorf("expected type %s, got - %s", TIMESTAMP, signedType) + } + case *TargetsType: + if TARGETS != signedType { + return fmt.Errorf("expected type %s, got - %s", TARGETS, signedType) + } + default: + return fmt.Errorf("unrecognized metadata type - %s", signedType) + } + // all okay + return nil +} + +func verifyLength(data []byte, length int64) error { + // TODO + return nil +} + +func verifyHashes(data []byte, hashes Hashes) error { + // TODO + return nil +} + +func (b *HexBytes) UnmarshalJSON(data []byte) error { + if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { + return errors.New("tuf: invalid JSON hex bytes") + } + res := make([]byte, hex.DecodedLen(len(data)-2)) + _, err := hex.Decode(res, data[1:len(data)-1]) + if err != nil { + return err + } + *b = res + return nil +} + +func (b HexBytes) MarshalJSON() ([]byte, error) { + res := make([]byte, hex.EncodedLen(len(b))+2) + res[0] = '"' + res[len(res)-1] = '"' + hex.Encode(res[1:], b) + return res, nil +} + +func (b HexBytes) String() string { + return hex.EncodeToString(b) +} + +func PathHexDigest(s string) string { + b := sha256.Sum256([]byte(s)) + return hex.EncodeToString(b[:]) +} diff --git a/metadata/keys.go b/metadata/keys.go new file mode 100644 index 00000000..a5f8f624 --- /dev/null +++ b/metadata/keys.go @@ -0,0 +1,291 @@ +package metadata + +import ( + "bytes" + "crypto" + "crypto/ecdsa" + "crypto/ed25519" + "crypto/rsa" + "crypto/sha256" + "crypto/x509" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/secure-systems-lab/go-securesystemslib/cjson" + "golang.org/x/exp/slices" +) + +const ( + // MaxJSONKeySize defines the maximum length of a JSON payload. + MaxJSONKeySize = 512 * 1024 // 512Kb + KeyIDLength = sha256.Size * 2 + + KeyTypeEd25519 KeyType = "ed25519" + KeyTypeECDSA_SHA2_P256 KeyType = "ecdsa-sha2-nistp256" + KeyTypeRSASSA_PSS_SHA256 KeyType = "rsa" + + KeySchemeEd25519 KeyScheme = "ed25519" + KeySchemeECDSA_SHA2_P256 KeyScheme = "ecdsa-sha2-nistp256" + KeySchemeRSASSA_PSS_SHA256 KeyScheme = "rsassa-pss-sha256" +) + +type helperED25519 struct { + PublicKey HexBytes `json:"public"` +} +type helperRSAECDSA struct { + PublicKey crypto.PublicKey `json:"public"` +} + +// ToPublicKey generate crypto.PublicKey from metadata type Key +func (k *Key) ToPublicKey() (crypto.PublicKey, error) { + switch k.Type { + case KeyTypeRSASSA_PSS_SHA256: + return k.toPublicKeyRSA() + case KeyTypeECDSA_SHA2_P256: + return k.toPublicKeyECDSA() + case KeyTypeEd25519: + return k.toPublicKeyED25519() + } + return nil, fmt.Errorf("unsupported public key type") +} + +// KeyFromPublicKey generate metadata type Key from crypto.PublicKey +func KeyFromPublicKey(k crypto.PublicKey) (*Key, error) { + var b []byte + var err error + key := &Key{} + switch k := k.(type) { + case *rsa.PublicKey: + key.Type = KeyTypeRSASSA_PSS_SHA256 + key.Scheme = KeySchemeRSASSA_PSS_SHA256 + // pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) + s := &helperRSAECDSA{ + PublicKey: k, + // PublicKey: string(pemKey), + } + b, err = json.Marshal(s) + if err != nil { + return nil, err + } + case *ecdsa.PublicKey: + key.Type = KeyTypeECDSA_SHA2_P256 + key.Scheme = KeySchemeECDSA_SHA2_P256 + // pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) + s := &helperRSAECDSA{ + PublicKey: k, + // PublicKey: string(pemKey), + } + b, err = json.Marshal(s) + if err != nil { + return nil, err + } + case ed25519.PublicKey: + key.Type = KeyTypeEd25519 + key.Scheme = KeySchemeEd25519 + s := &helperED25519{ + PublicKey: []byte(k), + } + b, err = json.Marshal(s) + if err != nil { + return nil, err + } + default: + return nil, fmt.Errorf("unsupported public key type") + } + key.Value = b + return key, nil +} + +// AddKey adds new signing key for delegated role "role" +// keyID: Identifier of the key to be added for “role“. +// key: Signing key to be added for “role“. +// role: Name of the role, for which “key“ is added. +func (signed *RootType) AddKey(key *Key, role string) error { + // verify role is present + if _, ok := signed.Roles[role]; !ok { + return fmt.Errorf("Role %s doesn't exist", role) + } + // add keyID to role + if !slices.Contains(signed.Roles[role].KeyIDs, key.ID()) { + signed.Roles[role].KeyIDs = append(signed.Roles[role].KeyIDs, key.ID()) + } + // update Keys + signed.Keys[key.ID()] = key + return nil +} + +// RevokeKey revoke key from “role“ and updates the Keys store. +// keyID: Identifier of the key to be removed for “role“. +// role: Name of the role, for which a signing key is removed. +func (signed *RootType) RevokeKey(keyID, role string) error { + // verify role is present + if _, ok := signed.Roles[role]; !ok { + return fmt.Errorf("Role %s doesn't exist", role) + } + // verify keyID is present for given role + if !slices.Contains(signed.Roles[role].KeyIDs, keyID) { + return fmt.Errorf("Key with id %s is not used by %s", keyID, role) + } + // remove keyID from role + filteredKeyIDs := []string{} + for _, k := range signed.Roles[role].KeyIDs { + if k != keyID { + filteredKeyIDs = append(filteredKeyIDs, k) + } + } + // overwrite the old keyID slice + signed.Roles[role].KeyIDs = filteredKeyIDs + // check if keyID is used by other roles too + for _, r := range signed.Roles { + if slices.Contains(r.KeyIDs, keyID) { + return nil + } + } + // delete the keyID from Keys if it's not used anywhere else + delete(signed.Keys, keyID) + return nil +} + +// AddKey adds new signing key for delegated role "role" +// key: Signing key to be added for “role“. +// role: Name of the role, for which “key“ is added. +func (signed *TargetsType) AddKey(key *Key, role string) error { + // check if Delegations are even present + if signed.Delegations == nil { + return fmt.Errorf("delegated role %s doesn't exist", role) + } + // loop through all delegated roles + for i, d := range signed.Delegations.Roles { + // if role is found + if d.Name == role { + // add key if keyID is not already part of keyIDs for that role + if !slices.Contains(d.KeyIDs, key.ID()) { + signed.Delegations.Roles[i].KeyIDs = append(signed.Delegations.Roles[i].KeyIDs, key.ID()) + signed.Delegations.Keys[key.ID()] = key + return nil + } + return fmt.Errorf("delegated role %s already has keyID %s", role, key.ID()) + } + } + return fmt.Errorf("delegated role %s doesn't exist", role) +} + +// RevokeKey revokes key from delegated role "role" and updates the delegations key store +// keyID: Identifier of the key to be removed for “role“. +// role: Name of the role, for which a signing key is removed. +func (signed *TargetsType) RevokeKey(keyID string, role string) error { + // check if Delegations are even present + if signed.Delegations == nil { + return fmt.Errorf("delegated role %s doesn't exist", role) + } + // loop through all delegated roles + for i, d := range signed.Delegations.Roles { + // if role is found + if d.Name == role { + // check if keyID is present in keyIDs for that role + if !slices.Contains(d.KeyIDs, keyID) { + return fmt.Errorf("Key with id %s is not used by %s", keyID, role) + } + // remove keyID from role + filteredKeyIDs := []string{} + for _, k := range signed.Delegations.Roles[i].KeyIDs { + if k != keyID { + filteredKeyIDs = append(filteredKeyIDs, k) + } + } + // overwrite the old keyID slice + signed.Delegations.Roles[i].KeyIDs = filteredKeyIDs + break + } + } + // check if keyID is used by other roles too + for _, r := range signed.Delegations.Roles { + if slices.Contains(r.KeyIDs, keyID) { + return nil + } + } + // delete the keyID from Keys if it's not used anywhere else + delete(signed.Delegations.Keys, keyID) + return nil +} + +func (k *Key) toPublicKeyED25519() (crypto.PublicKey, error) { + // Prepare decoder limited to 512Kb + dec := json.NewDecoder(io.LimitReader(bytes.NewReader(k.Value), MaxJSONKeySize)) + s := &helperED25519{} + // Unmarshal key value + if err := dec.Decode(s); err != nil { + if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { + return nil, fmt.Errorf("the public key is truncated or too large: %w", err) + } + return nil, err + } + if n := len(s.PublicKey); n != ed25519.PublicKeySize { + return nil, fmt.Errorf("unexpected public key length for ed25519 key, expected %d, got %d", ed25519.PublicKeySize, n) + } + ed25519Key := ed25519.PublicKey(s.PublicKey) + if _, err := x509.MarshalPKIXPublicKey(ed25519Key); err != nil { + return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") + } + return ed25519Key, nil +} + +func (k *Key) toPublicKeyECDSA() (crypto.PublicKey, error) { + // Prepare decoder limited to 512Kb + dec := json.NewDecoder(io.LimitReader(bytes.NewReader(k.Value), MaxJSONKeySize)) + s := &helperRSAECDSA{} + // Unmarshal key value + if err := dec.Decode(s); err != nil { + if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { + return nil, fmt.Errorf("the public key is truncated or too large: %w", err) + } + return nil, err + } + ecdsaKey, ok := s.PublicKey.(*ecdsa.PublicKey) + if !ok { + return nil, fmt.Errorf("invalid public key") + } + + if _, err := x509.MarshalPKIXPublicKey(ecdsaKey); err != nil { + return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") + } + return ecdsaKey, nil +} + +func (k *Key) toPublicKeyRSA() (crypto.PublicKey, error) { + // Prepare decoder limited to 512Kb + dec := json.NewDecoder(io.LimitReader(bytes.NewReader(k.Value), MaxJSONKeySize)) + s := &helperRSAECDSA{} + // Unmarshal key value + if err := dec.Decode(s); err != nil { + if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { + return nil, fmt.Errorf("the public key is truncated or too large: %w", err) + } + return nil, err + } + rsaKey, ok := s.PublicKey.(*rsa.PublicKey) + if !ok { + return nil, fmt.Errorf("invalid public key") + } + + if _, err := x509.MarshalPKIXPublicKey(rsaKey); err != nil { + return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") + } + return rsaKey, nil +} + +// ID returns the keyID value for the given Key +func (k *Key) ID() string { + k.idOnce.Do(func() { + data, err := cjson.EncodeCanonical(k) + if err != nil { + panic(fmt.Errorf("tuf: error creating key ID: %w", err)) + } + digest := sha256.Sum256(data) + k.id = hex.EncodeToString(digest[:]) + }) + return k.id +} diff --git a/metadata/metadata.go b/metadata/metadata.go new file mode 100644 index 00000000..19428d17 --- /dev/null +++ b/metadata/metadata.go @@ -0,0 +1,351 @@ +package metadata + +import ( + "bytes" + "crypto" + "encoding/json" + "fmt" + "io/ioutil" + "time" + + "github.com/secure-systems-lab/go-securesystemslib/cjson" + "github.com/sigstore/sigstore/pkg/signature" +) + +// Root create new metadata instance of type Root +func Root(expires ...time.Time) *Metadata[RootType] { + // expire now if there's nothing set + if len(expires) == 0 { + expires = []time.Time{time.Now().UTC()} + } + roles := map[string]*Role{} + for _, r := range []string{ROOT, SNAPSHOT, TARGETS, TIMESTAMP} { + roles[r] = &Role{ + KeyIDs: []string{}, + Threshold: 1, + } + } + return &Metadata[RootType]{ + Signed: RootType{ + Type: "root", + SpecVersion: SPECIFICATION_VERSION, + Version: 1, + Expires: expires[0], + Keys: map[string]*Key{}, + Roles: roles, + ConsistentSnapshot: false, + }, + Signatures: []Signature{}, + } +} + +// Snapshot create new metadata instance of type Snapshot +func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { + // expire now if there's nothing set + if len(expires) == 0 { + expires = []time.Time{time.Now().UTC()} + } + return &Metadata[SnapshotType]{ + Signed: SnapshotType{ + Type: "snapshot", + SpecVersion: SPECIFICATION_VERSION, + Version: 1, + Expires: expires[0], + Meta: map[string]MetaFiles{ + "targets.json": { + Version: 1, + }, + }, + }, + Signatures: []Signature{}, + } +} + +// Timestamp create new metadata instance of type Timestamp +func Timestamp(expires ...time.Time) *Metadata[TimestampType] { + // expire now if there's nothing set + if len(expires) == 0 { + expires = []time.Time{time.Now().UTC()} + } + return &Metadata[TimestampType]{ + Signed: TimestampType{ + Type: "timestamp", + SpecVersion: SPECIFICATION_VERSION, + Version: 1, + Expires: expires[0], + Meta: map[string]MetaFiles{ + "snapshot.json": { + Version: 1, + }, + }, + }, + Signatures: []Signature{}, + } +} + +// Targets create new metadata instance of type Targets +func Targets(expires ...time.Time) *Metadata[TargetsType] { + // expire now if there's nothing set + if len(expires) == 0 { + expires = []time.Time{time.Now().UTC()} + } + return &Metadata[TargetsType]{ + Signed: TargetsType{ + Type: "targets", + SpecVersion: SPECIFICATION_VERSION, + Version: 1, + Expires: expires[0], + Targets: map[string]TargetFiles{}, + Delegations: &Delegations{ + Keys: map[string]*Key{}, + Roles: []DelegatedRole{}, + }, + }, + Signatures: []Signature{}, + } +} + +// TargetFile create new metadata instance of type TargetFiles +func TargetFile() *TargetFiles { + return &TargetFiles{ + Length: 0, + Hashes: Hashes{}, + } +} + +// MetaFile create new metadata instance of type MetaFile +func MetaFile(version int64) *MetaFiles { + return &MetaFiles{ + Length: 0, + Hashes: Hashes{}, + Version: version, + } +} + +// FromFile load metadata from file +func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { + m, err := fromFile[T](name) + if err != nil { + return nil, fmt.Errorf("error generating metadata from bytes - %s", name) + } + *meta = *m + return meta, nil +} + +// FromBytes deserialize metadata from bytes +func (meta *Metadata[T]) FromBytes(bytes []byte) (*Metadata[T], error) { + m, err := fromBytes[T](bytes) + if err != nil { + return nil, err + } + *meta = *m + return meta, nil +} + +// ToBytes serialize metadata to bytes +func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { + if pretty { + return json.MarshalIndent(*meta, "", "\t") + } + return json.Marshal(*meta) +} + +// ToFile save metadata to file +func (meta *Metadata[T]) ToFile(name string, pretty bool) error { + bytes, err := meta.ToBytes(pretty) + if err != nil { + return fmt.Errorf("failed serializing metadata") + } + return ioutil.WriteFile(name, bytes, 0644) +} + +// Sign create signature over Signed and assign it to Signatures +func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { + // encode the Signed part to canonical JSON so signatures are consistent + payload, err := cjson.EncodeCanonical(meta.Signed) + if err != nil { + return nil, fmt.Errorf("failed to encode Signed in canonical format during Sign()") + } + // sign the Signed part + sb, err := signer.SignMessage(bytes.NewReader(payload)) + if err != nil { + return nil, fmt.Errorf("failed to Sign(), returned signature should not be nil") + } + // get the signer's PublicKey + publ, err := signer.PublicKey() + if err != nil { + return nil, err + } + // convert to TUF Key type to get keyID + key, err := KeyFromPublicKey(publ) + if err != nil { + return nil, err + } + // build signature + sig := &Signature{ + KeyID: key.ID(), + Signature: sb, + } + // update the Signatures part + meta.Signatures = append(meta.Signatures, *sig) + // return the new signature + return sig, nil +} + +// VerifyDelegate verifies that “delegated_metadata“ is signed with the required +// threshold of keys for the delegated role “delegated_role“ +func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadata any) error { + var keys map[string]*Key + var roleKeyIDs []string + var roleThreshold int + var sign Signature + var payload []byte + signing_keys := map[string]bool{} + i := any(meta) + // collect keys, keyIDs and threshold based on delegator type + switch i := i.(type) { + case *Metadata[RootType]: + keys = i.Signed.Keys + if role, ok := (*i).Signed.Roles[delegated_role]; ok { + roleKeyIDs = role.KeyIDs + roleThreshold = role.Threshold + } else { + return fmt.Errorf("no delegation found for %s", delegated_role) + } + case *Metadata[TargetsType]: + keys = i.Signed.Delegations.Keys + for _, v := range i.Signed.Delegations.Roles { + if v.Name == delegated_role { + roleKeyIDs = v.KeyIDs + roleThreshold = v.Threshold + break + } + } + default: + return fmt.Errorf("call is valid only on delegator metadata (root or targets)") + } + // if there are no keyIDs for that role it means there's no delegation found + if len(roleKeyIDs) == 0 { + fmt.Println("no delegation found for", delegated_role) + return fmt.Errorf("no delegation found for %s", delegated_role) + } + // loop through each role keyID + for _, v := range roleKeyIDs { + // convert to a PublicKey type + key, err := keys[v].ToPublicKey() + if err != nil { + fmt.Println("failed to generate crypto.PublicKey from Key") + return err + } + // load a verifier based on that key + verifier, err := signature.LoadVerifier(key, crypto.Hash(0)) + if err != nil { + fmt.Println("failed to load verifier") + return err + } + // collect the signature for that key and build the payload we'll verify + // based on the Signed part of the delegated metadata + switch d := delegated_metadata.(type) { + case *Metadata[RootType]: + for _, s := range d.Signatures { + if s.KeyID == v { + sign = s + } + } + payload, err = cjson.EncodeCanonical(d.Signed) + if err != nil { + fmt.Println("failed to encode Signed in canonical format during verify") + } + case *Metadata[SnapshotType]: + for _, s := range d.Signatures { + if s.KeyID == v { + sign = s + } + } + payload, err = cjson.EncodeCanonical(d.Signed) + if err != nil { + fmt.Println("failed to encode Signed in canonical format during verify") + } + case *Metadata[TimestampType]: + for _, s := range d.Signatures { + if s.KeyID == v { + sign = s + } + } + payload, err = cjson.EncodeCanonical(d.Signed) + if err != nil { + fmt.Println("failed to encode Signed in canonical format during verify") + } + case *Metadata[TargetsType]: + for _, s := range d.Signatures { + if s.KeyID == v { + sign = s + } + } + payload, err = cjson.EncodeCanonical(d.Signed) + if err != nil { + fmt.Println("failed to encode Signed in canonical format during verify") + } + default: + fmt.Println("unknown delegated metadata type") + } + // verify if the signature for that payload corresponds to the given key + if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err == nil { + // save the verified keyID only if there's no err value + signing_keys[v] = true + } + } + // check if the amount of valid signatures is enough + if len(signing_keys) < roleThreshold { + return fmt.Errorf("signature verification failed, not enough signatures") + } + return nil +} + +// IsExpired returns true if metadata is expired. +// It checks if referenceTime is after Signed.Expires +func (signed *RootType) IsExpired(referenceTime time.Time) bool { + return referenceTime.After(signed.Expires) +} + +// IsExpired returns true if metadata is expired. +// It checks if referenceTime is after Signed.Expires +func (signed *SnapshotType) IsExpired(referenceTime time.Time) bool { + return referenceTime.After(signed.Expires) +} + +// IsExpired returns true if metadata is expired. +// It checks if referenceTime is after Signed.Expires +func (signed *TimestampType) IsExpired(referenceTime time.Time) bool { + return referenceTime.After(signed.Expires) +} + +// IsExpired returns true if metadata is expired. +// It checks if referenceTime is after Signed.Expires +func (signed *TargetsType) IsExpired(referenceTime time.Time) bool { + return referenceTime.After(signed.Expires) +} + +// VerifyLengthHashes checks whether the data matches its corresponding +// length and hashes +func (f *MetaFiles) VerifyLengthHashes(data []byte) error { + err := verifyHashes(data, f.Hashes) + if err != nil { + return err + } + err = verifyLength(data, f.Length) + if err != nil { + return err + } + return nil +} + +// FromFile generates TargetFiles from file +func (t *TargetFiles) FromFile(targetPath, localPath string) (*TargetFiles, error) { + return &TargetFiles{}, nil +} + +// ClearSignatures clears the Signatures +func (meta *Metadata[T]) ClearSignatures() { + meta.Signatures = []Signature{} +} diff --git a/metadata/types.go b/metadata/types.go new file mode 100644 index 00000000..436558cb --- /dev/null +++ b/metadata/types.go @@ -0,0 +1,123 @@ +package metadata + +import ( + "encoding/json" + "sync" + "time" +) + +// Generic type constraint +type Roles interface { + RootType | SnapshotType | TimestampType | TargetsType +} + +// Define version of the TUF specification +const ( + SPECIFICATION_VERSION = "1.0.31" +) + +// Define top level role names +const ( + ROOT = "root" + SNAPSHOT = "snapshot" + TARGETS = "targets" + TIMESTAMP = "timestamp" +) + +type Metadata[T Roles] struct { + Signed T `json:"signed"` + Signatures []Signature `json:"signatures"` +} + +type Signature struct { + KeyID string `json:"keyid"` + Signature HexBytes `json:"sig"` +} + +type RootType struct { + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Keys map[string]*Key `json:"keys"` + Roles map[string]*Role `json:"roles"` + ConsistentSnapshot bool `json:"consistent_snapshot"` + Custom *json.RawMessage `json:"custom,omitempty"` +} + +type SnapshotType struct { + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Meta map[string]MetaFiles `json:"meta"` + Custom *json.RawMessage `json:"custom,omitempty"` +} + +type TargetsType struct { + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Targets map[string]TargetFiles `json:"targets"` + Delegations *Delegations `json:"delegations,omitempty"` + Custom *json.RawMessage `json:"custom,omitempty"` +} + +type TimestampType struct { + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Meta map[string]MetaFiles `json:"meta"` + Custom *json.RawMessage `json:"custom,omitempty"` +} + +type Key struct { + Type KeyType `json:"keytype"` + Scheme KeyScheme `json:"scheme"` + Value json.RawMessage `json:"keyval"` + Custom *json.RawMessage `json:"custom,omitempty"` + id string + idOnce sync.Once +} + +type Role struct { + KeyIDs []string `json:"keyids"` + Threshold int `json:"threshold"` +} + +type HexBytes []byte + +type KeyType string + +type KeyScheme string + +type Hashes map[string]HexBytes + +type MetaFiles struct { + Length int64 `json:"length,omitempty"` + Hashes Hashes `json:"hashes,omitempty"` + Version int64 `json:"version"` + Custom *json.RawMessage `json:"custom,omitempty"` +} + +type TargetFiles struct { + Length int64 `json:"length"` + Hashes Hashes `json:"hashes"` + Custom *json.RawMessage `json:"custom,omitempty"` +} + +type Delegations struct { + Keys map[string]*Key `json:"keys"` + Roles []DelegatedRole `json:"roles"` +} + +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"` +} diff --git a/repo/repo.go b/repo/repo.go new file mode 100644 index 00000000..cbd78b6e --- /dev/null +++ b/repo/repo.go @@ -0,0 +1,60 @@ +package repo + +import ( + "github.com/rdimitrov/ngo-tuf/metadata" +) + +// struct for storing various metadata +type repository struct { + root *metadata.Metadata[metadata.RootType] + snapshot *metadata.Metadata[metadata.SnapshotType] + timestamp *metadata.Metadata[metadata.TimestampType] + targets map[string]*metadata.Metadata[metadata.TargetsType] +} + +// New creates an empty repository instance +func New() *repository { + return &repository{ + targets: map[string]*metadata.Metadata[metadata.TargetsType]{}, + } +} + +// Root returns metadata of type Root +func (r *repository) Root() *metadata.Metadata[metadata.RootType] { + return r.root +} + +// SetRoot sets metadata of type Root +func (r *repository) SetRoot(meta *metadata.Metadata[metadata.RootType]) { + r.root = meta +} + +// Snapshot returns metadata of type Snapshot +func (r *repository) Snapshot() *metadata.Metadata[metadata.SnapshotType] { + return r.snapshot +} + +// SetSnapshot sets metadata of type Snapshot +func (r *repository) SetSnapshot(meta *metadata.Metadata[metadata.SnapshotType]) { + r.snapshot = meta +} + +// Timestamp returns metadata of type Timestamp +func (r *repository) Timestamp() *metadata.Metadata[metadata.TimestampType] { + return r.timestamp +} + +// SetTimestamp sets metadata of type Timestamp +func (r *repository) SetTimestamp(meta *metadata.Metadata[metadata.TimestampType]) { + r.timestamp = meta +} + +// Targets returns metadata of type Targets +func (r *repository) Targets(name string) *metadata.Metadata[metadata.TargetsType] { + return r.targets[name] +} + +// SetTargets sets metadata of type Targets +func (r *repository) SetTargets(name string, meta *metadata.Metadata[metadata.TargetsType]) { + r.targets[name] = meta +} From e3fb769ea4c19cf50b223f497eb7ebb3e39e53f8 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 2 Dec 2022 18:36:57 +0200 Subject: [PATCH 003/208] update basic_repo.go example Signed-off-by: Radoslav Dimitrov --- examples/basic_repo.go | 47 +++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/examples/basic_repo.go b/examples/basic_repo.go index 42e70544..51466ebd 100644 --- a/examples/basic_repo.go +++ b/examples/basic_repo.go @@ -225,7 +225,7 @@ func main() { // on that key owner's computer. All the owner has to do is read the metadata // file, sign it, and write it back to the same file, and this can be repeated // until the threshold is satisfied. - outofbandRoot, err := metadata.Root().FromFile(filepath.Join(tmpDir, "1.root.json")) + _, err = roles.Root().FromFile(filepath.Join(tmpDir, "1.root.json")) if err != nil { panic(fmt.Sprintln("basic_repo.go:", "loading root metadata from file failed", err)) } @@ -233,11 +233,11 @@ func main() { if err != nil { panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) } - _, err = outofbandRoot.Sign(outofbandSigner) + _, err = roles.Root().Sign(outofbandSigner) if err != nil { panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) } - err = outofbandRoot.ToFile(filepath.Join(tmpDir, "1.root.json"), true) + err = roles.Root().ToFile(filepath.Join(tmpDir, "1.root.json"), true) if err != nil { panic(fmt.Sprintln("basic_repo.go:", "saving root metadata to file failed", err)) } @@ -245,25 +245,25 @@ func main() { // Verify that metadata is signed correctly // ==================================== // Verify root - err = outofbandRoot.VerifyDelegate("root", outofbandRoot) + err = roles.Root().VerifyDelegate("root", roles.Root()) if err != nil { panic(fmt.Sprintln("basic_repo.go:", "verifying root metadata failed", err)) } // Verify targets - err = outofbandRoot.VerifyDelegate("targets", roles.Targets("targets")) + err = roles.Root().VerifyDelegate("targets", roles.Targets("targets")) if err != nil { panic(fmt.Sprintln("basic_repo.go:", "verifying targets metadata failed", err)) } // Verify snapshot - err = outofbandRoot.VerifyDelegate("snapshot", roles.Snapshot()) + err = roles.Root().VerifyDelegate("snapshot", roles.Snapshot()) if err != nil { panic(fmt.Sprintln("basic_repo.go:", "verifying snapshot metadata failed", err)) } // Verify timestamp - err = outofbandRoot.VerifyDelegate("timestamp", roles.Timestamp()) + err = roles.Root().VerifyDelegate("timestamp", roles.Timestamp()) if err != nil { panic(fmt.Sprintln("basic_repo.go:", "verifying timestamp metadata failed", err)) } @@ -443,7 +443,40 @@ func main() { if err != nil { panic(fmt.Sprintln("basic_repo.go:", "saving root to file failed", err)) } + + // Verify again that metadata is signed correctly + // ==================================== + // Verify root + err = roles.Root().VerifyDelegate("root", roles.Root()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying root metadata failed", err)) + } + + // Verify targets + err = roles.Root().VerifyDelegate("targets", roles.Targets("targets")) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying targets metadata failed", err)) + } + + // Verify snapshot + err = roles.Root().VerifyDelegate("snapshot", roles.Snapshot()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying snapshot metadata failed", err)) + } + + // Verify timestamp + err = roles.Root().VerifyDelegate("timestamp", roles.Timestamp()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying timestamp metadata failed", err)) + } + + // Verify delegatee + err = roles.Targets("targets").VerifyDelegate(delegateeName, roles.Targets(delegateeName)) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying delegatee metadata failed", err)) + } fmt.Println("Done! Metadata files location:", tmpDir) + } // helperExpireIn returns time offset by days From f29347f65021d9ee5b4ebb4e65e37a2488d0ddb5 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 2 Dec 2022 18:41:11 +0200 Subject: [PATCH 004/208] Update README.md --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3602e0e2..f933b060 100644 --- a/README.md +++ b/README.md @@ -50,9 +50,9 @@ Roadmap [] Verify the metadata API is complete -[] Implement a client (standalone package built on top of metadata, to be split into several other parts) +[] Implement a client (standalone package built on top of metadata, to be split into several other tasks) -[] Implement a repository (standalone package built on top of metadata, to be split into several other parts) +[] Implement a repository (standalone package built on top of metadata, to be split into several other tasks) Documentation ------------- @@ -61,8 +61,7 @@ Documentation Contact ------- -Questions, feedback, and suggestions are welcomed on the [#tuf] -(https://cloud-native.slack.com/archives/C8NMD3QJ3) channel on +Questions, feedback, and suggestions are welcomed on the [#tuf](https://cloud-native.slack.com/archives/C8NMD3QJ3) channel on [CNCF Slack](https://slack.cncf.io/). We strive to make the specification easy to implement, so if you come across From 7a97b4f76979506c6acc645e3ac7f7808051d0ad Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 2 Dec 2022 18:54:48 +0200 Subject: [PATCH 005/208] update example to use the placeholder repo instance Signed-off-by: Radoslav Dimitrov --- examples/basic_repo.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/basic_repo.go b/examples/basic_repo.go index 51466ebd..f31384d4 100644 --- a/examples/basic_repo.go +++ b/examples/basic_repo.go @@ -41,7 +41,8 @@ func main() { // protect, i.e. target files. // Define containers for metadata objects and cryptographic keys created below. This - // allows us to sign and write metadata in a batch more easily. + // allows us to sign and write metadata in a batch more easily. The repo.New() instance + // is really just to help and be used as a placeholder for all metadata. roles := repo.New() keys := map[string]ed25519.PrivateKey{} @@ -65,7 +66,7 @@ func main() { if err != nil { panic(fmt.Sprintln("basic_repo.go:", "generating target file info failed", err)) } - targets.Signed.Targets[targetPath] = *targetFileInfo + roles.Targets("targets").Signed.Targets[targetPath] = *targetFileInfo // Snapshot (consistency) // ---------------------- // The snapshot role guarantees consistency of the entire repository. It does so From 3485d06eceb0e39cec41010998c5d39a807028e5 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 4 Dec 2022 01:23:19 +0200 Subject: [PATCH 006/208] implement verifiers for length and hash Signed-off-by: Radoslav Dimitrov --- examples/basic_repo.go | 2 +- metadata/helpers.go | 31 ++++++++++++++++--- metadata/metadata.go | 69 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 94 insertions(+), 8 deletions(-) diff --git a/examples/basic_repo.go b/examples/basic_repo.go index f31384d4..52bf5e9a 100644 --- a/examples/basic_repo.go +++ b/examples/basic_repo.go @@ -62,7 +62,7 @@ func main() { // |----base URL---||-----target path-----| // e.g. tuf-examples.org/examples/basic_repo.py targetPath, localPath := helperGetPathForTarget("basic_repo.go") - targetFileInfo, err := metadata.TargetFile().FromFile(targetPath, localPath) + targetFileInfo, err := metadata.TargetFile().FromFile(localPath, "sha256") if err != nil { panic(fmt.Sprintln("basic_repo.go:", "generating target file info failed", err)) } diff --git a/metadata/helpers.go b/metadata/helpers.go index dd73a441..60f25188 100644 --- a/metadata/helpers.go +++ b/metadata/helpers.go @@ -1,11 +1,14 @@ package metadata import ( + "bytes" "crypto/sha256" + "crypto/sha512" "encoding/hex" "encoding/json" "errors" "fmt" + "hash" "io" "os" @@ -18,11 +21,11 @@ func fromFile[T Roles](name string) (*Metadata[T], error) { return nil, fmt.Errorf("error opening metadata file - %s", name) } defer in.Close() - bytes, err := io.ReadAll(in) + data, err := io.ReadAll(in) if err != nil { return nil, fmt.Errorf("error reading metadata bytes from file - %s", name) } - meta, err := fromBytes[T](bytes) + meta, err := fromBytes[T](data) if err != nil { return nil, fmt.Errorf("error generating metadata from bytes - %s", name) } @@ -91,12 +94,32 @@ func checkType[T Roles](bytes []byte) error { } func verifyLength(data []byte, length int64) error { - // TODO + len, err := io.Copy(io.Discard, bytes.NewReader(data)) + if err != nil { + return err + } + if length != len { + return fmt.Errorf("length verification failed - expected %d, got %d", length, len) + } return nil } func verifyHashes(data []byte, hashes Hashes) error { - // TODO + var hasher hash.Hash + for k, v := range hashes { + switch k { + case "sha256": + hasher = sha256.New() + case "sha512": + hasher = sha512.New() + default: + return fmt.Errorf("hash verification failed - unknown hashing algorithm - %s", k) + } + hasher.Write(data) + if hex.EncodeToString(v) != hex.EncodeToString(hasher.Sum(nil)) { + return fmt.Errorf("hash verification failed - mismatch for algorithm %s", k) + } + } return nil } diff --git a/metadata/metadata.go b/metadata/metadata.go index 19428d17..c7f58957 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -3,9 +3,14 @@ package metadata import ( "bytes" "crypto" + "crypto/sha256" + "crypto/sha512" "encoding/json" "fmt" + "hash" + "io" "io/ioutil" + "os" "time" "github.com/secure-systems-lab/go-securesystemslib/cjson" @@ -326,9 +331,28 @@ func (signed *TargetsType) IsExpired(referenceTime time.Time) bool { return referenceTime.After(signed.Expires) } -// VerifyLengthHashes checks whether the data matches its corresponding +// VerifyLengthHashes checks whether the Metafile data matches its corresponding // length and hashes func (f *MetaFiles) VerifyLengthHashes(data []byte) error { + // hashes and length are optional for MetaFiles + if len(f.Hashes) > 0 { + err := verifyHashes(data, f.Hashes) + if err != nil { + return err + } + } + if f.Length != 0 { + err := verifyLength(data, f.Length) + if err != nil { + return err + } + } + return nil +} + +// VerifyLengthHashes checks whether the TargetFiles data matches its corresponding +// length and hashes +func (f *TargetFiles) VerifyLengthHashes(data []byte) error { err := verifyHashes(data, f.Hashes) if err != nil { return err @@ -341,8 +365,47 @@ func (f *MetaFiles) VerifyLengthHashes(data []byte) error { } // FromFile generates TargetFiles from file -func (t *TargetFiles) FromFile(targetPath, localPath string) (*TargetFiles, error) { - return &TargetFiles{}, nil +func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { + var hasher hash.Hash + targetFile := &TargetFiles{ + Hashes: map[string]HexBytes{}, + } + // use default hash algorithm if not set + if len(hashes) == 0 { + hashes = []string{"sha256"} + } + // open file + in, err := os.Open(localPath) + if err != nil { + return nil, fmt.Errorf("error opening target file - %s", localPath) + } + defer in.Close() + data, err := io.ReadAll(in) + if err != nil { + return nil, fmt.Errorf("error reading bytes from target file - %s", localPath) + } + // calculate length + len, err := io.Copy(io.Discard, bytes.NewReader(data)) + if err != nil { + return nil, err + } + targetFile.Length = len + for _, v := range hashes { + switch v { + case "sha256": + hasher = sha256.New() + case "sha512": + hasher = sha512.New() + default: + return nil, fmt.Errorf("hash calculation failed - unknown hashing algorithm - %s", v) + } + _, err := hasher.Write(data) + if err != nil { + return nil, err + } + targetFile.Hashes[v] = hasher.Sum(nil) + } + return targetFile, nil } // ClearSignatures clears the Signatures From de9cb26a539b95f4a6d809aa15814af3a1938c84 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 4 Dec 2022 01:29:10 +0200 Subject: [PATCH 007/208] set consistent snapshots to true when init Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index c7f58957..450eaa1c 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -38,7 +38,7 @@ func Root(expires ...time.Time) *Metadata[RootType] { Expires: expires[0], Keys: map[string]*Key{}, Roles: roles, - ConsistentSnapshot: false, + ConsistentSnapshot: true, }, Signatures: []Signature{}, } From 610ee9f5374fe5d9d410bd738b12a38c9a2ece7e Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 4 Dec 2022 14:22:21 +0200 Subject: [PATCH 008/208] add version check for metafiles Signed-off-by: Radoslav Dimitrov --- metadata/helpers.go | 14 +++++++++----- metadata/metadata.go | 9 +++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/metadata/helpers.go b/metadata/helpers.go index 60f25188..f92933ed 100644 --- a/metadata/helpers.go +++ b/metadata/helpers.go @@ -15,6 +15,8 @@ import ( "golang.org/x/exp/slices" ) +// fromFile returns *Metadata[T] object from file and verifies +// that the data corresponds to the caller struct type func fromFile[T Roles](name string) (*Metadata[T], error) { in, err := os.Open(name) if err != nil { @@ -32,14 +34,16 @@ func fromFile[T Roles](name string) (*Metadata[T], error) { return meta, nil } -func fromBytes[T Roles](bytes []byte) (*Metadata[T], error) { +// fromBytes returns *Metadata[T] object from bytes and verifies +// that the data corresponds to the caller struct type +func fromBytes[T Roles](data []byte) (*Metadata[T], error) { meta := &Metadata[T]{} // verify that the type we used to create the object is the same as the type of the metadata file - if err := checkType[T](bytes); err != nil { + if err := checkType[T](data); err != nil { return nil, err } // if all is okay, unmarshal meta to the desired Metadata[T] type - if err := json.Unmarshal(bytes, meta); err != nil { + if err := json.Unmarshal(data, meta); err != nil { return nil, err } // Make sure signature key IDs are unique @@ -62,10 +66,10 @@ func checkUniqueSignatures[T Roles](meta Metadata[T]) error { } // Verifies if the Generic type used to create the object is the same as the type of the metadata file in bytes -func checkType[T Roles](bytes []byte) error { +func checkType[T Roles](data []byte) error { var m map[string]any i := any(new(T)) - if err := json.Unmarshal(bytes, &m); err != nil { + if err := json.Unmarshal(data, &m); err != nil { return err } signedType := m["signed"].(map[string]any)["_type"].(string) diff --git a/metadata/metadata.go b/metadata/metadata.go index 450eaa1c..2794edc3 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -23,6 +23,7 @@ func Root(expires ...time.Time) *Metadata[RootType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } + // populate Roles roles := map[string]*Role{} for _, r := range []string{ROOT, SNAPSHOT, TARGETS, TIMESTAMP} { roles[r] = &Role{ @@ -120,6 +121,10 @@ func TargetFile() *TargetFiles { // MetaFile create new metadata instance of type MetaFile func MetaFile(version int64) *MetaFiles { + if version < 0 { + // attempting to set incorrect version + version = 1 + } return &MetaFiles{ Length: 0, Hashes: Hashes{}, @@ -138,8 +143,8 @@ func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { } // FromBytes deserialize metadata from bytes -func (meta *Metadata[T]) FromBytes(bytes []byte) (*Metadata[T], error) { - m, err := fromBytes[T](bytes) +func (meta *Metadata[T]) FromBytes(data []byte) (*Metadata[T], error) { + m, err := fromBytes[T](data) if err != nil { return nil, err } From 193985a1b887b1cbb16d98613456271e1c8bd4cb Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 4 Dec 2022 14:36:19 +0200 Subject: [PATCH 009/208] remove delegations object when creating targets metadata Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 4 ---- metadata/types.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 2794edc3..d0b8444c 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -102,10 +102,6 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { Version: 1, Expires: expires[0], Targets: map[string]TargetFiles{}, - Delegations: &Delegations{ - Keys: map[string]*Key{}, - Roles: []DelegatedRole{}, - }, }, Signatures: []Signature{}, } diff --git a/metadata/types.go b/metadata/types.go index 436558cb..0fdb2a7a 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -37,11 +37,11 @@ type Signature struct { type RootType struct { Type string `json:"_type"` SpecVersion string `json:"spec_version"` + ConsistentSnapshot bool `json:"consistent_snapshot"` Version int64 `json:"version"` Expires time.Time `json:"expires"` Keys map[string]*Key `json:"keys"` Roles map[string]*Role `json:"roles"` - ConsistentSnapshot bool `json:"consistent_snapshot"` Custom *json.RawMessage `json:"custom,omitempty"` } From f4f285bc352eef29e0c2350248c2fa2d5b0bc8fa Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 4 Dec 2022 16:34:11 +0200 Subject: [PATCH 010/208] use variable for custom values Signed-off-by: Radoslav Dimitrov --- metadata/types.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/metadata/types.go b/metadata/types.go index 0fdb2a7a..f0794526 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -42,7 +42,7 @@ type RootType struct { Expires time.Time `json:"expires"` Keys map[string]*Key `json:"keys"` Roles map[string]*Role `json:"roles"` - Custom *json.RawMessage `json:"custom,omitempty"` + Custom json.RawMessage `json:"custom,omitempty"` } type SnapshotType struct { @@ -51,7 +51,7 @@ type SnapshotType struct { Version int64 `json:"version"` Expires time.Time `json:"expires"` Meta map[string]MetaFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` + Custom json.RawMessage `json:"custom,omitempty"` } type TargetsType struct { @@ -61,7 +61,7 @@ type TargetsType struct { Expires time.Time `json:"expires"` Targets map[string]TargetFiles `json:"targets"` Delegations *Delegations `json:"delegations,omitempty"` - Custom *json.RawMessage `json:"custom,omitempty"` + Custom json.RawMessage `json:"custom,omitempty"` } type TimestampType struct { @@ -70,14 +70,14 @@ type TimestampType struct { Version int64 `json:"version"` Expires time.Time `json:"expires"` Meta map[string]MetaFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` + Custom json.RawMessage `json:"custom,omitempty"` } type Key struct { - Type KeyType `json:"keytype"` - Scheme KeyScheme `json:"scheme"` - Value json.RawMessage `json:"keyval"` - Custom *json.RawMessage `json:"custom,omitempty"` + Type KeyType `json:"keytype"` + Scheme KeyScheme `json:"scheme"` + Value json.RawMessage `json:"keyval"` + Custom json.RawMessage `json:"custom,omitempty"` id string idOnce sync.Once } @@ -96,16 +96,16 @@ type KeyScheme string type Hashes map[string]HexBytes type MetaFiles struct { - Length int64 `json:"length,omitempty"` - Hashes Hashes `json:"hashes,omitempty"` - Version int64 `json:"version"` - Custom *json.RawMessage `json:"custom,omitempty"` + Length int64 `json:"length,omitempty"` + Hashes Hashes `json:"hashes,omitempty"` + Version int64 `json:"version"` + Custom json.RawMessage `json:"custom,omitempty"` } type TargetFiles struct { - Length int64 `json:"length"` - Hashes Hashes `json:"hashes"` - Custom *json.RawMessage `json:"custom,omitempty"` + Length int64 `json:"length"` + Hashes Hashes `json:"hashes"` + Custom json.RawMessage `json:"custom,omitempty"` } type Delegations struct { From ad6cffeaed553da2a6019edeb2ec394c178b5008 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 5 Dec 2022 00:52:10 +0200 Subject: [PATCH 011/208] fix rsa and ecdsa key type support Signed-off-by: Radoslav Dimitrov --- examples/basic_repo.go | 95 +++++++++++++++++++++++++-- metadata/keys.go | 142 +++++++++++------------------------------ metadata/metadata.go | 12 ++-- metadata/types.go | 14 ++-- 4 files changed, 142 insertions(+), 121 deletions(-) diff --git a/examples/basic_repo.go b/examples/basic_repo.go index 52bf5e9a..98334799 100644 --- a/examples/basic_repo.go +++ b/examples/basic_repo.go @@ -2,6 +2,10 @@ package main import ( "crypto" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/rsa" "fmt" "os" "path/filepath" @@ -67,6 +71,7 @@ func main() { panic(fmt.Sprintln("basic_repo.go:", "generating target file info failed", err)) } roles.Targets("targets").Signed.Targets[targetPath] = *targetFileInfo + // Snapshot (consistency) // ---------------------- // The snapshot role guarantees consistency of the entire repository. It does so @@ -75,6 +80,7 @@ func main() { // repository and we want to protect the client against mix-and-match attacks. snapshot := metadata.Snapshot(helperExpireIn(7)) roles.SetSnapshot(snapshot) + // Timestamp (freshness) // --------------------- // The timestamp role guarantees freshness of the repository metadata. It does @@ -135,9 +141,6 @@ func main() { if err != nil { panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) } - // TODO: Extend the example to showcase a mixture of keys, i.e. - // anotherRootKey, _ := rsa.GenerateKey(rand.Reader, 2048) - // anotherRootKey, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) anotherKey, err := metadata.KeyFromPublicKey(anotherRootKey.Public()) if err != nil { @@ -446,7 +449,7 @@ func main() { } // Verify again that metadata is signed correctly - // ==================================== + // ============================================== // Verify root err = roles.Root().VerifyDelegate("root", roles.Root()) if err != nil { @@ -476,8 +479,90 @@ func main() { if err != nil { panic(fmt.Sprintln("basic_repo.go:", "verifying delegatee metadata failed", err)) } - fmt.Println("Done! Metadata files location:", tmpDir) + // Use a mixture of key types + // ========================== + // Create an RSA key + anotherRootKeyRSA, _ := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "RSA key generation failed", err)) + } + anotherKeyRSA, err := metadata.KeyFromPublicKey(anotherRootKeyRSA.Public()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "RSA key conversion failed", err)) + } + + // Create an ECDSA key + anotherRootKeyECDSA, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "ECDSA key generation failed", err)) + } + anotherKeyECDSA, err := metadata.KeyFromPublicKey(anotherRootKeyECDSA.Public()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "ECDSA key conversion failed", err)) + } + + // Add the RSA key to root keys + err = roles.Root().Signed.AddKey(anotherKeyRSA, "root") + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "adding RSA key to root failed", err)) + } + + // Add the ECDSA key to root keys + err = roles.Root().Signed.AddKey(anotherKeyECDSA, "root") + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "adding ECDSA key to root failed", err)) + } + + // Clear existing signatures, bump version and threshold + roles.Root().Signed.Roles["root"].Threshold = 4 + roles.Root().Signed.Version += 1 + roles.Root().ClearSignatures() + + // Sign root with existing ed25519 keys + for _, k := range []ed25519.PrivateKey{keys["root"], anotherRootKey, newRootKey} { + signer, err := signature.LoadSigner(k, crypto.Hash(0)) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + } + _, err = roles.Root().Sign(signer) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + } + } + + // Sign root with the new RSA and ECDSA keys + outofbandSignerRSA, err := signature.LoadSigner(anotherRootKeyRSA, crypto.SHA256) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading RSA signer failed", err)) + } + outofbandSignerECDSA, err := signature.LoadSigner(anotherRootKeyECDSA, crypto.SHA256) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "loading ECDSA signer failed", err)) + } + _, err = roles.Root().Sign(outofbandSignerRSA) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + } + _, err = roles.Root().Sign(outofbandSignerECDSA) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + } + + // Verify that root is signed correctly + // ==================================== + err = roles.Root().VerifyDelegate("root", roles.Root()) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "verifying root metadata failed", err)) + } + + // Save root to file + filename = fmt.Sprintf("%d.%s.json", roles.Root().Signed.Version, "root") + err = roles.Root().ToFile(filepath.Join(tmpDir, filename), true) + if err != nil { + panic(fmt.Sprintln("basic_repo.go:", "saving root to file failed", err)) + } + fmt.Println("Done! Metadata files location:", tmpDir) } // helperExpireIn returns time offset by days diff --git a/metadata/keys.go b/metadata/keys.go index a5f8f624..53830722 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -1,7 +1,6 @@ package metadata import ( - "bytes" "crypto" "crypto/ecdsa" "crypto/ed25519" @@ -9,12 +8,10 @@ import ( "crypto/sha256" "crypto/x509" "encoding/hex" - "encoding/json" - "errors" "fmt" - "io" "github.com/secure-systems-lab/go-securesystemslib/cjson" + "github.com/sigstore/sigstore/pkg/cryptoutils" "golang.org/x/exp/slices" ) @@ -23,79 +20,81 @@ const ( MaxJSONKeySize = 512 * 1024 // 512Kb KeyIDLength = sha256.Size * 2 - KeyTypeEd25519 KeyType = "ed25519" - KeyTypeECDSA_SHA2_P256 KeyType = "ecdsa-sha2-nistp256" - KeyTypeRSASSA_PSS_SHA256 KeyType = "rsa" + KeyTypeEd25519 = "ed25519" + KeyTypeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" + KeyTypeRSASSA_PSS_SHA256 = "rsa" - KeySchemeEd25519 KeyScheme = "ed25519" - KeySchemeECDSA_SHA2_P256 KeyScheme = "ecdsa-sha2-nistp256" - KeySchemeRSASSA_PSS_SHA256 KeyScheme = "rsassa-pss-sha256" + KeySchemeEd25519 = "ed25519" + KeySchemeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" + KeySchemeRSASSA_PSS_SHA256 = "rsassa-pss-sha256" ) -type helperED25519 struct { - PublicKey HexBytes `json:"public"` -} -type helperRSAECDSA struct { - PublicKey crypto.PublicKey `json:"public"` -} - // ToPublicKey generate crypto.PublicKey from metadata type Key func (k *Key) ToPublicKey() (crypto.PublicKey, error) { + publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal PEM keyval: %w", err) + } switch k.Type { case KeyTypeRSASSA_PSS_SHA256: - return k.toPublicKeyRSA() + rsaKey, ok := publicKey.(*rsa.PublicKey) + if !ok { + return nil, fmt.Errorf("invalid rsa public key") + } + if _, err := x509.MarshalPKIXPublicKey(rsaKey); err != nil { + return nil, fmt.Errorf("marshalling to PKIX key failed") + } + return rsaKey, nil case KeyTypeECDSA_SHA2_P256: - return k.toPublicKeyECDSA() + ecdsaKey, ok := publicKey.(*ecdsa.PublicKey) + if !ok { + return nil, fmt.Errorf("invalid ecdsa public key") + } + if _, err := x509.MarshalPKIXPublicKey(ecdsaKey); err != nil { + return nil, fmt.Errorf("marshalling to PKIX key failed") + } + return ecdsaKey, nil case KeyTypeEd25519: - return k.toPublicKeyED25519() + ed25519Key := publicKey.(ed25519.PublicKey) + if _, err := x509.MarshalPKIXPublicKey(ed25519Key); err != nil { + return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") + } + return ed25519Key, nil } return nil, fmt.Errorf("unsupported public key type") } // KeyFromPublicKey generate metadata type Key from crypto.PublicKey func KeyFromPublicKey(k crypto.PublicKey) (*Key, error) { - var b []byte - var err error key := &Key{} switch k := k.(type) { case *rsa.PublicKey: key.Type = KeyTypeRSASSA_PSS_SHA256 key.Scheme = KeySchemeRSASSA_PSS_SHA256 - // pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) - s := &helperRSAECDSA{ - PublicKey: k, - // PublicKey: string(pemKey), - } - b, err = json.Marshal(s) + pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) if err != nil { return nil, err } + key.Value.PublicKey = string(pemKey) case *ecdsa.PublicKey: key.Type = KeyTypeECDSA_SHA2_P256 key.Scheme = KeySchemeECDSA_SHA2_P256 - // pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) - s := &helperRSAECDSA{ - PublicKey: k, - // PublicKey: string(pemKey), - } - b, err = json.Marshal(s) + pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) if err != nil { return nil, err } + key.Value.PublicKey = string(pemKey) case ed25519.PublicKey: key.Type = KeyTypeEd25519 key.Scheme = KeySchemeEd25519 - s := &helperED25519{ - PublicKey: []byte(k), - } - b, err = json.Marshal(s) + pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) if err != nil { return nil, err } + key.Value.PublicKey = string(pemKey) default: return nil, fmt.Errorf("unsupported public key type") } - key.Value = b return key, nil } @@ -212,71 +211,6 @@ func (signed *TargetsType) RevokeKey(keyID string, role string) error { return nil } -func (k *Key) toPublicKeyED25519() (crypto.PublicKey, error) { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(k.Value), MaxJSONKeySize)) - s := &helperED25519{} - // Unmarshal key value - if err := dec.Decode(s); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return nil, fmt.Errorf("the public key is truncated or too large: %w", err) - } - return nil, err - } - if n := len(s.PublicKey); n != ed25519.PublicKeySize { - return nil, fmt.Errorf("unexpected public key length for ed25519 key, expected %d, got %d", ed25519.PublicKeySize, n) - } - ed25519Key := ed25519.PublicKey(s.PublicKey) - if _, err := x509.MarshalPKIXPublicKey(ed25519Key); err != nil { - return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") - } - return ed25519Key, nil -} - -func (k *Key) toPublicKeyECDSA() (crypto.PublicKey, error) { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(k.Value), MaxJSONKeySize)) - s := &helperRSAECDSA{} - // Unmarshal key value - if err := dec.Decode(s); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return nil, fmt.Errorf("the public key is truncated or too large: %w", err) - } - return nil, err - } - ecdsaKey, ok := s.PublicKey.(*ecdsa.PublicKey) - if !ok { - return nil, fmt.Errorf("invalid public key") - } - - if _, err := x509.MarshalPKIXPublicKey(ecdsaKey); err != nil { - return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") - } - return ecdsaKey, nil -} - -func (k *Key) toPublicKeyRSA() (crypto.PublicKey, error) { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(k.Value), MaxJSONKeySize)) - s := &helperRSAECDSA{} - // Unmarshal key value - if err := dec.Decode(s); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return nil, fmt.Errorf("the public key is truncated or too large: %w", err) - } - return nil, err - } - rsaKey, ok := s.PublicKey.(*rsa.PublicKey) - if !ok { - return nil, fmt.Errorf("invalid public key") - } - - if _, err := x509.MarshalPKIXPublicKey(rsaKey); err != nil { - return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") - } - return rsaKey, nil -} - // ID returns the keyID value for the given Key func (k *Key) ID() string { k.idOnce.Do(func() { diff --git a/metadata/metadata.go b/metadata/metadata.go index d0b8444c..ba9b7e67 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -232,7 +232,6 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } // if there are no keyIDs for that role it means there's no delegation found if len(roleKeyIDs) == 0 { - fmt.Println("no delegation found for", delegated_role) return fmt.Errorf("no delegation found for %s", delegated_role) } // loop through each role keyID @@ -243,8 +242,13 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat fmt.Println("failed to generate crypto.PublicKey from Key") return err } + // use corresponding hash function for key type + hash := crypto.Hash(0) + if keys[v].Type != KeyTypeEd25519 { + hash = crypto.SHA256 + } // load a verifier based on that key - verifier, err := signature.LoadVerifier(key, crypto.Hash(0)) + verifier, err := signature.LoadVerifier(key, hash) if err != nil { fmt.Println("failed to load verifier") return err @@ -297,13 +301,13 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } // verify if the signature for that payload corresponds to the given key if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err == nil { - // save the verified keyID only if there's no err value + // save the verified keyID only if verification passed signing_keys[v] = true } } // check if the amount of valid signatures is enough if len(signing_keys) < roleThreshold { - return fmt.Errorf("signature verification failed, not enough signatures") + return fmt.Errorf("signature verification failed, not enough signatures, got %d, want %d", len(signing_keys), roleThreshold) } return nil } diff --git a/metadata/types.go b/metadata/types.go index f0794526..d4b4e54a 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -74,14 +74,16 @@ type TimestampType struct { } type Key struct { - Type KeyType `json:"keytype"` - Scheme KeyScheme `json:"scheme"` - Value json.RawMessage `json:"keyval"` + Type string `json:"keytype"` + Scheme string `json:"scheme"` + Value KeyVal `json:"keyval"` Custom json.RawMessage `json:"custom,omitempty"` id string idOnce sync.Once } - +type KeyVal struct { + PublicKey string `json:"public"` +} type Role struct { KeyIDs []string `json:"keyids"` Threshold int `json:"threshold"` @@ -89,10 +91,6 @@ type Role struct { type HexBytes []byte -type KeyType string - -type KeyScheme string - type Hashes map[string]HexBytes type MetaFiles struct { From 1cff8e236c75f14169f9f0f436c122334df524a8 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 5 Dec 2022 08:01:37 +0200 Subject: [PATCH 012/208] implement GetRolesForTarget Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index ba9b7e67..49176ee5 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -11,6 +11,7 @@ import ( "io" "io/ioutil" "os" + "path/filepath" "time" "github.com/secure-systems-lab/go-securesystemslib/cjson" @@ -117,7 +118,7 @@ func TargetFile() *TargetFiles { // MetaFile create new metadata instance of type MetaFile func MetaFile(version int64) *MetaFiles { - if version < 0 { + if version <= 0 { // attempting to set incorrect version version = 1 } @@ -417,3 +418,32 @@ func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles func (meta *Metadata[T]) ClearSignatures() { meta.Signatures = []Signature{} } + +// IsDelegatedPath determines whether the given "targetFilepath" is in one of +// the paths that "DelegatedRole" is trusted to provide +func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) { + if len(role.PathHashPrefixes) > 0 { + // TODO + return false, nil + } else if len(role.Paths) > 0 { + for _, pathPattern := range role.Paths { + return filepath.Match(targetFilepath, pathPattern) + } + } + return false, nil +} + +// GetRolesForTarget returns names and terminating status of all +// delegated roles who are responsible for targetFilepath +func (role *Delegations) GetRolesForTarget(targetFilepath string) map[string]bool { + res := map[string]bool{} + if len(role.Roles) > 0 { + for _, r := range role.Roles { + ok, err := r.IsDelegatedPath(targetFilepath) + if err == nil && ok { + res[r.Name] = r.Terminating + } + } + } + return res +} From 4dcbb081ab40345bacdef3ad98d0b79a6cbcc2a4 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 5 Dec 2022 16:25:19 +0200 Subject: [PATCH 013/208] implement trusted metadata set Signed-off-by: Radoslav Dimitrov --- examples/basic_repo.go | 2 +- {repo => metadata/repo}/repo.go | 0 metadata/trustedmetadata/trustedmetadata.go | 328 ++++++++++++++++++++ metadata/updater/updater.go | 93 ++++++ 4 files changed, 422 insertions(+), 1 deletion(-) rename {repo => metadata/repo}/repo.go (100%) create mode 100644 metadata/trustedmetadata/trustedmetadata.go create mode 100644 metadata/updater/updater.go diff --git a/examples/basic_repo.go b/examples/basic_repo.go index 98334799..aba4c0aa 100644 --- a/examples/basic_repo.go +++ b/examples/basic_repo.go @@ -12,7 +12,7 @@ import ( "time" "github.com/rdimitrov/ngo-tuf/metadata" - "github.com/rdimitrov/ngo-tuf/repo" + "github.com/rdimitrov/ngo-tuf/metadata/repo" "github.com/sigstore/sigstore/pkg/signature" "golang.org/x/crypto/ed25519" ) diff --git a/repo/repo.go b/metadata/repo/repo.go similarity index 100% rename from repo/repo.go rename to metadata/repo/repo.go diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go new file mode 100644 index 00000000..6d3ee253 --- /dev/null +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -0,0 +1,328 @@ +package trustedmetadata + +import ( + "fmt" + "time" + + "github.com/rdimitrov/ngo-tuf/metadata" +) + +// TrustedMetadata struct for storing trusted metadata +type TrustedMetadata struct { + root *metadata.Metadata[metadata.RootType] + snapshot *metadata.Metadata[metadata.SnapshotType] + timestamp *metadata.Metadata[metadata.TimestampType] + targets map[string]*metadata.Metadata[metadata.TargetsType] + refTime time.Time +} + +// New creates a new TrustedMetadata instance which ensures that the +// collection of metadata in it is valid and trusted through the whole +// client update workflow. It provides easy ways to update the metadata +// with the caller making decisions on what is updated. +func New(rootData []byte) (*TrustedMetadata, error) { + res := &TrustedMetadata{ + targets: map[string]*metadata.Metadata[metadata.TargetsType]{}, + refTime: time.Now().UTC(), + } + // load and validate the local root metadata. + // Valid initial trusted root metadata is required + err := res.loadTrustedRoot(rootData) + if err != nil { + return nil, err + } + return res, nil +} + +// loadTrustedRoot verifies and loads "data" as trusted root metadata. +// Note that an expired initial root is considered valid: expiry is +// only checked for the final root in “UpdateTimestamp()“. +func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { + // generate root metadata + newRoot, err := metadata.Root().FromBytes(rootData) + if err != nil { + return err + } + // check metadata type matches root + if newRoot.Signed.Type != metadata.ROOT { + return fmt.Errorf("expected %s, got %s", metadata.ROOT, newRoot.Signed.Type) + } + // verify root by itself + err = newRoot.VerifyDelegate(metadata.ROOT, newRoot) + if err != nil { + return err + } + // save root if verified + trusted.root = newRoot + fmt.Println("Loaded trusted root v", trusted.root.Signed.Version) + return nil +} + +// UpdateRoot verifies and loads “data“ as new root metadata. +// Note that an expired intermediate root is considered valid: expiry is +// only checked for the final root in “UpdateTimestamp()“. +func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[metadata.RootType], error) { + if trusted.timestamp != nil { + return nil, fmt.Errorf("cannot update root after timestamp") + } + fmt.Println("Updating root") + // generate root metadata + newRoot, err := metadata.Root().FromBytes(rootData) + if err != nil { + return nil, err + } + // check metadata type matches root + if newRoot.Signed.Type != metadata.ROOT { + return nil, fmt.Errorf("expected %s, got %s", metadata.ROOT, newRoot.Signed.Type) + } + // verify that new root is signed by trusted root + err = trusted.root.VerifyDelegate(metadata.ROOT, newRoot) + if err != nil { + return nil, err + } + // verify version + if newRoot.Signed.Version != trusted.root.Signed.Version+1 { + return nil, fmt.Errorf("bad version number, expected %d, got %d", trusted.root.Signed.Version+1, newRoot.Signed.Version) + } + // verify that new root is signed by itself + err = newRoot.VerifyDelegate(metadata.ROOT, newRoot) + if err != nil { + return nil, err + } + // save root if verified + trusted.root = newRoot + fmt.Printf("Updated root v%d\n", trusted.root.Signed.Version) + return trusted.root, nil +} + +// UpdateTimestamp verifies and loads “data“ as new timestamp metadata. +// Note that an intermediate timestamp is allowed to be expired. "TrustedMetadata" +// will error in this case but the intermediate timestamp will be loaded. +// This way a newer timestamp can still be loaded (and the intermediate +// timestamp will be used for rollback protection). Expired timestamp will +// prevent loading snapshot metadata. +func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata.Metadata[metadata.TimestampType], error) { + if trusted.snapshot != nil { + return nil, fmt.Errorf("cannot update timestamp after snapshot") + } + // client workflow 5.3.10: Make sure final root is not expired. + if trusted.root.Signed.IsExpired(trusted.refTime) { + return nil, fmt.Errorf("final root.json is expired") + } + fmt.Println("Updating timestamp") + // no need to check for 5.3.11 (fast forward attack recovery): + // timestamp/snapshot can not yet be loaded at this point + newTimestamp, err := metadata.Timestamp().FromBytes(timestampData) + if err != nil { + return nil, err + } + // check metadata type matches timestamp + if newTimestamp.Signed.Type != metadata.TIMESTAMP { + return nil, fmt.Errorf("expected %s, got %s", metadata.TIMESTAMP, newTimestamp.Signed.Type) + } + // verify that new timestamp is signed by trusted root + err = trusted.root.VerifyDelegate(metadata.TIMESTAMP, newTimestamp) + if err != nil { + return nil, err + } + // if an existing trusted timestamp is updated, + // check for a rollback attack + if trusted.timestamp != nil { + // prevent rolling back timestamp version + if newTimestamp.Signed.Version < trusted.timestamp.Signed.Version { + return nil, fmt.Errorf("new timestamp version %d must be >= %d", newTimestamp.Signed.Version, trusted.timestamp.Signed.Version) + } + // keep using old timestamp if versions are equal. + if newTimestamp.Signed.Version == trusted.timestamp.Signed.Version { + return nil, fmt.Errorf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.timestamp.Signed.Version) + } + // prevent rolling back snapshot version + snapshotMeta := trusted.timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + newSnapshotMeta := newTimestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + if newSnapshotMeta.Version < snapshotMeta.Version { + return nil, fmt.Errorf("new snapshot version %d must be >= %d", newSnapshotMeta.Version, snapshotMeta.Version) + } + } + // expiry not checked to allow old timestamp to be used for rollback + // protection of new timestamp: expiry is checked in UpdateSnapshot() + // save root if verified + trusted.timestamp = newTimestamp + fmt.Printf("Updated timestamp v%d\n", trusted.timestamp.Signed.Version) + + // timestamp is loaded: error if it is not valid _final_ timestamp + err = trusted.checkFinalTimestamp() + if err != nil { + // return the new timestamp but also the error if it's expired + return trusted.timestamp, err + } + return trusted.timestamp, nil +} + +// checkFinalTimestamp verifies if trusted timestamp is not expired +func (trusted *TrustedMetadata) checkFinalTimestamp() error { + if trusted.timestamp.Signed.IsExpired(trusted.refTime) { + return fmt.Errorf("timestamp.json is expired") + } + return nil +} + +// UpdateSnapshot verifies and loads “data“ as new snapshot metadata. +// Note that an intermediate snapshot is allowed to be expired and version +// is allowed to not match timestamp meta version: TrustedMetadata +// will error for case of expired metadata or when using bad versions but the +// intermediate snapshot will be loaded. This way a newer snapshot can still +// be loaded (and the intermediate snapshot will be used for rollback protection). +// Expired snapshot or snapshot that does not match timestamp meta version will +// prevent loading targets. +func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bool) (*metadata.Metadata[metadata.SnapshotType], error) { + if trusted.timestamp == nil { + return nil, fmt.Errorf("cannot update snapshot before timestamp") + } + if trusted.targets[metadata.TARGETS] != nil { + return nil, fmt.Errorf("cannot update snapshot after targets") + } + fmt.Println("Updating targets") + + // snapshot cannot be loaded if final timestamp is expired + err := trusted.checkFinalTimestamp() + if err != nil { + return nil, err + } + snapshotMeta := trusted.timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + // verify non-trusted data against the hashes in timestamp, if any. + // trusted snapshot data has already been verified once. + if !isTrusted { + err = snapshotMeta.VerifyLengthHashes(snapshotData) + if err != nil { + return nil, err + } + } + newSnapshot, err := metadata.Snapshot().FromBytes(snapshotData) + if err != nil { + return nil, err + } + // check metadata type matches snapshot + if newSnapshot.Signed.Type != metadata.SNAPSHOT { + return nil, fmt.Errorf("expected %s, got %s", metadata.SNAPSHOT, newSnapshot.Signed.Type) + } + // verify that new snapshot is signed by trusted root + err = trusted.root.VerifyDelegate(metadata.SNAPSHOT, newSnapshot) + if err != nil { + return nil, err + } + + // version not checked against meta version to allow old snapshot to be + // used in rollback protection: it is checked when targets is updated + + // if an existing trusted snapshot is updated, check for rollback attack + if trusted.snapshot != nil { + for name, info := range trusted.snapshot.Signed.Meta { + newFileInfo, ok := newSnapshot.Signed.Meta[name] + // prevent removal of any metadata in meta + if !ok { + return nil, fmt.Errorf("new snapshot is missing info for %s", name) + } + // prevent rollback of any metadata versions + if newFileInfo.Version < info.Version { + return nil, fmt.Errorf("expected %s version %d, got %d", name, newFileInfo.Version, info.Version) + } + } + } + + // expiry not checked to allow old snapshot to be used for rollback + // protection of new snapshot: it is checked when targets is updated + trusted.snapshot = newSnapshot + fmt.Printf("Updated snapshot v%d\n", trusted.snapshot.Signed.Version) + + // snapshot is loaded, but we error if it's not valid _final_ snapshot + err = trusted.checkFinalSnapshot() + if err != nil { + // return the new snapshot but also the error if it's expired + return trusted.snapshot, err + } + return trusted.snapshot, nil +} + +// checkFinalSnapshot verifies if it's not expired and snapshot version matches timestamp meta version +func (trusted *TrustedMetadata) checkFinalSnapshot() error { + if trusted.snapshot.Signed.IsExpired(trusted.refTime) { + return fmt.Errorf("snapshot.json is expired") + } + snapshotMeta := trusted.timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + if trusted.snapshot.Signed.Version != snapshotMeta.Version { + return fmt.Errorf("expected %d, got %d", snapshotMeta.Version, trusted.snapshot.Signed.Version) + } + return nil +} + +// UpdateTargets verifies and loads “data“ as new top-level targets metadata. +func (trusted *TrustedMetadata) UpdateTargets(targetsData []byte) (*metadata.Metadata[metadata.TargetsType], error) { + return trusted.updateDelegatedTargets(targetsData, metadata.TARGETS, metadata.ROOT) +} + +// updateDelegatedTargets verifies and loads “data“ as new metadata for target “role_name“ +func (trusted *TrustedMetadata) updateDelegatedTargets(targetsData []byte, roleName, delegatorName string) (*metadata.Metadata[metadata.TargetsType], error) { + var ok bool + if trusted.snapshot == nil { + return nil, fmt.Errorf("cannot load targets before snapshot") + } + // targets cannot be loaded if final snapshot is expired or its version + // does not match meta version in timestamp + err := trusted.checkFinalSnapshot() + if err != nil { + return nil, err + } + // check if delegator metadata is present + if delegatorName == metadata.ROOT { + if trusted.root != nil { + ok = true + } else { + ok = false + } + } else { + _, ok = trusted.targets[delegatorName] + } + if !ok { + return nil, fmt.Errorf("cannot load targets before delegator") + } + fmt.Printf("updating %s delegated by %s\n", roleName, delegatorName) + + // Verify against the hashes in snapshot, if any + meta, ok := trusted.snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] + if !ok { + return nil, fmt.Errorf("snapshot does not contain information for %s", roleName) + } + err = meta.VerifyLengthHashes(targetsData) + if err != nil { + return nil, err + } + newDelegate, err := metadata.Targets().FromBytes(targetsData) + if err != nil { + return nil, err + } + // check metadata type matches targets + if newDelegate.Signed.Type != metadata.TARGETS { + return nil, fmt.Errorf("expected %s, got %s", metadata.TARGETS, newDelegate.Signed.Type) + } + // get delegator metadata and verify the new delegatee + if delegatorName == metadata.ROOT { + err = trusted.root.VerifyDelegate(roleName, newDelegate) + if err != nil { + return nil, err + } + } else { + err = trusted.targets[delegatorName].VerifyDelegate(roleName, newDelegate) + if err != nil { + return nil, err + } + } + if newDelegate.Signed.Version != meta.Version { + return nil, fmt.Errorf("expected %s version %d, got %d", roleName, meta.Version, newDelegate.Signed.Version) + } + if newDelegate.Signed.IsExpired(trusted.refTime) { + return nil, fmt.Errorf("New %s is expired", roleName) + } + trusted.targets[roleName] = newDelegate + fmt.Printf("Updated %s v%d\n", roleName, trusted.targets[roleName].Signed.Version) + return trusted.targets[roleName], nil +} diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go new file mode 100644 index 00000000..0654b89a --- /dev/null +++ b/metadata/updater/updater.go @@ -0,0 +1,93 @@ +package updater + +import ( + "fmt" + "io" + "os" + "strings" + + "github.com/rdimitrov/ngo-tuf/metadata" + "github.com/rdimitrov/ngo-tuf/metadata/trustedmetadata" +) + +type UpdaterConfig struct { + MaxRootRotations int64 + MaxDelegations int64 + RootMaxLength int64 + TimestampMaxLength int64 + SnapshotMaxLength int64 + TargetsMaxLength int64 + PrefixTargetsWithHash bool +} +type Updater struct { + metadataDir string + metadataBaseUrl string + targetDir string + targetBaseUrl string + trusted *trustedmetadata.TrustedMetadata + config *UpdaterConfig + // fetcher + // config +} + +// New creates a new “Updater“ instance and loads trusted root metadata. +func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string) (*Updater, error) { + rootBytes, err := loadLocalMetadata(metadata.ROOT) + if err != nil { + return nil, err + } + trustedMetadataSet, err := trustedmetadata.New(rootBytes) + if err != nil { + return nil, err + } + // validate input + metadataBaseUrl = ensureTrailingSlash(metadataBaseUrl) + if len(targetBaseUrl) > 0 { + targetBaseUrl = ensureTrailingSlash(targetBaseUrl) + } + + return &Updater{ + metadataDir: metadataDir, + metadataBaseUrl: metadataBaseUrl, + targetDir: targetDir, + targetBaseUrl: targetBaseUrl, + trusted: trustedMetadataSet, + config: NewConfig(), + }, nil +} + +func loadLocalMetadata(name string) ([]byte, error) { + name = fmt.Sprintf("%s.json", name) + in, err := os.Open(name) + if err != nil { + return nil, fmt.Errorf("error opening metadata file - %s", name) + } + defer in.Close() + data, err := io.ReadAll(in) + if err != nil { + return nil, fmt.Errorf("error reading metadata bytes from file - %s", name) + } + return data, nil +} + +// NewConfig creates a new UpdaterConfig instance used by the Updater to +// store configuration +func NewConfig() *UpdaterConfig { + return &UpdaterConfig{ + MaxRootRotations: 32, + MaxDelegations: 32, + RootMaxLength: 512000, // bytes + TimestampMaxLength: 16384, // bytes + SnapshotMaxLength: 2000000, // bytes + TargetsMaxLength: 5000000, // bytes + PrefixTargetsWithHash: true, + } +} + +// ensureTrailingSlash ensures url ends with a slash +func ensureTrailingSlash(url string) string { + if strings.HasSuffix(url, "/") { + return url + } + return url + "/" +} From 43f886877bb1f2fbadf355b508a41bfc61b9d289 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 6 Dec 2022 17:58:37 +0200 Subject: [PATCH 014/208] tidy up code and rename repo to repository Signed-off-by: Radoslav Dimitrov --- README.md | 69 ++++++++++++++----- examples/basic_repo.go | 8 +-- metadata/config/config.go | 25 +++++++ metadata/fetcher/fetcher.go | 1 + .../repo.go => repository/repository.go} | 26 +++---- metadata/updater/updater.go | 54 +++++++-------- 6 files changed, 119 insertions(+), 64 deletions(-) create mode 100644 metadata/config/config.go create mode 100644 metadata/fetcher/fetcher.go rename metadata/{repo/repo.go => repository/repository.go} (52%) diff --git a/README.md b/README.md index f933b060..ec8b34d7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # TUF A Framework for Securing Software Update Systems + ---------------------------- [The Update Framework (TUF)](https://theupdateframework.io/) is a framework for secure content delivery and updates. It protects against various types of @@ -7,8 +8,9 @@ supply chain attacks and provides resilience to compromise. NGO-TUF is started from the idea of providing a Go implementation of TUF that is heavily influenced by the design decisions made in [python-tuf](https://github.com/theupdateframework/python-tuf). -About The Update Framework --------------------------- +## About The Update Framework + +---------------------------- The Update Framework (TUF) design helps developers maintain the security of a software update system, even against attackers that compromise the repository or signing keys. @@ -24,8 +26,10 @@ by various tech companies and open source organizations. Please see [TUF's website](https://theupdateframework.com/) for more information about TUF! -How to use it -------------- +## How to use it + +---------------------------- + See the [basic_repo.go](examples/basic_repo.go) example which demonstrates how to *manually* create and maintain repository metadata using the low-level Metadata API. @@ -42,25 +46,59 @@ The example highlights the following functionality supported by the metadata API * writing and reading metadata files * root key rotation -Roadmap -------------- -[x] Bootstrap a metadata API implementation +## Roadmap + +---------------------------- + +### :white_check_mark: - Implement the `metadata` API + +* The `metadata` API provides access to a Metadata file abstraction that closely +follows the TUF specification’s document formats. This API handles de/serialization +to and from files and bytes, covers also the process to create and verify metadata +signatures and makes it easier to access and modify metadata content. It is purely +focused on individual pieces of Metadata and provides no concepts like “repository” +or “update workflow”. + +### :white_check_mark: - Recreate the `basic_repo.py` example + +* The example demonstrates how to *manually* create and +maintain repository metadata using the low-level Metadata API. + +### :white_check_mark: - Implement the `TrustedMetadata` package + +* A `TrustedMetadata` instance ensures that the collection of metadata in it is valid +and trusted through the whole client update workflow. It provides easy ways to update +the metadata with the caller making decisions on what is updated. + +### :white_check_mark: - Implement client API - `config` package + +* The `config` package is used to store ``Updater`` configuration. -[x] Recreate the `basic_repo.py` example +### :construction: - Implement client API - `fetcher` package -[] Verify the metadata API is complete +* The `fetcher` package defines an interface for abstract network download. -[] Implement a client (standalone package built on top of metadata, to be split into several other tasks) +### :construction: - Implement client API - `updater` package -[] Implement a repository (standalone package built on top of metadata, to be split into several other tasks) +* The `updater` package provides an implementation of the TUF client workflow. +It provides ways to query and download target files securely, while handling the +TUF update workflow behind the scenes. It is implemented on top of the Metadata API +and can be used to implement various TUF clients with relatively little effort. + +### :soon: - Implement repository API (standalone package built on top of metadata, to be split into several other tasks) + +## Documentation + +---------------------------- -Documentation -------------- * [Introduction to TUF's Design](https://theupdateframework.io/overview/) + * [The TUF Specification](https://theupdateframework.github.io/specification/latest/) -Contact -------- +## Contact + +---------------------------- + Questions, feedback, and suggestions are welcomed on the [#tuf](https://cloud-native.slack.com/archives/C8NMD3QJ3) channel on [CNCF Slack](https://slack.cncf.io/). @@ -68,4 +106,3 @@ We strive to make the specification easy to implement, so if you come across any inconsistencies or experience any difficulty, do let us know by sending an email, or by reporting an issue in the GitHub [specification repo](https://github.com/theupdateframework/specification/issues). - diff --git a/examples/basic_repo.go b/examples/basic_repo.go index aba4c0aa..7e2a7a8b 100644 --- a/examples/basic_repo.go +++ b/examples/basic_repo.go @@ -12,7 +12,7 @@ import ( "time" "github.com/rdimitrov/ngo-tuf/metadata" - "github.com/rdimitrov/ngo-tuf/metadata/repo" + "github.com/rdimitrov/ngo-tuf/metadata/repository" "github.com/sigstore/sigstore/pkg/signature" "golang.org/x/crypto/ed25519" ) @@ -45,9 +45,9 @@ func main() { // protect, i.e. target files. // Define containers for metadata objects and cryptographic keys created below. This - // allows us to sign and write metadata in a batch more easily. The repo.New() instance - // is really just to help and be used as a placeholder for all metadata. - roles := repo.New() + // allows us to sign and write metadata in a batch more easily. The repository.New() instance + // doesn't provide anything else yet other than serving as a placeholder for all metadata. + roles := repository.New() keys := map[string]ed25519.PrivateKey{} // Targets (integrity) diff --git a/metadata/config/config.go b/metadata/config/config.go new file mode 100644 index 00000000..fd31d620 --- /dev/null +++ b/metadata/config/config.go @@ -0,0 +1,25 @@ +package config + +type UpdaterConfig struct { + MaxRootRotations int64 + MaxDelegations int64 + RootMaxLength int64 + TimestampMaxLength int64 + SnapshotMaxLength int64 + TargetsMaxLength int64 + PrefixTargetsWithHash bool +} + +// New creates a new UpdaterConfig instance used by the Updater to +// store configuration +func New() *UpdaterConfig { + return &UpdaterConfig{ + MaxRootRotations: 32, + MaxDelegations: 32, + RootMaxLength: 512000, // bytes + TimestampMaxLength: 16384, // bytes + SnapshotMaxLength: 2000000, // bytes + TargetsMaxLength: 5000000, // bytes + PrefixTargetsWithHash: true, + } +} diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go new file mode 100644 index 00000000..b306ea49 --- /dev/null +++ b/metadata/fetcher/fetcher.go @@ -0,0 +1 @@ +package fetcher diff --git a/metadata/repo/repo.go b/metadata/repository/repository.go similarity index 52% rename from metadata/repo/repo.go rename to metadata/repository/repository.go index cbd78b6e..c808ed4b 100644 --- a/metadata/repo/repo.go +++ b/metadata/repository/repository.go @@ -1,11 +1,11 @@ -package repo +package repository import ( "github.com/rdimitrov/ngo-tuf/metadata" ) -// struct for storing various metadata -type repository struct { +// repositoryType struct for storing metadata +type repositoryType struct { root *metadata.Metadata[metadata.RootType] snapshot *metadata.Metadata[metadata.SnapshotType] timestamp *metadata.Metadata[metadata.TimestampType] @@ -13,48 +13,48 @@ type repository struct { } // New creates an empty repository instance -func New() *repository { - return &repository{ +func New() *repositoryType { + return &repositoryType{ targets: map[string]*metadata.Metadata[metadata.TargetsType]{}, } } // Root returns metadata of type Root -func (r *repository) Root() *metadata.Metadata[metadata.RootType] { +func (r *repositoryType) Root() *metadata.Metadata[metadata.RootType] { return r.root } // SetRoot sets metadata of type Root -func (r *repository) SetRoot(meta *metadata.Metadata[metadata.RootType]) { +func (r *repositoryType) SetRoot(meta *metadata.Metadata[metadata.RootType]) { r.root = meta } // Snapshot returns metadata of type Snapshot -func (r *repository) Snapshot() *metadata.Metadata[metadata.SnapshotType] { +func (r *repositoryType) Snapshot() *metadata.Metadata[metadata.SnapshotType] { return r.snapshot } // SetSnapshot sets metadata of type Snapshot -func (r *repository) SetSnapshot(meta *metadata.Metadata[metadata.SnapshotType]) { +func (r *repositoryType) SetSnapshot(meta *metadata.Metadata[metadata.SnapshotType]) { r.snapshot = meta } // Timestamp returns metadata of type Timestamp -func (r *repository) Timestamp() *metadata.Metadata[metadata.TimestampType] { +func (r *repositoryType) Timestamp() *metadata.Metadata[metadata.TimestampType] { return r.timestamp } // SetTimestamp sets metadata of type Timestamp -func (r *repository) SetTimestamp(meta *metadata.Metadata[metadata.TimestampType]) { +func (r *repositoryType) SetTimestamp(meta *metadata.Metadata[metadata.TimestampType]) { r.timestamp = meta } // Targets returns metadata of type Targets -func (r *repository) Targets(name string) *metadata.Metadata[metadata.TargetsType] { +func (r *repositoryType) Targets(name string) *metadata.Metadata[metadata.TargetsType] { return r.targets[name] } // SetTargets sets metadata of type Targets -func (r *repository) SetTargets(name string, meta *metadata.Metadata[metadata.TargetsType]) { +func (r *repositoryType) SetTargets(name string, meta *metadata.Metadata[metadata.TargetsType]) { r.targets[name] = meta } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 0654b89a..9a76049c 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -3,31 +3,23 @@ package updater import ( "fmt" "io" + "net/url" "os" "strings" "github.com/rdimitrov/ngo-tuf/metadata" + "github.com/rdimitrov/ngo-tuf/metadata/config" "github.com/rdimitrov/ngo-tuf/metadata/trustedmetadata" ) -type UpdaterConfig struct { - MaxRootRotations int64 - MaxDelegations int64 - RootMaxLength int64 - TimestampMaxLength int64 - SnapshotMaxLength int64 - TargetsMaxLength int64 - PrefixTargetsWithHash bool -} type Updater struct { metadataDir string metadataBaseUrl string targetDir string targetBaseUrl string trusted *trustedmetadata.TrustedMetadata - config *UpdaterConfig + config *config.UpdaterConfig // fetcher - // config } // New creates a new “Updater“ instance and loads trusted root metadata. @@ -52,38 +44,38 @@ func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string) (*Update targetDir: targetDir, targetBaseUrl: targetBaseUrl, trusted: trustedMetadataSet, - config: NewConfig(), + config: config.New(), }, nil } -func loadLocalMetadata(name string) ([]byte, error) { - name = fmt.Sprintf("%s.json", name) - in, err := os.Open(name) +// downloadMetadata download a metadata file and return it as bytes +func (up *Updater) downloadMetadata(roleName string, length int, version string) ([]byte, error) { + var urlPath string + roleName = url.QueryEscape(roleName) + if version == "" { + urlPath = fmt.Sprint("%s%s.json", up.metadataBaseUrl, roleName) + } else { + urlPath = fmt.Sprint("%s%s.%s.json", up.metadataBaseUrl, version, roleName) + } + _ = urlPath + // download file with size length from path + return nil, nil +} + +func loadLocalMetadata(roleName string) ([]byte, error) { + roleName = fmt.Sprintf("%s.json", url.QueryEscape(roleName)) + in, err := os.Open(roleName) if err != nil { - return nil, fmt.Errorf("error opening metadata file - %s", name) + return nil, fmt.Errorf("error opening metadata file - %s", roleName) } defer in.Close() data, err := io.ReadAll(in) if err != nil { - return nil, fmt.Errorf("error reading metadata bytes from file - %s", name) + return nil, fmt.Errorf("error reading metadata bytes from file - %s", roleName) } return data, nil } -// NewConfig creates a new UpdaterConfig instance used by the Updater to -// store configuration -func NewConfig() *UpdaterConfig { - return &UpdaterConfig{ - MaxRootRotations: 32, - MaxDelegations: 32, - RootMaxLength: 512000, // bytes - TimestampMaxLength: 16384, // bytes - SnapshotMaxLength: 2000000, // bytes - TargetsMaxLength: 5000000, // bytes - PrefixTargetsWithHash: true, - } -} - // ensureTrailingSlash ensures url ends with a slash func ensureTrailingSlash(url string) string { if strings.HasSuffix(url, "/") { From a298a28e2f51bc92d3faca2e1cdd6841e1c98b1b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 7 Dec 2022 17:21:49 +0200 Subject: [PATCH 015/208] rename to go-tuf-metadata Signed-off-by: Radoslav Dimitrov --- README.md | 2 +- examples/basic_repo.go | 4 +- go.mod | 2 +- metadata/fetcher/fetcher.go | 58 ++++ metadata/metadata.go | 6 +- metadata/repository/repository.go | 2 +- metadata/trustedmetadata/trustedmetadata.go | 110 ++++---- metadata/types.go | 1 + metadata/updater/updater.go | 298 ++++++++++++++++++-- 9 files changed, 392 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index ec8b34d7..f8d1e530 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ secure content delivery and updates. It protects against various types of supply chain attacks and provides resilience to compromise. -NGO-TUF is started from the idea of providing a Go implementation of TUF that is heavily influenced by the +go-tuf-metadata is started from the idea of providing a Go implementation of TUF that is heavily influenced by the design decisions made in [python-tuf](https://github.com/theupdateframework/python-tuf). ## About The Update Framework diff --git a/examples/basic_repo.go b/examples/basic_repo.go index 7e2a7a8b..40a4588f 100644 --- a/examples/basic_repo.go +++ b/examples/basic_repo.go @@ -11,8 +11,8 @@ import ( "path/filepath" "time" - "github.com/rdimitrov/ngo-tuf/metadata" - "github.com/rdimitrov/ngo-tuf/metadata/repository" + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/repository" "github.com/sigstore/sigstore/pkg/signature" "golang.org/x/crypto/ed25519" ) diff --git a/go.mod b/go.mod index 8967939b..59635167 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/rdimitrov/ngo-tuf +module github.com/rdimitrov/go-tuf-metadata go 1.19 diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index b306ea49..14acbe7a 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -1 +1,59 @@ package fetcher + +import ( + "fmt" + "io" + "net/http" + "net/url" + "strconv" +) + +// Fetcher interface +type Fetcher interface { + DownloadFile(urlPath string, maxLength int64) ([]byte, error) +} + +// Default fetcher +type DefaultFetcher struct { + httpUserAgent string +} + +// DownloadFile downloads a file from urlPath, errors out if it failed or its length is larger than maxLength +func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64) ([]byte, error) { + client := http.DefaultClient + req, err := http.NewRequest("GET", urlPath, nil) + if err != nil { + return nil, err + } + // use in case of multiple sessions + if d.httpUserAgent != "" { + req.Header.Set("User-Agent", d.httpUserAgent) + } + // execute the request + res, err := client.Do(req) + if err != nil { + return nil, err + } + defer res.Body.Close() + // handle bad status codes + if res.StatusCode == http.StatusNotFound || res.StatusCode != http.StatusOK { + return nil, &url.Error{ + Op: "GET", + URL: urlPath, + Err: fmt.Errorf("unexpected HTTP status %d", res.StatusCode), + } + } + // get content length + length, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) + if err != nil { + return nil, err + } + // error if the reported size is greater than what is expected + if length > maxLength { + return nil, fmt.Errorf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength) + } + // although the size has been checked above, use a LimitReader in case + // the reported size is inaccurate, or size is -1 which indicates an + // unknown length + return io.ReadAll(io.LimitReader(res.Body, maxLength)) +} diff --git a/metadata/metadata.go b/metadata/metadata.go index 49176ee5..7bad616b 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -9,7 +9,6 @@ import ( "fmt" "hash" "io" - "io/ioutil" "os" "path/filepath" "time" @@ -159,11 +158,11 @@ func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { // ToFile save metadata to file func (meta *Metadata[T]) ToFile(name string, pretty bool) error { - bytes, err := meta.ToBytes(pretty) + data, err := meta.ToBytes(pretty) if err != nil { return fmt.Errorf("failed serializing metadata") } - return ioutil.WriteFile(name, bytes, 0644) + return os.WriteFile(name, data, 0644) } // Sign create signature over Signed and assign it to Signatures @@ -411,6 +410,7 @@ func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles } targetFile.Hashes[v] = hasher.Sum(nil) } + targetFile.Path = localPath return targetFile, nil } diff --git a/metadata/repository/repository.go b/metadata/repository/repository.go index c808ed4b..60983d2b 100644 --- a/metadata/repository/repository.go +++ b/metadata/repository/repository.go @@ -1,7 +1,7 @@ package repository import ( - "github.com/rdimitrov/ngo-tuf/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata" ) // repositoryType struct for storing metadata diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 6d3ee253..ed4f0349 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -4,16 +4,16 @@ import ( "fmt" "time" - "github.com/rdimitrov/ngo-tuf/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata" ) // TrustedMetadata struct for storing trusted metadata type TrustedMetadata struct { - root *metadata.Metadata[metadata.RootType] - snapshot *metadata.Metadata[metadata.SnapshotType] - timestamp *metadata.Metadata[metadata.TimestampType] - targets map[string]*metadata.Metadata[metadata.TargetsType] - refTime time.Time + Root *metadata.Metadata[metadata.RootType] + Snapshot *metadata.Metadata[metadata.SnapshotType] + Timestamp *metadata.Metadata[metadata.TimestampType] + Targets map[string]*metadata.Metadata[metadata.TargetsType] + RefTime time.Time } // New creates a new TrustedMetadata instance which ensures that the @@ -22,8 +22,8 @@ type TrustedMetadata struct { // with the caller making decisions on what is updated. func New(rootData []byte) (*TrustedMetadata, error) { res := &TrustedMetadata{ - targets: map[string]*metadata.Metadata[metadata.TargetsType]{}, - refTime: time.Now().UTC(), + Targets: map[string]*metadata.Metadata[metadata.TargetsType]{}, + RefTime: time.Now().UTC(), } // load and validate the local root metadata. // Valid initial trusted root metadata is required @@ -53,8 +53,8 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { return err } // save root if verified - trusted.root = newRoot - fmt.Println("Loaded trusted root v", trusted.root.Signed.Version) + trusted.Root = newRoot + fmt.Println("Loaded trusted root v", trusted.Root.Signed.Version) return nil } @@ -62,7 +62,7 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { // Note that an expired intermediate root is considered valid: expiry is // only checked for the final root in “UpdateTimestamp()“. func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[metadata.RootType], error) { - if trusted.timestamp != nil { + if trusted.Timestamp != nil { return nil, fmt.Errorf("cannot update root after timestamp") } fmt.Println("Updating root") @@ -76,13 +76,13 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ return nil, fmt.Errorf("expected %s, got %s", metadata.ROOT, newRoot.Signed.Type) } // verify that new root is signed by trusted root - err = trusted.root.VerifyDelegate(metadata.ROOT, newRoot) + err = trusted.Root.VerifyDelegate(metadata.ROOT, newRoot) if err != nil { return nil, err } // verify version - if newRoot.Signed.Version != trusted.root.Signed.Version+1 { - return nil, fmt.Errorf("bad version number, expected %d, got %d", trusted.root.Signed.Version+1, newRoot.Signed.Version) + if newRoot.Signed.Version != trusted.Root.Signed.Version+1 { + return nil, fmt.Errorf("bad version number, expected %d, got %d", trusted.Root.Signed.Version+1, newRoot.Signed.Version) } // verify that new root is signed by itself err = newRoot.VerifyDelegate(metadata.ROOT, newRoot) @@ -90,9 +90,9 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ return nil, err } // save root if verified - trusted.root = newRoot - fmt.Printf("Updated root v%d\n", trusted.root.Signed.Version) - return trusted.root, nil + trusted.Root = newRoot + fmt.Printf("Updated root v%d\n", trusted.Root.Signed.Version) + return trusted.Root, nil } // UpdateTimestamp verifies and loads “data“ as new timestamp metadata. @@ -102,11 +102,11 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ // timestamp will be used for rollback protection). Expired timestamp will // prevent loading snapshot metadata. func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata.Metadata[metadata.TimestampType], error) { - if trusted.snapshot != nil { + if trusted.Snapshot != nil { return nil, fmt.Errorf("cannot update timestamp after snapshot") } // client workflow 5.3.10: Make sure final root is not expired. - if trusted.root.Signed.IsExpired(trusted.refTime) { + if trusted.Root.Signed.IsExpired(trusted.RefTime) { return nil, fmt.Errorf("final root.json is expired") } fmt.Println("Updating timestamp") @@ -121,23 +121,23 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata return nil, fmt.Errorf("expected %s, got %s", metadata.TIMESTAMP, newTimestamp.Signed.Type) } // verify that new timestamp is signed by trusted root - err = trusted.root.VerifyDelegate(metadata.TIMESTAMP, newTimestamp) + err = trusted.Root.VerifyDelegate(metadata.TIMESTAMP, newTimestamp) if err != nil { return nil, err } // if an existing trusted timestamp is updated, // check for a rollback attack - if trusted.timestamp != nil { + if trusted.Timestamp != nil { // prevent rolling back timestamp version - if newTimestamp.Signed.Version < trusted.timestamp.Signed.Version { - return nil, fmt.Errorf("new timestamp version %d must be >= %d", newTimestamp.Signed.Version, trusted.timestamp.Signed.Version) + if newTimestamp.Signed.Version < trusted.Timestamp.Signed.Version { + return nil, fmt.Errorf("new timestamp version %d must be >= %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) } // keep using old timestamp if versions are equal. - if newTimestamp.Signed.Version == trusted.timestamp.Signed.Version { - return nil, fmt.Errorf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.timestamp.Signed.Version) + if newTimestamp.Signed.Version == trusted.Timestamp.Signed.Version { + return nil, fmt.Errorf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) } // prevent rolling back snapshot version - snapshotMeta := trusted.timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + snapshotMeta := trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] newSnapshotMeta := newTimestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] if newSnapshotMeta.Version < snapshotMeta.Version { return nil, fmt.Errorf("new snapshot version %d must be >= %d", newSnapshotMeta.Version, snapshotMeta.Version) @@ -146,21 +146,21 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata // expiry not checked to allow old timestamp to be used for rollback // protection of new timestamp: expiry is checked in UpdateSnapshot() // save root if verified - trusted.timestamp = newTimestamp - fmt.Printf("Updated timestamp v%d\n", trusted.timestamp.Signed.Version) + trusted.Timestamp = newTimestamp + fmt.Printf("Updated timestamp v%d\n", trusted.Timestamp.Signed.Version) // timestamp is loaded: error if it is not valid _final_ timestamp err = trusted.checkFinalTimestamp() if err != nil { // return the new timestamp but also the error if it's expired - return trusted.timestamp, err + return trusted.Timestamp, err } - return trusted.timestamp, nil + return trusted.Timestamp, nil } // checkFinalTimestamp verifies if trusted timestamp is not expired func (trusted *TrustedMetadata) checkFinalTimestamp() error { - if trusted.timestamp.Signed.IsExpired(trusted.refTime) { + if trusted.Timestamp.Signed.IsExpired(trusted.RefTime) { return fmt.Errorf("timestamp.json is expired") } return nil @@ -175,10 +175,10 @@ func (trusted *TrustedMetadata) checkFinalTimestamp() error { // Expired snapshot or snapshot that does not match timestamp meta version will // prevent loading targets. func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bool) (*metadata.Metadata[metadata.SnapshotType], error) { - if trusted.timestamp == nil { + if trusted.Timestamp == nil { return nil, fmt.Errorf("cannot update snapshot before timestamp") } - if trusted.targets[metadata.TARGETS] != nil { + if trusted.Targets[metadata.TARGETS] != nil { return nil, fmt.Errorf("cannot update snapshot after targets") } fmt.Println("Updating targets") @@ -188,7 +188,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo if err != nil { return nil, err } - snapshotMeta := trusted.timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + snapshotMeta := trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] // verify non-trusted data against the hashes in timestamp, if any. // trusted snapshot data has already been verified once. if !isTrusted { @@ -206,7 +206,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo return nil, fmt.Errorf("expected %s, got %s", metadata.SNAPSHOT, newSnapshot.Signed.Type) } // verify that new snapshot is signed by trusted root - err = trusted.root.VerifyDelegate(metadata.SNAPSHOT, newSnapshot) + err = trusted.Root.VerifyDelegate(metadata.SNAPSHOT, newSnapshot) if err != nil { return nil, err } @@ -215,8 +215,8 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo // used in rollback protection: it is checked when targets is updated // if an existing trusted snapshot is updated, check for rollback attack - if trusted.snapshot != nil { - for name, info := range trusted.snapshot.Signed.Meta { + if trusted.Snapshot != nil { + for name, info := range trusted.Snapshot.Signed.Meta { newFileInfo, ok := newSnapshot.Signed.Meta[name] // prevent removal of any metadata in meta if !ok { @@ -231,26 +231,26 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo // expiry not checked to allow old snapshot to be used for rollback // protection of new snapshot: it is checked when targets is updated - trusted.snapshot = newSnapshot - fmt.Printf("Updated snapshot v%d\n", trusted.snapshot.Signed.Version) + trusted.Snapshot = newSnapshot + fmt.Printf("Updated snapshot v%d\n", trusted.Snapshot.Signed.Version) // snapshot is loaded, but we error if it's not valid _final_ snapshot err = trusted.checkFinalSnapshot() if err != nil { // return the new snapshot but also the error if it's expired - return trusted.snapshot, err + return trusted.Snapshot, err } - return trusted.snapshot, nil + return trusted.Snapshot, nil } // checkFinalSnapshot verifies if it's not expired and snapshot version matches timestamp meta version func (trusted *TrustedMetadata) checkFinalSnapshot() error { - if trusted.snapshot.Signed.IsExpired(trusted.refTime) { + if trusted.Snapshot.Signed.IsExpired(trusted.RefTime) { return fmt.Errorf("snapshot.json is expired") } - snapshotMeta := trusted.timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] - if trusted.snapshot.Signed.Version != snapshotMeta.Version { - return fmt.Errorf("expected %d, got %d", snapshotMeta.Version, trusted.snapshot.Signed.Version) + snapshotMeta := trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + if trusted.Snapshot.Signed.Version != snapshotMeta.Version { + return fmt.Errorf("expected %d, got %d", snapshotMeta.Version, trusted.Snapshot.Signed.Version) } return nil } @@ -263,7 +263,7 @@ func (trusted *TrustedMetadata) UpdateTargets(targetsData []byte) (*metadata.Met // updateDelegatedTargets verifies and loads “data“ as new metadata for target “role_name“ func (trusted *TrustedMetadata) updateDelegatedTargets(targetsData []byte, roleName, delegatorName string) (*metadata.Metadata[metadata.TargetsType], error) { var ok bool - if trusted.snapshot == nil { + if trusted.Snapshot == nil { return nil, fmt.Errorf("cannot load targets before snapshot") } // targets cannot be loaded if final snapshot is expired or its version @@ -274,13 +274,13 @@ func (trusted *TrustedMetadata) updateDelegatedTargets(targetsData []byte, roleN } // check if delegator metadata is present if delegatorName == metadata.ROOT { - if trusted.root != nil { + if trusted.Root != nil { ok = true } else { ok = false } } else { - _, ok = trusted.targets[delegatorName] + _, ok = trusted.Targets[delegatorName] } if !ok { return nil, fmt.Errorf("cannot load targets before delegator") @@ -288,7 +288,7 @@ func (trusted *TrustedMetadata) updateDelegatedTargets(targetsData []byte, roleN fmt.Printf("updating %s delegated by %s\n", roleName, delegatorName) // Verify against the hashes in snapshot, if any - meta, ok := trusted.snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] + meta, ok := trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] if !ok { return nil, fmt.Errorf("snapshot does not contain information for %s", roleName) } @@ -306,12 +306,12 @@ func (trusted *TrustedMetadata) updateDelegatedTargets(targetsData []byte, roleN } // get delegator metadata and verify the new delegatee if delegatorName == metadata.ROOT { - err = trusted.root.VerifyDelegate(roleName, newDelegate) + err = trusted.Root.VerifyDelegate(roleName, newDelegate) if err != nil { return nil, err } } else { - err = trusted.targets[delegatorName].VerifyDelegate(roleName, newDelegate) + err = trusted.Targets[delegatorName].VerifyDelegate(roleName, newDelegate) if err != nil { return nil, err } @@ -319,10 +319,10 @@ func (trusted *TrustedMetadata) updateDelegatedTargets(targetsData []byte, roleN if newDelegate.Signed.Version != meta.Version { return nil, fmt.Errorf("expected %s version %d, got %d", roleName, meta.Version, newDelegate.Signed.Version) } - if newDelegate.Signed.IsExpired(trusted.refTime) { + if newDelegate.Signed.IsExpired(trusted.RefTime) { return nil, fmt.Errorf("New %s is expired", roleName) } - trusted.targets[roleName] = newDelegate - fmt.Printf("Updated %s v%d\n", roleName, trusted.targets[roleName].Signed.Version) - return trusted.targets[roleName], nil + trusted.Targets[roleName] = newDelegate + fmt.Printf("Updated %s v%d\n", roleName, trusted.Targets[roleName].Signed.Version) + return trusted.Targets[roleName], nil } diff --git a/metadata/types.go b/metadata/types.go index d4b4e54a..34f2e861 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -104,6 +104,7 @@ type TargetFiles struct { Length int64 `json:"length"` Hashes Hashes `json:"hashes"` Custom json.RawMessage `json:"custom,omitempty"` + Path string } type Delegations struct { diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 9a76049c..b7731bbf 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -5,11 +5,14 @@ import ( "io" "net/url" "os" + "path/filepath" + "strconv" "strings" - "github.com/rdimitrov/ngo-tuf/metadata" - "github.com/rdimitrov/ngo-tuf/metadata/config" - "github.com/rdimitrov/ngo-tuf/metadata/trustedmetadata" + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/config" + "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" + "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" ) type Updater struct { @@ -19,50 +22,289 @@ type Updater struct { targetBaseUrl string trusted *trustedmetadata.TrustedMetadata config *config.UpdaterConfig - // fetcher + fetcher fetcher.Fetcher } -// New creates a new “Updater“ instance and loads trusted root metadata. -func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string) (*Updater, error) { - rootBytes, err := loadLocalMetadata(metadata.ROOT) +// loadTimestamp load local and remote timestamp metadata +func (up *Updater) loadTimestamp() error { + data, err := up.loadLocalMetadata(metadata.TIMESTAMP) if err != nil { - return nil, err + return err } - trustedMetadataSet, err := trustedmetadata.New(rootBytes) + temp, err := up.trusted.UpdateTimestamp(data) if err != nil { - return nil, err + if temp == nil { + return err + } + fmt.Printf("Local timestamp not valid as final: %s", err) } - // validate input - metadataBaseUrl = ensureTrailingSlash(metadataBaseUrl) - if len(targetBaseUrl) > 0 { - targetBaseUrl = ensureTrailingSlash(targetBaseUrl) + // Load from remote (whether local load succeeded or not) + data, err = up.downloadMetadata(metadata.TIMESTAMP, up.config.TimestampMaxLength, "") + if err != nil { + return err } + _, err = up.trusted.UpdateTimestamp(data) + // TODO: If the new timestamp version is the same as current, discard the + // new timestamp. This is normal and it shouldn't raise any error. + if err != nil { + return err + } + err = up.persistMetadata(metadata.TIMESTAMP, data) + if err != nil { + return err + } + return nil +} - return &Updater{ +// loadSnapshot load local (and if needed remote) snapshot metadata +func (up *Updater) loadSnapshot() error { + data, err := up.loadLocalMetadata(metadata.SNAPSHOT) + if err != nil { + return err + } + _, err = up.trusted.UpdateSnapshot(data, true) + if err != nil { + return err + } else { + fmt.Println("Local snapshot is valid: not downloading new one") + } + // Local snapshot not valid as final + snapshotMeta := up.trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + length := snapshotMeta.Length + if length == 0 { + length = up.config.SnapshotMaxLength + } + version := "" + if up.trusted.Root.Signed.ConsistentSnapshot { + version = strconv.FormatInt(snapshotMeta.Version, 10) + } + data, err = up.downloadMetadata(metadata.SNAPSHOT, length, version) + if err != nil { + return err + } + _, err = up.trusted.UpdateSnapshot(data, false) + if err != nil { + return err + } + err = up.persistMetadata(metadata.TIMESTAMP, data) + if err != nil { + return err + } + return nil +} + +// loadTargets load local (and if needed remote) metadata for roleName. +func (up *Updater) loadTargets(roleName, parent string) error { + return nil +} + +// preorderDepthFirstWalk interrogates the tree of target delegations +// in order of appearance (which implicitly order trustworthiness), +// and returns the matching target found in the most trusted role. +func (up *Updater) preorderDepthFirstWalk(targetFilePath string) (*metadata.TargetFiles, error) { + return nil, nil +} + +// loadRoot load remote root metadata. Sequentially load and +// persist on local disk every newer root metadata version +// available on the remote. +func (up *Updater) loadRoot() error { + // calculate boundaries + lowerBound := up.trusted.Root.Signed.Version + 1 + upperBound := lowerBound + up.config.MaxRootRotations + + // loop until we find the latest available version of root + for nextVersion := lowerBound; nextVersion <= upperBound; nextVersion++ { + data, err := up.downloadMetadata(metadata.ROOT, up.config.RootMaxLength, strconv.FormatInt(nextVersion, 10)) + if err != nil { + // if err has status codes 403 or 404 it means current root is newest available + if strings.Contains(err.Error(), "403") || strings.Contains(err.Error(), "404") { + break + } + return err + } + // verify and load the root data + _, err = up.trusted.UpdateRoot(data) + if err != nil { + return err + } + // write root to disk + err = up.persistMetadata(metadata.ROOT, data) + if err != nil { + return err + } + } + return nil +} + +// GetTargetInfo returns “metadata.TargetFiles“ instance with information +// for targetPath. The return value can be used as an argument to +// “DownloadTarget()“ and “FindCachedTarget()“. +// If “Refresh()“ has not been called before calling +// “GetTargetInfo()“, the refresh will be done implicitly. +// As a side-effect this method downloads all the additional (delegated +// targets) metadata it needs to return the target information. +func (up *Updater) GetTargetInfo(targetPath string) (*metadata.TargetFiles, error) { + // do a Refresh() in case there's no trusted targets.json yet + if up.trusted.Targets[metadata.TARGETS] == nil { + err := up.Refresh() + if err != nil { + return nil, err + } + } + return up.preorderDepthFirstWalk(targetPath) +} + +// DownloadTarget downloads the target file specified by “targetinfo“ +func (up *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, error) { + return "", nil +} + +// FindCachedTarget checks whether a local file is an up to date target +func (up *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePath string) (string, error) { + var err error + targetFilePath := "" + // get its path if not provided + if filePath == "" { + targetFilePath, err = up.generateTargetFilePath(targetFile) + if err != nil { + return "", err + } + } else { + targetFilePath = filePath + } + // open the file + in, err := os.Open(targetFilePath) + if err != nil { + return "", fmt.Errorf("error opening target file - %s", targetFilePath) + } + defer in.Close() + // read its data + data, err := io.ReadAll(in) + if err != nil { + return "", fmt.Errorf("error reading target bytes from file - %s", targetFilePath) + } + // verify if this local target file is an up-to-date target + err = targetFile.VerifyLengthHashes(data) + if err != nil { + return "", err + } + // if all okay, return its path + return targetFilePath, nil +} + +// persistMetadata writes metadata to disk atomically to avoid data loss. +func (up *Updater) persistMetadata(roleName string, data []byte) error { + fileName := filepath.Join(up.metadataDir, fmt.Sprintf("%s.json", url.QueryEscape(roleName))) + cwd, err := os.Getwd() + if err != nil { + return err + } + // create a temporary file + file, err := os.CreateTemp(cwd, "tuf_tmp") + if err != nil { + return err + } + // write the data content to the temporary file + err = os.WriteFile(file.Name(), data, 0644) + if err != nil { + // delete the temporary file if there was an error while writing + os.Remove(file.Name()) + return err + } + // if all okay, rename the temporary file to the desired one + err = os.Rename(file.Name(), fileName) + if err != nil { + return err + } + return nil +} + +// Refresh refreshes top-level metadata. +// Downloads, verifies, and loads metadata for the top-level roles in the +// specified order (root -> timestamp -> snapshot -> targets) implementing +// all the checks required in the TUF client workflow. +// A Refresh()“ can be done only once during the lifetime of an Updater. +// If Refresh()“ has not been explicitly called before the first +// “GetTargetInfo()“ call, it will be done implicitly at that time. +// The metadata for delegated roles is not updated by Refresh()“: +// that happens on demand during GetTargetInfo()“. However, if the +// repository uses `consistent_snapshot +// `_, +// then all metadata downloaded by the Updater will use the same consistent +// repository state. +func (up *Updater) Refresh() error { + err := up.loadRoot() + if err != nil { + return err + } + err = up.loadTimestamp() + if err != nil { + return err + } + err = up.loadSnapshot() + if err != nil { + return err + } + err = up.loadTargets(metadata.TARGETS, metadata.ROOT) + if err != nil { + return err + } + return nil +} + +// New creates a new “Updater“ instance and loads trusted root metadata. +func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string, f fetcher.Fetcher) (*Updater, error) { + // use the built-in download fetcher if nothing is provided + if f == nil { + f = &fetcher.DefaultFetcher{} + } + // create an updater instance + updater := &Updater{ metadataDir: metadataDir, - metadataBaseUrl: metadataBaseUrl, + metadataBaseUrl: ensureTrailingSlash(metadataBaseUrl), targetDir: targetDir, - targetBaseUrl: targetBaseUrl, - trusted: trustedMetadataSet, + targetBaseUrl: ensureTrailingSlash(targetBaseUrl), config: config.New(), - }, nil + fetcher: f, + } + // load the root metadata file used for bootstrapping trust + rootBytes, err := updater.loadLocalMetadata(metadata.ROOT) + if err != nil { + return nil, err + } + // create a new trusted metadata instance + trustedMetadataSet, err := trustedmetadata.New(rootBytes) + if err != nil { + return nil, err + } + updater.trusted = trustedMetadataSet + return updater, nil } // downloadMetadata download a metadata file and return it as bytes -func (up *Updater) downloadMetadata(roleName string, length int, version string) ([]byte, error) { - var urlPath string - roleName = url.QueryEscape(roleName) +func (up *Updater) downloadMetadata(roleName string, length int64, version string) ([]byte, error) { + urlPath := up.metadataBaseUrl + // build urlPath if version == "" { - urlPath = fmt.Sprint("%s%s.json", up.metadataBaseUrl, roleName) + urlPath = fmt.Sprintf("%s%s.json", urlPath, url.QueryEscape(roleName)) } else { - urlPath = fmt.Sprint("%s%s.%s.json", up.metadataBaseUrl, version, roleName) + urlPath = fmt.Sprintf("%s%s.%s.json", urlPath, version, url.QueryEscape(roleName)) } - _ = urlPath - // download file with size length from path - return nil, nil + return up.fetcher.DownloadFile(urlPath, length) +} + +// generateTargetFilePath generates path from TargetFiles +func (up *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, error) { + if up.targetDir == "" { + return "", fmt.Errorf("target_dir must be set if filepath is not given") + } + // Use URL encoded target path as filename + return url.JoinPath(up.targetDir, url.QueryEscape(tf.Path)) } -func loadLocalMetadata(roleName string) ([]byte, error) { +// loadLocalMetadata reads a local .json file and returns its bytes +func (up *Updater) loadLocalMetadata(roleName string) ([]byte, error) { roleName = fmt.Sprintf("%s.json", url.QueryEscape(roleName)) in, err := os.Open(roleName) if err != nil { From c3b1ad43cb3a3541841b65615ee811e854a16793 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 7 Dec 2022 17:30:45 +0200 Subject: [PATCH 016/208] update README.md and testdata Signed-off-by: Radoslav Dimitrov --- NOTES.md | 7 +- README.md | 4 +- examples/testdata/1.go-scripts.json | 23 ++++ examples/testdata/1.python-scripts.json | 22 --- examples/testdata/1.root.json | 162 +++++++++++----------- examples/testdata/1.snapshot.json | 34 ++--- examples/testdata/1.targets.json | 41 +++--- examples/testdata/2.root.json | 170 ++++++++++++------------ examples/testdata/2.snapshot.json | 40 +++--- examples/testdata/2.targets.json | 74 +++++------ examples/testdata/3.root.json | 111 ++++++++++++++++ examples/testdata/timestamp.json | 34 ++--- 12 files changed, 418 insertions(+), 304 deletions(-) create mode 100644 examples/testdata/1.go-scripts.json delete mode 100755 examples/testdata/1.python-scripts.json mode change 100755 => 100644 examples/testdata/1.root.json mode change 100755 => 100644 examples/testdata/1.snapshot.json mode change 100755 => 100644 examples/testdata/1.targets.json mode change 100755 => 100644 examples/testdata/2.root.json mode change 100755 => 100644 examples/testdata/2.snapshot.json mode change 100755 => 100644 examples/testdata/2.targets.json create mode 100644 examples/testdata/3.root.json mode change 100755 => 100644 examples/testdata/timestamp.json diff --git a/NOTES.md b/NOTES.md index 70946fe2..6482643a 100644 --- a/NOTES.md +++ b/NOTES.md @@ -4,7 +4,8 @@ * Add the option to set custom key ID * Add creating a metadata from init struct * Support for hashbin delegations and succint roles -* Make sure to not discard custom fields when converting, i.e. for keys and such -* Verify and fix how rsa and ecdsa keys are stored -* Revisit the design - should we use generics or just 4 different structs for each metadata type? +* Verify we don't discard custom fields when converting, i.e. for keys and such +* Verify and fix if needed the format of which keys are stored +* Revisit the design - should we use generics or just 4 different types for each metadata? * Investigate whether depending on `sigstore/signatures` can cause dependency cycle and if so, how to avoid it? +* Add support for storing/loading metadata and target files from AWS S3 buckets diff --git a/README.md b/README.md index f8d1e530..b2c0cc34 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ or “update workflow”. * The example demonstrates how to *manually* create and maintain repository metadata using the low-level Metadata API. -### :white_check_mark: - Implement the `TrustedMetadata` package +### :white_check_mark: - Implement the `trustedmetadata` package * A `TrustedMetadata` instance ensures that the collection of metadata in it is valid and trusted through the whole client update workflow. It provides easy ways to update @@ -74,7 +74,7 @@ the metadata with the caller making decisions on what is updated. * The `config` package is used to store ``Updater`` configuration. -### :construction: - Implement client API - `fetcher` package +### :white_check_mark: - Implement client API - `fetcher` package * The `fetcher` package defines an interface for abstract network download. diff --git a/examples/testdata/1.go-scripts.json b/examples/testdata/1.go-scripts.json new file mode 100644 index 00000000..dd74e89c --- /dev/null +++ b/examples/testdata/1.go-scripts.json @@ -0,0 +1,23 @@ +{ + "signed": { + "_type": "targets", + "spec_version": "1.0.31", + "version": 1, + "expires": "2022-12-14T21:45:43.593949Z", + "targets": { + "examples/basic_repo.go": { + "length": 23252, + "hashes": { + "sha256": "2057628adfcaaedacaab5101e4bb7c4c28a4715b875ae9c381643671c39bdc4a" + }, + "Path": "/Users/dimitrovr/workspace/go-tuf-metadata/examples/basic_repo.go" + } + } + }, + "signatures": [ + { + "keyid": "0df633150a8f5bf05a2619221f030ddb4a4511db4f6c8f3aae8c2eb0e97915e4", + "sig": "e3e22236ac1700b16c047ed7a8e06083cf08867466c0f3362007fab4c6e33719d100ac52ea9495a1cf908ca811f385cceeaa97cecd014ec3e9c2c5c7eaffc206" + } + ] +} \ No newline at end of file diff --git a/examples/testdata/1.python-scripts.json b/examples/testdata/1.python-scripts.json deleted file mode 100755 index 6b166923..00000000 --- a/examples/testdata/1.python-scripts.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signatures": [ - { - "keyid": "322cf964acb4d34e57a7cd2ddfbdc75583a2baba04446338aea15febc4249c87", - "sig": "98b3dfed196e52b273cd44ef1367cb8dde0698a90e4d645fba7f2efa987e762d85645732d281d38f18f5f07af9287da69201b5f727555fcc8762a84cf7606a03" - } - ], - "signed": { - "_type": "targets", - "expires": "2022-11-28T17:14:43Z", - "spec_version": "1.0.30", - "targets": { - "repo_example/basic_repo.py": { - "hashes": { - "sha256": "f29be71d9f3e83945e5bc7ea5a187338e1a5a2ec5bb746481aa6faa59ebaf40e" - }, - "length": 14721 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/examples/testdata/1.root.json b/examples/testdata/1.root.json old mode 100755 new mode 100644 index d81681a7..53dc916b --- a/examples/testdata/1.root.json +++ b/examples/testdata/1.root.json @@ -1,83 +1,83 @@ { - "signatures": [ - { - "keyid": "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142", - "sig": "e3a62de4dfc0b5b99b6ab4ef4060e54524e3bd2aed57bef9b54c3142d6f594e2094d9735c775f833c254f870c035e9c8622955defa4cefc130cb4a240959c50c" - }, - { - "keyid": "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5", - "sig": "7b0510b458e62bae4025632d7d60ec7a7fed98efbafb819ac40ead5bd70154bddf384385554dd2e4a609c163107cd3a0486c6cfa4bf5b68000bd81c2fd4d860b" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2023-11-21T17:14:43Z", - "keys": { - "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5": { - "keytype": "ed25519", - "keyval": { - "public": "0b470699f4ab18651379cb4916aaab55202ddf361b8476055280c437c60a3261" - }, - "scheme": "ed25519" - }, - "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5": { - "keytype": "ed25519", - "keyval": { - "public": "d3e4315f1ef5716b055573a09e85664c6c06191e7c3a005e2ffd87aeab6b6824" - }, - "scheme": "ed25519" - }, - "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed": { - "keytype": "ed25519", - "keyval": { - "public": "e026bf3eb3b73eb9e4e2376823478acb2edcc64326eaaa0ee7dac16b52e0f925" - }, - "scheme": "ed25519" - }, - "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142": { - "keytype": "ed25519", - "keyval": { - "public": "1d3da289035d44600cb74be0645e7c3f9fc8758038d602bf29d674110cc526f6" - }, - "scheme": "ed25519" - }, - "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd": { - "keytype": "ed25519", - "keyval": { - "public": "3a2c095be6f5d3a61581eeb5c2deb08c88e6c89831a065d0088e244accf4bdad" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142", - "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5" - ], - "threshold": 2 - }, - "snapshot": { - "keyids": [ - "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.30", - "version": 1 - } + "signed": { + "_type": "root", + "spec_version": "1.0.31", + "consistent_snapshot": true, + "version": 1, + "expires": "2023-12-07T21:45:43.583629Z", + "keys": { + "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAMR3IzvSvQWkdjRkWXh3MEN+4MnjQEXiqHn84y0GKPBA=\n-----END PUBLIC KEY-----\n" + } + }, + "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAsw6Lf/GJ6fYcIrJL3QcYL2rCl1olc664Y+2ysp6nMG4=\n-----END PUBLIC KEY-----\n" + } + }, + "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/ph0QVgfNBFSqsAuTXVrK8tyA6fZWuVSlC4u7pV9818=\n-----END PUBLIC KEY-----\n" + } + }, + "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA5Lid84j/me8Fov8B390k87w5+pA7hQZIWL5VcSl6B5Y=\n-----END PUBLIC KEY-----\n" + } + }, + "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAxt0doK1NRRsH01PVuDjNCCyJUyHVuVjvB69JkwOq5/U=\n-----END PUBLIC KEY-----\n" + } + } + }, + "roles": { + "root": { + "keyids": [ + "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", + "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af" + ], + "threshold": 2 + }, + "snapshot": { + "keyids": [ + "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee" + ], + "threshold": 1 + } + } + }, + "signatures": [ + { + "keyid": "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", + "sig": "c52e03c80be04eb8b86dc529e7c84517add201cc313977ee5094790118c11fac3cea61152c51c6ef591678fc56bf09ab1db8bb9f75fb43b4c694ac23060abb06" + }, + { + "keyid": "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", + "sig": "c134171ec2a5b564b77f17a1856574749c1cfef58f255169242d65eacb821a9c6682e5ccb8730b7d9747708891814cb18cdfe0ffb0c99dc286766da0fcdbf60a" + } + ] } \ No newline at end of file diff --git a/examples/testdata/1.snapshot.json b/examples/testdata/1.snapshot.json old mode 100755 new mode 100644 index c95e7ab4..80368361 --- a/examples/testdata/1.snapshot.json +++ b/examples/testdata/1.snapshot.json @@ -1,19 +1,19 @@ { - "signatures": [ - { - "keyid": "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5", - "sig": "ce880634087e5cdd37967b7fe3ae74c5b0d757c8ad00c67d83ffa88e438db7a26f0cfd83dfd27042e88e116045b81be81b184356598f43e4951392680d8bb80b" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2022-11-28T17:14:43Z", - "meta": { - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0.30", - "version": 1 - } + "signed": { + "_type": "snapshot", + "spec_version": "1.0.31", + "version": 1, + "expires": "2022-12-14T21:45:43.583628Z", + "meta": { + "targets.json": { + "version": 1 + } + } + }, + "signatures": [ + { + "keyid": "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8", + "sig": "dc22700a81a079e4a9567ee856b62ef477d1de093bb5eaf0e0336738d4733052eceb7bd07e0ea5b576102d7816ba97778c18fa81a5412f906eb3d7a828630f0c" + } + ] } \ No newline at end of file diff --git a/examples/testdata/1.targets.json b/examples/testdata/1.targets.json old mode 100755 new mode 100644 index 5c095c8b..a601181e --- a/examples/testdata/1.targets.json +++ b/examples/testdata/1.targets.json @@ -1,22 +1,23 @@ { - "signatures": [ - { - "keyid": "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed", - "sig": "cdfb73a25173d87701dcefd8ffdfc08acb86e190f31ac59b11dbbea9e03fcec1603904a7c7306af496e24f397664d373c960e46a80ed3d3570647a19bd981202" - } - ], - "signed": { - "_type": "targets", - "expires": "2022-11-28T17:14:43Z", - "spec_version": "1.0.30", - "targets": { - "repo_example/basic_repo.py": { - "hashes": { - "sha256": "f29be71d9f3e83945e5bc7ea5a187338e1a5a2ec5bb746481aa6faa59ebaf40e" - }, - "length": 14721 - } - }, - "version": 1 - } + "signed": { + "_type": "targets", + "spec_version": "1.0.31", + "version": 1, + "expires": "2022-12-14T21:45:43.582245Z", + "targets": { + "examples/basic_repo.go": { + "length": 23252, + "hashes": { + "sha256": "2057628adfcaaedacaab5101e4bb7c4c28a4715b875ae9c381643671c39bdc4a" + }, + "Path": "/Users/dimitrovr/workspace/go-tuf-metadata/examples/basic_repo.go" + } + } + }, + "signatures": [ + { + "keyid": "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2", + "sig": "119c0a74d99b1d3dbe313d93d98fff30991f9f14f16d9a33bae6aa1b2ea2e84beea87556da6bcadcdb4d6d134e0dbb3e2cb9b12e609cec5352fae788bfede809" + } + ] } \ No newline at end of file diff --git a/examples/testdata/2.root.json b/examples/testdata/2.root.json old mode 100755 new mode 100644 index b2cf477e..28eba81d --- a/examples/testdata/2.root.json +++ b/examples/testdata/2.root.json @@ -1,87 +1,87 @@ { - "signatures": [ - { - "keyid": "825aae332118576e99512c4e065547d934199c23e8d14004223a90c6ac1b3142", - "sig": "97788ae96aa16e092689346140a88c2e1c74a1ad780b4851744f3cde969b0d84ff3d760b34aa0a4f708ff396775e7f7183a6c7e142d45d8004db1754edca9408" - }, - { - "keyid": "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5", - "sig": "b62226470fd616c1b3d1eef2b9cc33d9537b078d098c2085b7366f8737ffc2647f1a9df636341af2c9c5b934d3032b58edc66bc22a65d0485c46d51b3131ab02" - }, - { - "keyid": "24f316df9097265fdccbc9e37f4c5ab0480fa8bb4b80c378b8f90418cfa03ed1", - "sig": "3c62bd91a4c0967b38fd0217cec20ed7a7dfb0c6c98551a2c0561153b5a2d905ab5a6ca3121adde009ea35419b89dcec64e747d6929829ac79895110dbf3be08" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2023-11-21T17:14:43Z", - "keys": { - "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5": { - "keytype": "ed25519", - "keyval": { - "public": "0b470699f4ab18651379cb4916aaab55202ddf361b8476055280c437c60a3261" - }, - "scheme": "ed25519" - }, - "24f316df9097265fdccbc9e37f4c5ab0480fa8bb4b80c378b8f90418cfa03ed1": { - "keytype": "ed25519", - "keyval": { - "public": "fe60e6edc0e36a0dc7fbb75753bdf187739b2e360a4e5002922af25eaa785403" - }, - "scheme": "ed25519" - }, - "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5": { - "keytype": "ed25519", - "keyval": { - "public": "d3e4315f1ef5716b055573a09e85664c6c06191e7c3a005e2ffd87aeab6b6824" - }, - "scheme": "ed25519" - }, - "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed": { - "keytype": "ed25519", - "keyval": { - "public": "e026bf3eb3b73eb9e4e2376823478acb2edcc64326eaaa0ee7dac16b52e0f925" - }, - "scheme": "ed25519" - }, - "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd": { - "keytype": "ed25519", - "keyval": { - "public": "3a2c095be6f5d3a61581eeb5c2deb08c88e6c89831a065d0088e244accf4bdad" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "21b6d3ca68e4e02166005c827f91c73c5f1fe4943c1f9e349d7bc490c1f0f4b5", - "24f316df9097265fdccbc9e37f4c5ab0480fa8bb4b80c378b8f90418cfa03ed1" - ], - "threshold": 2 - }, - "snapshot": { - "keyids": [ - "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.30", - "version": 2 - } + "signed": { + "_type": "root", + "spec_version": "1.0.31", + "consistent_snapshot": true, + "version": 2, + "expires": "2023-12-07T21:45:43.583629Z", + "keys": { + "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAsw6Lf/GJ6fYcIrJL3QcYL2rCl1olc664Y+2ysp6nMG4=\n-----END PUBLIC KEY-----\n" + } + }, + "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/ph0QVgfNBFSqsAuTXVrK8tyA6fZWuVSlC4u7pV9818=\n-----END PUBLIC KEY-----\n" + } + }, + "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA5Lid84j/me8Fov8B390k87w5+pA7hQZIWL5VcSl6B5Y=\n-----END PUBLIC KEY-----\n" + } + }, + "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAxt0doK1NRRsH01PVuDjNCCyJUyHVuVjvB69JkwOq5/U=\n-----END PUBLIC KEY-----\n" + } + }, + "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEARiLuKbSCRTHw7zijJOEQ8Bq33OwC/d2EDUrAW1bgmrg=\n-----END PUBLIC KEY-----\n" + } + } + }, + "roles": { + "root": { + "keyids": [ + "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", + "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6" + ], + "threshold": 2 + }, + "snapshot": { + "keyids": [ + "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee" + ], + "threshold": 1 + } + } + }, + "signatures": [ + { + "keyid": "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", + "sig": "1e41524f4cf74984334b465f2c785a60e3763b413d226026cb2eebc95f36309566def96f70a34cef3e565e1d344dd8299d3923989617c6129ff049cff4956104" + }, + { + "keyid": "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", + "sig": "46d579fefa2f1b323d8b199ef86c48f2e944994fa99a4eb9f985f0ab12899c4d5b371e21f9875d9423da7111d3cf4bbbcaf50f4ab34a992788576ec1ee171300" + }, + { + "keyid": "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6", + "sig": "b261c1de4f93f82440ce170ff02f20946f424f9c93ebbaa8b8a1aac9c52cd94c5fbeb1221fb15cec0f6e5dfbb8d79e74403038a838def3297bf799c8ba8eab00" + } + ] } \ No newline at end of file diff --git a/examples/testdata/2.snapshot.json b/examples/testdata/2.snapshot.json old mode 100755 new mode 100644 index 333f559e..6b7589c4 --- a/examples/testdata/2.snapshot.json +++ b/examples/testdata/2.snapshot.json @@ -1,22 +1,22 @@ { - "signatures": [ - { - "keyid": "46525ed124f01a204652cfb62bb339ec6b8808036aecc505188620c2729743b5", - "sig": "a0c2cd11a47a12e11fc563cafaec57531ce53dc5f9f65e222ec91c9904e8afa1e5a66198d8971c357c3f8cc154a53fcae34561c07b3aad1c97c7cb091058440f" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2022-11-28T17:14:43Z", - "meta": { - "python-scripts.json": { - "version": 1 - }, - "targets.json": { - "version": 2 - } - }, - "spec_version": "1.0.30", - "version": 2 - } + "signed": { + "_type": "snapshot", + "spec_version": "1.0.31", + "version": 2, + "expires": "2022-12-14T21:45:43.583628Z", + "meta": { + "go-scripts": { + "version": 1 + }, + "targets.json": { + "version": 2 + } + } + }, + "signatures": [ + { + "keyid": "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8", + "sig": "e3f21edc33bcda3d64a4fa5ad44885eada6a6c735d4010bb00089d89cb76618e8c21a8cb5489c9eb8d0a19fcb40670001221f8dfb66dcc6c51088d3f1fd7fe0b" + } + ] } \ No newline at end of file diff --git a/examples/testdata/2.targets.json b/examples/testdata/2.targets.json old mode 100755 new mode 100644 index 6e592b94..4d1cac39 --- a/examples/testdata/2.targets.json +++ b/examples/testdata/2.targets.json @@ -1,39 +1,39 @@ { - "signatures": [ - { - "keyid": "5ac9d776498e3678d7b9709b18b42793e4f0ea12dcdbe287b586e926a62e11ed", - "sig": "bad74a90c337cbf50bd3f103b29dca0f86848b87691e3d78cd45fb81aefe5af3ac0b19da4c7395d7ae3db08b0b616b429b93c7e968d2d159697701986b08ea03" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": { - "322cf964acb4d34e57a7cd2ddfbdc75583a2baba04446338aea15febc4249c87": { - "keytype": "ed25519", - "keyval": { - "public": "2a2ce05007e88856d095cc882fdf580c821badaf3a4f9e84489ac8b09aca38c2" - }, - "scheme": "ed25519" - } - }, - "roles": [ - { - "keyids": [ - "322cf964acb4d34e57a7cd2ddfbdc75583a2baba04446338aea15febc4249c87" - ], - "name": "python-scripts", - "paths": [ - "*.py" - ], - "terminating": true, - "threshold": 1 - } - ] - }, - "expires": "2023-11-21T17:14:43Z", - "spec_version": "1.0.30", - "targets": {}, - "version": 2 - } + "signed": { + "_type": "targets", + "spec_version": "1.0.31", + "version": 2, + "expires": "2023-12-07T21:45:43.593989Z", + "targets": {}, + "delegations": { + "keys": { + "0df633150a8f5bf05a2619221f030ddb4a4511db4f6c8f3aae8c2eb0e97915e4": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEApfH0vl7dtoz0J3UJS6V47d1P0h3PxftYE0Ev9P0L8pk=\n-----END PUBLIC KEY-----\n" + } + } + }, + "roles": [ + { + "name": "go-scripts", + "keyids": [ + "0df633150a8f5bf05a2619221f030ddb4a4511db4f6c8f3aae8c2eb0e97915e4" + ], + "threshold": 1, + "terminating": true, + "paths": [ + "*.go" + ] + } + ] + } + }, + "signatures": [ + { + "keyid": "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2", + "sig": "f8fc91acf209aab59a68e1862fa4efee07ccf08dfc68edfde8b413e60d480cef16c5035f2a54a31fbd9164275c62effc9dd5dbf8b23a3aae61c4cbe7e57e440c" + } + ] } \ No newline at end of file diff --git a/examples/testdata/3.root.json b/examples/testdata/3.root.json new file mode 100644 index 00000000..bd917763 --- /dev/null +++ b/examples/testdata/3.root.json @@ -0,0 +1,111 @@ +{ + "signed": { + "_type": "root", + "spec_version": "1.0.31", + "consistent_snapshot": true, + "version": 3, + "expires": "2023-12-07T21:45:43.583629Z", + "keys": { + "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAsw6Lf/GJ6fYcIrJL3QcYL2rCl1olc664Y+2ysp6nMG4=\n-----END PUBLIC KEY-----\n" + } + }, + "5b4e2d5150acf8c633be14f03b3ee2e00701f4b67cb8c6e0655ebed629a51543": { + "keytype": "ecdsa-sha2-nistp256", + "scheme": "ecdsa-sha2-nistp256", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9yu5eGyRtNJdy/7H/1/wplsfYjs9\nY1SHrLiVWgtEmBqi/Z1YAOY1qdOaR4eD0W1GU40dmw6/UwhAYZdXAGBlsA==\n-----END PUBLIC KEY-----\n" + } + }, + "616ad32f17442cd7f55ad4c8b8f305267eaf933bf1d99e779a3e89bf6c9d3e2b": { + "keytype": "rsa", + "scheme": "rsassa-pss-sha256", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvFTgbL3WPSxfJ2qDvTuS\nJ5+qjW85zmDM6GKlFwfK8Jth1xZJUtiBVNfbSjcfXrg0Ua3/bYT8r6RiNrbyNIFT\ngNQu3jeMRgNifbqcOe/DIvURVXLANqPWPKflVlyLCTr5dvobEMsG977TmYdLZhsn\nsh/OU4bAYBadJTn1MLe/ieP7uqn/xbqfmLXVPrqDkxw1P2hoFi6l++Lh/6cCSOYc\nV5vPXGHeZy5aEQwuAUWrjbozZ9M9qjbbpF6qs9rs3FoiJt0nb0mFuxaXuyZHEuH4\no+beWnd72HqqFdF8DCLu6veMs/Je7pq/mWg7272S2NijnGxyWgD4wk6XlOSYzX1m\nlQIDAQAB\n-----END PUBLIC KEY-----\n" + } + }, + "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/ph0QVgfNBFSqsAuTXVrK8tyA6fZWuVSlC4u7pV9818=\n-----END PUBLIC KEY-----\n" + } + }, + "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA5Lid84j/me8Fov8B390k87w5+pA7hQZIWL5VcSl6B5Y=\n-----END PUBLIC KEY-----\n" + } + }, + "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAxt0doK1NRRsH01PVuDjNCCyJUyHVuVjvB69JkwOq5/U=\n-----END PUBLIC KEY-----\n" + } + }, + "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEARiLuKbSCRTHw7zijJOEQ8Bq33OwC/d2EDUrAW1bgmrg=\n-----END PUBLIC KEY-----\n" + } + } + }, + "roles": { + "root": { + "keyids": [ + "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", + "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6", + "616ad32f17442cd7f55ad4c8b8f305267eaf933bf1d99e779a3e89bf6c9d3e2b", + "5b4e2d5150acf8c633be14f03b3ee2e00701f4b67cb8c6e0655ebed629a51543" + ], + "threshold": 4 + }, + "snapshot": { + "keyids": [ + "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee" + ], + "threshold": 1 + } + } + }, + "signatures": [ + { + "keyid": "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", + "sig": "66b0e54d0f7c2ec19ae46d40d1e806e1b02083d25e3197aac85615a23afc43a84eb912102e891c745e7a698321c31248c8d1eb82c8860e7e77b5f4bb93695e0b" + }, + { + "keyid": "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", + "sig": "1a6a9c3d6d9e5f6cb920f2ac2ae1b75665968be54ec06b2a3012134142d973b8ad7e07c467f7c0a3ea60ffa391661bf64df4292d7541db2f7262d2c0f8f49a0b" + }, + { + "keyid": "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6", + "sig": "a8d5723b3c248d9aba32b6dd530e976ecfc0dc07dafe725927d0eef74c06a4d16a0a12d82e2034681e7136c90fb075f2916a6ea97ea9780d1af6b6387fadd70e" + }, + { + "keyid": "616ad32f17442cd7f55ad4c8b8f305267eaf933bf1d99e779a3e89bf6c9d3e2b", + "sig": "2f2b964f15b1c8f042da39f9d3a964a846659805d746b411ea4a38bec6bca7225893bcb1de6d1cbff0fbbc524dab606fd1bcdd547c9bae73bc9bde073b81e6589c91f15af468740b47038383131b433e23942405ffa49c3a304b1513db9320a4cd69ae4d4dd4056af8e1e80d9ab3515a189925a177644b4d53774d589c2cbafdb867b18fc5bfe6bdebfeb089376bcbbf7ffbb26d7c875f8127a54d484a02d2b7ee6ef55231a3a8fb22eefc0ac5b747cf9f107f209414b7ba6535caa813b2f9ee4b0772667fc9bfd3cfe90d52d3a0dd4fa334f2ac485bd49e34fbda89694822843873014baf4e32fad3cc5aecac1eb03749b0dc2393b3655e64fb1ec326323b91" + }, + { + "keyid": "5b4e2d5150acf8c633be14f03b3ee2e00701f4b67cb8c6e0655ebed629a51543", + "sig": "304502207c7b7bc5218dea6de5dc6ab2f5a4533ec74209bd87ceae8c32f4362765844b7e022100c6889b66aae06437695a9c4c19cdc57c5216a4c6a27ad541c37fc51514dc74bd" + } + ] +} \ No newline at end of file diff --git a/examples/testdata/timestamp.json b/examples/testdata/timestamp.json old mode 100755 new mode 100644 index b279a558..8643ca89 --- a/examples/testdata/timestamp.json +++ b/examples/testdata/timestamp.json @@ -1,19 +1,19 @@ { - "signatures": [ - { - "keyid": "f560e27a3ae9ba884c3561ef5b09b10ba927d5d853f7cd9b750a2a433a8bf8cd", - "sig": "b32389c852b4f1081bf08c5fdfaa493f4879c0a1e5a8a4f2f8d6acdd1936cc10786499f87c118fcc82e4e420d9f4abb30e05b4de0f0e4d50a0a1bbc0936d560c" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2022-11-22T17:14:43Z", - "meta": { - "snapshot.json": { - "version": 2 - } - }, - "spec_version": "1.0.30", - "version": 2 - } + "signed": { + "_type": "timestamp", + "spec_version": "1.0.31", + "version": 2, + "expires": "2022-12-08T21:45:43.583629Z", + "meta": { + "snapshot.json": { + "version": 2 + } + } + }, + "signatures": [ + { + "keyid": "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee", + "sig": "71efad39a7e1046ca359957a6084ce4ab47162e441a05614b8e1d243b342c8dfc271a68037d899e7bd8f33e8a2525199362b4ff0384b57d286cccd0145e17202" + } + ] } \ No newline at end of file From db83b7281df91b29427dd720d30edb2d6f4c1fe8 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 8 Dec 2022 16:27:45 +0200 Subject: [PATCH 017/208] proceed implementing the Updater - implement loadTargets Signed-off-by: Radoslav Dimitrov --- metadata/config/config.go | 2 +- metadata/trustedmetadata/trustedmetadata.go | 6 +- metadata/updater/updater.go | 133 ++++++++++++++++++-- 3 files changed, 130 insertions(+), 11 deletions(-) diff --git a/metadata/config/config.go b/metadata/config/config.go index fd31d620..4a5ec69a 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -2,7 +2,7 @@ package config type UpdaterConfig struct { MaxRootRotations int64 - MaxDelegations int64 + MaxDelegations int RootMaxLength int64 TimestampMaxLength int64 SnapshotMaxLength int64 diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index ed4f0349..409445e9 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -257,11 +257,11 @@ func (trusted *TrustedMetadata) checkFinalSnapshot() error { // UpdateTargets verifies and loads “data“ as new top-level targets metadata. func (trusted *TrustedMetadata) UpdateTargets(targetsData []byte) (*metadata.Metadata[metadata.TargetsType], error) { - return trusted.updateDelegatedTargets(targetsData, metadata.TARGETS, metadata.ROOT) + return trusted.UpdateDelegatedTargets(targetsData, metadata.TARGETS, metadata.ROOT) } -// updateDelegatedTargets verifies and loads “data“ as new metadata for target “role_name“ -func (trusted *TrustedMetadata) updateDelegatedTargets(targetsData []byte, roleName, delegatorName string) (*metadata.Metadata[metadata.TargetsType], error) { +// UpdateDelegatedTargets verifies and loads “data“ as new metadata for target “role_name“ +func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleName, delegatorName string) (*metadata.Metadata[metadata.TargetsType], error) { var ok bool if trusted.Snapshot == nil { return nil, fmt.Errorf("cannot load targets before snapshot") diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index b7731bbf..c5d783ab 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -1,6 +1,7 @@ package updater import ( + "encoding/hex" "fmt" "io" "net/url" @@ -15,6 +16,29 @@ import ( "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" ) +// Client update workflow implementation +// The "Updater" provides an implementation of the `TUF client workflow +// `_. +// "Updater" provides an API to query available targets and to download them in a +// secure manner: All downloaded files are verified by signed metadata. +// High-level description of "Updater" functionality: +// * Initializing an "Updater" loads and validates the trusted local root +// metadata: This root metadata is used as the source of trust for all other +// metadata. +// * "Refresh()"" can optionally be called to update and load all top-level +// metadata as described in the specification, using both locally cached +// metadata and metadata downloaded from the remote repository. If refresh is +// not done explicitly, it will happen automatically during the first target +// info lookup. +// * "Updater" can be used to download targets. For each target: +// * "GetTargetInfo()"" is first used to find information about a +// specific target. This will load new targets metadata as needed (from +// local cache or remote repository). +// * "FindCachedTarget()"" can optionally be used to check if a +// target file is already locally cached. +// * "DownloadTarget()" downloads a target file and ensures it is +// verified correct by the metadata. + type Updater struct { metadataDir string metadataBaseUrl string @@ -94,14 +118,64 @@ func (up *Updater) loadSnapshot() error { } // loadTargets load local (and if needed remote) metadata for roleName. -func (up *Updater) loadTargets(roleName, parent string) error { - return nil +func (up *Updater) loadTargets(roleName, parentName string) (*metadata.Metadata[metadata.TargetsType], error) { + // avoid loading 'roleName' more than once during "GetTargetInfo" + role, ok := up.trusted.Targets[roleName] + if ok { + return role, nil + } + data, err := up.loadLocalMetadata(roleName) + if err != nil { + return nil, err + } + delegatedTargets, err := up.trusted.UpdateDelegatedTargets(data, roleName, parentName) + if err == nil { + fmt.Printf("Local %s is valid: not downloading new one\n", roleName) + return delegatedTargets, nil + } else { + // local 'role' does not exist or is invalid: update from remote + if up.trusted.Snapshot != nil { + metaInfo := up.trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] + length := metaInfo.Length + if length != 0 { + length = up.config.TargetsMaxLength + } + version := "" + if up.trusted.Root.Signed.ConsistentSnapshot { + version = strconv.FormatInt(metaInfo.Version, 10) + } + data, err := up.downloadMetadata(roleName, length, version) + if err != nil { + return nil, err + } + delegatedTargets, err := up.trusted.UpdateDelegatedTargets(data, roleName, parentName) + if err != nil { + return nil, err + } + err = up.persistMetadata(roleName, data) + if err != nil { + return nil, err + } + return delegatedTargets, nil + } + return nil, err + } } -// preorderDepthFirstWalk interrogates the tree of target delegations +// preOrderDepthFirstWalk interrogates the tree of target delegations // in order of appearance (which implicitly order trustworthiness), // and returns the matching target found in the most trusted role. -func (up *Updater) preorderDepthFirstWalk(targetFilePath string) (*metadata.TargetFiles, error) { +func (up *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata.TargetFiles, error) { + // list of delegations to be interrogated. A (role, parent role) pair + // is needed to load and verify the delegated targets metadata. + delegationsToVisit := []string{metadata.TARGETS, metadata.ROOT} + visitedRoleNames := map[string]bool{} + + // pre-order depth-first traversal of the graph of target delegations. + for len(visitedRoleNames) <= up.config.MaxDelegations && len(delegationsToVisit) > 0 { + // pop the role name from the top of the stack. + + } return nil, nil } @@ -152,12 +226,57 @@ func (up *Updater) GetTargetInfo(targetPath string) (*metadata.TargetFiles, erro return nil, err } } - return up.preorderDepthFirstWalk(targetPath) + return up.preOrderDepthFirstWalk(targetPath) } // DownloadTarget downloads the target file specified by “targetinfo“ func (up *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, error) { - return "", nil + var err error + if filePath == "" { + filePath, err = up.generateTargetFilePath(targetFile) + if err != nil { + return "", err + } + } + if targetBaseURL == "" { + if up.targetBaseUrl == "" { + return "", fmt.Errorf("targetBaseURL must be set in either DownloadTarget() or the Updater struct") + } + targetBaseURL = up.targetBaseUrl + } else { + targetBaseURL = ensureTrailingSlash(targetBaseURL) + } + targetFilePath := targetFile.Path + consistentSnapshot := up.trusted.Root.Signed.ConsistentSnapshot + if consistentSnapshot && up.config.PrefixTargetsWithHash { + hashes := "" + // get first hex value of hashes + for _, v := range targetFile.Hashes { + hashes = hex.EncodeToString(v) + break + } + dirName, baseName, ok := strings.Cut(targetFilePath, "/") + if !ok { + return "", fmt.Errorf("error handling targetFilePath %s, no separator found", targetFilePath) + } + targetFilePath = fmt.Sprintf("%s/%s.%s", dirName, hashes, baseName) + } + fullURL := fmt.Sprintf("%s%s", targetBaseURL, targetFilePath) + data, err := up.fetcher.DownloadFile(fullURL, targetFile.Length) + if err != nil { + return "", err + } + err = targetFile.VerifyLengthHashes(data) + if err != nil { + return "", err + } + // write the data content to the temporary file + err = os.WriteFile(filePath, data, 0644) + if err != nil { + return "", err + } + fmt.Printf("Downloaded target %s\n", targetFile.Path) + return filePath, nil } // FindCachedTarget checks whether a local file is an up to date target @@ -246,7 +365,7 @@ func (up *Updater) Refresh() error { if err != nil { return err } - err = up.loadTargets(metadata.TARGETS, metadata.ROOT) + _, err = up.loadTargets(metadata.TARGETS, metadata.ROOT) if err != nil { return err } From 4cc0bd63f56305d0d46108b8df39f53e8519a11c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 8 Dec 2022 21:20:31 +0200 Subject: [PATCH 018/208] complete the Updater implementation Signed-off-by: Radoslav Dimitrov --- NOTES.md | 2 +- metadata/trustedmetadata/trustedmetadata.go | 12 +- metadata/updater/updater.go | 501 +++++++++++--------- 3 files changed, 287 insertions(+), 228 deletions(-) diff --git a/NOTES.md b/NOTES.md index 6482643a..e9d80b3f 100644 --- a/NOTES.md +++ b/NOTES.md @@ -5,7 +5,7 @@ * Add creating a metadata from init struct * Support for hashbin delegations and succint roles * Verify we don't discard custom fields when converting, i.e. for keys and such -* Verify and fix if needed the format of which keys are stored +* Verify and fix if needed the format of which keys are stored - ed25519 should be hex only * Revisit the design - should we use generics or just 4 different types for each metadata? * Investigate whether depending on `sigstore/signatures` can cause dependency cycle and if so, how to avoid it? * Add support for storing/loading metadata and target files from AWS S3 buckets diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 409445e9..037da4fb 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -58,7 +58,7 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { return nil } -// UpdateRoot verifies and loads “data“ as new root metadata. +// UpdateRoot verifies and loads “rootData“ as new root metadata. // Note that an expired intermediate root is considered valid: expiry is // only checked for the final root in “UpdateTimestamp()“. func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[metadata.RootType], error) { @@ -95,10 +95,10 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ return trusted.Root, nil } -// UpdateTimestamp verifies and loads “data“ as new timestamp metadata. +// UpdateTimestamp verifies and loads “timestampData“ as new timestamp metadata. // Note that an intermediate timestamp is allowed to be expired. "TrustedMetadata" // will error in this case but the intermediate timestamp will be loaded. -// This way a newer timestamp can still be loaded (and the intermediate +// This way a newer timestamp can still be loaded (and the intermediate // timestamp will be used for rollback protection). Expired timestamp will // prevent loading snapshot metadata. func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata.Metadata[metadata.TimestampType], error) { @@ -166,7 +166,7 @@ func (trusted *TrustedMetadata) checkFinalTimestamp() error { return nil } -// UpdateSnapshot verifies and loads “data“ as new snapshot metadata. +// UpdateSnapshot verifies and loads “snapshotData“ as new snapshot metadata. // Note that an intermediate snapshot is allowed to be expired and version // is allowed to not match timestamp meta version: TrustedMetadata // will error for case of expired metadata or when using bad versions but the @@ -255,12 +255,12 @@ func (trusted *TrustedMetadata) checkFinalSnapshot() error { return nil } -// UpdateTargets verifies and loads “data“ as new top-level targets metadata. +// UpdateTargets verifies and loads “targetsData“ as new top-level targets metadata. func (trusted *TrustedMetadata) UpdateTargets(targetsData []byte) (*metadata.Metadata[metadata.TargetsType], error) { return trusted.UpdateDelegatedTargets(targetsData, metadata.TARGETS, metadata.ROOT) } -// UpdateDelegatedTargets verifies and loads “data“ as new metadata for target “role_name“ +// UpdateDelegatedTargets verifies and loads “targetsData“ as new metadata for target “roleName“ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleName, delegatorName string) (*metadata.Metadata[metadata.TargetsType], error) { var ok bool if trusted.Snapshot == nil { diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index c5d783ab..984cf8c2 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -22,22 +22,26 @@ import ( // "Updater" provides an API to query available targets and to download them in a // secure manner: All downloaded files are verified by signed metadata. // High-level description of "Updater" functionality: -// * Initializing an "Updater" loads and validates the trusted local root +// - Initializing an "Updater" loads and validates the trusted local root // metadata: This root metadata is used as the source of trust for all other // metadata. -// * "Refresh()"" can optionally be called to update and load all top-level +// - "Refresh()"" can optionally be called to update and load all top-level // metadata as described in the specification, using both locally cached // metadata and metadata downloaded from the remote repository. If refresh is // not done explicitly, it will happen automatically during the first target // info lookup. -// * "Updater" can be used to download targets. For each target: -// * "GetTargetInfo()"" is first used to find information about a -// specific target. This will load new targets metadata as needed (from -// local cache or remote repository). -// * "FindCachedTarget()"" can optionally be used to check if a -// target file is already locally cached. -// * "DownloadTarget()" downloads a target file and ensures it is -// verified correct by the metadata. +// - "Updater" can be used to download targets. For each target: +// - "GetTargetInfo()"" is first used to find information about a +// specific target. This will load new targets metadata as needed (from +// local cache or remote repository). +// - "FindCachedTarget()"" can optionally be used to check if a +// target file is already locally cached. +// - "DownloadTarget()" downloads a target file and ensures it is +// verified correct by the metadata. +type roleParentTuple struct { + Role string + Parent string +} type Updater struct { metadataDir string @@ -49,168 +53,68 @@ type Updater struct { fetcher fetcher.Fetcher } -// loadTimestamp load local and remote timestamp metadata -func (up *Updater) loadTimestamp() error { - data, err := up.loadLocalMetadata(metadata.TIMESTAMP) - if err != nil { - return err - } - temp, err := up.trusted.UpdateTimestamp(data) - if err != nil { - if temp == nil { - return err - } - fmt.Printf("Local timestamp not valid as final: %s", err) +// New creates a new “Updater“ instance and loads trusted root metadata. +func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string, f fetcher.Fetcher) (*Updater, error) { + // use the built-in download fetcher if nothing is provided + if f == nil { + f = &fetcher.DefaultFetcher{} } - // Load from remote (whether local load succeeded or not) - data, err = up.downloadMetadata(metadata.TIMESTAMP, up.config.TimestampMaxLength, "") - if err != nil { - return err + // create an updater instance + updater := &Updater{ + metadataDir: metadataDir, + metadataBaseUrl: ensureTrailingSlash(metadataBaseUrl), + targetDir: targetDir, + targetBaseUrl: ensureTrailingSlash(targetBaseUrl), + config: config.New(), + fetcher: f, } - _, err = up.trusted.UpdateTimestamp(data) - // TODO: If the new timestamp version is the same as current, discard the - // new timestamp. This is normal and it shouldn't raise any error. + // load the root metadata file used for bootstrapping trust + rootBytes, err := updater.loadLocalMetadata(metadata.ROOT) if err != nil { - return err + return nil, err } - err = up.persistMetadata(metadata.TIMESTAMP, data) + // create a new trusted metadata instance + trustedMetadataSet, err := trustedmetadata.New(rootBytes) if err != nil { - return err + return nil, err } - return nil + updater.trusted = trustedMetadataSet + return updater, nil } -// loadSnapshot load local (and if needed remote) snapshot metadata -func (up *Updater) loadSnapshot() error { - data, err := up.loadLocalMetadata(metadata.SNAPSHOT) - if err != nil { - return err - } - _, err = up.trusted.UpdateSnapshot(data, true) +// Refresh refreshes top-level metadata. +// Downloads, verifies, and loads metadata for the top-level roles in the +// specified order (root -> timestamp -> snapshot -> targets) implementing +// all the checks required in the TUF client workflow. +// A Refresh()“ can be done only once during the lifetime of an Updater. +// If Refresh()“ has not been explicitly called before the first +// “GetTargetInfo()“ call, it will be done implicitly at that time. +// The metadata for delegated roles is not updated by Refresh()“: +// that happens on demand during GetTargetInfo()“. However, if the +// repository uses `consistent_snapshot +// `_, +// then all metadata downloaded by the Updater will use the same consistent +// repository state. +func (update *Updater) Refresh() error { + err := update.loadRoot() if err != nil { return err - } else { - fmt.Println("Local snapshot is valid: not downloading new one") } - // Local snapshot not valid as final - snapshotMeta := up.trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] - length := snapshotMeta.Length - if length == 0 { - length = up.config.SnapshotMaxLength - } - version := "" - if up.trusted.Root.Signed.ConsistentSnapshot { - version = strconv.FormatInt(snapshotMeta.Version, 10) - } - data, err = up.downloadMetadata(metadata.SNAPSHOT, length, version) + err = update.loadTimestamp() if err != nil { return err } - _, err = up.trusted.UpdateSnapshot(data, false) + err = update.loadSnapshot() if err != nil { return err } - err = up.persistMetadata(metadata.TIMESTAMP, data) + _, err = update.loadTargets(metadata.TARGETS, metadata.ROOT) if err != nil { return err } return nil } -// loadTargets load local (and if needed remote) metadata for roleName. -func (up *Updater) loadTargets(roleName, parentName string) (*metadata.Metadata[metadata.TargetsType], error) { - // avoid loading 'roleName' more than once during "GetTargetInfo" - role, ok := up.trusted.Targets[roleName] - if ok { - return role, nil - } - data, err := up.loadLocalMetadata(roleName) - if err != nil { - return nil, err - } - delegatedTargets, err := up.trusted.UpdateDelegatedTargets(data, roleName, parentName) - if err == nil { - fmt.Printf("Local %s is valid: not downloading new one\n", roleName) - return delegatedTargets, nil - } else { - // local 'role' does not exist or is invalid: update from remote - if up.trusted.Snapshot != nil { - metaInfo := up.trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] - length := metaInfo.Length - if length != 0 { - length = up.config.TargetsMaxLength - } - version := "" - if up.trusted.Root.Signed.ConsistentSnapshot { - version = strconv.FormatInt(metaInfo.Version, 10) - } - data, err := up.downloadMetadata(roleName, length, version) - if err != nil { - return nil, err - } - delegatedTargets, err := up.trusted.UpdateDelegatedTargets(data, roleName, parentName) - if err != nil { - return nil, err - } - err = up.persistMetadata(roleName, data) - if err != nil { - return nil, err - } - return delegatedTargets, nil - } - return nil, err - } -} - -// preOrderDepthFirstWalk interrogates the tree of target delegations -// in order of appearance (which implicitly order trustworthiness), -// and returns the matching target found in the most trusted role. -func (up *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata.TargetFiles, error) { - // list of delegations to be interrogated. A (role, parent role) pair - // is needed to load and verify the delegated targets metadata. - delegationsToVisit := []string{metadata.TARGETS, metadata.ROOT} - visitedRoleNames := map[string]bool{} - - // pre-order depth-first traversal of the graph of target delegations. - for len(visitedRoleNames) <= up.config.MaxDelegations && len(delegationsToVisit) > 0 { - // pop the role name from the top of the stack. - - } - return nil, nil -} - -// loadRoot load remote root metadata. Sequentially load and -// persist on local disk every newer root metadata version -// available on the remote. -func (up *Updater) loadRoot() error { - // calculate boundaries - lowerBound := up.trusted.Root.Signed.Version + 1 - upperBound := lowerBound + up.config.MaxRootRotations - - // loop until we find the latest available version of root - for nextVersion := lowerBound; nextVersion <= upperBound; nextVersion++ { - data, err := up.downloadMetadata(metadata.ROOT, up.config.RootMaxLength, strconv.FormatInt(nextVersion, 10)) - if err != nil { - // if err has status codes 403 or 404 it means current root is newest available - if strings.Contains(err.Error(), "403") || strings.Contains(err.Error(), "404") { - break - } - return err - } - // verify and load the root data - _, err = up.trusted.UpdateRoot(data) - if err != nil { - return err - } - // write root to disk - err = up.persistMetadata(metadata.ROOT, data) - if err != nil { - return err - } - } - return nil -} - // GetTargetInfo returns “metadata.TargetFiles“ instance with information // for targetPath. The return value can be used as an argument to // “DownloadTarget()“ and “FindCachedTarget()“. @@ -218,37 +122,37 @@ func (up *Updater) loadRoot() error { // “GetTargetInfo()“, the refresh will be done implicitly. // As a side-effect this method downloads all the additional (delegated // targets) metadata it needs to return the target information. -func (up *Updater) GetTargetInfo(targetPath string) (*metadata.TargetFiles, error) { +func (update *Updater) GetTargetInfo(targetPath string) (*metadata.TargetFiles, error) { // do a Refresh() in case there's no trusted targets.json yet - if up.trusted.Targets[metadata.TARGETS] == nil { - err := up.Refresh() + if update.trusted.Targets[metadata.TARGETS] == nil { + err := update.Refresh() if err != nil { return nil, err } } - return up.preOrderDepthFirstWalk(targetPath) + return update.preOrderDepthFirstWalk(targetPath) } -// DownloadTarget downloads the target file specified by “targetinfo“ -func (up *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, error) { +// DownloadTarget downloads the target file specified by targetFile +func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, error) { var err error if filePath == "" { - filePath, err = up.generateTargetFilePath(targetFile) + filePath, err = update.generateTargetFilePath(targetFile) if err != nil { return "", err } } if targetBaseURL == "" { - if up.targetBaseUrl == "" { + if update.targetBaseUrl == "" { return "", fmt.Errorf("targetBaseURL must be set in either DownloadTarget() or the Updater struct") } - targetBaseURL = up.targetBaseUrl + targetBaseURL = update.targetBaseUrl } else { targetBaseURL = ensureTrailingSlash(targetBaseURL) } targetFilePath := targetFile.Path - consistentSnapshot := up.trusted.Root.Signed.ConsistentSnapshot - if consistentSnapshot && up.config.PrefixTargetsWithHash { + consistentSnapshot := update.trusted.Root.Signed.ConsistentSnapshot + if consistentSnapshot && update.config.PrefixTargetsWithHash { hashes := "" // get first hex value of hashes for _, v := range targetFile.Hashes { @@ -262,7 +166,7 @@ func (up *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, ta targetFilePath = fmt.Sprintf("%s/%s.%s", dirName, hashes, baseName) } fullURL := fmt.Sprintf("%s%s", targetBaseURL, targetFilePath) - data, err := up.fetcher.DownloadFile(fullURL, targetFile.Length) + data, err := update.fetcher.DownloadFile(fullURL, targetFile.Length) if err != nil { return "", err } @@ -280,12 +184,12 @@ func (up *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, ta } // FindCachedTarget checks whether a local file is an up to date target -func (up *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePath string) (string, error) { +func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePath string) (string, error) { var err error targetFilePath := "" // get its path if not provided if filePath == "" { - targetFilePath, err = up.generateTargetFilePath(targetFile) + targetFilePath, err = update.generateTargetFilePath(targetFile) if err != nil { return "", err } @@ -312,118 +216,266 @@ func (up *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePath s return targetFilePath, nil } -// persistMetadata writes metadata to disk atomically to avoid data loss. -func (up *Updater) persistMetadata(roleName string, data []byte) error { - fileName := filepath.Join(up.metadataDir, fmt.Sprintf("%s.json", url.QueryEscape(roleName))) - cwd, err := os.Getwd() +// loadTimestamp load local and remote timestamp metadata +func (update *Updater) loadTimestamp() error { + data, err := update.loadLocalMetadata(metadata.TIMESTAMP) if err != nil { return err } - // create a temporary file - file, err := os.CreateTemp(cwd, "tuf_tmp") + temp, err := update.trusted.UpdateTimestamp(data) + if err != nil { + if temp == nil { + return err + } + fmt.Printf("Local timestamp not valid as final: %s", err) + } + // Load from remote (whether local load succeeded or not) + data, err = update.downloadMetadata(metadata.TIMESTAMP, update.config.TimestampMaxLength, "") if err != nil { return err } - // write the data content to the temporary file - err = os.WriteFile(file.Name(), data, 0644) + _, err = update.trusted.UpdateTimestamp(data) + // TODO: If the new timestamp version is the same as current, discard the + // new timestamp. This is normal and it shouldn't raise any error. if err != nil { - // delete the temporary file if there was an error while writing - os.Remove(file.Name()) return err } - // if all okay, rename the temporary file to the desired one - err = os.Rename(file.Name(), fileName) + err = update.persistMetadata(metadata.TIMESTAMP, data) if err != nil { return err } return nil } -// Refresh refreshes top-level metadata. -// Downloads, verifies, and loads metadata for the top-level roles in the -// specified order (root -> timestamp -> snapshot -> targets) implementing -// all the checks required in the TUF client workflow. -// A Refresh()“ can be done only once during the lifetime of an Updater. -// If Refresh()“ has not been explicitly called before the first -// “GetTargetInfo()“ call, it will be done implicitly at that time. -// The metadata for delegated roles is not updated by Refresh()“: -// that happens on demand during GetTargetInfo()“. However, if the -// repository uses `consistent_snapshot -// `_, -// then all metadata downloaded by the Updater will use the same consistent -// repository state. -func (up *Updater) Refresh() error { - err := up.loadRoot() +// loadSnapshot load local (and if needed remote) snapshot metadata +func (update *Updater) loadSnapshot() error { + data, err := update.loadLocalMetadata(metadata.SNAPSHOT) if err != nil { return err } - err = up.loadTimestamp() + _, err = update.trusted.UpdateSnapshot(data, true) if err != nil { return err + } else { + fmt.Println("Local snapshot is valid: not downloading new one") + } + // Local snapshot not valid as final + snapshotMeta := update.trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + length := snapshotMeta.Length + if length == 0 { + length = update.config.SnapshotMaxLength } - err = up.loadSnapshot() + version := "" + if update.trusted.Root.Signed.ConsistentSnapshot { + version = strconv.FormatInt(snapshotMeta.Version, 10) + } + data, err = update.downloadMetadata(metadata.SNAPSHOT, length, version) if err != nil { return err } - _, err = up.loadTargets(metadata.TARGETS, metadata.ROOT) + _, err = update.trusted.UpdateSnapshot(data, false) + if err != nil { + return err + } + err = update.persistMetadata(metadata.TIMESTAMP, data) if err != nil { return err } return nil } -// New creates a new “Updater“ instance and loads trusted root metadata. -func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string, f fetcher.Fetcher) (*Updater, error) { - // use the built-in download fetcher if nothing is provided - if f == nil { - f = &fetcher.DefaultFetcher{} - } - // create an updater instance - updater := &Updater{ - metadataDir: metadataDir, - metadataBaseUrl: ensureTrailingSlash(metadataBaseUrl), - targetDir: targetDir, - targetBaseUrl: ensureTrailingSlash(targetBaseUrl), - config: config.New(), - fetcher: f, +// loadTargets load local (and if needed remote) metadata for roleName. +func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metadata[metadata.TargetsType], error) { + // avoid loading 'roleName' more than once during "GetTargetInfo" + role, ok := update.trusted.Targets[roleName] + if ok { + return role, nil } - // load the root metadata file used for bootstrapping trust - rootBytes, err := updater.loadLocalMetadata(metadata.ROOT) + data, err := update.loadLocalMetadata(roleName) if err != nil { return nil, err } - // create a new trusted metadata instance - trustedMetadataSet, err := trustedmetadata.New(rootBytes) - if err != nil { + delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) + if err == nil { + fmt.Printf("Local %s is valid: not downloading new one\n", roleName) + return delegatedTargets, nil + } else { + // local 'role' does not exist or is invalid: update from remote + if update.trusted.Snapshot != nil { + metaInfo := update.trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] + length := metaInfo.Length + if length != 0 { + length = update.config.TargetsMaxLength + } + version := "" + if update.trusted.Root.Signed.ConsistentSnapshot { + version = strconv.FormatInt(metaInfo.Version, 10) + } + data, err := update.downloadMetadata(roleName, length, version) + if err != nil { + return nil, err + } + delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) + if err != nil { + return nil, err + } + err = update.persistMetadata(roleName, data) + if err != nil { + return nil, err + } + return delegatedTargets, nil + } return nil, err } - updater.trusted = trustedMetadataSet - return updater, nil +} + +// loadRoot load remote root metadata. Sequentially load and +// persist on local disk every newer root metadata version +// available on the remote. +func (update *Updater) loadRoot() error { + // calculate boundaries + lowerBound := update.trusted.Root.Signed.Version + 1 + upperBound := lowerBound + update.config.MaxRootRotations + + // loop until we find the latest available version of root + for nextVersion := lowerBound; nextVersion <= upperBound; nextVersion++ { + data, err := update.downloadMetadata(metadata.ROOT, update.config.RootMaxLength, strconv.FormatInt(nextVersion, 10)) + if err != nil { + // if err has status codes 403 or 404 it means current root is newest available + if strings.Contains(err.Error(), "403") || strings.Contains(err.Error(), "404") { + break + } + return err + } + // verify and load the root data + _, err = update.trusted.UpdateRoot(data) + if err != nil { + return err + } + // write root to disk + err = update.persistMetadata(metadata.ROOT, data) + if err != nil { + return err + } + } + return nil +} + +// preOrderDepthFirstWalk interrogates the tree of target delegations +// in order of appearance (which implicitly order trustworthiness), +// and returns the matching target found in the most trusted role. +func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata.TargetFiles, error) { + // list of delegations to be interrogated. A (role, parent role) pair + // is needed to load and verify the delegated targets metadata. + delegationsToVisit := []roleParentTuple{{ + Role: metadata.TARGETS, + Parent: metadata.ROOT, + }} + visitedRoleNames := map[string]bool{} + // pre-order depth-first traversal of the graph of target delegations. + for len(visitedRoleNames) <= update.config.MaxDelegations && len(delegationsToVisit) > 0 { + // pop the role name from the top of the stack. + delegation := delegationsToVisit[len(delegationsToVisit)-1] + delegationsToVisit = delegationsToVisit[:len(delegationsToVisit)-1] + // skip any visited current role to prevent cycles. + _, ok := visitedRoleNames[delegation.Role] + if ok { + fmt.Printf("Skipping visited current role %s\n", delegation.Role) + continue + } + // The metadata for 'delegation.Role' must be downloaded/updated before + // its targets, delegations, and child roles can be inspected. + targets, err := update.loadTargets(delegation.Role, delegation.Parent) + if err != nil { + return nil, err + } + target, ok := targets.Signed.Targets[targetFilePath] + if ok { + fmt.Printf("Found target in current role %s\n", delegation.Role) + return &target, nil + } + // After pre-order check, add current role to set of visited roles. + visitedRoleNames[delegation.Role] = true + if targets.Signed.Delegations != nil { + childRolesToVisit := []roleParentTuple{} + // NOTE: This may be a slow operation if there are many + // delegated roles. + roles := targets.Signed.Delegations.GetRolesForTarget(targetFilePath) + for child, terminating := range roles { + fmt.Printf("Adding child role %s\n", child) + childRolesToVisit = append(childRolesToVisit, roleParentTuple{Role: child, Parent: delegation.Role}) + if terminating { + fmt.Println("Not backtracking to other roles") + } + delegationsToVisit = []roleParentTuple{} + break + } + // Push 'childRolesToVisit' in reverse order of appearance + // onto 'delegationsToVisit'. Roles are popped from the end of + // the list. + reverseSlice(childRolesToVisit) + delegationsToVisit = append(delegationsToVisit, childRolesToVisit...) + } + } + if len(delegationsToVisit) > 0 { + fmt.Printf("%d roles left to visit, but allowed at most %d delegations", + len(delegationsToVisit), + update.config.MaxDelegations) + } + // If this point is reached then target is not found, return nil + return nil, fmt.Errorf("target %s not found", targetFilePath) +} + +// persistMetadata writes metadata to disk atomically to avoid data loss. +func (update *Updater) persistMetadata(roleName string, data []byte) error { + fileName := filepath.Join(update.metadataDir, fmt.Sprintf("%s.json", url.QueryEscape(roleName))) + cwd, err := os.Getwd() + if err != nil { + return err + } + // create a temporary file + file, err := os.CreateTemp(cwd, "tuf_tmp") + if err != nil { + return err + } + // write the data content to the temporary file + err = os.WriteFile(file.Name(), data, 0644) + if err != nil { + // delete the temporary file if there was an error while writing + os.Remove(file.Name()) + return err + } + // if all okay, rename the temporary file to the desired one + err = os.Rename(file.Name(), fileName) + if err != nil { + return err + } + return nil } // downloadMetadata download a metadata file and return it as bytes -func (up *Updater) downloadMetadata(roleName string, length int64, version string) ([]byte, error) { - urlPath := up.metadataBaseUrl +func (update *Updater) downloadMetadata(roleName string, length int64, version string) ([]byte, error) { + urlPath := update.metadataBaseUrl // build urlPath if version == "" { urlPath = fmt.Sprintf("%s%s.json", urlPath, url.QueryEscape(roleName)) } else { urlPath = fmt.Sprintf("%s%s.%s.json", urlPath, version, url.QueryEscape(roleName)) } - return up.fetcher.DownloadFile(urlPath, length) + return update.fetcher.DownloadFile(urlPath, length) } // generateTargetFilePath generates path from TargetFiles -func (up *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, error) { - if up.targetDir == "" { +func (update *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, error) { + if update.targetDir == "" { return "", fmt.Errorf("target_dir must be set if filepath is not given") } // Use URL encoded target path as filename - return url.JoinPath(up.targetDir, url.QueryEscape(tf.Path)) + return url.JoinPath(update.targetDir, url.QueryEscape(tf.Path)) } // loadLocalMetadata reads a local .json file and returns its bytes -func (up *Updater) loadLocalMetadata(roleName string) ([]byte, error) { +func (update *Updater) loadLocalMetadata(roleName string) ([]byte, error) { roleName = fmt.Sprintf("%s.json", url.QueryEscape(roleName)) in, err := os.Open(roleName) if err != nil { @@ -444,3 +496,10 @@ func ensureTrailingSlash(url string) string { } return url + "/" } + +// reverseSlice reverses the elements in a generic type of slice +func reverseSlice[S ~[]E, E any](s S) { + for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { + s[i], s[j] = s[j], s[i] + } +} From 85d1591465ea46d3746a1b5afd762cb4ef028015 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 9 Dec 2022 01:35:05 +0200 Subject: [PATCH 019/208] ed25519 public key should be hex only Signed-off-by: Radoslav Dimitrov --- examples/testdata/1.go-scripts.json | 6 +-- examples/testdata/1.root.json | 40 ++++++++-------- examples/testdata/1.snapshot.json | 6 +-- examples/testdata/1.targets.json | 6 +-- examples/testdata/2.root.json | 44 ++++++++--------- examples/testdata/2.snapshot.json | 6 +-- examples/testdata/2.targets.json | 12 ++--- examples/testdata/3.root.json | 74 ++++++++++++++--------------- examples/testdata/timestamp.json | 6 +-- metadata/keys.go | 35 +++++++------- 10 files changed, 117 insertions(+), 118 deletions(-) diff --git a/examples/testdata/1.go-scripts.json b/examples/testdata/1.go-scripts.json index dd74e89c..8cce2e81 100644 --- a/examples/testdata/1.go-scripts.json +++ b/examples/testdata/1.go-scripts.json @@ -3,7 +3,7 @@ "_type": "targets", "spec_version": "1.0.31", "version": 1, - "expires": "2022-12-14T21:45:43.593949Z", + "expires": "2022-12-15T23:33:57.876917Z", "targets": { "examples/basic_repo.go": { "length": 23252, @@ -16,8 +16,8 @@ }, "signatures": [ { - "keyid": "0df633150a8f5bf05a2619221f030ddb4a4511db4f6c8f3aae8c2eb0e97915e4", - "sig": "e3e22236ac1700b16c047ed7a8e06083cf08867466c0f3362007fab4c6e33719d100ac52ea9495a1cf908ca811f385cceeaa97cecd014ec3e9c2c5c7eaffc206" + "keyid": "027249e08beb71d4960953524334f82fa037b811e3dfece8f3e3f91587043a2f", + "sig": "74fe989da6d187b31245b326ecbdb3926c5485285b2836bccf0c93d95183370aa0ba0ecd9a4166c873e92bf0b1e9ac13fc70acd0b0a743113bc474a26ca04b0c" } ] } \ No newline at end of file diff --git a/examples/testdata/1.root.json b/examples/testdata/1.root.json index 53dc916b..0ef0444b 100644 --- a/examples/testdata/1.root.json +++ b/examples/testdata/1.root.json @@ -4,67 +4,67 @@ "spec_version": "1.0.31", "consistent_snapshot": true, "version": 1, - "expires": "2023-12-07T21:45:43.583629Z", + "expires": "2023-12-08T23:33:57.867599Z", "keys": { - "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8": { + "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAMR3IzvSvQWkdjRkWXh3MEN+4MnjQEXiqHn84y0GKPBA=\n-----END PUBLIC KEY-----\n" + "public": "c84605c5b23a495fe63b1be7ecb6f6373c5dd612bc2e92925f0d9025b0cc9214" } }, - "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2": { + "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAsw6Lf/GJ6fYcIrJL3QcYL2rCl1olc664Y+2ysp6nMG4=\n-----END PUBLIC KEY-----\n" + "public": "8a095cf432a9bd295c31f58917b96954516fb06eab26604aa664e29a66565243" } }, - "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee": { + "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/ph0QVgfNBFSqsAuTXVrK8tyA6fZWuVSlC4u7pV9818=\n-----END PUBLIC KEY-----\n" + "public": "be6ca7af32389f004e7b840a22675bc33264528bceef364affb9b626d83e5e4e" } }, - "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af": { + "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA5Lid84j/me8Fov8B390k87w5+pA7hQZIWL5VcSl6B5Y=\n-----END PUBLIC KEY-----\n" + "public": "77588cb86c06f466c4cb5ad05adde88c0097ae855d2593affe409b393e3477d4" } }, - "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8": { + "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAxt0doK1NRRsH01PVuDjNCCyJUyHVuVjvB69JkwOq5/U=\n-----END PUBLIC KEY-----\n" + "public": "c01daa3eeb0572dc8e733fc7f3eadb69b3c7bedfd5be1a8f7c9eb5fd2ae8dc55" } } }, "roles": { "root": { "keyids": [ - "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", - "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af" + "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", + "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96" ], "threshold": 2 }, "snapshot": { "keyids": [ - "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8" + "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304" ], "threshold": 1 }, "targets": { "keyids": [ - "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2" + "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01" ], "threshold": 1 }, "timestamp": { "keyids": [ - "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee" + "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad" ], "threshold": 1 } @@ -72,12 +72,12 @@ }, "signatures": [ { - "keyid": "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", - "sig": "c52e03c80be04eb8b86dc529e7c84517add201cc313977ee5094790118c11fac3cea61152c51c6ef591678fc56bf09ab1db8bb9f75fb43b4c694ac23060abb06" + "keyid": "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", + "sig": "9882c638f0a7b45cdfcfa2b7e179ffddb3e75735bc60be7ba4a9ae6d03421320dd015d4d06afbe4ddb28c913575d2912b0b750d05d6f957066f22cb491577400" }, { - "keyid": "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", - "sig": "c134171ec2a5b564b77f17a1856574749c1cfef58f255169242d65eacb821a9c6682e5ccb8730b7d9747708891814cb18cdfe0ffb0c99dc286766da0fcdbf60a" + "keyid": "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", + "sig": "0c8ce6c46758744619ec2aa55c9d17fdccafe0753352798a46a9e8683552df0d458a44f90d17fd341ce691d2792ce7df6f1c7569098f2da41c2d13a14d62ee02" } ] } \ No newline at end of file diff --git a/examples/testdata/1.snapshot.json b/examples/testdata/1.snapshot.json index 80368361..b1c91aac 100644 --- a/examples/testdata/1.snapshot.json +++ b/examples/testdata/1.snapshot.json @@ -3,7 +3,7 @@ "_type": "snapshot", "spec_version": "1.0.31", "version": 1, - "expires": "2022-12-14T21:45:43.583628Z", + "expires": "2022-12-15T23:33:57.867598Z", "meta": { "targets.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8", - "sig": "dc22700a81a079e4a9567ee856b62ef477d1de093bb5eaf0e0336738d4733052eceb7bd07e0ea5b576102d7816ba97778c18fa81a5412f906eb3d7a828630f0c" + "keyid": "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304", + "sig": "ad88682568533e3ddf674cc32c5a3af4f9713b7dfb02ce1543c883b15266680517e42ad57a71262cc174979acdc985bdaef9918439ddee9aae0ab014f285080d" } ] } \ No newline at end of file diff --git a/examples/testdata/1.targets.json b/examples/testdata/1.targets.json index a601181e..bc017b17 100644 --- a/examples/testdata/1.targets.json +++ b/examples/testdata/1.targets.json @@ -3,7 +3,7 @@ "_type": "targets", "spec_version": "1.0.31", "version": 1, - "expires": "2022-12-14T21:45:43.582245Z", + "expires": "2022-12-15T23:33:57.866294Z", "targets": { "examples/basic_repo.go": { "length": 23252, @@ -16,8 +16,8 @@ }, "signatures": [ { - "keyid": "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2", - "sig": "119c0a74d99b1d3dbe313d93d98fff30991f9f14f16d9a33bae6aa1b2ea2e84beea87556da6bcadcdb4d6d134e0dbb3e2cb9b12e609cec5352fae788bfede809" + "keyid": "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01", + "sig": "b1a2030e729d3ae4d89f2905f115ddf4107bb30f39f6d04b879b804d9e691faef9068fab199c7c60182e9835c94a7cdccd57d9932d58d58924d75bbd66db000e" } ] } \ No newline at end of file diff --git a/examples/testdata/2.root.json b/examples/testdata/2.root.json index 28eba81d..1a6a6e75 100644 --- a/examples/testdata/2.root.json +++ b/examples/testdata/2.root.json @@ -4,67 +4,67 @@ "spec_version": "1.0.31", "consistent_snapshot": true, "version": 2, - "expires": "2023-12-07T21:45:43.583629Z", + "expires": "2023-12-08T23:33:57.867599Z", "keys": { - "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2": { + "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAsw6Lf/GJ6fYcIrJL3QcYL2rCl1olc664Y+2ysp6nMG4=\n-----END PUBLIC KEY-----\n" + "public": "c84605c5b23a495fe63b1be7ecb6f6373c5dd612bc2e92925f0d9025b0cc9214" } }, - "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee": { + "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/ph0QVgfNBFSqsAuTXVrK8tyA6fZWuVSlC4u7pV9818=\n-----END PUBLIC KEY-----\n" + "public": "8a095cf432a9bd295c31f58917b96954516fb06eab26604aa664e29a66565243" } }, - "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af": { + "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA5Lid84j/me8Fov8B390k87w5+pA7hQZIWL5VcSl6B5Y=\n-----END PUBLIC KEY-----\n" + "public": "6cf291228118c23cb046f70e880f8b8b24a698f42ace97c6584235ba2a3d33d7" } }, - "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8": { + "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAxt0doK1NRRsH01PVuDjNCCyJUyHVuVjvB69JkwOq5/U=\n-----END PUBLIC KEY-----\n" + "public": "be6ca7af32389f004e7b840a22675bc33264528bceef364affb9b626d83e5e4e" } }, - "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6": { + "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEARiLuKbSCRTHw7zijJOEQ8Bq33OwC/d2EDUrAW1bgmrg=\n-----END PUBLIC KEY-----\n" + "public": "77588cb86c06f466c4cb5ad05adde88c0097ae855d2593affe409b393e3477d4" } } }, "roles": { "root": { "keyids": [ - "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", - "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6" + "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", + "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077" ], "threshold": 2 }, "snapshot": { "keyids": [ - "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8" + "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304" ], "threshold": 1 }, "targets": { "keyids": [ - "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2" + "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01" ], "threshold": 1 }, "timestamp": { "keyids": [ - "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee" + "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad" ], "threshold": 1 } @@ -72,16 +72,16 @@ }, "signatures": [ { - "keyid": "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", - "sig": "1e41524f4cf74984334b465f2c785a60e3763b413d226026cb2eebc95f36309566def96f70a34cef3e565e1d344dd8299d3923989617c6129ff049cff4956104" + "keyid": "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", + "sig": "cb508fa54e850a527a89e9b3e7aafdac03200cfbaca5829bc16f8cad6230968df7f6846bef183181c41cd12aa560a566fdb77ec9cdacedeb5423dba9f5fe4e0b" }, { - "keyid": "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", - "sig": "46d579fefa2f1b323d8b199ef86c48f2e944994fa99a4eb9f985f0ab12899c4d5b371e21f9875d9423da7111d3cf4bbbcaf50f4ab34a992788576ec1ee171300" + "keyid": "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", + "sig": "7681bf1df79f4de39179b3a55c85c4f83f4211bd8fc8e00ed1622ab61804987fe261e8931c8d4767a85cd9b418299de70247f10a34ccf6602fd1d64ebe71d700" }, { - "keyid": "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6", - "sig": "b261c1de4f93f82440ce170ff02f20946f424f9c93ebbaa8b8a1aac9c52cd94c5fbeb1221fb15cec0f6e5dfbb8d79e74403038a838def3297bf799c8ba8eab00" + "keyid": "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077", + "sig": "0be9ddaf9a97983df5c8ddc7571ad0806da3cfe21b9322fcee0b31b4bbf898becb47b79086c6511e705a4aaa288bbe2c5b60cd78b33c114a600327ee5597900e" } ] } \ No newline at end of file diff --git a/examples/testdata/2.snapshot.json b/examples/testdata/2.snapshot.json index 6b7589c4..8682ccc5 100644 --- a/examples/testdata/2.snapshot.json +++ b/examples/testdata/2.snapshot.json @@ -3,7 +3,7 @@ "_type": "snapshot", "spec_version": "1.0.31", "version": 2, - "expires": "2022-12-14T21:45:43.583628Z", + "expires": "2022-12-15T23:33:57.867598Z", "meta": { "go-scripts": { "version": 1 @@ -15,8 +15,8 @@ }, "signatures": [ { - "keyid": "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8", - "sig": "e3f21edc33bcda3d64a4fa5ad44885eada6a6c735d4010bb00089d89cb76618e8c21a8cb5489c9eb8d0a19fcb40670001221f8dfb66dcc6c51088d3f1fd7fe0b" + "keyid": "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304", + "sig": "e9184054a652a91e61fc5d85e96ef6de8395cd958e4bca710d6243cf8b44080a233af0c94f2443a565e0dac4a657d284bb9ac35ee52c27adedacef0a9264180c" } ] } \ No newline at end of file diff --git a/examples/testdata/2.targets.json b/examples/testdata/2.targets.json index 4d1cac39..f237252b 100644 --- a/examples/testdata/2.targets.json +++ b/examples/testdata/2.targets.json @@ -3,15 +3,15 @@ "_type": "targets", "spec_version": "1.0.31", "version": 2, - "expires": "2023-12-07T21:45:43.593989Z", + "expires": "2023-12-08T23:33:57.876945Z", "targets": {}, "delegations": { "keys": { - "0df633150a8f5bf05a2619221f030ddb4a4511db4f6c8f3aae8c2eb0e97915e4": { + "027249e08beb71d4960953524334f82fa037b811e3dfece8f3e3f91587043a2f": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEApfH0vl7dtoz0J3UJS6V47d1P0h3PxftYE0Ev9P0L8pk=\n-----END PUBLIC KEY-----\n" + "public": "4a37db60d479d095864af8ce5b91cce4fac052cd42eb5bd354c9118f64e6b161" } } }, @@ -19,7 +19,7 @@ { "name": "go-scripts", "keyids": [ - "0df633150a8f5bf05a2619221f030ddb4a4511db4f6c8f3aae8c2eb0e97915e4" + "027249e08beb71d4960953524334f82fa037b811e3dfece8f3e3f91587043a2f" ], "threshold": 1, "terminating": true, @@ -32,8 +32,8 @@ }, "signatures": [ { - "keyid": "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2", - "sig": "f8fc91acf209aab59a68e1862fa4efee07ccf08dfc68edfde8b413e60d480cef16c5035f2a54a31fbd9164275c62effc9dd5dbf8b23a3aae61c4cbe7e57e440c" + "keyid": "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01", + "sig": "39865fab715dc9a566fc7c54b4e35412bfd760655244d2d1378df02d53bb40d8cfc8a79f4aba87b19eb74598960002df548d15c0f6c8e8ab601a31e2d8bc260a" } ] } \ No newline at end of file diff --git a/examples/testdata/3.root.json b/examples/testdata/3.root.json index bd917763..6f1aa3b6 100644 --- a/examples/testdata/3.root.json +++ b/examples/testdata/3.root.json @@ -4,83 +4,83 @@ "spec_version": "1.0.31", "consistent_snapshot": true, "version": 3, - "expires": "2023-12-07T21:45:43.583629Z", + "expires": "2023-12-08T23:33:57.867599Z", "keys": { - "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2": { + "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAsw6Lf/GJ6fYcIrJL3QcYL2rCl1olc664Y+2ysp6nMG4=\n-----END PUBLIC KEY-----\n" + "public": "c84605c5b23a495fe63b1be7ecb6f6373c5dd612bc2e92925f0d9025b0cc9214" } }, - "5b4e2d5150acf8c633be14f03b3ee2e00701f4b67cb8c6e0655ebed629a51543": { - "keytype": "ecdsa-sha2-nistp256", - "scheme": "ecdsa-sha2-nistp256", - "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9yu5eGyRtNJdy/7H/1/wplsfYjs9\nY1SHrLiVWgtEmBqi/Z1YAOY1qdOaR4eD0W1GU40dmw6/UwhAYZdXAGBlsA==\n-----END PUBLIC KEY-----\n" - } - }, - "616ad32f17442cd7f55ad4c8b8f305267eaf933bf1d99e779a3e89bf6c9d3e2b": { + "2c6c9f9d8bf4bbb20b047c8bba07ed07ef0b73362fa5c60162db1952e55f24a0": { "keytype": "rsa", "scheme": "rsassa-pss-sha256", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvFTgbL3WPSxfJ2qDvTuS\nJ5+qjW85zmDM6GKlFwfK8Jth1xZJUtiBVNfbSjcfXrg0Ua3/bYT8r6RiNrbyNIFT\ngNQu3jeMRgNifbqcOe/DIvURVXLANqPWPKflVlyLCTr5dvobEMsG977TmYdLZhsn\nsh/OU4bAYBadJTn1MLe/ieP7uqn/xbqfmLXVPrqDkxw1P2hoFi6l++Lh/6cCSOYc\nV5vPXGHeZy5aEQwuAUWrjbozZ9M9qjbbpF6qs9rs3FoiJt0nb0mFuxaXuyZHEuH4\no+beWnd72HqqFdF8DCLu6veMs/Je7pq/mWg7272S2NijnGxyWgD4wk6XlOSYzX1m\nlQIDAQAB\n-----END PUBLIC KEY-----\n" + "public": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArbDuQQQdLxsCgP6jdAjA\nna8LJk9z0pt8nxEdhi0CZwXi0HBMZ+PX7TnBlTbLnp1o0/5cBKoDT073tLXSewjj\nsRxWLBA4v3k/PEcytfs9SRmbLzr71H9cvY2ezIR5wbK2lSdbu+5eokOBEj2C3Z4Y\nbbMbXGTr7y3rlDzbbB0bSZ66/TCmwsGr6RP1jPz+RF75yaomZVxIIm7JAeTMuIek\nbQoehIdw7y9gdjpvDuZ5WCYdhKwPYRzaABmh+YdJ2Uch9b5X8ZbHqbFprWaC+FrD\nFiTHQL/xcuyXKTkNqutbTt6f8xTmPjLvXd+PvSjnJDoXlLLD9ecLWLCK+Dne1evD\n0QIDAQAB\n-----END PUBLIC KEY-----\n" } }, - "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee": { + "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA/ph0QVgfNBFSqsAuTXVrK8tyA6fZWuVSlC4u7pV9818=\n-----END PUBLIC KEY-----\n" + "public": "8a095cf432a9bd295c31f58917b96954516fb06eab26604aa664e29a66565243" } }, - "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af": { + "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA5Lid84j/me8Fov8B390k87w5+pA7hQZIWL5VcSl6B5Y=\n-----END PUBLIC KEY-----\n" + "public": "6cf291228118c23cb046f70e880f8b8b24a698f42ace97c6584235ba2a3d33d7" } }, - "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8": { + "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAxt0doK1NRRsH01PVuDjNCCyJUyHVuVjvB69JkwOq5/U=\n-----END PUBLIC KEY-----\n" + "public": "be6ca7af32389f004e7b840a22675bc33264528bceef364affb9b626d83e5e4e" } }, - "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6": { + "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad": { "keytype": "ed25519", "scheme": "ed25519", "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEARiLuKbSCRTHw7zijJOEQ8Bq33OwC/d2EDUrAW1bgmrg=\n-----END PUBLIC KEY-----\n" + "public": "77588cb86c06f466c4cb5ad05adde88c0097ae855d2593affe409b393e3477d4" + } + }, + "cd514a6a1d45099d92a652f7c960e2c598999411f4d57acbe990da91392841aa": { + "keytype": "ecdsa-sha2-nistp256", + "scheme": "ecdsa-sha2-nistp256", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbS6FXiB7y5eSb4Mx/SNNU+151N+E\nt/xVZXfuf5ehPwOgHzAoKsxOtu3xD/o08ZNgLWBPGgiL++o/GQwoHOSwMA==\n-----END PUBLIC KEY-----\n" } } }, "roles": { "root": { "keyids": [ - "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", - "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6", - "616ad32f17442cd7f55ad4c8b8f305267eaf933bf1d99e779a3e89bf6c9d3e2b", - "5b4e2d5150acf8c633be14f03b3ee2e00701f4b67cb8c6e0655ebed629a51543" + "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", + "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077", + "2c6c9f9d8bf4bbb20b047c8bba07ed07ef0b73362fa5c60162db1952e55f24a0", + "cd514a6a1d45099d92a652f7c960e2c598999411f4d57acbe990da91392841aa" ], "threshold": 4 }, "snapshot": { "keyids": [ - "cbdee1866087fe22839341b12f2b7d90b0aa3f9d867815759be1a16a685e9fa8" + "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304" ], "threshold": 1 }, "targets": { "keyids": [ - "58600cba2d377583e5af1081f20b0b618edebd4cd1e4798261869114da681bc2" + "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01" ], "threshold": 1 }, "timestamp": { "keyids": [ - "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee" + "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad" ], "threshold": 1 } @@ -88,24 +88,24 @@ }, "signatures": [ { - "keyid": "1f0f5b18094e21d3914ee0c251cb9efdb7a3427b41a74405c6f15724a37e5ca8", - "sig": "66b0e54d0f7c2ec19ae46d40d1e806e1b02083d25e3197aac85615a23afc43a84eb912102e891c745e7a698321c31248c8d1eb82c8860e7e77b5f4bb93695e0b" + "keyid": "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", + "sig": "803f75081de968210bd8215dc819156a8fd3eaae87a1803e18b11671ba300abf62370b9a73a6ca81eaa16891060120615b8c0e536421593b7b64bbe359dff30e" }, { - "keyid": "a3345b68d9d5af1b73ca412d08325e76c1d219904628d7893673fbf3a289f3af", - "sig": "1a6a9c3d6d9e5f6cb920f2ac2ae1b75665968be54ec06b2a3012134142d973b8ad7e07c467f7c0a3ea60ffa391661bf64df4292d7541db2f7262d2c0f8f49a0b" + "keyid": "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", + "sig": "d514eaff04cbb8ac2316a286dd4378fb58e934d49a8fec3f3e0f01bcb03b4281764dd189da88094c32026dd76a1874dae118641b55c95f564f530e58f065520b" }, { - "keyid": "fc6554b4ef7006cc6c0786a31760e05aad82b741dd11fd1807e89901ff732ce6", - "sig": "a8d5723b3c248d9aba32b6dd530e976ecfc0dc07dafe725927d0eef74c06a4d16a0a12d82e2034681e7136c90fb075f2916a6ea97ea9780d1af6b6387fadd70e" + "keyid": "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077", + "sig": "e423044046dfbc2ada561db9088caa077f00c5217978bc487663177c0eaf712595771a07e246ef6ff93574a9c23c84a4faa8df23efa704289892c1c55ddad50f" }, { - "keyid": "616ad32f17442cd7f55ad4c8b8f305267eaf933bf1d99e779a3e89bf6c9d3e2b", - "sig": "2f2b964f15b1c8f042da39f9d3a964a846659805d746b411ea4a38bec6bca7225893bcb1de6d1cbff0fbbc524dab606fd1bcdd547c9bae73bc9bde073b81e6589c91f15af468740b47038383131b433e23942405ffa49c3a304b1513db9320a4cd69ae4d4dd4056af8e1e80d9ab3515a189925a177644b4d53774d589c2cbafdb867b18fc5bfe6bdebfeb089376bcbbf7ffbb26d7c875f8127a54d484a02d2b7ee6ef55231a3a8fb22eefc0ac5b747cf9f107f209414b7ba6535caa813b2f9ee4b0772667fc9bfd3cfe90d52d3a0dd4fa334f2ac485bd49e34fbda89694822843873014baf4e32fad3cc5aecac1eb03749b0dc2393b3655e64fb1ec326323b91" + "keyid": "2c6c9f9d8bf4bbb20b047c8bba07ed07ef0b73362fa5c60162db1952e55f24a0", + "sig": "1c763385038f83a9bfd581a09d4247ef8bf7ad50e5fa8e9fa66b51215f96dcb404ed539315d05d57531d231d42e90550a54eddeabcc147dff0a97cb9c89653e4a8a4ec3e2730569d7954d07c88f34033a423552a722f3e7ec66a01bbc40e2dfe9790884571c49c5c8b7f714d79d5ecd000dee152db87f8e51944bb0519ad96fda0f128476693f1aea71d53894f96ae705f9584e715adc7646985a7029ba4327b409e01a4b1cb06c73a9ceb8d717155b74f7608ae07b1679b4ce53312b4caed0288e2d70e72f8e58e4eb7533cb20240df241f7afad2775f4311b09d684b26488a9a4249ad4bc06a027921917230e6fa6d67d1ca72b509bcdb530345067c3cd779" }, { - "keyid": "5b4e2d5150acf8c633be14f03b3ee2e00701f4b67cb8c6e0655ebed629a51543", - "sig": "304502207c7b7bc5218dea6de5dc6ab2f5a4533ec74209bd87ceae8c32f4362765844b7e022100c6889b66aae06437695a9c4c19cdc57c5216a4c6a27ad541c37fc51514dc74bd" + "keyid": "cd514a6a1d45099d92a652f7c960e2c598999411f4d57acbe990da91392841aa", + "sig": "3046022100c5d2114087b5d1339d46438e27579e30dd769fc0fd45bc9f9415838c932650db022100ca262d78208bc8d6c50bde8db9d903e08c1c49d05b36b5ce2331b58729dea452" } ] } \ No newline at end of file diff --git a/examples/testdata/timestamp.json b/examples/testdata/timestamp.json index 8643ca89..e11c5de4 100644 --- a/examples/testdata/timestamp.json +++ b/examples/testdata/timestamp.json @@ -3,7 +3,7 @@ "_type": "timestamp", "spec_version": "1.0.31", "version": 2, - "expires": "2022-12-08T21:45:43.583629Z", + "expires": "2022-12-09T23:33:57.867599Z", "meta": { "snapshot.json": { "version": 2 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "77370a909cbf2c392a56977b61c178235bf8799e21ee6cd6583886705acbf9ee", - "sig": "71efad39a7e1046ca359957a6084ce4ab47162e441a05614b8e1d243b342c8dfc271a68037d899e7bd8f33e8a2525199362b4ff0384b57d286cccd0145e17202" + "keyid": "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad", + "sig": "a6201165eaceb2b5b6c1fc0a991607a89aca53fe15d54bd6eb7af148983236c3b254c07e83ab65bba6ee6b277d77cb65aa7d11c2e028326529ab1a6366c0ef05" } ] } \ No newline at end of file diff --git a/metadata/keys.go b/metadata/keys.go index 53830722..c89d8d49 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -16,14 +16,9 @@ import ( ) const ( - // MaxJSONKeySize defines the maximum length of a JSON payload. - MaxJSONKeySize = 512 * 1024 // 512Kb - KeyIDLength = sha256.Size * 2 - - KeyTypeEd25519 = "ed25519" - KeyTypeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" - KeyTypeRSASSA_PSS_SHA256 = "rsa" - + KeyTypeEd25519 = "ed25519" + KeyTypeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" + KeyTypeRSASSA_PSS_SHA256 = "rsa" KeySchemeEd25519 = "ed25519" KeySchemeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" KeySchemeRSASSA_PSS_SHA256 = "rsassa-pss-sha256" @@ -31,12 +26,12 @@ const ( // ToPublicKey generate crypto.PublicKey from metadata type Key func (k *Key) ToPublicKey() (crypto.PublicKey, error) { - publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal PEM keyval: %w", err) - } switch k.Type { case KeyTypeRSASSA_PSS_SHA256: + publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal PEM keyval: %w", err) + } rsaKey, ok := publicKey.(*rsa.PublicKey) if !ok { return nil, fmt.Errorf("invalid rsa public key") @@ -46,6 +41,10 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { } return rsaKey, nil case KeyTypeECDSA_SHA2_P256: + publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal PEM keyval: %w", err) + } ecdsaKey, ok := publicKey.(*ecdsa.PublicKey) if !ok { return nil, fmt.Errorf("invalid ecdsa public key") @@ -55,7 +54,11 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { } return ecdsaKey, nil case KeyTypeEd25519: - ed25519Key := publicKey.(ed25519.PublicKey) + publicKey, err := hex.DecodeString(k.Value.PublicKey) + if err != nil { + return nil, fmt.Errorf("failed to decode public ed25519 hex keyval: %w", err) + } + ed25519Key := ed25519.PublicKey(publicKey) if _, err := x509.MarshalPKIXPublicKey(ed25519Key); err != nil { return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") } @@ -87,11 +90,7 @@ func KeyFromPublicKey(k crypto.PublicKey) (*Key, error) { case ed25519.PublicKey: key.Type = KeyTypeEd25519 key.Scheme = KeySchemeEd25519 - pemKey, err := cryptoutils.MarshalPublicKeyToPEM(k) - if err != nil { - return nil, err - } - key.Value.PublicKey = string(pemKey) + key.Value.PublicKey = hex.EncodeToString(k) default: return nil, fmt.Errorf("unsupported public key type") } From ca55d5a492b161850e76200aad67bcdae9e03ef7 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 9 Dec 2022 02:01:44 +0200 Subject: [PATCH 020/208] restructure example folder Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 5 + .../basic_repository.go} | 116 +++++++++--------- .../repository/testdata/1.go-scripts.json | 22 ++++ examples/repository/testdata/1.root.json | 83 +++++++++++++ examples/repository/testdata/1.snapshot.json | 19 +++ examples/repository/testdata/1.targets.json | 22 ++++ examples/repository/testdata/2.root.json | 87 +++++++++++++ examples/repository/testdata/2.snapshot.json | 22 ++++ examples/repository/testdata/2.targets.json | 39 ++++++ examples/repository/testdata/3.root.json | 111 +++++++++++++++++ examples/repository/testdata/timestamp.json | 19 +++ examples/testdata/1.go-scripts.json | 23 ---- examples/testdata/1.root.json | 83 ------------- examples/testdata/1.snapshot.json | 19 --- examples/testdata/1.targets.json | 23 ---- examples/testdata/2.root.json | 87 ------------- examples/testdata/2.snapshot.json | 22 ---- examples/testdata/2.targets.json | 39 ------ examples/testdata/3.root.json | 111 ----------------- examples/testdata/timestamp.json | 19 --- metadata/metadata.go | 6 +- metadata/types.go | 2 +- 22 files changed, 491 insertions(+), 488 deletions(-) create mode 100644 examples/client/client_example.go rename examples/{basic_repo.go => repository/basic_repository.go} (81%) create mode 100644 examples/repository/testdata/1.go-scripts.json create mode 100644 examples/repository/testdata/1.root.json create mode 100644 examples/repository/testdata/1.snapshot.json create mode 100644 examples/repository/testdata/1.targets.json create mode 100644 examples/repository/testdata/2.root.json create mode 100644 examples/repository/testdata/2.snapshot.json create mode 100644 examples/repository/testdata/2.targets.json create mode 100644 examples/repository/testdata/3.root.json create mode 100644 examples/repository/testdata/timestamp.json delete mode 100644 examples/testdata/1.go-scripts.json delete mode 100644 examples/testdata/1.root.json delete mode 100644 examples/testdata/1.snapshot.json delete mode 100644 examples/testdata/1.targets.json delete mode 100644 examples/testdata/2.root.json delete mode 100644 examples/testdata/2.snapshot.json delete mode 100644 examples/testdata/2.targets.json delete mode 100644 examples/testdata/3.root.json delete mode 100644 examples/testdata/timestamp.json diff --git a/examples/client/client_example.go b/examples/client/client_example.go new file mode 100644 index 00000000..0db886e8 --- /dev/null +++ b/examples/client/client_example.go @@ -0,0 +1,5 @@ +package main + +func main() { + // TODO +} diff --git a/examples/basic_repo.go b/examples/repository/basic_repository.go similarity index 81% rename from examples/basic_repo.go rename to examples/repository/basic_repository.go index 40a4588f..34828533 100644 --- a/examples/basic_repo.go +++ b/examples/repository/basic_repository.go @@ -63,12 +63,12 @@ func main() { // hash and length of this file at the local path. In addition, it specifies the // 'target path', which a client uses to locate the target file relative to a // configured mirror base URL. - // |----base URL---||-----target path-----| - // e.g. tuf-examples.org/examples/basic_repo.py - targetPath, localPath := helperGetPathForTarget("basic_repo.go") + // |----base URL---||--------target path--------| + // e.g. tuf-examples.org/examples/basic_repository.py + targetPath, localPath := helperGetPathForTarget("basic_repository.go") targetFileInfo, err := metadata.TargetFile().FromFile(localPath, "sha256") if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "generating target file info failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "generating target file info failed", err)) } roles.Targets("targets").Signed.Targets[targetPath] = *targetFileInfo @@ -114,16 +114,16 @@ func main() { for _, name := range []string{"targets", "snapshot", "timestamp", "root"} { _, private, err := ed25519.GenerateKey(nil) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key generation failed", err)) } keys[name] = private key, err := metadata.KeyFromPublicKey(private.Public()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key conversion failed", err)) } err = roles.Root().Signed.AddKey(key, name) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "adding key to root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "adding key to root failed", err)) } } // NOTE: We only need the public part to populate root, so it is possible to use @@ -139,16 +139,16 @@ func main() { // required signature threshold. _, anotherRootKey, err := ed25519.GenerateKey(nil) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key generation failed", err)) } anotherKey, err := metadata.KeyFromPublicKey(anotherRootKey.Public()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key conversion failed", err)) } err = roles.Root().Signed.AddKey(anotherKey, "root") if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "adding another key to root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "adding another key to root failed", err)) } roles.Root().Signed.Roles["root"].Threshold = 2 @@ -160,7 +160,7 @@ func main() { key := keys[name] signer, err := signature.LoadSigner(key, crypto.Hash(0)) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading a signer failed", err)) } switch name { case "targets": @@ -173,7 +173,7 @@ func main() { _, err = roles.Root().Sign(signer) } if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "metadata signing failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "metadata signing failed", err)) } } @@ -194,11 +194,11 @@ func main() { // temporary directory at CWD for review. cwd, err := os.Getwd() if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "getting cwd failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "getting cwd failed", err)) } tmpDir, err := os.MkdirTemp(cwd, "tmp") if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "creating a temporary folder failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "creating a temporary folder failed", err)) } for _, name := range []string{"targets", "snapshot", "timestamp", "root"} { @@ -217,7 +217,7 @@ func main() { err = roles.Root().ToFile(filepath.Join(tmpDir, filename), true) } if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "saving metadata to file failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "saving metadata to file failed", err)) } } @@ -231,19 +231,19 @@ func main() { // until the threshold is satisfied. _, err = roles.Root().FromFile(filepath.Join(tmpDir, "1.root.json")) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading root metadata from file failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading root metadata from file failed", err)) } outofbandSigner, err := signature.LoadSigner(anotherRootKey, crypto.Hash(0)) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading a signer failed", err)) } _, err = roles.Root().Sign(outofbandSigner) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing root failed", err)) } err = roles.Root().ToFile(filepath.Join(tmpDir, "1.root.json"), true) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "saving root metadata to file failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "saving root metadata to file failed", err)) } // Verify that metadata is signed correctly @@ -251,25 +251,25 @@ func main() { // Verify root err = roles.Root().VerifyDelegate("root", roles.Root()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying root metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying root metadata failed", err)) } // Verify targets err = roles.Root().VerifyDelegate("targets", roles.Targets("targets")) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying targets metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying targets metadata failed", err)) } // Verify snapshot err = roles.Root().VerifyDelegate("snapshot", roles.Snapshot()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying snapshot metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying snapshot metadata failed", err)) } // Verify timestamp err = roles.Root().VerifyDelegate("timestamp", roles.Timestamp()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying timestamp metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying timestamp metadata failed", err)) } // Targets delegation @@ -285,7 +285,7 @@ func main() { delegateeName := "go-scripts" _, delegateePrivateKey, err := ed25519.GenerateKey(nil) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key generation failed", err)) } keys[delegateeName] = delegateePrivateKey @@ -353,14 +353,14 @@ func main() { key := keys[name] signer, err := signature.LoadSigner(key, crypto.Hash(0)) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading a signer failed", err)) } switch name { case "targets": roles.Targets("targets").ClearSignatures() _, err = roles.Targets("targets").Sign(signer) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing metadata failed", err)) } filename := fmt.Sprintf("%d.%s.json", roles.Targets("targets").Signed.Version, name) err = roles.Targets("targets").ToFile(filepath.Join(tmpDir, filename), true) @@ -368,7 +368,7 @@ func main() { roles.Snapshot().ClearSignatures() _, err = roles.Snapshot().Sign(signer) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing metadata failed", err)) } filename := fmt.Sprintf("%d.%s.json", roles.Snapshot().Signed.Version, name) err = roles.Snapshot().ToFile(filepath.Join(tmpDir, filename), true) @@ -376,7 +376,7 @@ func main() { roles.Timestamp().ClearSignatures() _, err = roles.Timestamp().Sign(signer) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing metadata failed", err)) } filename := fmt.Sprintf("%s.json", name) err = roles.Timestamp().ToFile(filepath.Join(tmpDir, filename), true) @@ -384,13 +384,13 @@ func main() { roles.Targets(delegateeName).ClearSignatures() _, err = roles.Targets(delegateeName).Sign(signer) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing metadata failed", err)) } filename := fmt.Sprintf("%d.%s.json", roles.Targets(delegateeName).Signed.Version, name) err = roles.Targets(delegateeName).ToFile(filepath.Join(tmpDir, filename), true) } if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "saving metadata to file failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "saving metadata to file failed", err)) } } @@ -409,24 +409,24 @@ func main() { // remains in place, it can be used to count towards the old and new threshold. _, newRootKey, err := ed25519.GenerateKey(nil) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key generation failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key generation failed", err)) } oldRootKey, err := metadata.KeyFromPublicKey(keys["root"].Public()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key conversion failed", err)) } err = roles.Root().Signed.RevokeKey(oldRootKey.ID(), "root") if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "revoking key failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "revoking key failed", err)) } // Add new key for root newRootKeyTUF, err := metadata.KeyFromPublicKey(newRootKey.Public()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "key conversion failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "key conversion failed", err)) } err = roles.Root().Signed.AddKey(newRootKeyTUF, "root") if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "adding key to root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "adding key to root failed", err)) } roles.Root().Signed.Version += 1 roles.Root().ClearSignatures() @@ -435,17 +435,17 @@ func main() { for _, k := range []ed25519.PrivateKey{keys["root"], anotherRootKey, newRootKey} { signer, err := signature.LoadSigner(k, crypto.Hash(0)) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading a signer failed", err)) } _, err = roles.Root().Sign(signer) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing root failed", err)) } } filename := fmt.Sprintf("%d.%s.json", roles.Root().Signed.Version, "root") err = roles.Root().ToFile(filepath.Join(tmpDir, filename), true) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "saving root to file failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "saving root to file failed", err)) } // Verify again that metadata is signed correctly @@ -453,31 +453,31 @@ func main() { // Verify root err = roles.Root().VerifyDelegate("root", roles.Root()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying root metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying root metadata failed", err)) } // Verify targets err = roles.Root().VerifyDelegate("targets", roles.Targets("targets")) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying targets metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying targets metadata failed", err)) } // Verify snapshot err = roles.Root().VerifyDelegate("snapshot", roles.Snapshot()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying snapshot metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying snapshot metadata failed", err)) } // Verify timestamp err = roles.Root().VerifyDelegate("timestamp", roles.Timestamp()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying timestamp metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying timestamp metadata failed", err)) } // Verify delegatee err = roles.Targets("targets").VerifyDelegate(delegateeName, roles.Targets(delegateeName)) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying delegatee metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying delegatee metadata failed", err)) } // Use a mixture of key types @@ -485,33 +485,33 @@ func main() { // Create an RSA key anotherRootKeyRSA, _ := rsa.GenerateKey(rand.Reader, 2048) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "RSA key generation failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "RSA key generation failed", err)) } anotherKeyRSA, err := metadata.KeyFromPublicKey(anotherRootKeyRSA.Public()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "RSA key conversion failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "RSA key conversion failed", err)) } // Create an ECDSA key anotherRootKeyECDSA, _ := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "ECDSA key generation failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "ECDSA key generation failed", err)) } anotherKeyECDSA, err := metadata.KeyFromPublicKey(anotherRootKeyECDSA.Public()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "ECDSA key conversion failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "ECDSA key conversion failed", err)) } // Add the RSA key to root keys err = roles.Root().Signed.AddKey(anotherKeyRSA, "root") if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "adding RSA key to root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "adding RSA key to root failed", err)) } // Add the ECDSA key to root keys err = roles.Root().Signed.AddKey(anotherKeyECDSA, "root") if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "adding ECDSA key to root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "adding ECDSA key to root failed", err)) } // Clear existing signatures, bump version and threshold @@ -523,44 +523,44 @@ func main() { for _, k := range []ed25519.PrivateKey{keys["root"], anotherRootKey, newRootKey} { signer, err := signature.LoadSigner(k, crypto.Hash(0)) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading a signer failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading a signer failed", err)) } _, err = roles.Root().Sign(signer) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing root failed", err)) } } // Sign root with the new RSA and ECDSA keys outofbandSignerRSA, err := signature.LoadSigner(anotherRootKeyRSA, crypto.SHA256) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading RSA signer failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading RSA signer failed", err)) } outofbandSignerECDSA, err := signature.LoadSigner(anotherRootKeyECDSA, crypto.SHA256) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "loading ECDSA signer failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "loading ECDSA signer failed", err)) } _, err = roles.Root().Sign(outofbandSignerRSA) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing root failed", err)) } _, err = roles.Root().Sign(outofbandSignerECDSA) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "signing root failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "signing root failed", err)) } // Verify that root is signed correctly // ==================================== err = roles.Root().VerifyDelegate("root", roles.Root()) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "verifying root metadata failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "verifying root metadata failed", err)) } // Save root to file filename = fmt.Sprintf("%d.%s.json", roles.Root().Signed.Version, "root") err = roles.Root().ToFile(filepath.Join(tmpDir, filename), true) if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "saving root to file failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "saving root to file failed", err)) } fmt.Println("Done! Metadata files location:", tmpDir) } @@ -574,7 +574,7 @@ func helperExpireIn(days int) time.Time { func helperGetPathForTarget(name string) (string, string) { cwd, err := os.Getwd() if err != nil { - panic(fmt.Sprintln("basic_repo.go:", "getting cwd failed", err)) + panic(fmt.Sprintln("basic_repository.go:", "getting cwd failed", err)) } _, dir := filepath.Split(cwd) return filepath.Join(dir, name), filepath.Join(cwd, name) diff --git a/examples/repository/testdata/1.go-scripts.json b/examples/repository/testdata/1.go-scripts.json new file mode 100644 index 00000000..b408f7de --- /dev/null +++ b/examples/repository/testdata/1.go-scripts.json @@ -0,0 +1,22 @@ +{ + "signed": { + "_type": "targets", + "spec_version": "1.0.31", + "version": 1, + "expires": "2022-12-16T00:00:16.544976Z", + "targets": { + "repository/basic_repository.go": { + "length": 23594, + "hashes": { + "sha256": "105490713c14383c130878c1eb0f4837e4f0b47bcaaff285115c3413e6eed5f4" + } + } + } + }, + "signatures": [ + { + "keyid": "a40e836cb2c2b4ebec806dabc04776d859c74bd6346e9c3e4cc88157d68fffc9", + "sig": "fd9112808c961129e0e2a0cd4524451c77901d5577b38a1bbc9ce7b4e2b7fbc0a2c281d0966ea328058e0b2f7a94ee6afb4c47f1e08704dd71e45fef6b5fae0d" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/1.root.json b/examples/repository/testdata/1.root.json new file mode 100644 index 00000000..1d20d415 --- /dev/null +++ b/examples/repository/testdata/1.root.json @@ -0,0 +1,83 @@ +{ + "signed": { + "_type": "root", + "spec_version": "1.0.31", + "consistent_snapshot": true, + "version": 1, + "expires": "2023-12-09T00:00:16.538097Z", + "keys": { + "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "077d70bef29d5b496b22561be7be17af95e318a556cdfb195fe1a6b140a7eac7" + } + }, + "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "04fa05d46a50ef8a35afd6c8f67c5b752f9824922f7e41af848b2a2edc8cff25" + } + }, + "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "b1647e286d229259065b227e86c2a84eb0d88141abba09579b8b2ddb06ad16ec" + } + }, + "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "81ab7f1c19b5a0fc12be460993dda3338e8405ee751690d352016b8538daef76" + } + }, + "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "7ad61ccd09b5b4459e87e8e5a6b8c834bcaa26a20d8f844cfb8dc14636a1b5be" + } + } + }, + "roles": { + "root": { + "keyids": [ + "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", + "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4" + ], + "threshold": 2 + }, + "snapshot": { + "keyids": [ + "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9" + ], + "threshold": 1 + } + } + }, + "signatures": [ + { + "keyid": "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", + "sig": "4f3f91e4a13aada1213232f5f3bb84399a21da5348e7525aa442abbb6897e32d3b1d4f3a1f091323695fa514dd84df56c35599318fefb631177170365682e60e" + }, + { + "keyid": "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", + "sig": "db1d5e1d5233127850acd20f97fe4a1d22660dfea816ca31a9e56c32c434429b581df2385c896f501bb26bcad88d9001ad995d6548c345ad0306bd5214c74b07" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/1.snapshot.json b/examples/repository/testdata/1.snapshot.json new file mode 100644 index 00000000..2fbe9ab8 --- /dev/null +++ b/examples/repository/testdata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signed": { + "_type": "snapshot", + "spec_version": "1.0.31", + "version": 1, + "expires": "2022-12-16T00:00:16.538096Z", + "meta": { + "targets.json": { + "version": 1 + } + } + }, + "signatures": [ + { + "keyid": "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3", + "sig": "2c817d996706610509ecddba407a80f8e3fd235399c9dbf22a1e4f7fd6fe20f629666ffb04e110f719bde56770f63bf03c758e7118fe1629d8c6da9d2cc5e10e" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/1.targets.json b/examples/repository/testdata/1.targets.json new file mode 100644 index 00000000..ddb74038 --- /dev/null +++ b/examples/repository/testdata/1.targets.json @@ -0,0 +1,22 @@ +{ + "signed": { + "_type": "targets", + "spec_version": "1.0.31", + "version": 1, + "expires": "2022-12-16T00:00:16.536956Z", + "targets": { + "repository/basic_repository.go": { + "length": 23594, + "hashes": { + "sha256": "105490713c14383c130878c1eb0f4837e4f0b47bcaaff285115c3413e6eed5f4" + } + } + } + }, + "signatures": [ + { + "keyid": "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78", + "sig": "b4531e7087f08bae58b0138001829b594ccc31085f93a5849cf0327a07bb79180ccff8c02728c5aec29d1fec13433249951e9474eb9bd2cb3711efe3e76d320e" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/2.root.json b/examples/repository/testdata/2.root.json new file mode 100644 index 00000000..01350310 --- /dev/null +++ b/examples/repository/testdata/2.root.json @@ -0,0 +1,87 @@ +{ + "signed": { + "_type": "root", + "spec_version": "1.0.31", + "consistent_snapshot": true, + "version": 2, + "expires": "2023-12-09T00:00:16.538097Z", + "keys": { + "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "077d70bef29d5b496b22561be7be17af95e318a556cdfb195fe1a6b140a7eac7" + } + }, + "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "6fcdb8fc3fda4dab409ed144f8fd9eb908fd73c2242c59a5a89f3ed80f911c81" + } + }, + "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "b1647e286d229259065b227e86c2a84eb0d88141abba09579b8b2ddb06ad16ec" + } + }, + "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "81ab7f1c19b5a0fc12be460993dda3338e8405ee751690d352016b8538daef76" + } + }, + "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "7ad61ccd09b5b4459e87e8e5a6b8c834bcaa26a20d8f844cfb8dc14636a1b5be" + } + } + }, + "roles": { + "root": { + "keyids": [ + "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", + "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5" + ], + "threshold": 2 + }, + "snapshot": { + "keyids": [ + "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9" + ], + "threshold": 1 + } + } + }, + "signatures": [ + { + "keyid": "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", + "sig": "3b10bfcb0f5e71fec7949f1165dd2e9175eebbee075ba8e8eeea7ebb6debf642b56030082a0e11b06a1a7fabe34a542456645f2f8a803997adcbbae6b5ba9805" + }, + { + "keyid": "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", + "sig": "5c247a72ca3426b8c89419a153994c85127d8cfba90ae584e0f0fe5f126705dfc90294f33207f4a810f9f07458dae071cfb366aac83e51c84c7a85c075ff240b" + }, + { + "keyid": "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5", + "sig": "f56a4d7b5c063c4425ca2e1cfa5509946bede3d66dd6b13252948f8ce8550d5f8213e4add944ecfe46c2f193564863cec1ae37718fa396e2b170743f7eaae703" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/2.snapshot.json b/examples/repository/testdata/2.snapshot.json new file mode 100644 index 00000000..fcb00e6d --- /dev/null +++ b/examples/repository/testdata/2.snapshot.json @@ -0,0 +1,22 @@ +{ + "signed": { + "_type": "snapshot", + "spec_version": "1.0.31", + "version": 2, + "expires": "2022-12-16T00:00:16.538096Z", + "meta": { + "go-scripts": { + "version": 1 + }, + "targets.json": { + "version": 2 + } + } + }, + "signatures": [ + { + "keyid": "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3", + "sig": "eb1f29892d804c2a20ab0346e6303f0593542c5f9c8401e1b32e705570a62f9a8f251003fa8970c0e33bb257db428b21fa524c070fc5bc8a86ec6458d0e58c06" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/2.targets.json b/examples/repository/testdata/2.targets.json new file mode 100644 index 00000000..e776cf26 --- /dev/null +++ b/examples/repository/testdata/2.targets.json @@ -0,0 +1,39 @@ +{ + "signed": { + "_type": "targets", + "spec_version": "1.0.31", + "version": 2, + "expires": "2023-12-09T00:00:16.544996Z", + "targets": {}, + "delegations": { + "keys": { + "a40e836cb2c2b4ebec806dabc04776d859c74bd6346e9c3e4cc88157d68fffc9": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "51befa736b161c783cbe1c017142e57cd520193ddfa36b0b5b7ba46bb5b0a4dc" + } + } + }, + "roles": [ + { + "name": "go-scripts", + "keyids": [ + "a40e836cb2c2b4ebec806dabc04776d859c74bd6346e9c3e4cc88157d68fffc9" + ], + "threshold": 1, + "terminating": true, + "paths": [ + "*.go" + ] + } + ] + } + }, + "signatures": [ + { + "keyid": "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78", + "sig": "34387ad53b0373b7c9008060f753038baa33216ca267bea07de7ff6b7034546d9561ffe50fe936521df7488d85a28c9d72981270567ed694f38a919abc79bf04" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/3.root.json b/examples/repository/testdata/3.root.json new file mode 100644 index 00000000..b76717db --- /dev/null +++ b/examples/repository/testdata/3.root.json @@ -0,0 +1,111 @@ +{ + "signed": { + "_type": "root", + "spec_version": "1.0.31", + "consistent_snapshot": true, + "version": 3, + "expires": "2023-12-09T00:00:16.538097Z", + "keys": { + "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "077d70bef29d5b496b22561be7be17af95e318a556cdfb195fe1a6b140a7eac7" + } + }, + "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "6fcdb8fc3fda4dab409ed144f8fd9eb908fd73c2242c59a5a89f3ed80f911c81" + } + }, + "878488d81d52dc7b297741795406694694c4295393175991b09cb0fa3d44f880": { + "keytype": "rsa", + "scheme": "rsassa-pss-sha256", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxSSy2UWTWlco3hYH1FUD\nn8COxD3GQ+ZQNntu5yOrA7yfd/01M5GJr00ZY2MObkohCR2d0jAu6iKx4k8PWw7y\nFXMmRVykQsO0QdYcJ4akTnnQFbmzZmpbwIN4NE0D89T26N5BZS8mzZynPu72Z2hJ\nPKK27bqMRrI74JbvRAx/3cUgPFBqI+FhSK91hSWjimueLSQYWOijNaLK29vjl5Fl\nMp8r5PGZCO9AqFSoQXaqBhqBbYYHxf1wJvC8xfFs+U7UoP7i24dfYlh4krpeZu4A\npxEHAHr+bcXpEJzmx2YLh3iVpNkkMmwSDhPCCssAYkYSkrRc7GLocjOBQn7xcmE4\nDwIDAQAB\n-----END PUBLIC KEY-----\n" + } + }, + "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "b1647e286d229259065b227e86c2a84eb0d88141abba09579b8b2ddb06ad16ec" + } + }, + "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "81ab7f1c19b5a0fc12be460993dda3338e8405ee751690d352016b8538daef76" + } + }, + "c57c3014545136c441db830691bc23f4aa29d60595125400164c2ce59868a6d8": { + "keytype": "ecdsa-sha2-nistp256", + "scheme": "ecdsa-sha2-nistp256", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEE+kjMtMydvRRHFA1Jr2MdpaSoM54\nXI9RgIhsDqFrN3DwqtYnUkqvoTsWTo5yNQ+tBazulma/UrXEcBLItx/7jA==\n-----END PUBLIC KEY-----\n" + } + }, + "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9": { + "keytype": "ed25519", + "scheme": "ed25519", + "keyval": { + "public": "7ad61ccd09b5b4459e87e8e5a6b8c834bcaa26a20d8f844cfb8dc14636a1b5be" + } + } + }, + "roles": { + "root": { + "keyids": [ + "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", + "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5", + "878488d81d52dc7b297741795406694694c4295393175991b09cb0fa3d44f880", + "c57c3014545136c441db830691bc23f4aa29d60595125400164c2ce59868a6d8" + ], + "threshold": 4 + }, + "snapshot": { + "keyids": [ + "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9" + ], + "threshold": 1 + } + } + }, + "signatures": [ + { + "keyid": "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", + "sig": "6ffc88e9674f2454b23d8dd83c0e5018100bcb094e3a27e98096a8e547477f4744765d482b00422f6945b919aed7e724bf1584431704d89f0066125c802a8300" + }, + { + "keyid": "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", + "sig": "b1c6a0a0bcf5aab0be11d35c09c486ab63273f449b732f71f15c84376844548620bb0e7d7bfd26af34fbd80b29f65a1d3fb8629bb90f1f4ec292a55bbb41ab00" + }, + { + "keyid": "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5", + "sig": "c6cfa0d2f9e7b9d1da78ddf2b536ac1952c0cadb61a4ca51a65ccf8dd5cf33e956c5122b9d6c57c01ec903962d6101d4c0c929fb5393421721a2207713a9870c" + }, + { + "keyid": "878488d81d52dc7b297741795406694694c4295393175991b09cb0fa3d44f880", + "sig": "8325b1664ad03735d3e49abc11a2223eeef1c676760392ea0dc54a29ec9315f9af243257c52546ed0c8020125035a0c82d0b215539dda17dff759312f6ff9f97a38200840b08d1eea3d2aa8d1110c392f2cc52b0c0314e7576b4b2c8bca7a411cdeb76510a9b0523ae6aeac590376dcee8898c6f05390bd1c76182fcfaa0870e30b5406b3c838d7cad43c87aeca337feebc0f24f2f5536eb52f4912cd9b98bdd26f91ad09b30a5474eb94086bfb0be056feb7e737ae266cfe67abf1b08a7b5897a2e98ce079eb9e6a6c07988302b751fe9caa5fbb9d52a4d459cf46010865e5d74daaf5f971dd266dfeeefd45c464e75f6428378153c607e82bef6e87c55d81a" + }, + { + "keyid": "c57c3014545136c441db830691bc23f4aa29d60595125400164c2ce59868a6d8", + "sig": "3045022002c83535467b1ca00ced690affa83bf60e0fe4ebfd1db8f8fdc2eba78860eccf022100c93c4522b2af690b52fb449036874c543016cd21961c40487fe6be16d4946a71" + } + ] +} \ No newline at end of file diff --git a/examples/repository/testdata/timestamp.json b/examples/repository/testdata/timestamp.json new file mode 100644 index 00000000..69221209 --- /dev/null +++ b/examples/repository/testdata/timestamp.json @@ -0,0 +1,19 @@ +{ + "signed": { + "_type": "timestamp", + "spec_version": "1.0.31", + "version": 2, + "expires": "2022-12-10T00:00:16.538096Z", + "meta": { + "snapshot.json": { + "version": 2 + } + } + }, + "signatures": [ + { + "keyid": "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9", + "sig": "657cf4584d34950f5685694d5dee0888767a732386647fd23d57e62c32e1d58fadc3c70cce2220b49bcb9d2d5d9f86c9bf22e8ab94c978f0722ab55c628ee10a" + } + ] +} \ No newline at end of file diff --git a/examples/testdata/1.go-scripts.json b/examples/testdata/1.go-scripts.json deleted file mode 100644 index 8cce2e81..00000000 --- a/examples/testdata/1.go-scripts.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0.31", - "version": 1, - "expires": "2022-12-15T23:33:57.876917Z", - "targets": { - "examples/basic_repo.go": { - "length": 23252, - "hashes": { - "sha256": "2057628adfcaaedacaab5101e4bb7c4c28a4715b875ae9c381643671c39bdc4a" - }, - "Path": "/Users/dimitrovr/workspace/go-tuf-metadata/examples/basic_repo.go" - } - } - }, - "signatures": [ - { - "keyid": "027249e08beb71d4960953524334f82fa037b811e3dfece8f3e3f91587043a2f", - "sig": "74fe989da6d187b31245b326ecbdb3926c5485285b2836bccf0c93d95183370aa0ba0ecd9a4166c873e92bf0b1e9ac13fc70acd0b0a743113bc474a26ca04b0c" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/1.root.json b/examples/testdata/1.root.json deleted file mode 100644 index 0ef0444b..00000000 --- a/examples/testdata/1.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0.31", - "consistent_snapshot": true, - "version": 1, - "expires": "2023-12-08T23:33:57.867599Z", - "keys": { - "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "c84605c5b23a495fe63b1be7ecb6f6373c5dd612bc2e92925f0d9025b0cc9214" - } - }, - "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "8a095cf432a9bd295c31f58917b96954516fb06eab26604aa664e29a66565243" - } - }, - "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "be6ca7af32389f004e7b840a22675bc33264528bceef364affb9b626d83e5e4e" - } - }, - "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "77588cb86c06f466c4cb5ad05adde88c0097ae855d2593affe409b393e3477d4" - } - }, - "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "c01daa3eeb0572dc8e733fc7f3eadb69b3c7bedfd5be1a8f7c9eb5fd2ae8dc55" - } - } - }, - "roles": { - "root": { - "keyids": [ - "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", - "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96" - ], - "threshold": 2 - }, - "snapshot": { - "keyids": [ - "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad" - ], - "threshold": 1 - } - } - }, - "signatures": [ - { - "keyid": "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", - "sig": "9882c638f0a7b45cdfcfa2b7e179ffddb3e75735bc60be7ba4a9ae6d03421320dd015d4d06afbe4ddb28c913575d2912b0b750d05d6f957066f22cb491577400" - }, - { - "keyid": "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", - "sig": "0c8ce6c46758744619ec2aa55c9d17fdccafe0753352798a46a9e8683552df0d458a44f90d17fd341ce691d2792ce7df6f1c7569098f2da41c2d13a14d62ee02" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/1.snapshot.json b/examples/testdata/1.snapshot.json deleted file mode 100644 index b1c91aac..00000000 --- a/examples/testdata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0.31", - "version": 1, - "expires": "2022-12-15T23:33:57.867598Z", - "meta": { - "targets.json": { - "version": 1 - } - } - }, - "signatures": [ - { - "keyid": "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304", - "sig": "ad88682568533e3ddf674cc32c5a3af4f9713b7dfb02ce1543c883b15266680517e42ad57a71262cc174979acdc985bdaef9918439ddee9aae0ab014f285080d" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/1.targets.json b/examples/testdata/1.targets.json deleted file mode 100644 index bc017b17..00000000 --- a/examples/testdata/1.targets.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0.31", - "version": 1, - "expires": "2022-12-15T23:33:57.866294Z", - "targets": { - "examples/basic_repo.go": { - "length": 23252, - "hashes": { - "sha256": "2057628adfcaaedacaab5101e4bb7c4c28a4715b875ae9c381643671c39bdc4a" - }, - "Path": "/Users/dimitrovr/workspace/go-tuf-metadata/examples/basic_repo.go" - } - } - }, - "signatures": [ - { - "keyid": "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01", - "sig": "b1a2030e729d3ae4d89f2905f115ddf4107bb30f39f6d04b879b804d9e691faef9068fab199c7c60182e9835c94a7cdccd57d9932d58d58924d75bbd66db000e" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/2.root.json b/examples/testdata/2.root.json deleted file mode 100644 index 1a6a6e75..00000000 --- a/examples/testdata/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0.31", - "consistent_snapshot": true, - "version": 2, - "expires": "2023-12-08T23:33:57.867599Z", - "keys": { - "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "c84605c5b23a495fe63b1be7ecb6f6373c5dd612bc2e92925f0d9025b0cc9214" - } - }, - "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "8a095cf432a9bd295c31f58917b96954516fb06eab26604aa664e29a66565243" - } - }, - "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "6cf291228118c23cb046f70e880f8b8b24a698f42ace97c6584235ba2a3d33d7" - } - }, - "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "be6ca7af32389f004e7b840a22675bc33264528bceef364affb9b626d83e5e4e" - } - }, - "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "77588cb86c06f466c4cb5ad05adde88c0097ae855d2593affe409b393e3477d4" - } - } - }, - "roles": { - "root": { - "keyids": [ - "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", - "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077" - ], - "threshold": 2 - }, - "snapshot": { - "keyids": [ - "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad" - ], - "threshold": 1 - } - } - }, - "signatures": [ - { - "keyid": "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", - "sig": "cb508fa54e850a527a89e9b3e7aafdac03200cfbaca5829bc16f8cad6230968df7f6846bef183181c41cd12aa560a566fdb77ec9cdacedeb5423dba9f5fe4e0b" - }, - { - "keyid": "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", - "sig": "7681bf1df79f4de39179b3a55c85c4f83f4211bd8fc8e00ed1622ab61804987fe261e8931c8d4767a85cd9b418299de70247f10a34ccf6602fd1d64ebe71d700" - }, - { - "keyid": "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077", - "sig": "0be9ddaf9a97983df5c8ddc7571ad0806da3cfe21b9322fcee0b31b4bbf898becb47b79086c6511e705a4aaa288bbe2c5b60cd78b33c114a600327ee5597900e" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/2.snapshot.json b/examples/testdata/2.snapshot.json deleted file mode 100644 index 8682ccc5..00000000 --- a/examples/testdata/2.snapshot.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0.31", - "version": 2, - "expires": "2022-12-15T23:33:57.867598Z", - "meta": { - "go-scripts": { - "version": 1 - }, - "targets.json": { - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304", - "sig": "e9184054a652a91e61fc5d85e96ef6de8395cd958e4bca710d6243cf8b44080a233af0c94f2443a565e0dac4a657d284bb9ac35ee52c27adedacef0a9264180c" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/2.targets.json b/examples/testdata/2.targets.json deleted file mode 100644 index f237252b..00000000 --- a/examples/testdata/2.targets.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0.31", - "version": 2, - "expires": "2023-12-08T23:33:57.876945Z", - "targets": {}, - "delegations": { - "keys": { - "027249e08beb71d4960953524334f82fa037b811e3dfece8f3e3f91587043a2f": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "4a37db60d479d095864af8ce5b91cce4fac052cd42eb5bd354c9118f64e6b161" - } - } - }, - "roles": [ - { - "name": "go-scripts", - "keyids": [ - "027249e08beb71d4960953524334f82fa037b811e3dfece8f3e3f91587043a2f" - ], - "threshold": 1, - "terminating": true, - "paths": [ - "*.go" - ] - } - ] - } - }, - "signatures": [ - { - "keyid": "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01", - "sig": "39865fab715dc9a566fc7c54b4e35412bfd760655244d2d1378df02d53bb40d8cfc8a79f4aba87b19eb74598960002df548d15c0f6c8e8ab601a31e2d8bc260a" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/3.root.json b/examples/testdata/3.root.json deleted file mode 100644 index 6f1aa3b6..00000000 --- a/examples/testdata/3.root.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0.31", - "consistent_snapshot": true, - "version": 3, - "expires": "2023-12-08T23:33:57.867599Z", - "keys": { - "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "c84605c5b23a495fe63b1be7ecb6f6373c5dd612bc2e92925f0d9025b0cc9214" - } - }, - "2c6c9f9d8bf4bbb20b047c8bba07ed07ef0b73362fa5c60162db1952e55f24a0": { - "keytype": "rsa", - "scheme": "rsassa-pss-sha256", - "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArbDuQQQdLxsCgP6jdAjA\nna8LJk9z0pt8nxEdhi0CZwXi0HBMZ+PX7TnBlTbLnp1o0/5cBKoDT073tLXSewjj\nsRxWLBA4v3k/PEcytfs9SRmbLzr71H9cvY2ezIR5wbK2lSdbu+5eokOBEj2C3Z4Y\nbbMbXGTr7y3rlDzbbB0bSZ66/TCmwsGr6RP1jPz+RF75yaomZVxIIm7JAeTMuIek\nbQoehIdw7y9gdjpvDuZ5WCYdhKwPYRzaABmh+YdJ2Uch9b5X8ZbHqbFprWaC+FrD\nFiTHQL/xcuyXKTkNqutbTt6f8xTmPjLvXd+PvSjnJDoXlLLD9ecLWLCK+Dne1evD\n0QIDAQAB\n-----END PUBLIC KEY-----\n" - } - }, - "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "8a095cf432a9bd295c31f58917b96954516fb06eab26604aa664e29a66565243" - } - }, - "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "6cf291228118c23cb046f70e880f8b8b24a698f42ace97c6584235ba2a3d33d7" - } - }, - "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "be6ca7af32389f004e7b840a22675bc33264528bceef364affb9b626d83e5e4e" - } - }, - "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "77588cb86c06f466c4cb5ad05adde88c0097ae855d2593affe409b393e3477d4" - } - }, - "cd514a6a1d45099d92a652f7c960e2c598999411f4d57acbe990da91392841aa": { - "keytype": "ecdsa-sha2-nistp256", - "scheme": "ecdsa-sha2-nistp256", - "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEbS6FXiB7y5eSb4Mx/SNNU+151N+E\nt/xVZXfuf5ehPwOgHzAoKsxOtu3xD/o08ZNgLWBPGgiL++o/GQwoHOSwMA==\n-----END PUBLIC KEY-----\n" - } - } - }, - "roles": { - "root": { - "keyids": [ - "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", - "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077", - "2c6c9f9d8bf4bbb20b047c8bba07ed07ef0b73362fa5c60162db1952e55f24a0", - "cd514a6a1d45099d92a652f7c960e2c598999411f4d57acbe990da91392841aa" - ], - "threshold": 4 - }, - "snapshot": { - "keyids": [ - "3d9a842805ff4831dfedfa83666fd24c8fec642f1a7658297cd288505193e304" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "283017a68d8b686d8de4237da15fe4d75567cf893afc847358a41981cc99ff01" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad" - ], - "threshold": 1 - } - } - }, - "signatures": [ - { - "keyid": "eb2885fc79098d4ebd382fd23d68b2d398d1fe3f9f38f18b10fab011f629beb1", - "sig": "803f75081de968210bd8215dc819156a8fd3eaae87a1803e18b11671ba300abf62370b9a73a6ca81eaa16891060120615b8c0e536421593b7b64bbe359dff30e" - }, - { - "keyid": "51af40ee7d98d28a2e9fce51dfea1045648f50b9714ce322026882b7eb718d96", - "sig": "d514eaff04cbb8ac2316a286dd4378fb58e934d49a8fec3f3e0f01bcb03b4281764dd189da88094c32026dd76a1874dae118641b55c95f564f530e58f065520b" - }, - { - "keyid": "431562f50d4eb4d30b8205f726d04b55bfb9e3e2b9b699b60e2bcbb79c851077", - "sig": "e423044046dfbc2ada561db9088caa077f00c5217978bc487663177c0eaf712595771a07e246ef6ff93574a9c23c84a4faa8df23efa704289892c1c55ddad50f" - }, - { - "keyid": "2c6c9f9d8bf4bbb20b047c8bba07ed07ef0b73362fa5c60162db1952e55f24a0", - "sig": "1c763385038f83a9bfd581a09d4247ef8bf7ad50e5fa8e9fa66b51215f96dcb404ed539315d05d57531d231d42e90550a54eddeabcc147dff0a97cb9c89653e4a8a4ec3e2730569d7954d07c88f34033a423552a722f3e7ec66a01bbc40e2dfe9790884571c49c5c8b7f714d79d5ecd000dee152db87f8e51944bb0519ad96fda0f128476693f1aea71d53894f96ae705f9584e715adc7646985a7029ba4327b409e01a4b1cb06c73a9ceb8d717155b74f7608ae07b1679b4ce53312b4caed0288e2d70e72f8e58e4eb7533cb20240df241f7afad2775f4311b09d684b26488a9a4249ad4bc06a027921917230e6fa6d67d1ca72b509bcdb530345067c3cd779" - }, - { - "keyid": "cd514a6a1d45099d92a652f7c960e2c598999411f4d57acbe990da91392841aa", - "sig": "3046022100c5d2114087b5d1339d46438e27579e30dd769fc0fd45bc9f9415838c932650db022100ca262d78208bc8d6c50bde8db9d903e08c1c49d05b36b5ce2331b58729dea452" - } - ] -} \ No newline at end of file diff --git a/examples/testdata/timestamp.json b/examples/testdata/timestamp.json deleted file mode 100644 index e11c5de4..00000000 --- a/examples/testdata/timestamp.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0.31", - "version": 2, - "expires": "2022-12-09T23:33:57.867599Z", - "meta": { - "snapshot.json": { - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "c253eafd5918633833540e5f7d6c0f6385ae61e99fa6600b1c4ae769186ba4ad", - "sig": "a6201165eaceb2b5b6c1fc0a991607a89aca53fe15d54bd6eb7af148983236c3b254c07e83ab65bba6ee6b277d77cb65aa7d11c2e028326529ab1a6366c0ef05" - } - ] -} \ No newline at end of file diff --git a/metadata/metadata.go b/metadata/metadata.go index 7bad616b..30403fbb 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -117,7 +117,7 @@ func TargetFile() *TargetFiles { // MetaFile create new metadata instance of type MetaFile func MetaFile(version int64) *MetaFiles { - if version <= 0 { + if version < 1 { // attempting to set incorrect version version = 1 } @@ -132,7 +132,7 @@ func MetaFile(version int64) *MetaFiles { func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { m, err := fromFile[T](name) if err != nil { - return nil, fmt.Errorf("error generating metadata from bytes - %s", name) + return nil, err } *meta = *m return meta, nil @@ -336,7 +336,7 @@ func (signed *TargetsType) IsExpired(referenceTime time.Time) bool { return referenceTime.After(signed.Expires) } -// VerifyLengthHashes checks whether the Metafile data matches its corresponding +// VerifyLengthHashes checks whether the MetaFiles data matches its corresponding // length and hashes func (f *MetaFiles) VerifyLengthHashes(data []byte) error { // hashes and length are optional for MetaFiles diff --git a/metadata/types.go b/metadata/types.go index 34f2e861..b7e0bf98 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -104,7 +104,7 @@ type TargetFiles struct { Length int64 `json:"length"` Hashes Hashes `json:"hashes"` Custom json.RawMessage `json:"custom,omitempty"` - Path string + Path string `json:"-"` } type Delegations struct { From ceb1ffa4ca98827197a5bed2649b8704d9191b23 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 9 Dec 2022 23:20:34 +0200 Subject: [PATCH 021/208] introduce logrus and restructure file layout Signed-off-by: Radoslav Dimitrov --- go.mod | 6 +- go.sum | 19 +- metadata/fetcher/fetcher.go | 11 +- metadata/helpers.go | 158 -------------- metadata/keys.go | 22 +- metadata/metadata.go | 216 +++++++++++++++++--- metadata/trustedmetadata/trustedmetadata.go | 24 ++- metadata/updater/updater.go | 156 +++++++------- 8 files changed, 306 insertions(+), 306 deletions(-) delete mode 100644 metadata/helpers.go diff --git a/go.mod b/go.mod index 59635167..5e62600e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,9 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.4.0 github.com/sigstore/sigstore v1.4.4 + github.com/sirupsen/logrus v1.9.0 golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be + golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) require ( @@ -15,14 +17,10 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - github.com/yuin/goldmark v1.4.13 // indirect - golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 // indirect - golang.org/x/mod v0.7.0 // indirect golang.org/x/net v0.2.0 // indirect golang.org/x/sys v0.2.0 // indirect golang.org/x/term v0.2.0 // indirect golang.org/x/text v0.4.0 // indirect - golang.org/x/tools v0.3.0 // indirect google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect google.golang.org/grpc v1.50.1 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/go.sum b/go.sum index d8aa2814..cadcb223 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg= github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= @@ -24,6 +26,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= 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/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= @@ -32,6 +35,10 @@ github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/ github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= github.com/sigstore/sigstore v1.4.4 h1:lVsnNTY8DUmy2hnwCPtimWfEqv+DIwleORkF8KyFsMs= github.com/sigstore/sigstore v1.4.4/go.mod h1:wIqu9sN72+pds31MMu89GchxXHy17k+VZWc+HY1ZXMA= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 h1:1i/Afw3rmaR1gF3sfVkG2X6ldkikQwA9zY380LrR5YI= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY= @@ -39,24 +46,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A= golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9 h1:yZNXmy+j/JpX19vZkVktWqAo7Gny4PBWYYK3zskGpx4= -golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= +golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= @@ -71,5 +73,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index 14acbe7a..99d1c5ea 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -4,7 +4,6 @@ import ( "fmt" "io" "net/http" - "net/url" "strconv" ) @@ -35,13 +34,9 @@ func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64) ([]byte, return nil, err } defer res.Body.Close() - // handle bad status codes - if res.StatusCode == http.StatusNotFound || res.StatusCode != http.StatusOK { - return nil, &url.Error{ - Op: "GET", - URL: urlPath, - Err: fmt.Errorf("unexpected HTTP status %d", res.StatusCode), - } + // handle HTTP status codes + if res.StatusCode == http.StatusNotFound || res.StatusCode == http.StatusForbidden || res.StatusCode != http.StatusOK { + return nil, fmt.Errorf("failed to download %s, http status code: %d", urlPath, res.StatusCode) } // get content length length, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) diff --git a/metadata/helpers.go b/metadata/helpers.go deleted file mode 100644 index f92933ed..00000000 --- a/metadata/helpers.go +++ /dev/null @@ -1,158 +0,0 @@ -package metadata - -import ( - "bytes" - "crypto/sha256" - "crypto/sha512" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "hash" - "io" - "os" - - "golang.org/x/exp/slices" -) - -// fromFile returns *Metadata[T] object from file and verifies -// that the data corresponds to the caller struct type -func fromFile[T Roles](name string) (*Metadata[T], error) { - in, err := os.Open(name) - if err != nil { - return nil, fmt.Errorf("error opening metadata file - %s", name) - } - defer in.Close() - data, err := io.ReadAll(in) - if err != nil { - return nil, fmt.Errorf("error reading metadata bytes from file - %s", name) - } - meta, err := fromBytes[T](data) - if err != nil { - return nil, fmt.Errorf("error generating metadata from bytes - %s", name) - } - return meta, nil -} - -// fromBytes returns *Metadata[T] object from bytes and verifies -// that the data corresponds to the caller struct type -func fromBytes[T Roles](data []byte) (*Metadata[T], error) { - meta := &Metadata[T]{} - // verify that the type we used to create the object is the same as the type of the metadata file - if err := checkType[T](data); err != nil { - return nil, err - } - // if all is okay, unmarshal meta to the desired Metadata[T] type - if err := json.Unmarshal(data, meta); err != nil { - return nil, err - } - // Make sure signature key IDs are unique - if err := checkUniqueSignatures(*meta); err != nil { - return nil, err - } - return meta, nil -} - -// Verifies if the signature key IDs are unique for that metadata -func checkUniqueSignatures[T Roles](meta Metadata[T]) error { - signatures := []string{} - for _, sig := range meta.Signatures { - if slices.Contains(signatures, sig.KeyID) { - return fmt.Errorf("multiple signatures found for keyid %s", sig.KeyID) - } - signatures = append(signatures, sig.KeyID) - } - return nil -} - -// Verifies if the Generic type used to create the object is the same as the type of the metadata file in bytes -func checkType[T Roles](data []byte) error { - var m map[string]any - i := any(new(T)) - if err := json.Unmarshal(data, &m); err != nil { - return err - } - signedType := m["signed"].(map[string]any)["_type"].(string) - switch i.(type) { - case *RootType: - if ROOT != signedType { - return fmt.Errorf("expected type %s, got - %s", ROOT, signedType) - } - case *SnapshotType: - if SNAPSHOT != signedType { - return fmt.Errorf("expected type %s, got - %s", SNAPSHOT, signedType) - } - case *TimestampType: - if TIMESTAMP != signedType { - return fmt.Errorf("expected type %s, got - %s", TIMESTAMP, signedType) - } - case *TargetsType: - if TARGETS != signedType { - return fmt.Errorf("expected type %s, got - %s", TARGETS, signedType) - } - default: - return fmt.Errorf("unrecognized metadata type - %s", signedType) - } - // all okay - return nil -} - -func verifyLength(data []byte, length int64) error { - len, err := io.Copy(io.Discard, bytes.NewReader(data)) - if err != nil { - return err - } - if length != len { - return fmt.Errorf("length verification failed - expected %d, got %d", length, len) - } - return nil -} - -func verifyHashes(data []byte, hashes Hashes) error { - var hasher hash.Hash - for k, v := range hashes { - switch k { - case "sha256": - hasher = sha256.New() - case "sha512": - hasher = sha512.New() - default: - return fmt.Errorf("hash verification failed - unknown hashing algorithm - %s", k) - } - hasher.Write(data) - if hex.EncodeToString(v) != hex.EncodeToString(hasher.Sum(nil)) { - return fmt.Errorf("hash verification failed - mismatch for algorithm %s", k) - } - } - return nil -} - -func (b *HexBytes) UnmarshalJSON(data []byte) error { - if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { - return errors.New("tuf: invalid JSON hex bytes") - } - res := make([]byte, hex.DecodedLen(len(data)-2)) - _, err := hex.Decode(res, data[1:len(data)-1]) - if err != nil { - return err - } - *b = res - return nil -} - -func (b HexBytes) MarshalJSON() ([]byte, error) { - res := make([]byte, hex.EncodedLen(len(b))+2) - res[0] = '"' - res[len(res)-1] = '"' - hex.Encode(res[1:], b) - return res, nil -} - -func (b HexBytes) String() string { - return hex.EncodeToString(b) -} - -func PathHexDigest(s string) string { - b := sha256.Sum256([]byte(s)) - return hex.EncodeToString(b[:]) -} diff --git a/metadata/keys.go b/metadata/keys.go index c89d8d49..35830e20 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -30,37 +30,37 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { case KeyTypeRSASSA_PSS_SHA256: publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) if err != nil { - return nil, fmt.Errorf("failed to unmarshal PEM keyval: %w", err) + return nil, err } rsaKey, ok := publicKey.(*rsa.PublicKey) if !ok { return nil, fmt.Errorf("invalid rsa public key") } if _, err := x509.MarshalPKIXPublicKey(rsaKey); err != nil { - return nil, fmt.Errorf("marshalling to PKIX key failed") + return nil, err } return rsaKey, nil case KeyTypeECDSA_SHA2_P256: publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) if err != nil { - return nil, fmt.Errorf("failed to unmarshal PEM keyval: %w", err) + return nil, err } ecdsaKey, ok := publicKey.(*ecdsa.PublicKey) if !ok { return nil, fmt.Errorf("invalid ecdsa public key") } if _, err := x509.MarshalPKIXPublicKey(ecdsaKey); err != nil { - return nil, fmt.Errorf("marshalling to PKIX key failed") + return nil, err } return ecdsaKey, nil case KeyTypeEd25519: publicKey, err := hex.DecodeString(k.Value.PublicKey) if err != nil { - return nil, fmt.Errorf("failed to decode public ed25519 hex keyval: %w", err) + return nil, err } ed25519Key := ed25519.PublicKey(publicKey) if _, err := x509.MarshalPKIXPublicKey(ed25519Key); err != nil { - return nil, fmt.Errorf("marshalling to PKIX key: invalid public key") + return nil, err } return ed25519Key, nil } @@ -104,7 +104,7 @@ func KeyFromPublicKey(k crypto.PublicKey) (*Key, error) { func (signed *RootType) AddKey(key *Key, role string) error { // verify role is present if _, ok := signed.Roles[role]; !ok { - return fmt.Errorf("Role %s doesn't exist", role) + return fmt.Errorf("role %s doesn't exist", role) } // add keyID to role if !slices.Contains(signed.Roles[role].KeyIDs, key.ID()) { @@ -121,11 +121,11 @@ func (signed *RootType) AddKey(key *Key, role string) error { func (signed *RootType) RevokeKey(keyID, role string) error { // verify role is present if _, ok := signed.Roles[role]; !ok { - return fmt.Errorf("Role %s doesn't exist", role) + return fmt.Errorf("role %s doesn't exist", role) } // verify keyID is present for given role if !slices.Contains(signed.Roles[role].KeyIDs, keyID) { - return fmt.Errorf("Key with id %s is not used by %s", keyID, role) + return fmt.Errorf("key with id %s is not used by %s", keyID, role) } // remove keyID from role filteredKeyIDs := []string{} @@ -185,7 +185,7 @@ func (signed *TargetsType) RevokeKey(keyID string, role string) error { if d.Name == role { // check if keyID is present in keyIDs for that role if !slices.Contains(d.KeyIDs, keyID) { - return fmt.Errorf("Key with id %s is not used by %s", keyID, role) + return fmt.Errorf("key with id %s is not used by %s", keyID, role) } // remove keyID from role filteredKeyIDs := []string{} @@ -215,7 +215,7 @@ func (k *Key) ID() string { k.idOnce.Do(func() { data, err := cjson.EncodeCanonical(k) if err != nil { - panic(fmt.Errorf("tuf: error creating key ID: %w", err)) + panic(fmt.Errorf("error creating key ID: %w", err)) } digest := sha256.Sum256(data) k.id = hex.EncodeToString(digest[:]) diff --git a/metadata/metadata.go b/metadata/metadata.go index 30403fbb..09b30b1b 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -5,7 +5,9 @@ import ( "crypto" "crypto/sha256" "crypto/sha512" + "encoding/hex" "encoding/json" + "errors" "fmt" "hash" "io" @@ -15,6 +17,8 @@ import ( "github.com/secure-systems-lab/go-securesystemslib/cjson" "github.com/sigstore/sigstore/pkg/signature" + log "github.com/sirupsen/logrus" + "golang.org/x/exp/slices" ) // Root create new metadata instance of type Root @@ -31,9 +35,10 @@ func Root(expires ...time.Time) *Metadata[RootType] { Threshold: 1, } } + log.Debugf("Created a metadata of type %s expiring at %s", ROOT, expires[0]) return &Metadata[RootType]{ Signed: RootType{ - Type: "root", + Type: ROOT, SpecVersion: SPECIFICATION_VERSION, Version: 1, Expires: expires[0], @@ -51,9 +56,10 @@ func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } + log.Debugf("Created a metadata of type %s expiring at %s", SNAPSHOT, expires[0]) return &Metadata[SnapshotType]{ Signed: SnapshotType{ - Type: "snapshot", + Type: SNAPSHOT, SpecVersion: SPECIFICATION_VERSION, Version: 1, Expires: expires[0], @@ -73,9 +79,10 @@ func Timestamp(expires ...time.Time) *Metadata[TimestampType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } + log.Debugf("Created a metadata of type %s expiring at %s", TIMESTAMP, expires[0]) return &Metadata[TimestampType]{ Signed: TimestampType{ - Type: "timestamp", + Type: TIMESTAMP, SpecVersion: SPECIFICATION_VERSION, Version: 1, Expires: expires[0], @@ -95,9 +102,10 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } + log.Debugf("Created a metadata of type %s expiring at %s", TARGETS, expires[0]) return &Metadata[TargetsType]{ Signed: TargetsType{ - Type: "targets", + Type: TARGETS, SpecVersion: SPECIFICATION_VERSION, Version: 1, Expires: expires[0], @@ -119,6 +127,7 @@ func TargetFile() *TargetFiles { func MetaFile(version int64) *MetaFiles { if version < 1 { // attempting to set incorrect version + log.Debugf("Attempting to set incorrect version of %d for MetaFile", version) version = 1 } return &MetaFiles{ @@ -130,11 +139,21 @@ func MetaFile(version int64) *MetaFiles { // FromFile load metadata from file func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { - m, err := fromFile[T](name) + in, err := os.Open(name) + if err != nil { + return nil, err + } + defer in.Close() + data, err := io.ReadAll(in) + if err != nil { + return nil, err + } + m, err := fromBytes[T](data) if err != nil { return nil, err } *meta = *m + log.Debugf("Loaded metadata from file %s", name) return meta, nil } @@ -145,11 +164,13 @@ func (meta *Metadata[T]) FromBytes(data []byte) (*Metadata[T], error) { return nil, err } *meta = *m + log.Debug("Loaded metadata from bytes") return meta, nil } // ToBytes serialize metadata to bytes func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { + log.Debug("Writing metadata to bytes") if pretty { return json.MarshalIndent(*meta, "", "\t") } @@ -158,9 +179,10 @@ func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { // ToFile save metadata to file func (meta *Metadata[T]) ToFile(name string, pretty bool) error { + log.Debugf("Writing metadata to file %s", name) data, err := meta.ToBytes(pretty) if err != nil { - return fmt.Errorf("failed serializing metadata") + return err } return os.WriteFile(name, data, 0644) } @@ -170,12 +192,12 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { // encode the Signed part to canonical JSON so signatures are consistent payload, err := cjson.EncodeCanonical(meta.Signed) if err != nil { - return nil, fmt.Errorf("failed to encode Signed in canonical format during Sign()") + return nil, err } // sign the Signed part sb, err := signer.SignMessage(bytes.NewReader(payload)) if err != nil { - return nil, fmt.Errorf("failed to Sign(), returned signature should not be nil") + return nil, err } // get the signer's PublicKey publ, err := signer.PublicKey() @@ -195,6 +217,7 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { // update the Signatures part meta.Signatures = append(meta.Signatures, *sig) // return the new signature + log.Debugf("Signed metadata with key ID: %s", key.ID()) return sig, nil } @@ -204,10 +227,9 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat var keys map[string]*Key var roleKeyIDs []string var roleThreshold int - var sign Signature - var payload []byte signing_keys := map[string]bool{} i := any(meta) + log.Debugf("Verifying %s", delegated_role) // collect keys, keyIDs and threshold based on delegator type switch i := i.(type) { case *Metadata[RootType]: @@ -236,10 +258,11 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } // loop through each role keyID for _, v := range roleKeyIDs { + sign := Signature{} + payload := []byte{} // convert to a PublicKey type key, err := keys[v].ToPublicKey() if err != nil { - fmt.Println("failed to generate crypto.PublicKey from Key") return err } // use corresponding hash function for key type @@ -250,7 +273,6 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat // load a verifier based on that key verifier, err := signature.LoadVerifier(key, hash) if err != nil { - fmt.Println("failed to load verifier") return err } // collect the signature for that key and build the payload we'll verify @@ -264,7 +286,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } payload, err = cjson.EncodeCanonical(d.Signed) if err != nil { - fmt.Println("failed to encode Signed in canonical format during verify") + return err } case *Metadata[SnapshotType]: for _, s := range d.Signatures { @@ -274,7 +296,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } payload, err = cjson.EncodeCanonical(d.Signed) if err != nil { - fmt.Println("failed to encode Signed in canonical format during verify") + return err } case *Metadata[TimestampType]: for _, s := range d.Signatures { @@ -284,7 +306,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } payload, err = cjson.EncodeCanonical(d.Signed) if err != nil { - fmt.Println("failed to encode Signed in canonical format during verify") + return err } case *Metadata[TargetsType]: for _, s := range d.Signatures { @@ -294,21 +316,25 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } payload, err = cjson.EncodeCanonical(d.Signed) if err != nil { - fmt.Println("failed to encode Signed in canonical format during verify") + return err } default: - fmt.Println("unknown delegated metadata type") + log.Debugf("unknown delegated metadata type") } // verify if the signature for that payload corresponds to the given key if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err == nil { // save the verified keyID only if verification passed signing_keys[v] = true + log.Debugf("Verified %s with key ID %s", delegated_role, v) } } // check if the amount of valid signatures is enough if len(signing_keys) < roleThreshold { - return fmt.Errorf("signature verification failed, not enough signatures, got %d, want %d", len(signing_keys), roleThreshold) + log.Debugf("Verifying %s failed, not enough signatures, got %d, want %d", delegated_role, len(signing_keys), roleThreshold) + return fmt.Errorf("verifying %s failed", delegated_role) + } + log.Debugf("Verified %s successfully", delegated_role) return nil } @@ -371,23 +397,31 @@ func (f *TargetFiles) VerifyLengthHashes(data []byte) error { // FromFile generates TargetFiles from file func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { - var hasher hash.Hash - targetFile := &TargetFiles{ - Hashes: map[string]HexBytes{}, - } - // use default hash algorithm if not set - if len(hashes) == 0 { - hashes = []string{"sha256"} - } + log.Debugf("Generating target file from file %s", localPath) // open file in, err := os.Open(localPath) if err != nil { - return nil, fmt.Errorf("error opening target file - %s", localPath) + return nil, err } defer in.Close() + // read file data, err := io.ReadAll(in) if err != nil { - return nil, fmt.Errorf("error reading bytes from target file - %s", localPath) + return nil, err + } + return t.FromBytes(localPath, data, hashes...) +} + +// FromBytes generates TargetFiles from bytes +func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) (*TargetFiles, error) { + log.Debugf("Generating target file from bytes %s", localPath) + var hasher hash.Hash + targetFile := &TargetFiles{ + Hashes: map[string]HexBytes{}, + } + // use default hash algorithm if not set + if len(hashes) == 0 { + hashes = []string{"sha256"} } // calculate length len, err := io.Copy(io.Discard, bytes.NewReader(data)) @@ -414,8 +448,9 @@ func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles return targetFile, nil } -// ClearSignatures clears the Signatures +// ClearSignatures clears Signatures func (meta *Metadata[T]) ClearSignatures() { + log.Debugf("Cleared signatures") meta.Signatures = []Signature{} } @@ -447,3 +482,126 @@ func (role *Delegations) GetRolesForTarget(targetFilepath string) map[string]boo } return res } + +// fromBytes returns *Metadata[T] object from bytes and verifies +// that the data corresponds to the caller struct type +func fromBytes[T Roles](data []byte) (*Metadata[T], error) { + meta := &Metadata[T]{} + // verify that the type we used to create the object is the same as the type of the metadata file + if err := checkType[T](data); err != nil { + return nil, err + } + // if all is okay, unmarshal meta to the desired Metadata[T] type + if err := json.Unmarshal(data, meta); err != nil { + return nil, err + } + // Make sure signature key IDs are unique + if err := checkUniqueSignatures(*meta); err != nil { + return nil, err + } + return meta, nil +} + +// Verifies if the signature key IDs are unique for that metadata +func checkUniqueSignatures[T Roles](meta Metadata[T]) error { + signatures := []string{} + for _, sig := range meta.Signatures { + if slices.Contains(signatures, sig.KeyID) { + return fmt.Errorf("multiple signatures found for key ID %s", sig.KeyID) + } + signatures = append(signatures, sig.KeyID) + } + return nil +} + +// Verifies if the Generic type used to create the object is the same as the type of the metadata file in bytes +func checkType[T Roles](data []byte) error { + var m map[string]any + i := any(new(T)) + if err := json.Unmarshal(data, &m); err != nil { + return err + } + signedType := m["signed"].(map[string]any)["_type"].(string) + switch i.(type) { + case *RootType: + if ROOT != signedType { + return fmt.Errorf("expected type %s, got - %s", ROOT, signedType) + } + case *SnapshotType: + if SNAPSHOT != signedType { + return fmt.Errorf("expected type %s, got - %s", SNAPSHOT, signedType) + } + case *TimestampType: + if TIMESTAMP != signedType { + return fmt.Errorf("expected type %s, got - %s", TIMESTAMP, signedType) + } + case *TargetsType: + if TARGETS != signedType { + return fmt.Errorf("expected type %s, got - %s", TARGETS, signedType) + } + default: + return fmt.Errorf("unrecognized metadata type - %s", signedType) + } + // all okay + return nil +} + +func verifyLength(data []byte, length int64) error { + len, err := io.Copy(io.Discard, bytes.NewReader(data)) + if err != nil { + return err + } + if length != len { + return fmt.Errorf("length verification failed - expected %d, got %d", length, len) + } + return nil +} + +func verifyHashes(data []byte, hashes Hashes) error { + var hasher hash.Hash + for k, v := range hashes { + switch k { + case "sha256": + hasher = sha256.New() + case "sha512": + hasher = sha512.New() + default: + return fmt.Errorf("hash verification failed - unknown hashing algorithm - %s", k) + } + hasher.Write(data) + if hex.EncodeToString(v) != hex.EncodeToString(hasher.Sum(nil)) { + return fmt.Errorf("hash verification failed - mismatch for algorithm %s", k) + } + } + return nil +} + +func (b *HexBytes) UnmarshalJSON(data []byte) error { + if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { + return errors.New("tuf: invalid JSON hex bytes") + } + res := make([]byte, hex.DecodedLen(len(data)-2)) + _, err := hex.Decode(res, data[1:len(data)-1]) + if err != nil { + return err + } + *b = res + return nil +} + +func (b HexBytes) MarshalJSON() ([]byte, error) { + res := make([]byte, hex.EncodedLen(len(b))+2) + res[0] = '"' + res[len(res)-1] = '"' + hex.Encode(res[1:], b) + return res, nil +} + +func (b HexBytes) String() string { + return hex.EncodeToString(b) +} + +func PathHexDigest(s string) string { + b := sha256.Sum256([]byte(s)) + return hex.EncodeToString(b[:]) +} diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 037da4fb..b6e827f4 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -5,6 +5,7 @@ import ( "time" "github.com/rdimitrov/go-tuf-metadata/metadata" + log "github.com/sirupsen/logrus" ) // TrustedMetadata struct for storing trusted metadata @@ -54,7 +55,7 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { } // save root if verified trusted.Root = newRoot - fmt.Println("Loaded trusted root v", trusted.Root.Signed.Version) + log.Debugf("Loaded trusted root v", trusted.Root.Signed.Version) return nil } @@ -65,7 +66,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ if trusted.Timestamp != nil { return nil, fmt.Errorf("cannot update root after timestamp") } - fmt.Println("Updating root") + log.Debugf("Updating root") // generate root metadata newRoot, err := metadata.Root().FromBytes(rootData) if err != nil { @@ -91,7 +92,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ } // save root if verified trusted.Root = newRoot - fmt.Printf("Updated root v%d\n", trusted.Root.Signed.Version) + log.Debugf("Updated root v%d", trusted.Root.Signed.Version) return trusted.Root, nil } @@ -109,7 +110,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata if trusted.Root.Signed.IsExpired(trusted.RefTime) { return nil, fmt.Errorf("final root.json is expired") } - fmt.Println("Updating timestamp") + log.Debugf("Updating timestamp") // no need to check for 5.3.11 (fast forward attack recovery): // timestamp/snapshot can not yet be loaded at this point newTimestamp, err := metadata.Timestamp().FromBytes(timestampData) @@ -134,7 +135,8 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata } // keep using old timestamp if versions are equal. if newTimestamp.Signed.Version == trusted.Timestamp.Signed.Version { - return nil, fmt.Errorf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) + log.Debugf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) + return nil, nil } // prevent rolling back snapshot version snapshotMeta := trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] @@ -147,7 +149,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata // protection of new timestamp: expiry is checked in UpdateSnapshot() // save root if verified trusted.Timestamp = newTimestamp - fmt.Printf("Updated timestamp v%d\n", trusted.Timestamp.Signed.Version) + log.Debugf("Updated timestamp v%d", trusted.Timestamp.Signed.Version) // timestamp is loaded: error if it is not valid _final_ timestamp err = trusted.checkFinalTimestamp() @@ -181,7 +183,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo if trusted.Targets[metadata.TARGETS] != nil { return nil, fmt.Errorf("cannot update snapshot after targets") } - fmt.Println("Updating targets") + log.Debugf("Updating targets") // snapshot cannot be loaded if final timestamp is expired err := trusted.checkFinalTimestamp() @@ -232,7 +234,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo // expiry not checked to allow old snapshot to be used for rollback // protection of new snapshot: it is checked when targets is updated trusted.Snapshot = newSnapshot - fmt.Printf("Updated snapshot v%d\n", trusted.Snapshot.Signed.Version) + log.Debugf("Updated snapshot v%d", trusted.Snapshot.Signed.Version) // snapshot is loaded, but we error if it's not valid _final_ snapshot err = trusted.checkFinalSnapshot() @@ -285,7 +287,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN if !ok { return nil, fmt.Errorf("cannot load targets before delegator") } - fmt.Printf("updating %s delegated by %s\n", roleName, delegatorName) + log.Debugf("updating %s delegated by %s", roleName, delegatorName) // Verify against the hashes in snapshot, if any meta, ok := trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] @@ -320,9 +322,9 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN return nil, fmt.Errorf("expected %s version %d, got %d", roleName, meta.Version, newDelegate.Signed.Version) } if newDelegate.Signed.IsExpired(trusted.RefTime) { - return nil, fmt.Errorf("New %s is expired", roleName) + return nil, fmt.Errorf("new %s is expired", roleName) } trusted.Targets[roleName] = newDelegate - fmt.Printf("Updated %s v%d\n", roleName, trusted.Targets[roleName].Signed.Version) + log.Debugf("Updated %s v%d", roleName, trusted.Targets[roleName].Signed.Version) return trusted.Targets[roleName], nil } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 984cf8c2..5af53f17 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -14,6 +14,7 @@ import ( "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" + log "github.com/sirupsen/logrus" ) // Client update workflow implementation @@ -179,7 +180,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath if err != nil { return "", err } - fmt.Printf("Downloaded target %s\n", targetFile.Path) + log.Debugf("Downloaded target %s", targetFile.Path) return filePath, nil } @@ -196,16 +197,10 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa } else { targetFilePath = filePath } - // open the file - in, err := os.Open(targetFilePath) + // get file content + data, err := readFile(targetFilePath) if err != nil { - return "", fmt.Errorf("error opening target file - %s", targetFilePath) - } - defer in.Close() - // read its data - data, err := io.ReadAll(in) - if err != nil { - return "", fmt.Errorf("error reading target bytes from file - %s", targetFilePath) + return "", err } // verify if this local target file is an up-to-date target err = targetFile.VerifyLengthHashes(data) @@ -218,26 +213,28 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa // loadTimestamp load local and remote timestamp metadata func (update *Updater) loadTimestamp() error { + // try to read local timestamp data, err := update.loadLocalMetadata(metadata.TIMESTAMP) - if err != nil { - return err - } - temp, err := update.trusted.UpdateTimestamp(data) - if err != nil { - if temp == nil { + if err == nil { + // try to verify and load it to the trusted metadata set + result, err := update.trusted.UpdateTimestamp(data) + if result == nil && err != nil { return err } - fmt.Printf("Local timestamp not valid as final: %s", err) + // proceed if both res and temp are != nil + log.Debugf("local timestamp is verified, but expired: %s", err) } // Load from remote (whether local load succeeded or not) data, err = update.downloadMetadata(metadata.TIMESTAMP, update.config.TimestampMaxLength, "") if err != nil { return err } - _, err = update.trusted.UpdateTimestamp(data) - // TODO: If the new timestamp version is the same as current, discard the + // if the new timestamp version is the same as current, discard the // new timestamp. This is normal and it shouldn't raise any error. - if err != nil { + // a bit hacky, but if both result and err are nil it means new timestamp + // version is the same as current + result, err := update.trusted.UpdateTimestamp(data) + if result == nil && err != nil { return err } err = update.persistMetadata(metadata.TIMESTAMP, data) @@ -249,17 +246,20 @@ func (update *Updater) loadTimestamp() error { // loadSnapshot load local (and if needed remote) snapshot metadata func (update *Updater) loadSnapshot() error { + // try to read local snapshot data, err := update.loadLocalMetadata(metadata.SNAPSHOT) - if err != nil { - return err + if err == nil { + // try to verify and load local snapshot to trusted metadata set + _, err = update.trusted.UpdateSnapshot(data, true) + if err == nil { + log.Debugf("Local snapshot is valid: not downloading new one") + return nil + } } - _, err = update.trusted.UpdateSnapshot(data, true) - if err != nil { - return err - } else { - fmt.Println("Local snapshot is valid: not downloading new one") + // local snapshot does not exist or is invalid, update from remote + if update.trusted.Timestamp == nil { + return fmt.Errorf("trusted timestamp not set") } - // Local snapshot not valid as final snapshotMeta := update.trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] length := snapshotMeta.Length if length == 0 { @@ -291,42 +291,42 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad if ok { return role, nil } + // try to read local targets data, err := update.loadLocalMetadata(roleName) + if err == nil { + // try to verify and load local targets file to trusted metadata set + delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) + if err == nil { + log.Debugf("Local %s is valid: not downloading new one\n", roleName) + return delegatedTargets, nil + } + } + // local 'role' does not exist or is invalid, update from remote + if update.trusted.Snapshot == nil { + return nil, fmt.Errorf("trusted snapshot not set") + } + metaInfo := update.trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] + length := metaInfo.Length + if length != 0 { + length = update.config.TargetsMaxLength + } + version := "" + if update.trusted.Root.Signed.ConsistentSnapshot { + version = strconv.FormatInt(metaInfo.Version, 10) + } + data, err = update.downloadMetadata(roleName, length, version) if err != nil { return nil, err } delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) - if err == nil { - fmt.Printf("Local %s is valid: not downloading new one\n", roleName) - return delegatedTargets, nil - } else { - // local 'role' does not exist or is invalid: update from remote - if update.trusted.Snapshot != nil { - metaInfo := update.trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] - length := metaInfo.Length - if length != 0 { - length = update.config.TargetsMaxLength - } - version := "" - if update.trusted.Root.Signed.ConsistentSnapshot { - version = strconv.FormatInt(metaInfo.Version, 10) - } - data, err := update.downloadMetadata(roleName, length, version) - if err != nil { - return nil, err - } - delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) - if err != nil { - return nil, err - } - err = update.persistMetadata(roleName, data) - if err != nil { - return nil, err - } - return delegatedTargets, nil - } + if err != nil { + return nil, err + } + err = update.persistMetadata(roleName, data) + if err != nil { return nil, err } + return delegatedTargets, nil } // loadRoot load remote root metadata. Sequentially load and @@ -341,11 +341,8 @@ func (update *Updater) loadRoot() error { for nextVersion := lowerBound; nextVersion <= upperBound; nextVersion++ { data, err := update.downloadMetadata(metadata.ROOT, update.config.RootMaxLength, strconv.FormatInt(nextVersion, 10)) if err != nil { - // if err has status codes 403 or 404 it means current root is newest available - if strings.Contains(err.Error(), "403") || strings.Contains(err.Error(), "404") { - break - } - return err + // current root is newest available + break } // verify and load the root data _, err = update.trusted.UpdateRoot(data) @@ -380,7 +377,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // skip any visited current role to prevent cycles. _, ok := visitedRoleNames[delegation.Role] if ok { - fmt.Printf("Skipping visited current role %s\n", delegation.Role) + log.Debugf("Skipping visited current role %s\n", delegation.Role) continue } // The metadata for 'delegation.Role' must be downloaded/updated before @@ -391,7 +388,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } target, ok := targets.Signed.Targets[targetFilePath] if ok { - fmt.Printf("Found target in current role %s\n", delegation.Role) + log.Debugf("Found target in current role %s\n", delegation.Role) return &target, nil } // After pre-order check, add current role to set of visited roles. @@ -402,10 +399,10 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // delegated roles. roles := targets.Signed.Delegations.GetRolesForTarget(targetFilePath) for child, terminating := range roles { - fmt.Printf("Adding child role %s\n", child) + log.Debugf("Adding child role %s", child) childRolesToVisit = append(childRolesToVisit, roleParentTuple{Role: child, Parent: delegation.Role}) if terminating { - fmt.Println("Not backtracking to other roles") + log.Debugf("Not backtracking to other roles") } delegationsToVisit = []roleParentTuple{} break @@ -418,7 +415,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } } if len(delegationsToVisit) > 0 { - fmt.Printf("%d roles left to visit, but allowed at most %d delegations", + log.Debugf("%d roles left to visit, but allowed at most %d delegations", len(delegationsToVisit), update.config.MaxDelegations) } @@ -477,16 +474,7 @@ func (update *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, // loadLocalMetadata reads a local .json file and returns its bytes func (update *Updater) loadLocalMetadata(roleName string) ([]byte, error) { roleName = fmt.Sprintf("%s.json", url.QueryEscape(roleName)) - in, err := os.Open(roleName) - if err != nil { - return nil, fmt.Errorf("error opening metadata file - %s", roleName) - } - defer in.Close() - data, err := io.ReadAll(in) - if err != nil { - return nil, fmt.Errorf("error reading metadata bytes from file - %s", roleName) - } - return data, nil + return readFile(roleName) } // ensureTrailingSlash ensures url ends with a slash @@ -503,3 +491,17 @@ func reverseSlice[S ~[]E, E any](s S) { s[i], s[j] = s[j], s[i] } } + +// readFile reads the content of a file and return its bytes +func readFile(name string) ([]byte, error) { + in, err := os.Open(name) + if err != nil { + return nil, err + } + defer in.Close() + data, err := io.ReadAll(in) + if err != nil { + return nil, err + } + return data, nil +} From cf43183c523544bf7fe7df11a37d8e3925511fb6 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 13 Jan 2023 17:32:03 +0200 Subject: [PATCH 022/208] add bsd-2 licensing Signed-off-by: Radoslav Dimitrov --- LICENSE | 13 +++++++++++++ NOTICE | 10 ++++++++++ examples/client/client_example.go | 11 +++++++++++ examples/repository/basic_repository.go | 11 +++++++++++ metadata/config/config.go | 11 +++++++++++ metadata/fetcher/fetcher.go | 11 +++++++++++ metadata/keys.go | 11 +++++++++++ metadata/metadata.go | 11 +++++++++++ metadata/repository/repository.go | 11 +++++++++++ metadata/trustedmetadata/trustedmetadata.go | 11 +++++++++++ metadata/types.go | 10 ++++++++++ metadata/updater/updater.go | 11 +++++++++++ 12 files changed, 132 insertions(+) create mode 100644 LICENSE create mode 100644 NOTICE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..0c212339 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2022 VMware, Inc. + +The BSD-2 license (the "License") set forth below applies to all parts of the go-tuf-metadata project. You may not use this file except in compliance with the License. + +BSD-2 License + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..68700061 --- /dev/null +++ b/NOTICE @@ -0,0 +1,10 @@ +Copyright 2022 VMware, Inc. + +This product is licensed to you under the BSD-2 license (the "License"). +You may not use this product except in compliance with the BSD-2 License. +This product may include a number of subcomponents with separate copyright +notices and license terms. Your use of these subcomponents is subject to +the terms and conditions of the subcomponent's license, as noted in the +LICENSE file. + +SPDX-License-Identifier: BSD-2-Clause diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 0db886e8..89bda0f2 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package main func main() { diff --git a/examples/repository/basic_repository.go b/examples/repository/basic_repository.go index 34828533..982a2604 100644 --- a/examples/repository/basic_repository.go +++ b/examples/repository/basic_repository.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package main import ( diff --git a/metadata/config/config.go b/metadata/config/config.go index 4a5ec69a..b3acc3ed 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package config type UpdaterConfig struct { diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index 99d1c5ea..c439b403 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package fetcher import ( diff --git a/metadata/keys.go b/metadata/keys.go index 35830e20..a3f0f813 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package metadata import ( diff --git a/metadata/metadata.go b/metadata/metadata.go index 09b30b1b..a0c34676 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package metadata import ( diff --git a/metadata/repository/repository.go b/metadata/repository/repository.go index 60983d2b..75821fd6 100644 --- a/metadata/repository/repository.go +++ b/metadata/repository/repository.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package repository import ( diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index b6e827f4..72e240c8 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package trustedmetadata import ( diff --git a/metadata/types.go b/metadata/types.go index b7e0bf98..c8367e6f 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -1,3 +1,13 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// SPDX-License-Identifier: BSD-2-Clause + package metadata import ( diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 5af53f17..22972d9f 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -1,3 +1,14 @@ +// Copyright 2022 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package updater import ( From ee8aeb48a6fe4010cd7133df7c077fa95bbec396 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 13 Jan 2023 17:58:14 +0200 Subject: [PATCH 023/208] Update license name so it matches the GitHub license keyword Signed-off-by: Radoslav Dimitrov --- LICENSE | 4 ++-- metadata/types.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 0c212339..ed1ea23e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,8 +1,8 @@ Copyright 2022 VMware, Inc. -The BSD-2 license (the "License") set forth below applies to all parts of the go-tuf-metadata project. You may not use this file except in compliance with the License. +The BSD-2-Clause license (the "License") set forth below applies to all parts of the go-tuf-metadata project. You may not use this file except in compliance with the License. -BSD-2 License +BSD-2-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/metadata/types.go b/metadata/types.go index c8367e6f..f14cea9f 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -6,6 +6,7 @@ // notices and license terms. Your use of these subcomponents is subject to // the terms and conditions of the subcomponent's license, as noted in the // LICENSE file. +// // SPDX-License-Identifier: BSD-2-Clause package metadata From 5aba429b6b62f372654aacbfcd9dcb2de86f15a2 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 13 Jan 2023 18:26:38 +0200 Subject: [PATCH 024/208] add code of conduct, contributing and gitignore files Signed-off-by: Radoslav Dimitrov --- .gitignore | 0 CODE-OF-CONDUCT.md | 140 +++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 9 +++ 3 files changed, 149 insertions(+) create mode 100644 .gitignore create mode 100644 CODE-OF-CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md new file mode 100644 index 00000000..48c853e3 --- /dev/null +++ b/CODE-OF-CONDUCT.md @@ -0,0 +1,140 @@ +==================================== +Contributor Covenant Code of Conduct +==================================== + +Our Pledge +========== + +We as members, contributors, and leaders pledge to make participation in this +project and our community a harassment-free experience for everyone, regardless +of age, body size, visible or invisible disability, ethnicity, sex +characteristics, gender identity and expression, level of experience, +education, socio-economic status, nationality, personal appearance, race, +religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +Our Standards +============= + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +Enforcement Responsibilities +============================ + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +Scope +===== + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +Enforcement +=========== + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at oss-coc@vmware.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +Enforcement Guidelines +====================== + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +1. Correction +------------- + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +2. Warning +---------- + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +3. Temporary Ban +---------------- + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +4. Permanent Ban +---------------- + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +Attribution +=========== + +This Code of Conduct is adapted from the `Contributor Covenant`_, +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by `Mozilla's code of conduct +enforcement ladder `_. + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. + +.. _Contributor Covenant: https://www.contributor-covenant.org \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..96527bfd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing + +## Developer Certificate of Origin + +Before you start working with this project, please read our [Developer Certificate of Origin](https://cla.vmware.com/dco). All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch. + +## Contribution Process + +* Follow the [GitHub process](https://help.github.com/articles/fork-a-repo) From aee21adfcf8a145852832b203222f03dec760841 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 13 Jan 2023 18:29:45 +0200 Subject: [PATCH 025/208] update readme Signed-off-by: Radoslav Dimitrov --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2c0cc34..52c62d5b 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,11 @@ by various tech companies and open source organizations. Please see [TUF's website](https://theupdateframework.com/) for more information about TUF! -## How to use it +## Getting started ---------------------------- -See the [basic_repo.go](examples/basic_repo.go) example which demonstrates how to *manually* create and +See the [basic_repository.go](examples/repository/basic_repository.go) example which demonstrates how to *manually* create and maintain repository metadata using the low-level Metadata API. The example highlights the following functionality supported by the metadata API: @@ -38,7 +38,7 @@ The example highlights the following functionality supported by the metadata API * creation of top-level metadata * target file handling * consistent snapshots -* key management +* key management (supports ED25519, RSA and ECDSA key types) * top-level delegation and signing thresholds * metadata verification * target delegation @@ -64,7 +64,7 @@ or “update workflow”. * The example demonstrates how to *manually* create and maintain repository metadata using the low-level Metadata API. -### :white_check_mark: - Implement the `trustedmetadata` package +### :white_check_mark: - Implement client API - `trustedmetadata` package * A `TrustedMetadata` instance ensures that the collection of metadata in it is valid and trusted through the whole client update workflow. It provides easy ways to update From e762870de38b1c4d64744fefef5ffda3a1903350 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 13 Jan 2023 18:31:35 +0200 Subject: [PATCH 026/208] fix formatting for code of conduct Signed-off-by: Radoslav Dimitrov --- CODE-OF-CONDUCT.md | 178 +++++++++++++++------------------------------ 1 file changed, 57 insertions(+), 121 deletions(-) diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md index 48c853e3..39b923b0 100644 --- a/CODE-OF-CONDUCT.md +++ b/CODE-OF-CONDUCT.md @@ -1,140 +1,76 @@ -==================================== -Contributor Covenant Code of Conduct -==================================== - -Our Pledge -========== - -We as members, contributors, and leaders pledge to make participation in this -project and our community a harassment-free experience for everyone, regardless -of age, body size, visible or invisible disability, ethnicity, sex -characteristics, gender identity and expression, level of experience, -education, socio-economic status, nationality, personal appearance, race, -religion, or sexual identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -Our Standards -============= - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -Enforcement Responsibilities -============================ - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -Scope -===== - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. +# Contributor Covenant Code of Conduct -Enforcement -=========== +## Our Pledge -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at oss-coc@vmware.com. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -Enforcement Guidelines -====================== - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. -1. Correction -------------- +## Our Standards -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. +Examples of behavior that contributes to creating a positive environment +include: -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members -2. Warning ----------- +Examples of unacceptable behavior by participants include: -**Community Impact**: A violation through a single incident or series -of actions. +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. +## Our Responsibilities -3. Temporary Ban ----------------- +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. +## Scope -4. Permanent Ban ----------------- +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. +## Enforcement -**Consequence**: A permanent ban from any sort of public interaction within -the community. +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at oss-coc@vmware.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. -Attribution -=========== +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. -This Code of Conduct is adapted from the `Contributor Covenant`_, -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +## Attribution -Community Impact Guidelines were inspired by `Mozilla's code of conduct -enforcement ladder `_. +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +[homepage]: https://www.contributor-covenant.org -.. _Contributor Covenant: https://www.contributor-covenant.org \ No newline at end of file +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq From ff78023b5c653ea70aa46e8ce4acb2efb9241655 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 13 Jan 2023 18:38:05 +0200 Subject: [PATCH 027/208] Create dependabot.yml --- .github/dependabot.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..13ce28b1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Monitor Go dependencies + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + time: "10:00" + commit-message: + prefix: "chore" + include: "scope" + open-pull-requests-limit: 10 From 877439db6401d05996fee7631ee7713b5f2d8c37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 16:38:40 +0000 Subject: [PATCH 028/208] chore(deps): bump github.com/sigstore/sigstore from 1.4.4 to 1.5.0 Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.4.4 to 1.5.0. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.4.4...v1.5.0) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 20 ++++++++++---------- go.sum | 46 +++++++++++++++++++++++----------------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/go.mod b/go.mod index 5e62600e..68bbbc29 100644 --- a/go.mod +++ b/go.mod @@ -4,25 +4,25 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.4.0 - github.com/sigstore/sigstore v1.4.4 + github.com/sigstore/sigstore v1.5.0 github.com/sirupsen/logrus v1.9.0 - golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be + golang.org/x/crypto v0.4.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) require ( github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-containerregistry v0.11.0 // indirect - github.com/letsencrypt/boulder v0.0.0-20220929215747-76583552c2be // indirect + github.com/google/go-containerregistry v0.12.1 // indirect + github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.2.0 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/term v0.2.0 // indirect - golang.org/x/text v0.4.0 // indirect - google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect - google.golang.org/grpc v1.50.1 // indirect + golang.org/x/net v0.3.0 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/term v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect + google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 // indirect + google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index cadcb223..d473bdaf 100644 --- a/go.sum +++ b/go.sum @@ -12,58 +12,58 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-containerregistry v0.11.0 h1:Xt8x1adcREjFcmDoDK8OdOsjxu90PHkGuwNP8GiHMLM= -github.com/google/go-containerregistry v0.11.0/go.mod h1:BBaYtsHPHA42uEgAvd/NejvAfPSlz281sJWqupjSxfk= +github.com/google/go-containerregistry v0.12.1 h1:W1mzdNUTx4Zla4JaixCRLhORcR7G6KxE5hHl5fkPsp8= +github.com/google/go-containerregistry v0.12.1/go.mod h1:sdIK+oHQO7B93xI8UweYdl887YhuIwg9vz8BSLH3+8k= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= -github.com/klauspost/compress v1.15.8 h1:JahtItbkWjf2jzm/T+qgMxkP9EMHsqEUA6vCMGmXvhA= +github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/letsencrypt/boulder v0.0.0-20220929215747-76583552c2be h1:Cx2bsfM27RBF/45zP1xhFN9FHDxo40LdYdE5L+GWVTw= -github.com/letsencrypt/boulder v0.0.0-20220929215747-76583552c2be/go.mod h1:j/WMsOEcTSfy6VR1PkiIo20qH1V9iRRzb7ishoKkN0g= +github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf h1:ndns1qx/5dL43g16EQkPV/i8+b3l5bYQwLeoSBe7tS8= +github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf/go.mod h1:aGkAgvWY/IUcVFfuly53REpfv5edu25oij+qHRFaraA= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= 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/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= -github.com/sigstore/sigstore v1.4.4 h1:lVsnNTY8DUmy2hnwCPtimWfEqv+DIwleORkF8KyFsMs= -github.com/sigstore/sigstore v1.4.4/go.mod h1:wIqu9sN72+pds31MMu89GchxXHy17k+VZWc+HY1ZXMA= +github.com/sigstore/sigstore v1.5.0 h1:NqstQ6SwwhQsp6Ll0wgk/d9g5MlfmEppo14aquUjJ/8= +github.com/sigstore/sigstore v1.5.0/go.mod h1:fRAaZ9xXh7ZQ0GJqZdpmNJ3pemuHBu2PgIAngmzIFSI= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 h1:1i/Afw3rmaR1gF3sfVkG2X6ldkikQwA9zY380LrR5YI= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A= -golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= +golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.2.0 h1:z85xZCsEl7bi/KwbNADeBYoOP0++7W1ipu+aGnpwzRM= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 h1:AGXp12e/9rItf6/4QymU7WsAUwCf+ICW75cuR91nJIc= +google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6/go.mod h1:1dOng4TWOomJrDGhpXjfCD35wQC6jnC7HpRmOFRqEV0= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= From 2441c9b9be752c36b69dc38b7ff7641a04fe313e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 10:13:10 +0000 Subject: [PATCH 029/208] chore(deps): bump golang.org/x/crypto from 0.4.0 to 0.5.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](https://github.com/golang/crypto/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 68bbbc29..0bbf5278 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.4.0 github.com/sigstore/sigstore v1.5.0 github.com/sirupsen/logrus v1.9.0 - golang.org/x/crypto v0.4.0 + golang.org/x/crypto v0.5.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) @@ -17,10 +17,10 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.3.0 // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/net v0.5.0 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/term v0.4.0 // indirect + golang.org/x/text v0.6.0 // indirect google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 // indirect google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/go.sum b/go.sum index d473bdaf..4cb838f4 100644 --- a/go.sum +++ b/go.sum @@ -46,19 +46,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= -golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= +golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 h1:AGXp12e/9rItf6/4QymU7WsAUwCf+ICW75cuR91nJIc= google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6/go.mod h1:1dOng4TWOomJrDGhpXjfCD35wQC6jnC7HpRmOFRqEV0= From 7f287d19e709bc7f33afa45c28e4e5e40a85386c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 19 Jan 2023 14:23:13 +0200 Subject: [PATCH 030/208] chore: update code comments, license year and init testing (#3) * docs: add comments describing the different types Signed-off-by: Radoslav Dimitrov * chore: add golangci and codeql Signed-off-by: Radoslav Dimitrov * chore: begin adding tests Signed-off-by: Radoslav Dimitrov * chore: add licence notice Signed-off-by: Radoslav Dimitrov * chore: update licence year to 2023 Signed-off-by: Radoslav Dimitrov * chore: fix linting error Signed-off-by: Radoslav Dimitrov * chore: temp limit ci to ubuntu so we don't waste GHA resources Signed-off-by: Radoslav Dimitrov Signed-off-by: Radoslav Dimitrov --- .github/workflows/ci.yml | 21 +++++++ .github/workflows/codeql-analysis.yml | 70 +++++++++++++++++++++ .github/workflows/tests.yml | 68 ++++++++++++++++++++ .golangci.yml | 26 ++++++++ LICENSE | 2 +- NOTES.md | 3 + NOTICE | 2 +- examples/client/client_example.go | 2 +- examples/repository/basic_repository.go | 4 +- go.mod | 3 + go.sum | 5 ++ metadata/config/config.go | 2 +- metadata/fetcher/fetcher.go | 2 +- metadata/keys.go | 2 +- metadata/metadata.go | 2 +- metadata/metadata_test.go | 54 ++++++++++++++++ metadata/repository/repository.go | 2 +- metadata/trustedmetadata/trustedmetadata.go | 4 +- metadata/types.go | 18 +++++- metadata/updater/updater.go | 2 +- 20 files changed, 280 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/tests.yml create mode 100644 .golangci.yml create mode 100644 metadata/metadata_test.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..a17e6c38 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +# Copyright 2022-2023 VMware, Inc. +# +# This product is licensed to you under the BSD-2 license (the "License"). +# You may not use this product except in compliance with the BSD-2 License. +# This product may include a number of subcomponents with separate copyright +# notices and license terms. Your use of these subcomponents is subject to +# the terms and conditions of the subcomponent's license, as noted in the +# LICENSE file. +# +# SPDX-License-Identifier: BSD-2-Clause +on: + pull_request: + push: + branches: + - "master" + tags: + - "v*" +name: CI +jobs: + tests: + uses: ./.github/workflows/tests.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..056a9251 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '25 14 * * 6' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..901396a1 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,68 @@ +# Copyright 2022-2023 VMware, Inc. +# +# This product is licensed to you under the BSD-2 license (the "License"). +# You may not use this product except in compliance with the BSD-2 License. +# This product may include a number of subcomponents with separate copyright +# notices and license terms. Your use of these subcomponents is subject to +# the terms and conditions of the subcomponent's license, as noted in the +# LICENSE file. +# +# SPDX-License-Identifier: BSD-2-Clause +on: + workflow_call: +name: Tests +jobs: + get-go-versions: + name: Collect available Go versions + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.versions.outputs.matrix }} + steps: + - uses: actions/checkout@v3 + - uses: arnested/go-version-action@b556f8d91b644164318c709d28b9083eaf0c064d + id: versions + + run: + strategy: + fail-fast: false # Keep running if one leg fails. + matrix: + os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources + go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} + runs-on: ${{ matrix.os }} + needs: get-go-versions + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup - Go ${{ matrix.go-version }} + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version: ${{ matrix.go-version }} + + - name: Run tests + run: go test -race -covermode atomic -coverprofile='profile.cov' ./... + + - name: Send coverage + uses: shogo82148/actions-goveralls@31ee804b8576ae49f6dc3caa22591bc5080e7920 + with: + path-to-profile: profile.cov + flag-name: Go-${{ matrix.go-version }} + parallel: true + + golangci: + strategy: + matrix: + go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} + os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources + runs-on: ${{ matrix.os }} + needs: get-go-versions + steps: + - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version: ${{ matrix.go-version }} + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1 + with: + version: v1.49 + args: --timeout 5m --verbose diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..9cc682f2 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,26 @@ +# Copyright 2022-2023 VMware, Inc. +# +# This product is licensed to you under the BSD-2 license (the "License"). +# You may not use this product except in compliance with the BSD-2 License. +# This product may include a number of subcomponents with separate copyright +# notices and license terms. Your use of these subcomponents is subject to +# the terms and conditions of the subcomponent's license, as noted in the +# LICENSE file. +# +# SPDX-License-Identifier: BSD-2-Clause +run: + # Lint using Go 1.17, since some linters are disabled by default for Go 1.18 + # until generics are supported. + # See https://github.com/golangci/golangci-lint/issues/2649 + go: "1.17" + +linters: + disable-all: true + enable: + - staticcheck + - gofmt + - govet + - gosimple + - unused + - typecheck + - forbidigo diff --git a/LICENSE b/LICENSE index ed1ea23e..7d008acd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2022 VMware, Inc. +Copyright 2022-2023 VMware, Inc. The BSD-2-Clause license (the "License") set forth below applies to all parts of the go-tuf-metadata project. You may not use this file except in compliance with the License. diff --git a/NOTES.md b/NOTES.md index e9d80b3f..ca9d9826 100644 --- a/NOTES.md +++ b/NOTES.md @@ -9,3 +9,6 @@ * Revisit the design - should we use generics or just 4 different types for each metadata? * Investigate whether depending on `sigstore/signatures` can cause dependency cycle and if so, how to avoid it? * Add support for storing/loading metadata and target files from AWS S3 buckets +* Make sure keys can be unmarshalled - https://github.com/theupdateframework/go-tuf/issues/363#issuecomment-1227340241 +* Revisit logging +* Searching through delegations diff --git a/NOTICE b/NOTICE index 68700061..9c004e23 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ -Copyright 2022 VMware, Inc. +Copyright 2022-2023 VMware, Inc. This product is licensed to you under the BSD-2 license (the "License"). You may not use this product except in compliance with the BSD-2 License. diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 89bda0f2..93449129 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. diff --git a/examples/repository/basic_repository.go b/examples/repository/basic_repository.go index 982a2604..446ea8b3 100644 --- a/examples/repository/basic_repository.go +++ b/examples/repository/basic_repository.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. @@ -74,7 +74,7 @@ func main() { // hash and length of this file at the local path. In addition, it specifies the // 'target path', which a client uses to locate the target file relative to a // configured mirror base URL. - // |----base URL---||--------target path--------| + // |----base URL---||--------target path--------| // e.g. tuf-examples.org/examples/basic_repository.py targetPath, localPath := helperGetPathForTarget("basic_repository.go") targetFileInfo, err := metadata.TargetFile().FromFile(localPath, "sha256") diff --git a/go.mod b/go.mod index 0bbf5278..c8dca262 100644 --- a/go.mod +++ b/go.mod @@ -6,15 +6,18 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.4.0 github.com/sigstore/sigstore v1.5.0 github.com/sirupsen/logrus v1.9.0 + github.com/stretchr/testify v1.8.1 golang.org/x/crypto v0.5.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) require ( + github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-containerregistry v0.12.1 // indirect github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.5.0 // indirect diff --git a/go.sum b/go.sum index 4cb838f4..bcd333e7 100644 --- a/go.sum +++ b/go.sum @@ -38,8 +38,13 @@ github.com/sigstore/sigstore v1.5.0/go.mod h1:fRAaZ9xXh7ZQ0GJqZdpmNJ3pemuHBu2PgI github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 h1:1i/Afw3rmaR1gF3sfVkG2X6ldkikQwA9zY380LrR5YI= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= diff --git a/metadata/config/config.go b/metadata/config/config.go index b3acc3ed..bff95f0b 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index c439b403..88335738 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. diff --git a/metadata/keys.go b/metadata/keys.go index a3f0f813..52601488 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. diff --git a/metadata/metadata.go b/metadata/metadata.go index a0c34676..d04aafea 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go new file mode 100644 index 00000000..8c0357a8 --- /dev/null +++ b/metadata/metadata_test.go @@ -0,0 +1,54 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package metadata + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestRootDefaultValues(t *testing.T) { + // without setting expiration + root := Root() + assert.NotNil(t, root) + assert.GreaterOrEqual(t, []time.Time{time.Now().UTC()}[0], root.Signed.Expires) + + // setting expiration + expire := time.Now().AddDate(0, 0, 2).UTC() + root = Root(expire) + assert.NotNil(t, root) + assert.Equal(t, expire, root.Signed.Expires) + + // Type + assert.Equal(t, ROOT, root.Signed.Type) + + // SpecVersion + assert.Equal(t, SPECIFICATION_VERSION, root.Signed.SpecVersion) + + // Version + assert.Equal(t, int64(1), root.Signed.Version) + + // Threshold and KeyIDs for Roles + for _, role := range []string{ROOT, SNAPSHOT, TARGETS, TIMESTAMP} { + assert.Equal(t, 1, root.Signed.Roles[role].Threshold) + assert.Equal(t, []string{}, root.Signed.Roles[role].KeyIDs) + } + + // Keys + assert.Equal(t, map[string]*Key{}, root.Signed.Keys) + + // Consistent snapshot + assert.True(t, root.Signed.ConsistentSnapshot) + +} diff --git a/metadata/repository/repository.go b/metadata/repository/repository.go index 75821fd6..85ef55f2 100644 --- a/metadata/repository/repository.go +++ b/metadata/repository/repository.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 72e240c8..dfd6210b 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. @@ -66,7 +66,7 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { } // save root if verified trusted.Root = newRoot - log.Debugf("Loaded trusted root v", trusted.Root.Signed.Version) + log.Debugf("Loaded trusted root v%d", trusted.Root.Signed.Version) return nil } diff --git a/metadata/types.go b/metadata/types.go index f14cea9f..b385986e 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. @@ -35,16 +35,21 @@ const ( TIMESTAMP = "timestamp" ) +// Metadata[T Roles] represents a TUF metadata. +// Provides methods to read and write to and +// from file and bytes, also to create, verify and clear metadata signatures. type Metadata[T Roles] struct { Signed T `json:"signed"` Signatures []Signature `json:"signatures"` } +// Signature represents the Signature part of a TUF metadata type Signature struct { KeyID string `json:"keyid"` Signature HexBytes `json:"sig"` } +// RootType represents the Signed portion of a root metadata type RootType struct { Type string `json:"_type"` SpecVersion string `json:"spec_version"` @@ -56,6 +61,7 @@ type RootType struct { Custom json.RawMessage `json:"custom,omitempty"` } +// SnapshotType represents the Signed portion of a snapshot metadata type SnapshotType struct { Type string `json:"_type"` SpecVersion string `json:"spec_version"` @@ -65,6 +71,7 @@ type SnapshotType struct { Custom json.RawMessage `json:"custom,omitempty"` } +// TargetsType represents the Signed portion of a targets metadata type TargetsType struct { Type string `json:"_type"` SpecVersion string `json:"spec_version"` @@ -75,6 +82,7 @@ type TargetsType struct { Custom json.RawMessage `json:"custom,omitempty"` } +// TimestampType represents the Signed portion of a timestamp metadata type TimestampType struct { Type string `json:"_type"` SpecVersion string `json:"spec_version"` @@ -84,6 +92,7 @@ type TimestampType struct { Custom json.RawMessage `json:"custom,omitempty"` } +// Key represents a key in TUF type Key struct { Type string `json:"keytype"` Scheme string `json:"scheme"` @@ -92,9 +101,12 @@ type Key struct { id string idOnce sync.Once } + type KeyVal struct { PublicKey string `json:"public"` } + +// Role represents one of the top-level roles in TUF type Role struct { KeyIDs []string `json:"keyids"` Threshold int `json:"threshold"` @@ -104,6 +116,7 @@ type HexBytes []byte type Hashes map[string]HexBytes +// MetaFiles represents the value portion of METAFILES in TUF (used in Snapshot and Timestamp metadata) type MetaFiles struct { Length int64 `json:"length,omitempty"` Hashes Hashes `json:"hashes,omitempty"` @@ -111,6 +124,7 @@ type MetaFiles struct { Custom json.RawMessage `json:"custom,omitempty"` } +// TargetFiles represents the value portion of TARGETS in TUF (used Targets metadata) type TargetFiles struct { Length int64 `json:"length"` Hashes Hashes `json:"hashes"` @@ -118,11 +132,13 @@ type TargetFiles struct { Path string `json:"-"` } +// Delegations is an optional object which represents delegation roles and their corresponding keys type Delegations struct { Keys map[string]*Key `json:"keys"` Roles []DelegatedRole `json:"roles"` } +// DelegatedRole represents a delegated role in TUF type DelegatedRole struct { Name string `json:"name"` KeyIDs []string `json:"keyids"` diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 22972d9f..1935745a 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -1,4 +1,4 @@ -// Copyright 2022 VMware, Inc. +// Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. From 20ebbef51a013ca37088daf9686bf5191a813e1d Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 19 Jan 2023 14:50:40 +0200 Subject: [PATCH 031/208] chore: add tests for metadata default values Signed-off-by: Radoslav Dimitrov --- metadata/metadata_test.go | 112 +++++++++++++++++++++++++++++++++----- 1 file changed, 99 insertions(+), 13 deletions(-) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 8c0357a8..a8e65423 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -20,35 +20,121 @@ import ( func TestRootDefaultValues(t *testing.T) { // without setting expiration - root := Root() - assert.NotNil(t, root) - assert.GreaterOrEqual(t, []time.Time{time.Now().UTC()}[0], root.Signed.Expires) + meta := Root() + assert.NotNil(t, meta) + assert.GreaterOrEqual(t, []time.Time{time.Now().UTC()}[0], meta.Signed.Expires) // setting expiration expire := time.Now().AddDate(0, 0, 2).UTC() - root = Root(expire) - assert.NotNil(t, root) - assert.Equal(t, expire, root.Signed.Expires) + meta = Root(expire) + assert.NotNil(t, meta) + assert.Equal(t, expire, meta.Signed.Expires) // Type - assert.Equal(t, ROOT, root.Signed.Type) + assert.Equal(t, ROOT, meta.Signed.Type) // SpecVersion - assert.Equal(t, SPECIFICATION_VERSION, root.Signed.SpecVersion) + assert.Equal(t, SPECIFICATION_VERSION, meta.Signed.SpecVersion) // Version - assert.Equal(t, int64(1), root.Signed.Version) + assert.Equal(t, int64(1), meta.Signed.Version) // Threshold and KeyIDs for Roles for _, role := range []string{ROOT, SNAPSHOT, TARGETS, TIMESTAMP} { - assert.Equal(t, 1, root.Signed.Roles[role].Threshold) - assert.Equal(t, []string{}, root.Signed.Roles[role].KeyIDs) + assert.Equal(t, 1, meta.Signed.Roles[role].Threshold) + assert.Equal(t, []string{}, meta.Signed.Roles[role].KeyIDs) } // Keys - assert.Equal(t, map[string]*Key{}, root.Signed.Keys) + assert.Equal(t, map[string]*Key{}, meta.Signed.Keys) // Consistent snapshot - assert.True(t, root.Signed.ConsistentSnapshot) + assert.True(t, meta.Signed.ConsistentSnapshot) + // Signatures + assert.Equal(t, []Signature{}, meta.Signatures) +} + +func TestSnapshotDefaultValues(t *testing.T) { + // without setting expiration + meta := Snapshot() + assert.NotNil(t, meta) + assert.GreaterOrEqual(t, []time.Time{time.Now().UTC()}[0], meta.Signed.Expires) + + // setting expiration + expire := time.Now().AddDate(0, 0, 2).UTC() + meta = Snapshot(expire) + assert.NotNil(t, meta) + assert.Equal(t, expire, meta.Signed.Expires) + + // Type + assert.Equal(t, SNAPSHOT, meta.Signed.Type) + + // SpecVersion + assert.Equal(t, SPECIFICATION_VERSION, meta.Signed.SpecVersion) + + // Version + assert.Equal(t, int64(1), meta.Signed.Version) + + // Targets meta + assert.Equal(t, map[string]MetaFiles{"targets.json": {Version: 1}}, meta.Signed.Meta) + + // Signatures + assert.Equal(t, []Signature{}, meta.Signatures) +} + +func TestTimestampDefaultValues(t *testing.T) { + // without setting expiration + meta := Timestamp() + assert.NotNil(t, meta) + assert.GreaterOrEqual(t, []time.Time{time.Now().UTC()}[0], meta.Signed.Expires) + + // setting expiration + expire := time.Now().AddDate(0, 0, 2).UTC() + meta = Timestamp(expire) + assert.NotNil(t, meta) + assert.Equal(t, expire, meta.Signed.Expires) + + // Type + assert.Equal(t, TIMESTAMP, meta.Signed.Type) + + // SpecVersion + assert.Equal(t, SPECIFICATION_VERSION, meta.Signed.SpecVersion) + + // Version + assert.Equal(t, int64(1), meta.Signed.Version) + + // Snapshot meta + assert.Equal(t, map[string]MetaFiles{"snapshot.json": {Version: 1}}, meta.Signed.Meta) + + // Signatures + assert.Equal(t, []Signature{}, meta.Signatures) +} + +func TestTargetsDefaultValues(t *testing.T) { + // without setting expiration + meta := Targets() + assert.NotNil(t, meta) + assert.GreaterOrEqual(t, []time.Time{time.Now().UTC()}[0], meta.Signed.Expires) + + // setting expiration + expire := time.Now().AddDate(0, 0, 2).UTC() + meta = Targets(expire) + assert.NotNil(t, meta) + assert.Equal(t, expire, meta.Signed.Expires) + + // Type + assert.Equal(t, TARGETS, meta.Signed.Type) + + // SpecVersion + assert.Equal(t, SPECIFICATION_VERSION, meta.Signed.SpecVersion) + + // Version + assert.Equal(t, int64(1), meta.Signed.Version) + + // Target files + assert.Equal(t, map[string]TargetFiles{}, meta.Signed.Targets) + + // Signatures + assert.Equal(t, []Signature{}, meta.Signatures) } From dd441b73d8b4e21dd183a52f7e0928962de26224 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 19 Jan 2023 14:51:50 +0200 Subject: [PATCH 032/208] fix: rename master to main in ci.yml Signed-off-by: Radoslav Dimitrov --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a17e6c38..a771d506 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: pull_request: push: branches: - - "master" + - "main" tags: - "v*" name: CI From d9c1dad2e199fcdb7b558d0f21903ed8ceaebf4d Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 19 Jan 2023 14:52:55 +0200 Subject: [PATCH 033/208] fix: rename master to main in codeql-analysis.yml Signed-off-by: Radoslav Dimitrov --- .github/workflows/codeql-analysis.yml | 58 +++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 056a9251..ef78c269 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,12 +13,12 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [main] schedule: - - cron: '25 14 * * 6' + - cron: "25 14 * * 6" jobs: analyze: @@ -32,39 +32,39 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'go' ] + language: ["go"] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From 2607e933d9ea2339f34172a731568da51c584bb0 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 19 Jan 2023 15:17:58 +0200 Subject: [PATCH 034/208] chore: add badges for license and build status Signed-off-by: Radoslav Dimitrov --- .github/workflows/tests.yml | 8 +++----- README.md | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 901396a1..ed016bb3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,14 +40,12 @@ jobs: go-version: ${{ matrix.go-version }} - name: Run tests - run: go test -race -covermode atomic -coverprofile='profile.cov' ./... + run: go test -race -covermode atomic -coverprofile=coverage.out ./... - name: Send coverage - uses: shogo82148/actions-goveralls@31ee804b8576ae49f6dc3caa22591bc5080e7920 + uses: codecov/codecov-action@v3 with: - path-to-profile: profile.cov - flag-name: Go-${{ matrix.go-version }} - parallel: true + flags: Go-${{ matrix.go-version }} golangci: strategy: diff --git a/README.md b/README.md index 52c62d5b..e9afb3fe 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/rdimitrov/go-tuf-metadata/ci.yml?branch=main) +[![codecov](https://codecov.io/github/rdimitrov/go-tuf-metadata/branch/main/graph/badge.svg?token=2ZUA68ZL13)](https://codecov.io/github/rdimitrov/go-tuf-metadata) +[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) + # TUF A Framework for Securing Software Update Systems ---------------------------- From 0ccff5ee2c4588a7e80d61f3a55f7fb6482c4705 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 19 Jan 2023 16:26:25 +0200 Subject: [PATCH 035/208] chore: add badge for pkg.go.dev Signed-off-by: Radoslav Dimitrov --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e9afb3fe..0b251233 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/rdimitrov/go-tuf-metadata/ci.yml?branch=main) [![codecov](https://codecov.io/github/rdimitrov/go-tuf-metadata/branch/main/graph/badge.svg?token=2ZUA68ZL13)](https://codecov.io/github/rdimitrov/go-tuf-metadata) +[![Go Reference](https://pkg.go.dev/badge/github.com/rdimitrov/go-tuf-metadata.svg)](https://pkg.go.dev/github.com/rdimitrov/go-tuf-metadata) [![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) # TUF A Framework for Securing Software Update Systems From 0c3adfe48454be61ce0ae7ba5f1e5dfa059f7d0f Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 19 Jan 2023 16:31:09 +0200 Subject: [PATCH 036/208] chore: add link to pkg.do.dev in README Signed-off-by: Radoslav Dimitrov --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0b251233..934c624c 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,8 @@ and can be used to implement various TUF clients with relatively little effort. ---------------------------- +* [go-tuf-metadata documentation](https://pkg.go.dev/github.com/rdimitrov/go-tuf-metadata) + * [Introduction to TUF's Design](https://theupdateframework.io/overview/) * [The TUF Specification](https://theupdateframework.github.io/specification/latest/) From 5959691ebb95b052d34c2db62c669e6e21d71427 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 14:05:02 +0200 Subject: [PATCH 037/208] chore(deps): bump github.com/sigstore/sigstore from 1.5.0 to 1.5.1 (#4) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index c8dca262..6ba2661a 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.4.0 - github.com/sigstore/sigstore v1.5.0 + github.com/sigstore/sigstore v1.5.1 github.com/sirupsen/logrus v1.9.0 github.com/stretchr/testify v1.8.1 golang.org/x/crypto v0.5.0 @@ -24,7 +24,7 @@ require ( golang.org/x/sys v0.4.0 // indirect golang.org/x/term v0.4.0 // indirect golang.org/x/text v0.6.0 // indirect - google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 // indirect + google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect diff --git a/go.sum b/go.sum index bcd333e7..32b92a3e 100644 --- a/go.sum +++ b/go.sum @@ -6,7 +6,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg= github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -33,8 +33,8 @@ github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8 github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= -github.com/sigstore/sigstore v1.5.0 h1:NqstQ6SwwhQsp6Ll0wgk/d9g5MlfmEppo14aquUjJ/8= -github.com/sigstore/sigstore v1.5.0/go.mod h1:fRAaZ9xXh7ZQ0GJqZdpmNJ3pemuHBu2PgIAngmzIFSI= +github.com/sigstore/sigstore v1.5.1 h1:iUou0QJW8eQKMUkTXbFyof9ZOblDtfaW2Sn2+QI8Tcs= +github.com/sigstore/sigstore v1.5.1/go.mod h1:3i6UTWVNtFwOtbgG63FZZNID4vO9KcO8AszIJlaNI8k= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -65,8 +65,8 @@ golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 h1:AGXp12e/9rItf6/4QymU7WsAUwCf+ICW75cuR91nJIc= -google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6/go.mod h1:1dOng4TWOomJrDGhpXjfCD35wQC6jnC7HpRmOFRqEV0= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= +google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= From 0c59134c2d37fae477643a70bc6eb9d375dd78a3 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 24 Jan 2023 22:53:55 +0200 Subject: [PATCH 038/208] add goreport badge to readme Signed-off-by: Radoslav Dimitrov --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 934c624c..9fde3d07 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ ![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/rdimitrov/go-tuf-metadata/ci.yml?branch=main) [![codecov](https://codecov.io/github/rdimitrov/go-tuf-metadata/branch/main/graph/badge.svg?token=2ZUA68ZL13)](https://codecov.io/github/rdimitrov/go-tuf-metadata) [![Go Reference](https://pkg.go.dev/badge/github.com/rdimitrov/go-tuf-metadata.svg)](https://pkg.go.dev/github.com/rdimitrov/go-tuf-metadata) +[![Go Report Card](https://goreportcard.com/badge/github.com/rdimitrov/go-tuf-metadata)](https://goreportcard.com/report/github.com/rdimitrov/go-tuf-metadata) [![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) # TUF A Framework for Securing Software Update Systems From 5dcb5df30986f11f07fa75729d7b1b54b9c4ea2b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Feb 2023 01:47:37 +0200 Subject: [PATCH 039/208] chore: add custom error types Signed-off-by: Radoslav Dimitrov --- metadata/errors.go | 159 ++++++++++++++ metadata/fetcher/fetcher.go | 6 +- metadata/keys.go | 117 +--------- metadata/metadata.go | 227 ++++++++++++++------ metadata/trustedmetadata/trustedmetadata.go | 129 +++++------ metadata/types.go | 4 +- metadata/updater/updater.go | 171 ++++++++++----- 7 files changed, 512 insertions(+), 301 deletions(-) create mode 100644 metadata/errors.go diff --git a/metadata/errors.go b/metadata/errors.go new file mode 100644 index 00000000..8322b853 --- /dev/null +++ b/metadata/errors.go @@ -0,0 +1,159 @@ +package metadata + +import ( + "fmt" +) + +// Define TUF error types used inside the new modern implementation. +// The names chosen for TUF error types should start in 'Err' except where +// there is a good reason not to, and provide that reason in those cases. + +// Repository errors + +// ErrRepository - an error with a repository's state, such as a missing file. +// It covers all exceptions that come from the repository side when +// looking from the perspective of users of metadata API or client +type ErrRepository struct { + Msg string +} + +func (e ErrRepository) Error() string { + return fmt.Sprintf("repository error: %s", e.Msg) +} + +// ErrUnsignedMetadata - An error about metadata object with insufficient threshold of signatures +type ErrUnsignedMetadata struct { + Msg string +} + +func (e ErrUnsignedMetadata) Error() string { + return fmt.Sprintf("unsigned metadata error: %s", e.Msg) +} + +// ErrUnsignedMetadata is a subset of ErrRepository +func (e ErrUnsignedMetadata) Is(target error) bool { + return target == ErrRepository{} +} + +// ErrBadVersionNumber - An error for metadata that contains an invalid version number +type ErrBadVersionNumber struct { + Msg string +} + +func (e ErrBadVersionNumber) Error() string { + return fmt.Sprintf("bad version number error: %s", e.Msg) +} + +// ErrBadVersionNumber is a subset of ErrRepository +func (e ErrBadVersionNumber) Is(target error) bool { + return target == ErrRepository{} +} + +// ErrEqualVersionNumber - An error for metadata containing a previously verified version number +type ErrEqualVersionNumber struct { + Msg string +} + +func (e ErrEqualVersionNumber) Error() string { + return fmt.Sprintf("equal version number error: %s", e.Msg) +} + +// ErrEqualVersionNumber is a subset of both ErrRepository and ErrBadVersionNumber +func (e ErrEqualVersionNumber) Is(target error) bool { + return target == ErrRepository{} || target == ErrBadVersionNumber{} +} + +// ErrExpiredMetadata - Indicate that a TUF Metadata file has expired +type ErrExpiredMetadata struct { + Msg string +} + +func (e ErrExpiredMetadata) Error() string { + return fmt.Sprintf("expired metadata error: %s", e.Msg) +} + +// ErrExpiredMetadata is a subset of ErrRepository +func (e ErrExpiredMetadata) Is(target error) bool { + return target == ErrRepository{} +} + +// ErrLengthOrHashMismatch - An error while checking the length and hash values of an object +type ErrLengthOrHashMismatch struct { + Msg string +} + +func (e ErrLengthOrHashMismatch) Error() string { + return fmt.Sprintf("length/hash verification error: %s", e.Msg) +} + +// ErrLengthOrHashMismatch is a subset of ErrRepository +func (e ErrLengthOrHashMismatch) Is(target error) bool { + return target == ErrRepository{} +} + +// Download errors + +// ErrDownload - An error occurred while attempting to download a file +type ErrDownload struct { + Msg string +} + +func (e ErrDownload) Error() string { + return fmt.Sprintf("download error: %s", e.Msg) +} + +// ErrDownloadLengthMismatch - Indicate that a mismatch of lengths was seen while downloading a file +type ErrDownloadLengthMismatch struct { + Msg string +} + +func (e ErrDownloadLengthMismatch) Error() string { + return fmt.Sprintf("download length mismatch error: %s", e.Msg) +} + +// ErrDownloadLengthMismatch is a subset of ErrDownload +func (e ErrDownloadLengthMismatch) Is(target error) bool { + return target == ErrDownload{} +} + +// ErrDownloadHTTP - Returned by Fetcher interface implementations for HTTP errors +type ErrDownloadHTTP struct { + StatusCode int + URL string +} + +func (e ErrDownloadHTTP) Error() string { + return fmt.Sprintf("failed to download %s, http status code: %d", e.URL, e.StatusCode) +} + +// ErrDownloadHTTP is a subset of ErrDownload +func (e ErrDownloadHTTP) Is(target error) bool { + return target == ErrDownload{} +} + +// ValueError +type ErrValue struct { + Msg string +} + +func (e ErrValue) Error() string { + return fmt.Sprintf("value error: %s", e.Msg) +} + +// TypeError +type ErrType struct { + Msg string +} + +func (e ErrType) Error() string { + return fmt.Sprintf("type error: %s", e.Msg) +} + +// RuntimeError +type ErrRuntime struct { + Msg string +} + +func (e ErrRuntime) Error() string { + return fmt.Sprintf("runtime error: %s", e.Msg) +} diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index 88335738..83ed9110 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -16,6 +16,8 @@ import ( "io" "net/http" "strconv" + + "github.com/rdimitrov/go-tuf-metadata/metadata" ) // Fetcher interface @@ -47,7 +49,7 @@ func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64) ([]byte, defer res.Body.Close() // handle HTTP status codes if res.StatusCode == http.StatusNotFound || res.StatusCode == http.StatusForbidden || res.StatusCode != http.StatusOK { - return nil, fmt.Errorf("failed to download %s, http status code: %d", urlPath, res.StatusCode) + return nil, metadata.ErrDownloadHTTP{StatusCode: res.StatusCode, URL: urlPath} } // get content length length, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) @@ -56,7 +58,7 @@ func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64) ([]byte, } // error if the reported size is greater than what is expected if length > maxLength { - return nil, fmt.Errorf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength) + return nil, metadata.ErrDownloadLengthMismatch{Msg: fmt.Sprintf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength)} } // although the size has been checked above, use a LimitReader in case // the reported size is inaccurate, or size is -1 which indicates an diff --git a/metadata/keys.go b/metadata/keys.go index 52601488..66f41c5b 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -23,7 +23,6 @@ import ( "github.com/secure-systems-lab/go-securesystemslib/cjson" "github.com/sigstore/sigstore/pkg/cryptoutils" - "golang.org/x/exp/slices" ) const ( @@ -47,6 +46,7 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { if !ok { return nil, fmt.Errorf("invalid rsa public key") } + // done for verification - ref. https://github.com/theupdateframework/go-tuf/pull/357 if _, err := x509.MarshalPKIXPublicKey(rsaKey); err != nil { return nil, err } @@ -60,6 +60,7 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { if !ok { return nil, fmt.Errorf("invalid ecdsa public key") } + // done for verification - ref. https://github.com/theupdateframework/go-tuf/pull/357 if _, err := x509.MarshalPKIXPublicKey(ecdsaKey); err != nil { return nil, err } @@ -70,6 +71,7 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { return nil, err } ed25519Key := ed25519.PublicKey(publicKey) + // done for verification - ref. https://github.com/theupdateframework/go-tuf/pull/357 if _, err := x509.MarshalPKIXPublicKey(ed25519Key); err != nil { return nil, err } @@ -108,119 +110,6 @@ func KeyFromPublicKey(k crypto.PublicKey) (*Key, error) { return key, nil } -// AddKey adds new signing key for delegated role "role" -// keyID: Identifier of the key to be added for “role“. -// key: Signing key to be added for “role“. -// role: Name of the role, for which “key“ is added. -func (signed *RootType) AddKey(key *Key, role string) error { - // verify role is present - if _, ok := signed.Roles[role]; !ok { - return fmt.Errorf("role %s doesn't exist", role) - } - // add keyID to role - if !slices.Contains(signed.Roles[role].KeyIDs, key.ID()) { - signed.Roles[role].KeyIDs = append(signed.Roles[role].KeyIDs, key.ID()) - } - // update Keys - signed.Keys[key.ID()] = key - return nil -} - -// RevokeKey revoke key from “role“ and updates the Keys store. -// keyID: Identifier of the key to be removed for “role“. -// role: Name of the role, for which a signing key is removed. -func (signed *RootType) RevokeKey(keyID, role string) error { - // verify role is present - if _, ok := signed.Roles[role]; !ok { - return fmt.Errorf("role %s doesn't exist", role) - } - // verify keyID is present for given role - if !slices.Contains(signed.Roles[role].KeyIDs, keyID) { - return fmt.Errorf("key with id %s is not used by %s", keyID, role) - } - // remove keyID from role - filteredKeyIDs := []string{} - for _, k := range signed.Roles[role].KeyIDs { - if k != keyID { - filteredKeyIDs = append(filteredKeyIDs, k) - } - } - // overwrite the old keyID slice - signed.Roles[role].KeyIDs = filteredKeyIDs - // check if keyID is used by other roles too - for _, r := range signed.Roles { - if slices.Contains(r.KeyIDs, keyID) { - return nil - } - } - // delete the keyID from Keys if it's not used anywhere else - delete(signed.Keys, keyID) - return nil -} - -// AddKey adds new signing key for delegated role "role" -// key: Signing key to be added for “role“. -// role: Name of the role, for which “key“ is added. -func (signed *TargetsType) AddKey(key *Key, role string) error { - // check if Delegations are even present - if signed.Delegations == nil { - return fmt.Errorf("delegated role %s doesn't exist", role) - } - // loop through all delegated roles - for i, d := range signed.Delegations.Roles { - // if role is found - if d.Name == role { - // add key if keyID is not already part of keyIDs for that role - if !slices.Contains(d.KeyIDs, key.ID()) { - signed.Delegations.Roles[i].KeyIDs = append(signed.Delegations.Roles[i].KeyIDs, key.ID()) - signed.Delegations.Keys[key.ID()] = key - return nil - } - return fmt.Errorf("delegated role %s already has keyID %s", role, key.ID()) - } - } - return fmt.Errorf("delegated role %s doesn't exist", role) -} - -// RevokeKey revokes key from delegated role "role" and updates the delegations key store -// keyID: Identifier of the key to be removed for “role“. -// role: Name of the role, for which a signing key is removed. -func (signed *TargetsType) RevokeKey(keyID string, role string) error { - // check if Delegations are even present - if signed.Delegations == nil { - return fmt.Errorf("delegated role %s doesn't exist", role) - } - // loop through all delegated roles - for i, d := range signed.Delegations.Roles { - // if role is found - if d.Name == role { - // check if keyID is present in keyIDs for that role - if !slices.Contains(d.KeyIDs, keyID) { - return fmt.Errorf("key with id %s is not used by %s", keyID, role) - } - // remove keyID from role - filteredKeyIDs := []string{} - for _, k := range signed.Delegations.Roles[i].KeyIDs { - if k != keyID { - filteredKeyIDs = append(filteredKeyIDs, k) - } - } - // overwrite the old keyID slice - signed.Delegations.Roles[i].KeyIDs = filteredKeyIDs - break - } - } - // check if keyID is used by other roles too - for _, r := range signed.Delegations.Roles { - if slices.Contains(r.KeyIDs, keyID) { - return nil - } - } - // delete the keyID from Keys if it's not used anywhere else - delete(signed.Delegations.Keys, keyID) - return nil -} - // ID returns the keyID value for the given Key func (k *Key) ID() string { k.idOnce.Do(func() { diff --git a/metadata/metadata.go b/metadata/metadata.go index d04aafea..b35ef616 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -18,7 +18,6 @@ import ( "crypto/sha512" "encoding/hex" "encoding/json" - "errors" "fmt" "hash" "io" @@ -32,7 +31,7 @@ import ( "golang.org/x/exp/slices" ) -// Root create new metadata instance of type Root +// Root return new metadata instance of type Root func Root(expires ...time.Time) *Metadata[RootType] { // expire now if there's nothing set if len(expires) == 0 { @@ -46,7 +45,7 @@ func Root(expires ...time.Time) *Metadata[RootType] { Threshold: 1, } } - log.Debugf("Created a metadata of type %s expiring at %s", ROOT, expires[0]) + log.Debugf("Created a metadata of type %s expiring at %s\n", ROOT, expires[0]) return &Metadata[RootType]{ Signed: RootType{ Type: ROOT, @@ -61,13 +60,13 @@ func Root(expires ...time.Time) *Metadata[RootType] { } } -// Snapshot create new metadata instance of type Snapshot +// Snapshot return new metadata instance of type Snapshot func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { // expire now if there's nothing set if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s expiring at %s", SNAPSHOT, expires[0]) + log.Debugf("Created a metadata of type %s expiring at %s\n", SNAPSHOT, expires[0]) return &Metadata[SnapshotType]{ Signed: SnapshotType{ Type: SNAPSHOT, @@ -84,13 +83,13 @@ func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { } } -// Timestamp create new metadata instance of type Timestamp +// Timestamp return new metadata instance of type Timestamp func Timestamp(expires ...time.Time) *Metadata[TimestampType] { // expire now if there's nothing set if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s expiring at %s", TIMESTAMP, expires[0]) + log.Debugf("Created a metadata of type %s expiring at %s\n", TIMESTAMP, expires[0]) return &Metadata[TimestampType]{ Signed: TimestampType{ Type: TIMESTAMP, @@ -107,13 +106,13 @@ func Timestamp(expires ...time.Time) *Metadata[TimestampType] { } } -// Targets create new metadata instance of type Targets +// Targets return new metadata instance of type Targets func Targets(expires ...time.Time) *Metadata[TargetsType] { // expire now if there's nothing set if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s expiring at %s", TARGETS, expires[0]) + log.Debugf("Created a metadata of type %s expiring at %s\n", TARGETS, expires[0]) return &Metadata[TargetsType]{ Signed: TargetsType{ Type: TARGETS, @@ -126,7 +125,7 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { } } -// TargetFile create new metadata instance of type TargetFiles +// TargetFile return new metadata instance of type TargetFiles func TargetFile() *TargetFiles { return &TargetFiles{ Length: 0, @@ -134,11 +133,11 @@ func TargetFile() *TargetFiles { } } -// MetaFile create new metadata instance of type MetaFile +// MetaFile return new metadata instance of type MetaFile func MetaFile(version int64) *MetaFiles { if version < 1 { // attempting to set incorrect version - log.Debugf("Attempting to set incorrect version of %d for MetaFile", version) + log.Debugf("Attempting to set incorrect version of %d for MetaFile\n", version) version = 1 } return &MetaFiles{ @@ -164,7 +163,7 @@ func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { return nil, err } *meta = *m - log.Debugf("Loaded metadata from file %s", name) + log.Debugf("Loaded metadata from file %s\n", name) return meta, nil } @@ -190,7 +189,7 @@ func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { // ToFile save metadata to file func (meta *Metadata[T]) ToFile(name string, pretty bool) error { - log.Debugf("Writing metadata to file %s", name) + log.Debugf("Writing metadata to file %s\n", name) data, err := meta.ToBytes(pretty) if err != nil { return err @@ -208,7 +207,7 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { // sign the Signed part sb, err := signer.SignMessage(bytes.NewReader(payload)) if err != nil { - return nil, err + return nil, ErrUnsignedMetadata{Msg: "problem signing metadata"} } // get the signer's PublicKey publ, err := signer.PublicKey() @@ -228,7 +227,7 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { // update the Signatures part meta.Signatures = append(meta.Signatures, *sig) // return the new signature - log.Debugf("Signed metadata with key ID: %s", key.ID()) + log.Infof("Signed metadata with key ID: %s\n", key.ID()) return sig, nil } @@ -240,7 +239,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat var roleThreshold int signing_keys := map[string]bool{} i := any(meta) - log.Debugf("Verifying %s", delegated_role) + log.Debugf("Verifying %s\n", delegated_role) // collect keys, keyIDs and threshold based on delegator type switch i := i.(type) { case *Metadata[RootType]: @@ -249,7 +248,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat roleKeyIDs = role.KeyIDs roleThreshold = role.Threshold } else { - return fmt.Errorf("no delegation found for %s", delegated_role) + return ErrValue{Msg: fmt.Sprintf("no delegation found for %s", delegated_role)} } case *Metadata[TargetsType]: keys = i.Signed.Delegations.Keys @@ -261,16 +260,16 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat } } default: - return fmt.Errorf("call is valid only on delegator metadata (root or targets)") + return ErrType{Msg: "call is valid only on delegator metadata (should be either root or targets)"} } // if there are no keyIDs for that role it means there's no delegation found if len(roleKeyIDs) == 0 { - return fmt.Errorf("no delegation found for %s", delegated_role) + return ErrValue{Msg: fmt.Sprintf("no delegation found for %s", delegated_role)} } // loop through each role keyID for _, v := range roleKeyIDs { sign := Signature{} - payload := []byte{} + var payload []byte // convert to a PublicKey type key, err := keys[v].ToPublicKey() if err != nil { @@ -330,22 +329,24 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat return err } default: - log.Debugf("unknown delegated metadata type") + return ErrType{Msg: "unknown delegated metadata type"} } // verify if the signature for that payload corresponds to the given key - if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err == nil { + if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err != nil { + // failed to verify the metadata with that key ID + log.Debugf("Failed to verify %s with key ID %s\n", delegated_role, v) + } else { // save the verified keyID only if verification passed signing_keys[v] = true - log.Debugf("Verified %s with key ID %s", delegated_role, v) + log.Debugf("Verified %s with key ID %s\n", delegated_role, v) } } // check if the amount of valid signatures is enough if len(signing_keys) < roleThreshold { - log.Debugf("Verifying %s failed, not enough signatures, got %d, want %d", delegated_role, len(signing_keys), roleThreshold) - return fmt.Errorf("verifying %s failed", delegated_role) - + log.Infof("Verifying %s failed, not enough signatures, got %d, want %d\n", delegated_role, len(signing_keys), roleThreshold) + return ErrUnsignedMetadata{Msg: fmt.Sprintf("Verifying %s failed, not enough signatures, got %d, want %d", delegated_role, len(signing_keys), roleThreshold)} } - log.Debugf("Verified %s successfully", delegated_role) + log.Infof("Verified %s successfully\n", delegated_role) return nil } @@ -406,9 +407,9 @@ func (f *TargetFiles) VerifyLengthHashes(data []byte) error { return nil } -// FromFile generates TargetFiles from file +// FromFile generate TargetFiles from file func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { - log.Debugf("Generating target file from file %s", localPath) + log.Debugf("Generating target file from file %s\n", localPath) // open file in, err := os.Open(localPath) if err != nil { @@ -423,9 +424,9 @@ func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles return t.FromBytes(localPath, data, hashes...) } -// FromBytes generates TargetFiles from bytes +// FromBytes generate TargetFiles from bytes func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) (*TargetFiles, error) { - log.Debugf("Generating target file from bytes %s", localPath) + log.Debugf("Generating target file from bytes %s\n", localPath) var hasher hash.Hash targetFile := &TargetFiles{ Hashes: map[string]HexBytes{}, @@ -447,7 +448,7 @@ func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) case "sha512": hasher = sha512.New() default: - return nil, fmt.Errorf("hash calculation failed - unknown hashing algorithm - %s", v) + return nil, ErrValue{Msg: fmt.Sprintf("failed generating TargetFile - unsupported hashing algorithm - %s", v)} } _, err := hasher.Write(data) if err != nil { @@ -461,7 +462,7 @@ func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) // ClearSignatures clears Signatures func (meta *Metadata[T]) ClearSignatures() { - log.Debugf("Cleared signatures") + log.Debug("Cleared signatures") meta.Signatures = []Signature{} } @@ -469,7 +470,7 @@ func (meta *Metadata[T]) ClearSignatures() { // the paths that "DelegatedRole" is trusted to provide func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) { if len(role.PathHashPrefixes) > 0 { - // TODO + // TODO: handle succinct roles return false, nil } else if len(role.Paths) > 0 { for _, pathPattern := range role.Paths { @@ -479,7 +480,7 @@ func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) return false, nil } -// GetRolesForTarget returns names and terminating status of all +// GetRolesForTarget return the names and terminating status of all // delegated roles who are responsible for targetFilepath func (role *Delegations) GetRolesForTarget(targetFilepath string) map[string]bool { res := map[string]bool{} @@ -491,10 +492,11 @@ func (role *Delegations) GetRolesForTarget(targetFilepath string) map[string]boo } } } + // TODO: handle succinct roles return res } -// fromBytes returns *Metadata[T] object from bytes and verifies +// fromBytes return a *Metadata[T] object from bytes and verifies // that the data corresponds to the caller struct type func fromBytes[T Roles](data []byte) (*Metadata[T], error) { meta := &Metadata[T]{} @@ -513,19 +515,19 @@ func fromBytes[T Roles](data []byte) (*Metadata[T], error) { return meta, nil } -// Verifies if the signature key IDs are unique for that metadata +// checkUniqueSignatures verifies if the signature key IDs are unique for that metadata func checkUniqueSignatures[T Roles](meta Metadata[T]) error { signatures := []string{} for _, sig := range meta.Signatures { if slices.Contains(signatures, sig.KeyID) { - return fmt.Errorf("multiple signatures found for key ID %s", sig.KeyID) + return ErrValue{Msg: fmt.Sprintf("multiple signatures found for key ID %s", sig.KeyID)} } signatures = append(signatures, sig.KeyID) } return nil } -// Verifies if the Generic type used to create the object is the same as the type of the metadata file in bytes +// checkType verifies if the generic type used to create the object is the same as the type of the metadata file in bytes func checkType[T Roles](data []byte) error { var m map[string]any i := any(new(T)) @@ -536,38 +538,40 @@ func checkType[T Roles](data []byte) error { switch i.(type) { case *RootType: if ROOT != signedType { - return fmt.Errorf("expected type %s, got - %s", ROOT, signedType) + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", ROOT, signedType)} } case *SnapshotType: if SNAPSHOT != signedType { - return fmt.Errorf("expected type %s, got - %s", SNAPSHOT, signedType) + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", SNAPSHOT, signedType)} } case *TimestampType: if TIMESTAMP != signedType { - return fmt.Errorf("expected type %s, got - %s", TIMESTAMP, signedType) + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", TIMESTAMP, signedType)} } case *TargetsType: if TARGETS != signedType { - return fmt.Errorf("expected type %s, got - %s", TARGETS, signedType) + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", TARGETS, signedType)} } default: - return fmt.Errorf("unrecognized metadata type - %s", signedType) + return ErrValue{Msg: fmt.Sprintf("unrecognized metadata type - %s", signedType)} } // all okay return nil } +// verifyLength verifies if the passed data has the corresponding length func verifyLength(data []byte, length int64) error { len, err := io.Copy(io.Discard, bytes.NewReader(data)) if err != nil { return err } if length != len { - return fmt.Errorf("length verification failed - expected %d, got %d", length, len) + return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("length verification failed - expected %d, got %d", length, len)} } return nil } +// verifyHashes verifies if the hash of the passed data corresponds to it func verifyHashes(data []byte, hashes Hashes) error { var hasher hash.Hash for k, v := range hashes { @@ -577,42 +581,127 @@ func verifyHashes(data []byte, hashes Hashes) error { case "sha512": hasher = sha512.New() default: - return fmt.Errorf("hash verification failed - unknown hashing algorithm - %s", k) + return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("hash verification failed - unknown hashing algorithm - %s", k)} } hasher.Write(data) if hex.EncodeToString(v) != hex.EncodeToString(hasher.Sum(nil)) { - return fmt.Errorf("hash verification failed - mismatch for algorithm %s", k) + return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("hash verification failed - mismatch for algorithm %s", k)} } } return nil } -func (b *HexBytes) UnmarshalJSON(data []byte) error { - if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { - return errors.New("tuf: invalid JSON hex bytes") +// AddKey adds new signing key for delegated role "role" +// keyID: Identifier of the key to be added for “role“. +// key: Signing key to be added for “role“. +// role: Name of the role, for which “key“ is added. +func (signed *RootType) AddKey(key *Key, role string) error { + // verify role is present + if _, ok := signed.Roles[role]; !ok { + return ErrValue{Msg: fmt.Sprintf("role %s doesn't exist", role)} } - res := make([]byte, hex.DecodedLen(len(data)-2)) - _, err := hex.Decode(res, data[1:len(data)-1]) - if err != nil { - return err + // add keyID to role + if !slices.Contains(signed.Roles[role].KeyIDs, key.ID()) { + signed.Roles[role].KeyIDs = append(signed.Roles[role].KeyIDs, key.ID()) } - *b = res + // update Keys + signed.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? return nil } -func (b HexBytes) MarshalJSON() ([]byte, error) { - res := make([]byte, hex.EncodedLen(len(b))+2) - res[0] = '"' - res[len(res)-1] = '"' - hex.Encode(res[1:], b) - return res, nil -} - -func (b HexBytes) String() string { - return hex.EncodeToString(b) +// RevokeKey revoke key from “role“ and updates the Keys store. +// keyID: Identifier of the key to be removed for “role“. +// role: Name of the role, for which a signing key is removed. +func (signed *RootType) RevokeKey(keyID, role string) error { + // verify role is present + if _, ok := signed.Roles[role]; !ok { + return ErrValue{Msg: fmt.Sprintf("role %s doesn't exist", role)} + } + // verify keyID is present for given role + if !slices.Contains(signed.Roles[role].KeyIDs, keyID) { + return ErrValue{Msg: fmt.Sprintf("key with id %s is not used by %s", keyID, role)} + } + // remove keyID from role + filteredKeyIDs := []string{} + for _, k := range signed.Roles[role].KeyIDs { + if k != keyID { + filteredKeyIDs = append(filteredKeyIDs, k) + } + } + // overwrite the old keyID slice + signed.Roles[role].KeyIDs = filteredKeyIDs + // check if keyID is used by other roles too + for _, r := range signed.Roles { + if slices.Contains(r.KeyIDs, keyID) { + return nil + } + } + // delete the keyID from Keys if it's not used anywhere else + delete(signed.Keys, keyID) + return nil } -func PathHexDigest(s string) string { - b := sha256.Sum256([]byte(s)) - return hex.EncodeToString(b[:]) +// AddKey adds new signing key for delegated role "role" +// key: Signing key to be added for “role“. +// role: Name of the role, for which “key“ is added. +func (signed *TargetsType) AddKey(key *Key, role string) error { + // check if Delegations are even present + if signed.Delegations == nil { + return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} + } + // loop through all delegated roles + for i, d := range signed.Delegations.Roles { + // if role is found + if d.Name == role { + // add key if keyID is not already part of keyIDs for that role + if !slices.Contains(d.KeyIDs, key.ID()) { + signed.Delegations.Roles[i].KeyIDs = append(signed.Delegations.Roles[i].KeyIDs, key.ID()) + signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? + return nil + } + log.Debugf("Delegated role %s already has keyID %s\n", role, key.ID()) + } + } + // TODO: Handle succinct roles + return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} +} + +// RevokeKey revokes key from delegated role "role" and updates the delegations key store +// keyID: Identifier of the key to be removed for “role“. +// role: Name of the role, for which a signing key is removed. +func (signed *TargetsType) RevokeKey(keyID string, role string) error { + // check if Delegations are even present + if signed.Delegations == nil { + return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} + } + // loop through all delegated roles + for i, d := range signed.Delegations.Roles { + // if role is found + if d.Name == role { + // check if keyID is present in keyIDs for that role + if !slices.Contains(d.KeyIDs, keyID) { + return ErrValue{Msg: fmt.Sprintf("key with id %s is not used by %s", keyID, role)} + } + // remove keyID from role + filteredKeyIDs := []string{} + for _, k := range signed.Delegations.Roles[i].KeyIDs { + if k != keyID { + filteredKeyIDs = append(filteredKeyIDs, k) + } + } + // overwrite the old keyID slice for that role + signed.Delegations.Roles[i].KeyIDs = filteredKeyIDs + // check if keyID is used by other roles too + for _, r := range signed.Delegations.Roles { + if slices.Contains(r.KeyIDs, keyID) { + return nil + } + } + // delete the keyID from Keys if it's not used anywhere else + delete(signed.Delegations.Keys, keyID) + return nil + } + } + // TODO: Handle succinct roles + return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index dfd6210b..37b91445 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -46,38 +46,14 @@ func New(rootData []byte) (*TrustedMetadata, error) { return res, nil } -// loadTrustedRoot verifies and loads "data" as trusted root metadata. -// Note that an expired initial root is considered valid: expiry is -// only checked for the final root in “UpdateTimestamp()“. -func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { - // generate root metadata - newRoot, err := metadata.Root().FromBytes(rootData) - if err != nil { - return err - } - // check metadata type matches root - if newRoot.Signed.Type != metadata.ROOT { - return fmt.Errorf("expected %s, got %s", metadata.ROOT, newRoot.Signed.Type) - } - // verify root by itself - err = newRoot.VerifyDelegate(metadata.ROOT, newRoot) - if err != nil { - return err - } - // save root if verified - trusted.Root = newRoot - log.Debugf("Loaded trusted root v%d", trusted.Root.Signed.Version) - return nil -} - // UpdateRoot verifies and loads “rootData“ as new root metadata. // Note that an expired intermediate root is considered valid: expiry is // only checked for the final root in “UpdateTimestamp()“. func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[metadata.RootType], error) { if trusted.Timestamp != nil { - return nil, fmt.Errorf("cannot update root after timestamp") + return nil, metadata.ErrRuntime{Msg: "cannot update root after timestamp"} } - log.Debugf("Updating root") + log.Debug("Updating root") // generate root metadata newRoot, err := metadata.Root().FromBytes(rootData) if err != nil { @@ -85,7 +61,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ } // check metadata type matches root if newRoot.Signed.Type != metadata.ROOT { - return nil, fmt.Errorf("expected %s, got %s", metadata.ROOT, newRoot.Signed.Type) + return nil, metadata.ErrRepository{Msg: fmt.Sprintf("expected %s, got %s", metadata.ROOT, newRoot.Signed.Type)} } // verify that new root is signed by trusted root err = trusted.Root.VerifyDelegate(metadata.ROOT, newRoot) @@ -94,7 +70,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ } // verify version if newRoot.Signed.Version != trusted.Root.Signed.Version+1 { - return nil, fmt.Errorf("bad version number, expected %d, got %d", trusted.Root.Signed.Version+1, newRoot.Signed.Version) + return nil, metadata.ErrBadVersionNumber{Msg: fmt.Sprintf("bad version number, expected %d, got %d", trusted.Root.Signed.Version+1, newRoot.Signed.Version)} } // verify that new root is signed by itself err = newRoot.VerifyDelegate(metadata.ROOT, newRoot) @@ -103,7 +79,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ } // save root if verified trusted.Root = newRoot - log.Debugf("Updated root v%d", trusted.Root.Signed.Version) + log.Infof("Updated root v%d\n", trusted.Root.Signed.Version) return trusted.Root, nil } @@ -115,22 +91,22 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ // prevent loading snapshot metadata. func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata.Metadata[metadata.TimestampType], error) { if trusted.Snapshot != nil { - return nil, fmt.Errorf("cannot update timestamp after snapshot") + return nil, metadata.ErrRuntime{Msg: "cannot update timestamp after snapshot"} } // client workflow 5.3.10: Make sure final root is not expired. if trusted.Root.Signed.IsExpired(trusted.RefTime) { - return nil, fmt.Errorf("final root.json is expired") + // no need to check for 5.3.11 (fast forward attack recovery): + // timestamp/snapshot can not yet be loaded at this point + return nil, metadata.ErrExpiredMetadata{Msg: "final root.json is expired"} } - log.Debugf("Updating timestamp") - // no need to check for 5.3.11 (fast forward attack recovery): - // timestamp/snapshot can not yet be loaded at this point + log.Debug("Updating timestamp") newTimestamp, err := metadata.Timestamp().FromBytes(timestampData) if err != nil { return nil, err } // check metadata type matches timestamp if newTimestamp.Signed.Type != metadata.TIMESTAMP { - return nil, fmt.Errorf("expected %s, got %s", metadata.TIMESTAMP, newTimestamp.Signed.Type) + return nil, metadata.ErrRepository{Msg: fmt.Sprintf("expected %s, got %s", metadata.TIMESTAMP, newTimestamp.Signed.Type)} } // verify that new timestamp is signed by trusted root err = trusted.Root.VerifyDelegate(metadata.TIMESTAMP, newTimestamp) @@ -142,39 +118,39 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata if trusted.Timestamp != nil { // prevent rolling back timestamp version if newTimestamp.Signed.Version < trusted.Timestamp.Signed.Version { - return nil, fmt.Errorf("new timestamp version %d must be >= %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) + return nil, metadata.ErrBadVersionNumber{Msg: fmt.Sprintf("new timestamp version %d must be >= %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version)} } - // keep using old timestamp if versions are equal. + // keep using old timestamp if versions are equal if newTimestamp.Signed.Version == trusted.Timestamp.Signed.Version { - log.Debugf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) - return nil, nil + log.Debugf("New timestamp version %d equals the old one %d\n", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) + return nil, metadata.ErrEqualVersionNumber{Msg: fmt.Sprintf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version)} } // prevent rolling back snapshot version snapshotMeta := trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] newSnapshotMeta := newTimestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] if newSnapshotMeta.Version < snapshotMeta.Version { - return nil, fmt.Errorf("new snapshot version %d must be >= %d", newSnapshotMeta.Version, snapshotMeta.Version) + return nil, metadata.ErrBadVersionNumber{Msg: fmt.Sprintf("new snapshot version %d must be >= %d", newSnapshotMeta.Version, snapshotMeta.Version)} } } // expiry not checked to allow old timestamp to be used for rollback // protection of new timestamp: expiry is checked in UpdateSnapshot() // save root if verified trusted.Timestamp = newTimestamp - log.Debugf("Updated timestamp v%d", trusted.Timestamp.Signed.Version) + log.Infof("Updated timestamp v%d\n", trusted.Timestamp.Signed.Version) // timestamp is loaded: error if it is not valid _final_ timestamp err = trusted.checkFinalTimestamp() if err != nil { - // return the new timestamp but also the error if it's expired - return trusted.Timestamp, err + return nil, err } + // all okay return trusted.Timestamp, nil } // checkFinalTimestamp verifies if trusted timestamp is not expired func (trusted *TrustedMetadata) checkFinalTimestamp() error { if trusted.Timestamp.Signed.IsExpired(trusted.RefTime) { - return fmt.Errorf("timestamp.json is expired") + return metadata.ErrExpiredMetadata{Msg: "timestamp.json is expired"} } return nil } @@ -189,12 +165,12 @@ func (trusted *TrustedMetadata) checkFinalTimestamp() error { // prevent loading targets. func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bool) (*metadata.Metadata[metadata.SnapshotType], error) { if trusted.Timestamp == nil { - return nil, fmt.Errorf("cannot update snapshot before timestamp") + return nil, metadata.ErrRuntime{Msg: "cannot update snapshot before timestamp"} } if trusted.Targets[metadata.TARGETS] != nil { - return nil, fmt.Errorf("cannot update snapshot after targets") + return nil, metadata.ErrRuntime{Msg: "cannot update snapshot after targets"} } - log.Debugf("Updating targets") + log.Debug("Updating snapshot") // snapshot cannot be loaded if final timestamp is expired err := trusted.checkFinalTimestamp() @@ -216,7 +192,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo } // check metadata type matches snapshot if newSnapshot.Signed.Type != metadata.SNAPSHOT { - return nil, fmt.Errorf("expected %s, got %s", metadata.SNAPSHOT, newSnapshot.Signed.Type) + return nil, metadata.ErrRepository{Msg: fmt.Sprintf("expected %s, got %s", metadata.SNAPSHOT, newSnapshot.Signed.Type)} } // verify that new snapshot is signed by trusted root err = trusted.Root.VerifyDelegate(metadata.SNAPSHOT, newSnapshot) @@ -233,11 +209,11 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo newFileInfo, ok := newSnapshot.Signed.Meta[name] // prevent removal of any metadata in meta if !ok { - return nil, fmt.Errorf("new snapshot is missing info for %s", name) + return nil, metadata.ErrRepository{Msg: fmt.Sprintf("new snapshot is missing info for %s", name)} } // prevent rollback of any metadata versions if newFileInfo.Version < info.Version { - return nil, fmt.Errorf("expected %s version %d, got %d", name, newFileInfo.Version, info.Version) + return nil, metadata.ErrBadVersionNumber{Msg: fmt.Sprintf("expected %s version %d, got %d", name, newFileInfo.Version, info.Version)} } } } @@ -245,25 +221,25 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo // expiry not checked to allow old snapshot to be used for rollback // protection of new snapshot: it is checked when targets is updated trusted.Snapshot = newSnapshot - log.Debugf("Updated snapshot v%d", trusted.Snapshot.Signed.Version) + log.Infof("Updated snapshot v%d\n", trusted.Snapshot.Signed.Version) // snapshot is loaded, but we error if it's not valid _final_ snapshot err = trusted.checkFinalSnapshot() if err != nil { - // return the new snapshot but also the error if it's expired - return trusted.Snapshot, err + return nil, err } + // all okay return trusted.Snapshot, nil } // checkFinalSnapshot verifies if it's not expired and snapshot version matches timestamp meta version func (trusted *TrustedMetadata) checkFinalSnapshot() error { if trusted.Snapshot.Signed.IsExpired(trusted.RefTime) { - return fmt.Errorf("snapshot.json is expired") + return metadata.ErrExpiredMetadata{Msg: "snapshot.json is expired"} } snapshotMeta := trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] if trusted.Snapshot.Signed.Version != snapshotMeta.Version { - return fmt.Errorf("expected %d, got %d", snapshotMeta.Version, trusted.Snapshot.Signed.Version) + return metadata.ErrBadVersionNumber{Msg: fmt.Sprintf("expected %d, got %d", snapshotMeta.Version, trusted.Snapshot.Signed.Version)} } return nil } @@ -277,7 +253,7 @@ func (trusted *TrustedMetadata) UpdateTargets(targetsData []byte) (*metadata.Met func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleName, delegatorName string) (*metadata.Metadata[metadata.TargetsType], error) { var ok bool if trusted.Snapshot == nil { - return nil, fmt.Errorf("cannot load targets before snapshot") + return nil, metadata.ErrRuntime{Msg: "cannot load targets before snapshot"} } // targets cannot be loaded if final snapshot is expired or its version // does not match meta version in timestamp @@ -296,14 +272,13 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN _, ok = trusted.Targets[delegatorName] } if !ok { - return nil, fmt.Errorf("cannot load targets before delegator") + return nil, metadata.ErrRuntime{Msg: "cannot load targets before delegator"} } - log.Debugf("updating %s delegated by %s", roleName, delegatorName) - + log.Debugf("Updating %s delegated by %s\n", roleName, delegatorName) // Verify against the hashes in snapshot, if any meta, ok := trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] if !ok { - return nil, fmt.Errorf("snapshot does not contain information for %s", roleName) + return nil, metadata.ErrRepository{Msg: fmt.Sprintf("snapshot does not contain information for %s", roleName)} } err = meta.VerifyLengthHashes(targetsData) if err != nil { @@ -315,7 +290,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN } // check metadata type matches targets if newDelegate.Signed.Type != metadata.TARGETS { - return nil, fmt.Errorf("expected %s, got %s", metadata.TARGETS, newDelegate.Signed.Type) + return nil, metadata.ErrRepository{Msg: fmt.Sprintf("expected %s, got %s", metadata.TARGETS, newDelegate.Signed.Type)} } // get delegator metadata and verify the new delegatee if delegatorName == metadata.ROOT { @@ -329,13 +304,39 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN return nil, err } } + // check versions if newDelegate.Signed.Version != meta.Version { - return nil, fmt.Errorf("expected %s version %d, got %d", roleName, meta.Version, newDelegate.Signed.Version) + return nil, metadata.ErrBadVersionNumber{Msg: fmt.Sprintf("expected %s version %d, got %d", roleName, meta.Version, newDelegate.Signed.Version)} } + // check expiration if newDelegate.Signed.IsExpired(trusted.RefTime) { - return nil, fmt.Errorf("new %s is expired", roleName) + return nil, metadata.ErrExpiredMetadata{Msg: fmt.Sprintf("new %s is expired", roleName)} } trusted.Targets[roleName] = newDelegate - log.Debugf("Updated %s v%d", roleName, trusted.Targets[roleName].Signed.Version) + log.Infof("Updated %s v%d\n", roleName, trusted.Targets[roleName].Signed.Version) return trusted.Targets[roleName], nil } + +// loadTrustedRoot verifies and loads "data" as trusted root metadata. +// Note that an expired initial root is considered valid: expiry is +// only checked for the final root in “UpdateTimestamp()“. +func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { + // generate root metadata + newRoot, err := metadata.Root().FromBytes(rootData) + if err != nil { + return err + } + // check metadata type matches root + if newRoot.Signed.Type != metadata.ROOT { + return metadata.ErrRepository{Msg: fmt.Sprintf("expected %s, got %s", metadata.ROOT, newRoot.Signed.Type)} + } + // verify root by itself + err = newRoot.VerifyDelegate(metadata.ROOT, newRoot) + if err != nil { + return err + } + // save root if verified + trusted.Root = newRoot + log.Infof("Loaded trusted root v%d\n", trusted.Root.Signed.Version) + return nil +} diff --git a/metadata/types.go b/metadata/types.go index b385986e..a4ff7fc7 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -116,7 +116,7 @@ type HexBytes []byte type Hashes map[string]HexBytes -// MetaFiles represents the value portion of METAFILES in TUF (used in Snapshot and Timestamp metadata) +// MetaFiles represents the value portion of METAFILES in TUF (used in Snapshot and Timestamp metadata). Used to store information about a particular meta file. type MetaFiles struct { Length int64 `json:"length,omitempty"` Hashes Hashes `json:"hashes,omitempty"` @@ -124,7 +124,7 @@ type MetaFiles struct { Custom json.RawMessage `json:"custom,omitempty"` } -// TargetFiles represents the value portion of TARGETS in TUF (used Targets metadata) +// TargetFiles represents the value portion of TARGETS in TUF (used Targets metadata). Used to store information about a particular target file. type TargetFiles struct { Length int64 `json:"length"` Hashes Hashes `json:"hashes"` diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 1935745a..25260b7f 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -13,8 +13,10 @@ package updater import ( "encoding/hex" + "errors" "fmt" "io" + "net/http" "net/url" "os" "path/filepath" @@ -156,7 +158,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath } if targetBaseURL == "" { if update.targetBaseUrl == "" { - return "", fmt.Errorf("targetBaseURL must be set in either DownloadTarget() or the Updater struct") + return "", metadata.ErrValue{Msg: "targetBaseURL must be set in either DownloadTarget() or the Updater struct"} } targetBaseURL = update.targetBaseUrl } else { @@ -173,7 +175,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath } dirName, baseName, ok := strings.Cut(targetFilePath, "/") if !ok { - return "", fmt.Errorf("error handling targetFilePath %s, no separator found", targetFilePath) + return "", metadata.ErrValue{Msg: fmt.Sprintf("error handling targetFilePath %s, no separator found", targetFilePath)} } targetFilePath = fmt.Sprintf("%s/%s.%s", dirName, hashes, baseName) } @@ -186,12 +188,12 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath if err != nil { return "", err } - // write the data content to the temporary file + // write the data content to file err = os.WriteFile(filePath, data, 0644) if err != nil { return "", err } - log.Debugf("Downloaded target %s", targetFile.Path) + log.Infof("Downloaded target %s\n", targetFile.Path) return filePath, nil } @@ -213,7 +215,7 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa if err != nil { return "", err } - // verify if this local target file is an up-to-date target + // verify if the length and hashes of this target file match the expected values err = targetFile.VerifyLengthHashes(data) if err != nil { return "", err @@ -226,28 +228,42 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa func (update *Updater) loadTimestamp() error { // try to read local timestamp data, err := update.loadLocalMetadata(metadata.TIMESTAMP) - if err == nil { - // try to verify and load it to the trusted metadata set - result, err := update.trusted.UpdateTimestamp(data) - if result == nil && err != nil { - return err + if err != nil { + // this means there's no existing local timestamp so we should proceed downloading it without the need to UpdateTimestamp + log.Debug("Local timestamp does not exist") + } else { + // local timestamp exists, let's try to verify it and load it to the trusted metadata set + _, err := update.trusted.UpdateTimestamp(data) + if err != nil { + if errors.Is(err, metadata.ErrRepository{}) { + // local timestamp is not valid, proceed downloading from remote; note that this error type includes several other subset errors + log.Debug("Local timestamp is not valid") + } else { + // another error + return err + } } - // proceed if both res and temp are != nil - log.Debugf("local timestamp is verified, but expired: %s", err) + log.Debug("Local timestamp is valid") + // all okay, local timestamp exists and it is valid, nevertheless proceed with downloading from remote } - // Load from remote (whether local load succeeded or not) + // load from remote (whether local load succeeded or not) data, err = update.downloadMetadata(metadata.TIMESTAMP, update.config.TimestampMaxLength, "") if err != nil { return err } - // if the new timestamp version is the same as current, discard the - // new timestamp. This is normal and it shouldn't raise any error. - // a bit hacky, but if both result and err are nil it means new timestamp - // version is the same as current - result, err := update.trusted.UpdateTimestamp(data) - if result == nil && err != nil { - return err + // try to verify and load the newly downloaded timestamp + _, err = update.trusted.UpdateTimestamp(data) + if err != nil { + if errors.Is(err, metadata.ErrEqualVersionNumber{}) { + // if the new timestamp version is the same as current, discard the + // new timestamp; this is normal and it shouldn't raise any error + return nil + } else { + // another error + return err + } } + // proceed with persisting the new timestamp err = update.persistMetadata(metadata.TIMESTAMP, data) if err != nil { return err @@ -259,80 +275,120 @@ func (update *Updater) loadTimestamp() error { func (update *Updater) loadSnapshot() error { // try to read local snapshot data, err := update.loadLocalMetadata(metadata.SNAPSHOT) - if err == nil { - // try to verify and load local snapshot to trusted metadata set + if err != nil { + // this means there's no existing local snapshot so we should proceed downloading it without the need to UpdateSnapshot + log.Debug("Local snapshot does not exist") + } else { + // successfully read a local snapshot metadata, so let's try to verify and load it to the trusted metadata set _, err = update.trusted.UpdateSnapshot(data, true) - if err == nil { - log.Debugf("Local snapshot is valid: not downloading new one") + if err != nil { + // this means snapshot verification/loading failed + if errors.Is(err, metadata.ErrRepository{}) { + // local snapshot is not valid, proceed downloading from remote; note that this error type includes several other subset errors + log.Debug("Local snapshot is not valid") + } else { + // another error + return err + } + } else { + // this means snapshot verification/loading succeeded + log.Debug("Local snapshot is valid: not downloading new one") return nil } } // local snapshot does not exist or is invalid, update from remote + log.Debug("Failed to load local snapshot") if update.trusted.Timestamp == nil { return fmt.Errorf("trusted timestamp not set") } + // extract the snapshot meta from the trusted timestamp metadata snapshotMeta := update.trusted.Timestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] + // extract the length of the snapshot metadata to be downloaded length := snapshotMeta.Length if length == 0 { length = update.config.SnapshotMaxLength } + // extract which snapshot version should be downloaded in case of consistent snapshots version := "" if update.trusted.Root.Signed.ConsistentSnapshot { version = strconv.FormatInt(snapshotMeta.Version, 10) } + // download snapshot metadata data, err = update.downloadMetadata(metadata.SNAPSHOT, length, version) if err != nil { return err } + // verify and load the new snapshot _, err = update.trusted.UpdateSnapshot(data, false) if err != nil { return err } - err = update.persistMetadata(metadata.TIMESTAMP, data) + // persist the new snapshot + err = update.persistMetadata(metadata.SNAPSHOT, data) if err != nil { return err } return nil } -// loadTargets load local (and if needed remote) metadata for roleName. +// loadTargets load local (and if needed remote) metadata for roleName func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metadata[metadata.TargetsType], error) { - // avoid loading 'roleName' more than once during "GetTargetInfo" + // avoid loading "roleName" more than once during "GetTargetInfo" role, ok := update.trusted.Targets[roleName] if ok { return role, nil } // try to read local targets data, err := update.loadLocalMetadata(roleName) - if err == nil { - // try to verify and load local targets file to trusted metadata set + if err != nil { + // this means there's no existing local target file so we should proceed downloading it without the need to UpdateDelegatedTargets + log.Debugf("Local %s does not exist\n", roleName) + } else { + // successfully read a local targets metadata, so let's try to verify and load it to the trusted metadata set delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) - if err == nil { + if err != nil { + // this means targets verification/loading failed + if errors.Is(err, metadata.ErrRepository{}) { + // local target file is not valid, proceed downloading from remote; note that this error type includes several other subset errors + log.Debugf("Local %s is not valid\n", roleName) + } else { + // another error + return nil, err + } + } else { + // this means targets verification/loading succeeded log.Debugf("Local %s is valid: not downloading new one\n", roleName) return delegatedTargets, nil } } - // local 'role' does not exist or is invalid, update from remote + // local "roleName" does not exist or is invalid, update from remote + log.Debugf("Failed to load local %s\n", roleName) if update.trusted.Snapshot == nil { return nil, fmt.Errorf("trusted snapshot not set") } + // extract the targets meta from the trusted snapshot metadata metaInfo := update.trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] + // extract the length of the target metadata to be downloaded length := metaInfo.Length if length != 0 { length = update.config.TargetsMaxLength } + // extract which target metadata version should be downloaded in case of consistent snapshots version := "" if update.trusted.Root.Signed.ConsistentSnapshot { version = strconv.FormatInt(metaInfo.Version, 10) } + // download targets metadata data, err = update.downloadMetadata(roleName, length, version) if err != nil { return nil, err } + // verify and load the new target metadata delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) if err != nil { return nil, err } + // persist the new target metadata err = update.persistMetadata(roleName, data) if err != nil { return nil, err @@ -348,22 +404,33 @@ func (update *Updater) loadRoot() error { lowerBound := update.trusted.Root.Signed.Version + 1 upperBound := lowerBound + update.config.MaxRootRotations - // loop until we find the latest available version of root + // loop until we find the latest available version of root (download -> verify -> load -> persist) for nextVersion := lowerBound; nextVersion <= upperBound; nextVersion++ { data, err := update.downloadMetadata(metadata.ROOT, update.config.RootMaxLength, strconv.FormatInt(nextVersion, 10)) if err != nil { - // current root is newest available - break - } - // verify and load the root data - _, err = update.trusted.UpdateRoot(data) - if err != nil { - return err - } - // write root to disk - err = update.persistMetadata(metadata.ROOT, data) - if err != nil { + // downloading the root metadata failed for some reason + var downloadErr *metadata.ErrDownloadHTTP + if errors.As(err, &downloadErr) { + if downloadErr.StatusCode != http.StatusNotFound && downloadErr.StatusCode != http.StatusForbidden { + // unexpected HTTP status code + return err + } + // 404/403 means current root is newest available, so we can stop the loop and move forward + break + } + // some other error ocurred return err + } else { + // downloading root metadata succeeded, so let's try to verify and load it + _, err = update.trusted.UpdateRoot(data) + if err != nil { + return err + } + // persist root metadata to disk + err = update.persistMetadata(metadata.ROOT, data) + if err != nil { + return err + } } } return nil @@ -410,23 +477,23 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // delegated roles. roles := targets.Signed.Delegations.GetRolesForTarget(targetFilePath) for child, terminating := range roles { - log.Debugf("Adding child role %s", child) + log.Debugf("Adding child role %s\n", child) childRolesToVisit = append(childRolesToVisit, roleParentTuple{Role: child, Parent: delegation.Role}) if terminating { - log.Debugf("Not backtracking to other roles") + log.Debug("Not backtracking to other roles") } delegationsToVisit = []roleParentTuple{} break } - // Push 'childRolesToVisit' in reverse order of appearance - // onto 'delegationsToVisit'. Roles are popped from the end of + // Push "childRolesToVisit" in reverse order of appearance + // onto "delegationsToVisit". Roles are popped from the end of // the list. reverseSlice(childRolesToVisit) delegationsToVisit = append(delegationsToVisit, childRolesToVisit...) } } if len(delegationsToVisit) > 0 { - log.Debugf("%d roles left to visit, but allowed at most %d delegations", + log.Debugf("%d roles left to visit, but allowed at most %d delegations\n", len(delegationsToVisit), update.config.MaxDelegations) } @@ -450,7 +517,11 @@ func (update *Updater) persistMetadata(roleName string, data []byte) error { err = os.WriteFile(file.Name(), data, 0644) if err != nil { // delete the temporary file if there was an error while writing - os.Remove(file.Name()) + errRemove := os.Remove(file.Name()) + if errRemove != nil { + log.Debugf("Failed to delete temporary file: %w\n", errRemove) + // writing failed and we return either way so better to use the err message of os.WriteFile + } return err } // if all okay, rename the temporary file to the desired one @@ -476,7 +547,7 @@ func (update *Updater) downloadMetadata(roleName string, length int64, version s // generateTargetFilePath generates path from TargetFiles func (update *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, error) { if update.targetDir == "" { - return "", fmt.Errorf("target_dir must be set if filepath is not given") + return "", metadata.ErrValue{Msg: "target_dir must be set if filepath is not given"} } // Use URL encoded target path as filename return url.JoinPath(update.targetDir, url.QueryEscape(tf.Path)) From c486b7fa7dd10a1d92251d6b58dc605d5dc7281b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Feb 2023 01:52:36 +0200 Subject: [PATCH 040/208] chore: update gh workflow and README Signed-off-by: Radoslav Dimitrov --- .github/workflows/tests.yml | 2 +- README.md | 2 +- metadata/updater/updater.go | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed016bb3..af775d5e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,5 +62,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1 with: - version: v1.49 + version: v1.51 # has to be pinned and thus manually updated due to https://github.com/golangci/golangci-lint-action/blob/6a290f7d5d488e1e423b0b37fe802c822ca2c08c/README.md?plain=1#L108 args: --timeout 5m --verbose diff --git a/README.md b/README.md index 9fde3d07..2eee753a 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ the metadata with the caller making decisions on what is updated. * The `fetcher` package defines an interface for abstract network download. -### :construction: - Implement client API - `updater` package +### :white_check_mark: - Implement client API - `updater` package * The `updater` package provides an implementation of the TUF client workflow. It provides ways to query and download target files securely, while handling the diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 25260b7f..3f476e93 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -519,8 +519,7 @@ func (update *Updater) persistMetadata(roleName string, data []byte) error { // delete the temporary file if there was an error while writing errRemove := os.Remove(file.Name()) if errRemove != nil { - log.Debugf("Failed to delete temporary file: %w\n", errRemove) - // writing failed and we return either way so better to use the err message of os.WriteFile + log.Debugf("Failed to delete temporary file: %s\n", file.Name()) } return err } From 70dc7a6f3fe4cd437de41c7044f3df6b5d115670 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Feb 2023 02:11:37 +0200 Subject: [PATCH 041/208] chore: refactor some of the comments Signed-off-by: Radoslav Dimitrov --- metadata/trustedmetadata/trustedmetadata.go | 8 +-- metadata/updater/updater.go | 80 ++++++++++----------- 2 files changed, 43 insertions(+), 45 deletions(-) diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 37b91445..271bcc9f 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -31,14 +31,14 @@ type TrustedMetadata struct { // New creates a new TrustedMetadata instance which ensures that the // collection of metadata in it is valid and trusted through the whole // client update workflow. It provides easy ways to update the metadata -// with the caller making decisions on what is updated. +// with the caller making decisions on what is updated func New(rootData []byte) (*TrustedMetadata, error) { res := &TrustedMetadata{ Targets: map[string]*metadata.Metadata[metadata.TargetsType]{}, RefTime: time.Now().UTC(), } - // load and validate the local root metadata. - // Valid initial trusted root metadata is required + // load and validate the local root metadata + // valid initial trusted root metadata is required err := res.loadTrustedRoot(rootData) if err != nil { return nil, err @@ -48,7 +48,7 @@ func New(rootData []byte) (*TrustedMetadata, error) { // UpdateRoot verifies and loads “rootData“ as new root metadata. // Note that an expired intermediate root is considered valid: expiry is -// only checked for the final root in “UpdateTimestamp()“. +// only checked for the final root in UpdateTimestamp() func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[metadata.RootType], error) { if trusted.Timestamp != nil { return nil, metadata.ErrRuntime{Msg: "cannot update root after timestamp"} diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 3f476e93..389cbd71 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -31,32 +31,32 @@ import ( ) // Client update workflow implementation -// The "Updater" provides an implementation of the `TUF client workflow -// `_. + +type roleParentTuple struct { + Role string + Parent string +} + +// The "Updater" provides an implementation of the TUF client workflow (ref. https://theupdateframework.github.io/specification/latest/#detailed-client-workflow). // "Updater" provides an API to query available targets and to download them in a // secure manner: All downloaded files are verified by signed metadata. // High-level description of "Updater" functionality: // - Initializing an "Updater" loads and validates the trusted local root // metadata: This root metadata is used as the source of trust for all other // metadata. -// - "Refresh()"" can optionally be called to update and load all top-level +// - Refresh() can optionally be called to update and load all top-level // metadata as described in the specification, using both locally cached // metadata and metadata downloaded from the remote repository. If refresh is // not done explicitly, it will happen automatically during the first target // info lookup. -// - "Updater" can be used to download targets. For each target: -// - "GetTargetInfo()"" is first used to find information about a +// - Updater can be used to download targets. For each target: +// - GetTargetInfo() is first used to find information about a // specific target. This will load new targets metadata as needed (from // local cache or remote repository). -// - "FindCachedTarget()"" can optionally be used to check if a +// - FindCachedTarget() can optionally be used to check if a // target file is already locally cached. -// - "DownloadTarget()" downloads a target file and ensures it is +// - DownloadTarget() downloads a target file and ensures it is // verified correct by the metadata. -type roleParentTuple struct { - Role string - Parent string -} - type Updater struct { metadataDir string metadataBaseUrl string @@ -67,7 +67,7 @@ type Updater struct { fetcher fetcher.Fetcher } -// New creates a new “Updater“ instance and loads trusted root metadata. +// New creates a new Updater instance and loads trusted root metadata func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string, f fetcher.Fetcher) (*Updater, error) { // use the built-in download fetcher if nothing is provided if f == nil { @@ -100,15 +100,13 @@ func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string, f fetche // Downloads, verifies, and loads metadata for the top-level roles in the // specified order (root -> timestamp -> snapshot -> targets) implementing // all the checks required in the TUF client workflow. -// A Refresh()“ can be done only once during the lifetime of an Updater. -// If Refresh()“ has not been explicitly called before the first -// “GetTargetInfo()“ call, it will be done implicitly at that time. -// The metadata for delegated roles is not updated by Refresh()“: -// that happens on demand during GetTargetInfo()“. However, if the -// repository uses `consistent_snapshot -// `_, -// then all metadata downloaded by the Updater will use the same consistent -// repository state. +// A Refresh() can be done only once during the lifetime of an Updater. +// If Refresh() has not been explicitly called before the first +// GetTargetInfo() call, it will be done implicitly at that time. +// The metadata for delegated roles is not updated by Refresh(): +// that happens on demand during GetTargetInfo(). However, if the +// repository uses consistent snapshots (ref. https://theupdateframework.github.io/specification/latest/#consistent-snapshots), +// then all metadata downloaded by the Updater will use the same consistent repository state. func (update *Updater) Refresh() error { err := update.loadRoot() if err != nil { @@ -129,11 +127,11 @@ func (update *Updater) Refresh() error { return nil } -// GetTargetInfo returns “metadata.TargetFiles“ instance with information +// GetTargetInfo returns metadata.TargetFiles instance with information // for targetPath. The return value can be used as an argument to -// “DownloadTarget()“ and “FindCachedTarget()“. -// If “Refresh()“ has not been called before calling -// “GetTargetInfo()“, the refresh will be done implicitly. +// DownloadTarget() and FindCachedTarget(). +// If Refresh() has not been called before calling +// GetTargetInfo(), the refresh will be done implicitly. // As a side-effect this method downloads all the additional (delegated // targets) metadata it needs to return the target information. func (update *Updater) GetTargetInfo(targetPath string) (*metadata.TargetFiles, error) { @@ -398,7 +396,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad // loadRoot load remote root metadata. Sequentially load and // persist on local disk every newer root metadata version -// available on the remote. +// available on the remote func (update *Updater) loadRoot() error { // calculate boundaries lowerBound := update.trusted.Root.Signed.Version + 1 @@ -441,25 +439,25 @@ func (update *Updater) loadRoot() error { // and returns the matching target found in the most trusted role. func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata.TargetFiles, error) { // list of delegations to be interrogated. A (role, parent role) pair - // is needed to load and verify the delegated targets metadata. + // is needed to load and verify the delegated targets metadata delegationsToVisit := []roleParentTuple{{ Role: metadata.TARGETS, Parent: metadata.ROOT, }} visitedRoleNames := map[string]bool{} - // pre-order depth-first traversal of the graph of target delegations. + // pre-order depth-first traversal of the graph of target delegations for len(visitedRoleNames) <= update.config.MaxDelegations && len(delegationsToVisit) > 0 { - // pop the role name from the top of the stack. + // pop the role name from the top of the stack delegation := delegationsToVisit[len(delegationsToVisit)-1] delegationsToVisit = delegationsToVisit[:len(delegationsToVisit)-1] - // skip any visited current role to prevent cycles. + // skip any visited current role to prevent cycles _, ok := visitedRoleNames[delegation.Role] if ok { log.Debugf("Skipping visited current role %s\n", delegation.Role) continue } - // The metadata for 'delegation.Role' must be downloaded/updated before - // its targets, delegations, and child roles can be inspected. + // the metadata for delegation.Role must be downloaded/updated before + // its targets, delegations, and child roles can be inspected targets, err := update.loadTargets(delegation.Role, delegation.Parent) if err != nil { return nil, err @@ -469,12 +467,12 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. log.Debugf("Found target in current role %s\n", delegation.Role) return &target, nil } - // After pre-order check, add current role to set of visited roles. + // after pre-order check, add current role to set of visited roles visitedRoleNames[delegation.Role] = true if targets.Signed.Delegations != nil { childRolesToVisit := []roleParentTuple{} - // NOTE: This may be a slow operation if there are many - // delegated roles. + // note that this may be a slow operation if there are many + // delegated roles roles := targets.Signed.Delegations.GetRolesForTarget(targetFilePath) for child, terminating := range roles { log.Debugf("Adding child role %s\n", child) @@ -485,9 +483,9 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. delegationsToVisit = []roleParentTuple{} break } - // Push "childRolesToVisit" in reverse order of appearance - // onto "delegationsToVisit". Roles are popped from the end of - // the list. + // push childRolesToVisit in reverse order of appearance + // onto delegationsToVisit. Roles are popped from the end of + // the list reverseSlice(childRolesToVisit) delegationsToVisit = append(delegationsToVisit, childRolesToVisit...) } @@ -497,11 +495,11 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. len(delegationsToVisit), update.config.MaxDelegations) } - // If this point is reached then target is not found, return nil + // if this point is reached then target is not found, return nil return nil, fmt.Errorf("target %s not found", targetFilePath) } -// persistMetadata writes metadata to disk atomically to avoid data loss. +// persistMetadata writes metadata to disk atomically to avoid data loss func (update *Updater) persistMetadata(roleName string, data []byte) error { fileName := filepath.Join(update.metadataDir, fmt.Sprintf("%s.json", url.QueryEscape(roleName))) cwd, err := os.Getwd() From d330e5b78127b7a74125244fe6c7d59d525407a0 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 13 Feb 2023 12:33:42 +0200 Subject: [PATCH 042/208] fix: root update failed due to wrong err type check Signed-off-by: Radoslav Dimitrov --- metadata/updater/updater.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 389cbd71..254026dd 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -407,7 +407,7 @@ func (update *Updater) loadRoot() error { data, err := update.downloadMetadata(metadata.ROOT, update.config.RootMaxLength, strconv.FormatInt(nextVersion, 10)) if err != nil { // downloading the root metadata failed for some reason - var downloadErr *metadata.ErrDownloadHTTP + var downloadErr metadata.ErrDownloadHTTP if errors.As(err, &downloadErr) { if downloadErr.StatusCode != http.StatusNotFound && downloadErr.StatusCode != http.StatusForbidden { // unexpected HTTP status code From a6d6618475793a250de6948903bf8187578d80c3 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 13 Feb 2023 13:07:26 +0200 Subject: [PATCH 043/208] fix: target update length check Signed-off-by: Radoslav Dimitrov --- metadata/updater/updater.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 254026dd..a7e8f0ee 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -368,7 +368,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad metaInfo := update.trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] // extract the length of the target metadata to be downloaded length := metaInfo.Length - if length != 0 { + if length == 0 { length = update.config.TargetsMaxLength } // extract which target metadata version should be downloaded in case of consistent snapshots From f50c97e3f8c78f8f4bfebed8ecb9fe89ef1db246 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 13 Feb 2023 14:19:35 +0200 Subject: [PATCH 044/208] fix: handle target path matches correctly and add test cases Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 2 +- metadata/metadata_test.go | 78 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index b35ef616..5c9be658 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -474,7 +474,7 @@ func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) return false, nil } else if len(role.Paths) > 0 { for _, pathPattern := range role.Paths { - return filepath.Match(targetFilepath, pathPattern) + return filepath.Match(pathPattern, targetFilepath) } } return false, nil diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index a8e65423..aacd5b33 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -138,3 +138,81 @@ func TestTargetsDefaultValues(t *testing.T) { // Signatures assert.Equal(t, []Signature{}, meta.Signatures) } + +func TestIsDelegatedPath(t *testing.T) { + type pathMatch struct { + Pattern []string + TargetPath string + Expected bool + } + // As per - https://theupdateframework.github.io/specification/latest/#pathpattern + matches := []pathMatch{ + // a PATHPATTERN of "targets/*.tgz" would match file paths "targets/foo.tgz" and "targets/bar.tgz", but not "targets/foo.txt". + { + Pattern: []string{"targets/*.tgz"}, + TargetPath: "targets/foo.tgz", + Expected: true, + }, + { + Pattern: []string{"targets/*.tgz"}, + TargetPath: "targets/bar.tgz", + Expected: true, + }, + { + Pattern: []string{"targets/*.tgz"}, + TargetPath: "targets/foo.txt", + Expected: false, + }, + // a PATHPATTERN of "foo-version-?.tgz" matches "foo-version-2.tgz" and "foo-version-a.tgz", but not "foo-version-alpha.tgz". + { + Pattern: []string{"foo-version-?.tgz"}, + TargetPath: "foo-version-2.tgz", + Expected: true, + }, + { + Pattern: []string{"foo-version-?.tgz"}, + TargetPath: "foo-version-a.tgz", + Expected: true, + }, + { + Pattern: []string{"foo-version-?.tgz"}, + TargetPath: "foo-version-alpha.tgz", + Expected: false, + }, + // a PATHPATTERN of "*.tgz" would match "foo.tgz" and "bar.tgz", but not "targets/foo.tgz" + { + Pattern: []string{"*.tgz"}, + TargetPath: "foo.tgz", + Expected: true, + }, + { + Pattern: []string{"*.tgz"}, + TargetPath: "bar.tgz", + Expected: true, + }, + { + Pattern: []string{"*.tgz"}, + TargetPath: "targets/foo.tgz", + Expected: false, + }, + // a PATHPATTERN of "foo.tgz" would match only "foo.tgz" + { + Pattern: []string{"foo.tgz"}, + TargetPath: "foo.tgz", + Expected: true, + }, + { + Pattern: []string{"foo.tgz"}, + TargetPath: "foosy.tgz", + Expected: false, + }, + } + for _, match := range matches { + role := &DelegatedRole{ + Paths: match.Pattern, + } + ok, err := role.IsDelegatedPath(match.TargetPath) + assert.Equal(t, match.Expected, ok) + assert.Nil(t, err) + } +} From 15e20370dd9ef9d2a73353069e5ffd2a5c967b3f Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 13 Feb 2023 16:20:39 +0200 Subject: [PATCH 045/208] fix: change default value for hash prefixed targets Signed-off-by: Radoslav Dimitrov --- metadata/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/config/config.go b/metadata/config/config.go index bff95f0b..2166ab33 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -31,6 +31,6 @@ func New() *UpdaterConfig { TimestampMaxLength: 16384, // bytes SnapshotMaxLength: 2000000, // bytes TargetsMaxLength: 5000000, // bytes - PrefixTargetsWithHash: true, + PrefixTargetsWithHash: false, } } From 3a20d44fb3f19488e81dca1c2c4f9b50028b34f4 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 13 Feb 2023 16:21:15 +0200 Subject: [PATCH 046/208] fix: populate TargetFiles.Path and do not fail when looking for cached target Signed-off-by: Radoslav Dimitrov --- metadata/updater/updater.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index a7e8f0ee..dfa8e2ec 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -211,12 +211,14 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa // get file content data, err := readFile(targetFilePath) if err != nil { - return "", err + // do not want to return err, instead we say that there's no cached target available + return "", nil } // verify if the length and hashes of this target file match the expected values err = targetFile.VerifyLengthHashes(data) if err != nil { - return "", err + // do not want to return err, instead we say that there's no cached target available + return "", nil } // if all okay, return its path return targetFilePath, nil @@ -465,6 +467,8 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. target, ok := targets.Signed.Targets[targetFilePath] if ok { log.Debugf("Found target in current role %s\n", delegation.Role) + // Probably not pretty, but populate TargetFiles.Path since this is not handled in fromBytes() + target.Path = targetFilePath return &target, nil } // after pre-order check, add current role to set of visited roles From 19bb59f9c7e872f04bdc15db0c68e2f49ec11f1a Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 14 Feb 2023 02:04:33 +0200 Subject: [PATCH 047/208] fix: revert deleted hexbytes methods Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 26 ++++++++++++++++++++++++++ metadata/updater/updater.go | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 5c9be658..66da4549 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -18,6 +18,7 @@ import ( "crypto/sha512" "encoding/hex" "encoding/json" + "errors" "fmt" "hash" "io" @@ -705,3 +706,28 @@ func (signed *TargetsType) RevokeKey(keyID string, role string) error { // TODO: Handle succinct roles return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } + +func (b *HexBytes) UnmarshalJSON(data []byte) error { + if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { + return errors.New("tuf: invalid JSON hex bytes") + } + res := make([]byte, hex.DecodedLen(len(data)-2)) + _, err := hex.Decode(res, data[1:len(data)-1]) + if err != nil { + return err + } + *b = res + return nil +} + +func (b HexBytes) MarshalJSON() ([]byte, error) { + res := make([]byte, hex.EncodedLen(len(b))+2) + res[0] = '"' + res[len(res)-1] = '"' + hex.Encode(res[1:], b) + return res, nil +} + +func (b HexBytes) String() string { + return hex.EncodeToString(b) +} diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index dfa8e2ec..a242c052 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -68,7 +68,7 @@ type Updater struct { } // New creates a new Updater instance and loads trusted root metadata -func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string, f fetcher.Fetcher) (*Updater, error) { +func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir string, f fetcher.Fetcher) (*Updater, error) { // use the built-in download fetcher if nothing is provided if f == nil { f = &fetcher.DefaultFetcher{} @@ -77,8 +77,8 @@ func New(metadataDir, metadataBaseUrl, targetDir, targetBaseUrl string, f fetche updater := &Updater{ metadataDir: metadataDir, metadataBaseUrl: ensureTrailingSlash(metadataBaseUrl), - targetDir: targetDir, targetBaseUrl: ensureTrailingSlash(targetBaseUrl), + targetDir: targetDir, config: config.New(), fetcher: f, } From 0990a8399a83d9ff213fbf4c96c42b4fd3c46924 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 14 Feb 2023 02:08:10 +0200 Subject: [PATCH 048/208] fix: support python-tuf ecdsa keytype value Signed-off-by: Radoslav Dimitrov --- metadata/keys.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/keys.go b/metadata/keys.go index 66f41c5b..798d326e 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -51,7 +51,7 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { return nil, err } return rsaKey, nil - case KeyTypeECDSA_SHA2_P256: + case KeyTypeECDSA_SHA2_P256, "ecdsa": // handle "ecdsa" too as python-tuf keys are using it for keytype instead of https://theupdateframework.github.io/specification/latest/index.html#keytype-ecdsa-sha2-nistp256 publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) if err != nil { return nil, err From fb693a0be06b75ae7a0562d0836e5d6fcaba8291 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 14 Feb 2023 02:09:47 +0200 Subject: [PATCH 049/208] feat: add initial version for client_example.go Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 145 +++++++++++++++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 93449129..7101cc85 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -11,6 +11,149 @@ package main +import ( + "fmt" + "io" + "net/http" + "net/url" + "os" + "path/filepath" + + log "github.com/sirupsen/logrus" + + "github.com/rdimitrov/go-tuf-metadata/metadata/updater" +) + +const ( + // To experiment with a local repository you can build one with the basic_repository.go example and serve it using a python file server + baseURL = "http://localhost:8000" // "https://jku.github.io/tuf-demo" + baseURLMetadataDir = "metadata" + baseURLTargetsDir = "" + targetName = "basic_repository.go" + verbosity = log.InfoLevel +) + func main() { - // TODO + // set debug level + log.SetLevel(verbosity) + + // initialize client with Trust-On-First-Use + localMetadataDir, err := InitTofu() + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to initialize Trust-On-First-Use", err)) + } + + // download the desired target + err = Download(localMetadataDir, targetName) + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to download target file", err)) + } + +} + +// InitTofu initialize local trusted metadata (Trust-On-First-Use) and create a +// directory for downloads +func InitTofu() (string, error) { + // get working directory + cwd, err := os.Getwd() + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to get current working directory", err)) + } + + // create a temporary folder for storing the demo artifacts + tmpDir, err := os.MkdirTemp(cwd, "tmp") + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to create a temporary folder", err)) + } + + // create a destination folder for storing the downloaded target + err = os.Mkdir(filepath.Join(tmpDir, "download"), 0750) + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to create a download folder", err)) + } + + // download the initial root metadata so we can bootstrap Trust-On-First-Use + rootURL, _ := url.JoinPath(baseURL, baseURLMetadataDir, "1.root.json") + req, err := http.NewRequest("GET", rootURL, nil) + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to create http request", err)) + } + + client := http.DefaultClient + + res, err := client.Do(req) + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to executed the http request", err)) + } + + defer res.Body.Close() + + data, err := io.ReadAll(res.Body) + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to read the http request body", err)) + } + + // write the downloaded data content to file + err = os.WriteFile("root.json", data, 0644) + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to write root.json metadata", err)) + } + + log.Info("client_example.go: initialized new root in: ", tmpDir) + + return tmpDir, nil +} + +// Download the target file using Updater. The Updater refreshes the top-level metadata, +// get the target information, verifies if the target is already cached, and in case it +// is not cached, downloads the target file. +func Download(localMetadataDir, target string) error { + metadataBaseURL, _ := url.JoinPath(baseURL, baseURLMetadataDir) + targetsBaseURL, _ := url.JoinPath(baseURL, baseURLTargetsDir) + // create a new Updater instance + up, err := updater.New( + localMetadataDir, + metadataBaseURL, + targetsBaseURL, + filepath.Join(localMetadataDir, "download"), + nil) + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to create Updater instance", err)) + } + + log.Info("client_example.go: created a new Updater instance") + + // try to build the top-level metadata + err = up.Refresh() + if err != nil { + panic(fmt.Sprintln("client_example.go:", "failed to Updater.Refresh()", err)) + } + + log.Info("client_example.go: updater.Refresh() succeeded") + + // search if the desired target is available + targetInfo, err := up.GetTargetInfo(target) + if err != nil { + panic(fmt.Sprintf("client_example.go: target %s not found - %s\n", target, err)) + } + + // target is available, so let's see if the target is already present locally + path, err := up.FindCachedTarget(targetInfo, "") + if err != nil { + panic(fmt.Sprintln("client_example.go: FindCachedTarget failed", err)) + } + if path != "" { + log.Infof("client_example.go: target %s is already present at - %s\n", target, path) + } + + // target is not present locally, so let's try to download it + path, err = up.DownloadTarget(targetInfo, "", "") + if err != nil { + panic(fmt.Sprintf("client_example.go: failed to download target %s - %s\n", target, err)) + } + if path != "" { + log.Infof("client_example.go: successfully downloaded target %s at - %s\n", target, path) + return nil + } + return nil } From ba597e346a6d102e7fc4065473604239888e5675 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 14 Feb 2023 02:11:02 +0200 Subject: [PATCH 050/208] fix: basic_repository.go: targetpath did not match the delegatee path patern Signed-off-by: Radoslav Dimitrov --- examples/repository/basic_repository.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/repository/basic_repository.go b/examples/repository/basic_repository.go index 446ea8b3..da9b6cb9 100644 --- a/examples/repository/basic_repository.go +++ b/examples/repository/basic_repository.go @@ -352,7 +352,7 @@ func main() { // Update snapshot to account for changed and new targets(delegatee) metadata roles.Snapshot().Signed.Meta["targets.json"] = *metadata.MetaFile(roles.Targets("targets").Signed.Version) - roles.Snapshot().Signed.Meta[delegateeName] = *metadata.MetaFile(1) + roles.Snapshot().Signed.Meta[fmt.Sprintf("%s.json", delegateeName)] = *metadata.MetaFile(1) roles.Snapshot().Signed.Version += 1 // Update timestamp to account for changed snapshot metadata @@ -587,6 +587,7 @@ func helperGetPathForTarget(name string) (string, string) { if err != nil { panic(fmt.Sprintln("basic_repository.go:", "getting cwd failed", err)) } - _, dir := filepath.Split(cwd) - return filepath.Join(dir, name), filepath.Join(cwd, name) + // _, dir := filepath.Split(cwd) + // return filepath.Join(dir, name), filepath.Join(cwd, name) + return name, filepath.Join(cwd, name) } From 758d5733165e4110004b657815b395148954c710 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Feb 2023 02:15:00 +0200 Subject: [PATCH 051/208] chore(deps): bump golang.org/x/crypto from 0.5.0 to 0.6.0 (#5) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](https://github.com/golang/crypto/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 6ba2661a..26d83201 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/sigstore/sigstore v1.5.1 github.com/sirupsen/logrus v1.9.0 github.com/stretchr/testify v1.8.1 - golang.org/x/crypto v0.5.0 + golang.org/x/crypto v0.6.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) @@ -20,10 +20,10 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.5.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/net v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/go.sum b/go.sum index 32b92a3e..71871945 100644 --- a/go.sum +++ b/go.sum @@ -51,19 +51,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= From d1b22bab78c53049f00d608f342ab4a306d92195 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 14 Feb 2023 02:24:43 +0200 Subject: [PATCH 052/208] test: add test for ClearSignatures() Signed-off-by: Radoslav Dimitrov --- metadata/metadata_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index aacd5b33..a92532ee 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -216,3 +216,22 @@ func TestIsDelegatedPath(t *testing.T) { assert.Nil(t, err) } } + +func TestClearSignatures(t *testing.T) { + meta := Root() + // verify signatures is empty + assert.Equal(t, []Signature{}, meta.Signatures) + // create a signature + sig := &Signature{ + KeyID: "keyid", + Signature: HexBytes{}, + } + // update the Signatures part + meta.Signatures = append(meta.Signatures, *sig) + // verify signatures is not empty + assert.NotEqual(t, []Signature{}, meta.Signatures) + // clear signatures + meta.ClearSignatures() + // verify signatures is empty + assert.Equal(t, []Signature{}, meta.Signatures) +} From 7c4e6a2201e6141cb077ba72be7e9a767963f731 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 14 Feb 2023 11:50:32 +0200 Subject: [PATCH 053/208] tests: add a few unit tests for metadata Signed-off-by: Radoslav Dimitrov --- metadata/metadata_test.go | 105 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 4 deletions(-) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index a92532ee..b8b80d65 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/assert" ) -func TestRootDefaultValues(t *testing.T) { +func TestDefaultValuesRoot(t *testing.T) { // without setting expiration meta := Root() assert.NotNil(t, meta) @@ -55,7 +55,7 @@ func TestRootDefaultValues(t *testing.T) { assert.Equal(t, []Signature{}, meta.Signatures) } -func TestSnapshotDefaultValues(t *testing.T) { +func TestDefaultValuesSnapshot(t *testing.T) { // without setting expiration meta := Snapshot() assert.NotNil(t, meta) @@ -83,7 +83,7 @@ func TestSnapshotDefaultValues(t *testing.T) { assert.Equal(t, []Signature{}, meta.Signatures) } -func TestTimestampDefaultValues(t *testing.T) { +func TestDefaultValuesTimestamp(t *testing.T) { // without setting expiration meta := Timestamp() assert.NotNil(t, meta) @@ -111,7 +111,7 @@ func TestTimestampDefaultValues(t *testing.T) { assert.Equal(t, []Signature{}, meta.Signatures) } -func TestTargetsDefaultValues(t *testing.T) { +func TestDefaultValuesTargets(t *testing.T) { // without setting expiration meta := Targets() assert.NotNil(t, meta) @@ -139,6 +139,43 @@ func TestTargetsDefaultValues(t *testing.T) { assert.Equal(t, []Signature{}, meta.Signatures) } +func TestDefaultValuesTargetFile(t *testing.T) { + targetFile := TargetFile() + assert.NotNil(t, targetFile) + assert.Equal(t, int64(0), targetFile.Length) + assert.Equal(t, Hashes{}, targetFile.Hashes) +} + +func TestMetaFileDefaultValues(t *testing.T) { + version := int64(0) + metaFile := MetaFile(version) + assert.NotNil(t, metaFile) + assert.Equal(t, int64(0), metaFile.Length) + assert.Equal(t, Hashes{}, metaFile.Hashes) + assert.Equal(t, int64(1), metaFile.Version) + + version = int64(-1) + metaFile = MetaFile(version) + assert.NotNil(t, metaFile) + assert.Equal(t, int64(0), metaFile.Length) + assert.Equal(t, Hashes{}, metaFile.Hashes) + assert.Equal(t, int64(1), metaFile.Version) + + version = int64(1) + metaFile = MetaFile(version) + assert.NotNil(t, metaFile) + assert.Equal(t, int64(0), metaFile.Length) + assert.Equal(t, Hashes{}, metaFile.Hashes) + assert.Equal(t, int64(1), metaFile.Version) + + version = int64(2) + metaFile = MetaFile(version) + assert.NotNil(t, metaFile) + assert.Equal(t, int64(0), metaFile.Length) + assert.Equal(t, Hashes{}, metaFile.Hashes) + assert.Equal(t, int64(2), metaFile.Version) +} + func TestIsDelegatedPath(t *testing.T) { type pathMatch struct { Pattern []string @@ -235,3 +272,63 @@ func TestClearSignatures(t *testing.T) { // verify signatures is empty assert.Equal(t, []Signature{}, meta.Signatures) } + +func TestIsExpiredRoot(t *testing.T) { + // without setting expiration + meta := Root() + assert.NotNil(t, meta) + // ensure time passed + time.Sleep(1 * time.Microsecond) + assert.True(t, meta.Signed.IsExpired(time.Now().UTC())) + + // setting expiration in 2 days from now + expire := time.Now().AddDate(0, 0, 2).UTC() + meta = Root(expire) + assert.NotNil(t, meta) + assert.False(t, meta.Signed.IsExpired(time.Now().UTC())) +} + +func TestIsExpiredSnapshot(t *testing.T) { + // without setting expiration + meta := Snapshot() + assert.NotNil(t, meta) + // ensure time passed + time.Sleep(1 * time.Microsecond) + assert.True(t, meta.Signed.IsExpired(time.Now().UTC())) + + // setting expiration in 2 days from now + expire := time.Now().AddDate(0, 0, 2).UTC() + meta = Snapshot(expire) + assert.NotNil(t, meta) + assert.False(t, meta.Signed.IsExpired(time.Now().UTC())) +} + +func TestIsExpiredTimestamp(t *testing.T) { + // without setting expiration + meta := Timestamp() + assert.NotNil(t, meta) + // ensure time passed + time.Sleep(1 * time.Microsecond) + assert.True(t, meta.Signed.IsExpired(time.Now().UTC())) + + // setting expiration in 2 days from now + expire := time.Now().AddDate(0, 0, 2).UTC() + meta = Timestamp(expire) + assert.NotNil(t, meta) + assert.False(t, meta.Signed.IsExpired(time.Now().UTC())) +} + +func TestIsExpiredTargets(t *testing.T) { + // without setting expiration + meta := Targets() + assert.NotNil(t, meta) + // ensure time passed + time.Sleep(1 * time.Microsecond) + assert.True(t, meta.Signed.IsExpired(time.Now().UTC())) + + // setting expiration in 2 days from now + expire := time.Now().AddDate(0, 0, 2).UTC() + meta = Targets(expire) + assert.NotNil(t, meta) + assert.False(t, meta.Signed.IsExpired(time.Now().UTC())) +} From a4613f6ec4198a6e9a81ef802a0b116a8827c287 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 14 Feb 2023 23:43:19 +0200 Subject: [PATCH 054/208] tests: add tests for custom fields in the Signed part Signed-off-by: Radoslav Dimitrov --- metadata/metadata_test.go | 30 ++++++++++++++++++++++++++++++ metadata/types.go | 32 ++++++++++++++++---------------- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index b8b80d65..0ce4cb95 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -12,6 +12,7 @@ package metadata import ( + "encoding/json" "testing" "time" @@ -332,3 +333,32 @@ func TestIsExpiredTargets(t *testing.T) { assert.NotNil(t, meta) assert.False(t, meta.Signed.IsExpired(time.Now().UTC())) } + +func TestCustomField(t *testing.T) { + expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) + testCustomJSON := json.RawMessage([]byte(`{"test":true}`)) + + root := Root(expire) + root.Signed.Custom = &testCustomJSON + rootJSON, err := root.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"root\",\"spec_version\":\"1.0.31\",\"consistent_snapshot\":true,\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"custom\":{\"test\":true}},\"signatures\":[]}"), rootJSON) + + targets := Targets(expire) + targets.Signed.Custom = &testCustomJSON + targetsJSON, err := targets.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"spec_version\":\"1.0.31\",\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"targets\":{},\"custom\":{\"test\":true}},\"signatures\":[]}"), targetsJSON) + + snapshot := Snapshot(expire) + snapshot.Signed.Custom = &testCustomJSON + snapshotJSON, err := snapshot.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"spec_version\":\"1.0.31\",\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"custom\":{\"test\":true}},\"signatures\":[]}"), snapshotJSON) + + timestamp := Timestamp(expire) + timestamp.Signed.Custom = &testCustomJSON + timestampJSON, err := timestamp.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"spec_version\":\"1.0.31\",\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"custom\":{\"test\":true}},\"signatures\":[]}"), timestampJSON) +} diff --git a/metadata/types.go b/metadata/types.go index a4ff7fc7..db55be82 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -58,7 +58,7 @@ type RootType struct { Expires time.Time `json:"expires"` Keys map[string]*Key `json:"keys"` Roles map[string]*Role `json:"roles"` - Custom json.RawMessage `json:"custom,omitempty"` + Custom *json.RawMessage `json:"custom,omitempty"` } // SnapshotType represents the Signed portion of a snapshot metadata @@ -68,7 +68,7 @@ type SnapshotType struct { Version int64 `json:"version"` Expires time.Time `json:"expires"` Meta map[string]MetaFiles `json:"meta"` - Custom json.RawMessage `json:"custom,omitempty"` + Custom *json.RawMessage `json:"custom,omitempty"` } // TargetsType represents the Signed portion of a targets metadata @@ -79,7 +79,7 @@ type TargetsType struct { Expires time.Time `json:"expires"` Targets map[string]TargetFiles `json:"targets"` Delegations *Delegations `json:"delegations,omitempty"` - Custom json.RawMessage `json:"custom,omitempty"` + Custom *json.RawMessage `json:"custom,omitempty"` } // TimestampType represents the Signed portion of a timestamp metadata @@ -89,15 +89,15 @@ type TimestampType struct { Version int64 `json:"version"` Expires time.Time `json:"expires"` Meta map[string]MetaFiles `json:"meta"` - Custom json.RawMessage `json:"custom,omitempty"` + Custom *json.RawMessage `json:"custom,omitempty"` } // Key represents a key in TUF type Key struct { - Type string `json:"keytype"` - Scheme string `json:"scheme"` - Value KeyVal `json:"keyval"` - Custom json.RawMessage `json:"custom,omitempty"` + Type string `json:"keytype"` + Scheme string `json:"scheme"` + Value KeyVal `json:"keyval"` + Custom *json.RawMessage `json:"custom,omitempty"` id string idOnce sync.Once } @@ -118,18 +118,18 @@ type Hashes map[string]HexBytes // MetaFiles represents the value portion of METAFILES in TUF (used in Snapshot and Timestamp metadata). Used to store information about a particular meta file. type MetaFiles struct { - Length int64 `json:"length,omitempty"` - Hashes Hashes `json:"hashes,omitempty"` - Version int64 `json:"version"` - Custom json.RawMessage `json:"custom,omitempty"` + Length int64 `json:"length,omitempty"` + Hashes Hashes `json:"hashes,omitempty"` + Version int64 `json:"version"` + Custom *json.RawMessage `json:"custom,omitempty"` } // TargetFiles represents the value portion of TARGETS in TUF (used Targets metadata). Used to store information about a particular target file. type TargetFiles struct { - Length int64 `json:"length"` - Hashes Hashes `json:"hashes"` - Custom json.RawMessage `json:"custom,omitempty"` - Path string `json:"-"` + Length int64 `json:"length"` + Hashes Hashes `json:"hashes"` + Custom *json.RawMessage `json:"custom,omitempty"` + Path string `json:"-"` } // Delegations is an optional object which represents delegation roles and their corresponding keys From 5cb4701028ea0083c6242d7ca05484b1c3da0b1b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 15 Feb 2023 12:31:15 +0200 Subject: [PATCH 055/208] chore: refactor client_example.go Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 76 +++++++++++++++++-------------- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 7101cc85..2ec5e4a5 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -26,10 +26,10 @@ import ( const ( // To experiment with a local repository you can build one with the basic_repository.go example and serve it using a python file server - baseURL = "http://localhost:8000" // "https://jku.github.io/tuf-demo" + baseURL = "http://localhost:8000" baseURLMetadataDir = "metadata" baseURLTargetsDir = "" - targetName = "basic_repository.go" + targetName = "basic_repo.py" verbosity = log.InfoLevel ) @@ -37,77 +37,87 @@ func main() { // set debug level log.SetLevel(verbosity) + // initialize environment - temporary folders, etc. + localMetadataDir, err := InitEnvironment() + if err != nil { + log.Fatal("Failed to initialize environment: ", err) + } + // initialize client with Trust-On-First-Use - localMetadataDir, err := InitTofu() + err = InitTrustOnFirstUse() if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to initialize Trust-On-First-Use", err)) + log.Fatal("Trust-On-First-Use failed: ", err) } // download the desired target - err = Download(localMetadataDir, targetName) + err = DownloadTarget(localMetadataDir, targetName) if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to download target file", err)) + log.Fatal("Download failed: ", err) } - } -// InitTofu initialize local trusted metadata (Trust-On-First-Use) and create a -// directory for downloads -func InitTofu() (string, error) { +// InitEnvironment prepares the local environment - temporary folders, etc. +func InitEnvironment() (string, error) { // get working directory cwd, err := os.Getwd() if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to get current working directory", err)) + return "", fmt.Errorf("failed to get current working directory: %w", err) } // create a temporary folder for storing the demo artifacts tmpDir, err := os.MkdirTemp(cwd, "tmp") if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to create a temporary folder", err)) + return "", fmt.Errorf("failed to create a temporary folder: %w", err) } // create a destination folder for storing the downloaded target err = os.Mkdir(filepath.Join(tmpDir, "download"), 0750) if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to create a download folder", err)) + return "", fmt.Errorf("failed to create a download folder: %w", err) } + return tmpDir, nil +} +// InitTrustOnFirstUse initialize local trusted metadata (Trust-On-First-Use) +func InitTrustOnFirstUse() error { // download the initial root metadata so we can bootstrap Trust-On-First-Use - rootURL, _ := url.JoinPath(baseURL, baseURLMetadataDir, "1.root.json") + rootURL, err := url.JoinPath(baseURL, baseURLMetadataDir, "1.root.json") + if err != nil { + return fmt.Errorf("failed to create URL path for 1.root.json: %w", err) + } + req, err := http.NewRequest("GET", rootURL, nil) if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to create http request", err)) + return fmt.Errorf("failed to create http request: %w", err) } client := http.DefaultClient res, err := client.Do(req) if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to executed the http request", err)) + return fmt.Errorf("failed to executed the http request: %w", err) } defer res.Body.Close() data, err := io.ReadAll(res.Body) if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to read the http request body", err)) + return fmt.Errorf("failed to read the http request body: %w", err) } - // write the downloaded data content to file + // write the downloaded root metadata to file err = os.WriteFile("root.json", data, 0644) if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to write root.json metadata", err)) + return fmt.Errorf("failed to write root.json metadata: %w", err) } - log.Info("client_example.go: initialized new root in: ", tmpDir) - - return tmpDir, nil + return nil } -// Download the target file using Updater. The Updater refreshes the top-level metadata, +// DownloadTarget downloads the target file using Updater. The Updater refreshes the top-level metadata, // get the target information, verifies if the target is already cached, and in case it // is not cached, downloads the target file. -func Download(localMetadataDir, target string) error { +func DownloadTarget(localMetadataDir, target string) error { metadataBaseURL, _ := url.JoinPath(baseURL, baseURLMetadataDir) targetsBaseURL, _ := url.JoinPath(baseURL, baseURLTargetsDir) // create a new Updater instance @@ -118,41 +128,37 @@ func Download(localMetadataDir, target string) error { filepath.Join(localMetadataDir, "download"), nil) if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to create Updater instance", err)) + return fmt.Errorf("failed to create Updater instance: %w", err) } - log.Info("client_example.go: created a new Updater instance") - // try to build the top-level metadata err = up.Refresh() if err != nil { - panic(fmt.Sprintln("client_example.go:", "failed to Updater.Refresh()", err)) + return fmt.Errorf("failed to refresh trusted metadata: %w", err) } - log.Info("client_example.go: updater.Refresh() succeeded") - // search if the desired target is available targetInfo, err := up.GetTargetInfo(target) if err != nil { - panic(fmt.Sprintf("client_example.go: target %s not found - %s\n", target, err)) + return fmt.Errorf("target %s not found: %w", target, err) } // target is available, so let's see if the target is already present locally path, err := up.FindCachedTarget(targetInfo, "") if err != nil { - panic(fmt.Sprintln("client_example.go: FindCachedTarget failed", err)) + return fmt.Errorf("failed while finding a cached target: %w", err) } if path != "" { - log.Infof("client_example.go: target %s is already present at - %s\n", target, path) + log.Infof("Target %s is already present at - %s\n", target, path) } // target is not present locally, so let's try to download it path, err = up.DownloadTarget(targetInfo, "", "") if err != nil { - panic(fmt.Sprintf("client_example.go: failed to download target %s - %s\n", target, err)) + return fmt.Errorf("failed to download target file %s - %w", target, err) } if path != "" { - log.Infof("client_example.go: successfully downloaded target %s at - %s\n", target, path) + log.Infof("Successfully downloaded target %s at - %s\n", target, path) return nil } return nil From ff1420381cd30aaab9b4ecb3dc89e7cc1f785cf8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:14:32 +0200 Subject: [PATCH 056/208] chore(deps): bump github.com/secure-systems-lab/go-securesystemslib (#6) Bumps [github.com/secure-systems-lab/go-securesystemslib](https://github.com/secure-systems-lab/go-securesystemslib) from 0.4.0 to 0.5.0. - [Release notes](https://github.com/secure-systems-lab/go-securesystemslib/releases) - [Commits](https://github.com/secure-systems-lab/go-securesystemslib/compare/v0.4.0...v0.5.0) --- updated-dependencies: - dependency-name: github.com/secure-systems-lab/go-securesystemslib dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 26d83201..30e9ffe0 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/rdimitrov/go-tuf-metadata go 1.19 require ( - github.com/secure-systems-lab/go-securesystemslib v0.4.0 + github.com/secure-systems-lab/go-securesystemslib v0.5.0 github.com/sigstore/sigstore v1.5.1 github.com/sirupsen/logrus v1.9.0 github.com/stretchr/testify v1.8.1 diff --git a/go.sum b/go.sum index 71871945..403c28a9 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,8 @@ github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPk github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= -github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= +github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= +github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= github.com/sigstore/sigstore v1.5.1 h1:iUou0QJW8eQKMUkTXbFyof9ZOblDtfaW2Sn2+QI8Tcs= github.com/sigstore/sigstore v1.5.1/go.mod h1:3i6UTWVNtFwOtbgG63FZZNID4vO9KcO8AszIJlaNI8k= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= From 7e41c9fa72469d5020422e8ceb08db4fdbe4ce5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:27:30 +0200 Subject: [PATCH 057/208] chore(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#7) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 30e9ffe0..efbf7ca1 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.6.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect diff --git a/go.sum b/go.sum index 403c28a9..a8b8d768 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 66725e1a25c818f44503290479834d66537707fa Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 19 Feb 2023 00:22:27 +0200 Subject: [PATCH 058/208] chore: disable length check until it is not reliable Signed-off-by: Radoslav Dimitrov --- metadata/fetcher/fetcher.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index 83ed9110..4d0c1991 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -12,10 +12,8 @@ package fetcher import ( - "fmt" "io" "net/http" - "strconv" "github.com/rdimitrov/go-tuf-metadata/metadata" ) @@ -51,15 +49,16 @@ func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64) ([]byte, if res.StatusCode == http.StatusNotFound || res.StatusCode == http.StatusForbidden || res.StatusCode != http.StatusOK { return nil, metadata.ErrDownloadHTTP{StatusCode: res.StatusCode, URL: urlPath} } - // get content length - length, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) - if err != nil { - return nil, err - } - // error if the reported size is greater than what is expected - if length > maxLength { - return nil, metadata.ErrDownloadLengthMismatch{Msg: fmt.Sprintf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength)} - } + // TODO: handle content length correctly as we should not rely on the Content-Length header + // // get content length + // length, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) + // if err != nil { + // return nil, err + // } + // // error if the reported size is greater than what is expected + // if length > maxLength { + // return nil, metadata.ErrDownloadLengthMismatch{Msg: fmt.Sprintf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength)} + // } // although the size has been checked above, use a LimitReader in case // the reported size is inaccurate, or size is -1 which indicates an // unknown length From 525c190b2cd3734fe9c7027fd028668f410b06de Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 19 Feb 2023 00:53:28 +0200 Subject: [PATCH 059/208] feat: add support for unrecognized json fields Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 443 +++++++++++++++++++++++++++++++++++++++++++ metadata/types.go | 109 ++++++----- 2 files changed, 504 insertions(+), 48 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 66da4549..fc8a8ecf 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -731,3 +731,446 @@ func (b HexBytes) MarshalJSON() ([]byte, error) { func (b HexBytes) String() string { return hex.EncodeToString(b) } + +func (signed RootType) MarshalJSON() ([]byte, error) { + dict := signed.UnrecognizedFields + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["consistent_snapshot"] = signed.ConsistentSnapshot + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["keys"] = signed.Keys + dict["roles"] = signed.Roles + if signed.Custom != nil { + dict["custom"] = signed.Custom + } + return json.Marshal(dict) +} + +func (signed *RootType) UnmarshalJSON(data []byte) error { + type Alias RootType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = RootType(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "consistent_snapshot") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "keys") + delete(dict, "roles") + delete(dict, "custom") + signed.UnrecognizedFields = dict + return nil +} + +func (signed SnapshotType) MarshalJSON() ([]byte, error) { + dict := signed.UnrecognizedFields + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["meta"] = signed.Meta + if signed.Custom != nil { + dict["custom"] = signed.Custom + } + return json.Marshal(dict) +} + +func (signed *SnapshotType) UnmarshalJSON(data []byte) error { + type Alias SnapshotType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = SnapshotType(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "meta") + delete(dict, "custom") + signed.UnrecognizedFields = dict + return nil +} + +func (signed TimestampType) MarshalJSON() ([]byte, error) { + dict := signed.UnrecognizedFields + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["meta"] = signed.Meta + if signed.Custom != nil { + dict["custom"] = signed.Custom + } + return json.Marshal(dict) +} + +func (signed *TimestampType) UnmarshalJSON(data []byte) error { + type Alias TimestampType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = TimestampType(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "meta") + delete(dict, "custom") + signed.UnrecognizedFields = dict + return nil +} + +func (signed TargetsType) MarshalJSON() ([]byte, error) { + dict := signed.UnrecognizedFields + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["targets"] = signed.Targets + if signed.Delegations != nil { + dict["delegations"] = signed.Delegations + } + if signed.Custom != nil { + dict["custom"] = signed.Custom + } + return json.Marshal(dict) +} + +func (signed *TargetsType) UnmarshalJSON(data []byte) error { + type Alias TargetsType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = TargetsType(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "targets") + delete(dict, "delegations") + delete(dict, "custom") + signed.UnrecognizedFields = dict + return nil +} + +func (signed MetaFiles) MarshalJSON() ([]byte, error) { + dict := signed.UnrecognizedFields + if signed.Length != 0 { + dict["length"] = signed.Length + } + if signed.Hashes != nil { + dict["hashes"] = signed.Hashes + } + dict["version"] = signed.Version + if signed.Custom != nil { + dict["custom"] = signed.Custom + } + return json.Marshal(dict) +} + +func (signed *MetaFiles) UnmarshalJSON(data []byte) error { + type Alias MetaFiles + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = MetaFiles(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "length") + delete(dict, "hashes") + delete(dict, "version") + delete(dict, "custom") + signed.UnrecognizedFields = dict + return nil +} + +func (signed TargetFiles) MarshalJSON() ([]byte, error) { + dict := signed.UnrecognizedFields + dict["length"] = signed.Length + dict["hashes"] = signed.Hashes + if signed.Custom != nil { + dict["custom"] = signed.Custom + } + return json.Marshal(dict) +} + +func (signed *TargetFiles) UnmarshalJSON(data []byte) error { + type Alias TargetFiles + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = TargetFiles(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "length") + delete(dict, "hashes") + delete(dict, "custom") + signed.UnrecognizedFields = dict + return nil +} + +func (k *Key) MarshalJSON() ([]byte, error) { + dict := k.UnrecognizedFields + dict["keytype"] = k.Type + dict["scheme"] = k.Scheme + dict["keyval"] = k.Value + if k.Custom != nil { + dict["custom"] = k.Custom + } + return json.Marshal(dict) +} + +func (k *Key) UnmarshalJSON(data []byte) error { + type Alias Key + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *k = Key(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keytype") + delete(dict, "scheme") + delete(dict, "keyval") + delete(dict, "custom") + k.UnrecognizedFields = dict + return nil +} + +func (meta *Metadata[T]) MarshalJSON() ([]byte, error) { + dict := meta.UnrecognizedFields + dict["signed"] = meta.Signed + dict["signatures"] = meta.Signatures + return json.Marshal(dict) +} + +func (meta *Metadata[T]) UnmarshalJSON(data []byte) error { + tmp := any(new(T)) + var m map[string]any + if err := json.Unmarshal(data, &m); err != nil { + return err + } + switch tmp.(type) { + case *RootType: + dict := struct { + Signed RootType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + case *SnapshotType: + dict := struct { + Signed SnapshotType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + case *TimestampType: + dict := struct { + Signed TimestampType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + case *TargetsType: + dict := struct { + Signed TargetsType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + default: + return ErrValue{Msg: "unrecognized metadata type"} + } + delete(m, "signed") + delete(m, "signatures") + meta.UnrecognizedFields = m + return nil +} + +func (s Signature) MarshalJSON() ([]byte, error) { + dict := s.UnrecognizedFields + dict["keyid"] = s.KeyID + dict["sig"] = s.Signature + return json.Marshal(dict) +} + +func (s *Signature) UnmarshalJSON(data []byte) error { + type Alias Signature + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *s = Signature(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keyid") + delete(dict, "sig") + s.UnrecognizedFields = dict + return nil +} + +func (kv KeyVal) MarshalJSON() ([]byte, error) { + dict := kv.UnrecognizedFields + dict["public"] = kv.PublicKey + return json.Marshal(dict) +} + +func (kv *KeyVal) UnmarshalJSON(data []byte) error { + type Alias KeyVal + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *kv = KeyVal(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "public") + kv.UnrecognizedFields = dict + return nil +} + +func (r *Role) MarshalJSON() ([]byte, error) { + dict := r.UnrecognizedFields + dict["keyids"] = r.KeyIDs + dict["threshold"] = r.Threshold + return json.Marshal(dict) +} + +func (r *Role) UnmarshalJSON(data []byte) error { + type Alias Role + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *r = Role(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keyids") + delete(dict, "threshold") + r.UnrecognizedFields = dict + return nil +} + +func (d *Delegations) MarshalJSON() ([]byte, error) { + dict := d.UnrecognizedFields + dict["keys"] = d.Keys + dict["roles"] = d.Roles + return json.Marshal(dict) +} + +func (d *Delegations) UnmarshalJSON(data []byte) error { + type Alias Delegations + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *d = Delegations(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keys") + delete(dict, "roles") + d.UnrecognizedFields = dict + return nil +} + +func (d DelegatedRole) MarshalJSON() ([]byte, error) { + dict := d.UnrecognizedFields + dict["name"] = d.Name + dict["keyids"] = d.KeyIDs + dict["threshold"] = d.Threshold + dict["terminating"] = d.Terminating + dict["paths"] = d.Paths + if d.PathHashPrefixes != nil { + dict["path_hash_prefixes"] = d.PathHashPrefixes + } + return json.Marshal(dict) +} + +func (d *DelegatedRole) UnmarshalJSON(data []byte) error { + type Alias DelegatedRole + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *d = DelegatedRole(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "name") + delete(dict, "keyids") + delete(dict, "threshold") + delete(dict, "terminating") + delete(dict, "paths") + delete(dict, "path_hash_prefixes") + d.UnrecognizedFields = dict + return nil +} diff --git a/metadata/types.go b/metadata/types.go index db55be82..c2f39a37 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -39,14 +39,16 @@ const ( // Provides methods to read and write to and // from file and bytes, also to create, verify and clear metadata signatures. type Metadata[T Roles] struct { - Signed T `json:"signed"` - Signatures []Signature `json:"signatures"` + Signed T `json:"signed"` + Signatures []Signature `json:"signatures"` + UnrecognizedFields map[string]any `json:"-"` } // Signature represents the Signature part of a TUF metadata type Signature struct { - KeyID string `json:"keyid"` - Signature HexBytes `json:"sig"` + KeyID string `json:"keyid"` + Signature HexBytes `json:"sig"` + UnrecognizedFields map[string]any `json:"-"` } // RootType represents the Signed portion of a root metadata @@ -59,57 +61,64 @@ type RootType struct { Keys map[string]*Key `json:"keys"` Roles map[string]*Role `json:"roles"` Custom *json.RawMessage `json:"custom,omitempty"` + UnrecognizedFields map[string]any `json:"-"` } // SnapshotType represents the Signed portion of a snapshot metadata type SnapshotType struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta map[string]MetaFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Meta map[string]MetaFiles `json:"meta"` + Custom *json.RawMessage `json:"custom,omitempty"` + UnrecognizedFields map[string]any `json:"-"` } // TargetsType represents the Signed portion of a targets metadata type TargetsType struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Targets map[string]TargetFiles `json:"targets"` - Delegations *Delegations `json:"delegations,omitempty"` - Custom *json.RawMessage `json:"custom,omitempty"` + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Targets map[string]TargetFiles `json:"targets"` + Delegations *Delegations `json:"delegations,omitempty"` + Custom *json.RawMessage `json:"custom,omitempty"` + UnrecognizedFields map[string]any `json:"-"` } // TimestampType represents the Signed portion of a timestamp metadata type TimestampType struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta map[string]MetaFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Meta map[string]MetaFiles `json:"meta"` + Custom *json.RawMessage `json:"custom,omitempty"` + UnrecognizedFields map[string]any `json:"-"` } // Key represents a key in TUF type Key struct { - Type string `json:"keytype"` - Scheme string `json:"scheme"` - Value KeyVal `json:"keyval"` - Custom *json.RawMessage `json:"custom,omitempty"` - id string - idOnce sync.Once + Type string `json:"keytype"` + Scheme string `json:"scheme"` + Value KeyVal `json:"keyval"` + Custom *json.RawMessage `json:"custom,omitempty"` + id string `json:"-"` + idOnce sync.Once `json:"-"` + UnrecognizedFields map[string]any `json:"-"` } type KeyVal struct { - PublicKey string `json:"public"` + PublicKey string `json:"public"` + UnrecognizedFields map[string]any `json:"-"` } // Role represents one of the top-level roles in TUF type Role struct { - KeyIDs []string `json:"keyids"` - Threshold int `json:"threshold"` + KeyIDs []string `json:"keyids"` + Threshold int `json:"threshold"` + UnrecognizedFields map[string]any `json:"-"` } type HexBytes []byte @@ -118,32 +127,36 @@ type Hashes map[string]HexBytes // MetaFiles represents the value portion of METAFILES in TUF (used in Snapshot and Timestamp metadata). Used to store information about a particular meta file. type MetaFiles struct { - Length int64 `json:"length,omitempty"` - Hashes Hashes `json:"hashes,omitempty"` - Version int64 `json:"version"` - Custom *json.RawMessage `json:"custom,omitempty"` + Length int64 `json:"length,omitempty"` + Hashes Hashes `json:"hashes,omitempty"` + Version int64 `json:"version"` + Custom *json.RawMessage `json:"custom,omitempty"` + UnrecognizedFields map[string]any `json:"-"` } // TargetFiles represents the value portion of TARGETS in TUF (used Targets metadata). Used to store information about a particular target file. type TargetFiles struct { - Length int64 `json:"length"` - Hashes Hashes `json:"hashes"` - Custom *json.RawMessage `json:"custom,omitempty"` - Path string `json:"-"` + Length int64 `json:"length"` + Hashes Hashes `json:"hashes"` + Custom *json.RawMessage `json:"custom,omitempty"` + Path string `json:"-"` + UnrecognizedFields map[string]any `json:"-"` } // Delegations is an optional object which represents delegation roles and their corresponding keys type Delegations struct { - Keys map[string]*Key `json:"keys"` - Roles []DelegatedRole `json:"roles"` + Keys map[string]*Key `json:"keys"` + Roles []DelegatedRole `json:"roles"` + UnrecognizedFields map[string]any `json:"-"` } // DelegatedRole represents a delegated role in TUF 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"` + 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"` + UnrecognizedFields map[string]any `json:"-"` } From 66626797188eb71cbdd926c0135fdf66d5c5f878 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 19 Feb 2023 01:01:38 +0200 Subject: [PATCH 060/208] chore: use Jussi's github demo as a repository for the client_example.go Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 2ec5e4a5..4a970031 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -24,12 +24,12 @@ import ( "github.com/rdimitrov/go-tuf-metadata/metadata/updater" ) +// The following config is used to fetch a target from Jussi's GitHub repository example const ( - // To experiment with a local repository you can build one with the basic_repository.go example and serve it using a python file server - baseURL = "http://localhost:8000" + baseURL = "https://jku.github.io/tuf-demo" baseURLMetadataDir = "metadata" - baseURLTargetsDir = "" - targetName = "basic_repo.py" + baseURLTargetsDir = "targets" + targetName = "file1.txt" verbosity = log.InfoLevel ) From ab3f2d7b6ebff3fd0c5e1edb0699bc43bbc89233 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 20 Feb 2023 23:41:12 +0200 Subject: [PATCH 061/208] fix: check for nil when marshaling unrecognized metadata fields Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 74 +++++++++++++++++++++++++++++++++++--------- metadata/types.go | 2 +- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index fc8a8ecf..0715246a 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -733,7 +733,10 @@ func (b HexBytes) String() string { } func (signed RootType) MarshalJSON() ([]byte, error) { - dict := signed.UnrecognizedFields + dict := map[string]any{} + if signed.UnrecognizedFields != nil { + dict = signed.UnrecognizedFields + } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion dict["consistent_snapshot"] = signed.ConsistentSnapshot @@ -772,7 +775,10 @@ func (signed *RootType) UnmarshalJSON(data []byte) error { } func (signed SnapshotType) MarshalJSON() ([]byte, error) { - dict := signed.UnrecognizedFields + dict := map[string]any{} + if signed.UnrecognizedFields != nil { + dict = signed.UnrecognizedFields + } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion dict["version"] = signed.Version @@ -807,7 +813,10 @@ func (signed *SnapshotType) UnmarshalJSON(data []byte) error { } func (signed TimestampType) MarshalJSON() ([]byte, error) { - dict := signed.UnrecognizedFields + dict := map[string]any{} + if signed.UnrecognizedFields != nil { + dict = signed.UnrecognizedFields + } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion dict["version"] = signed.Version @@ -842,7 +851,10 @@ func (signed *TimestampType) UnmarshalJSON(data []byte) error { } func (signed TargetsType) MarshalJSON() ([]byte, error) { - dict := signed.UnrecognizedFields + dict := map[string]any{} + if signed.UnrecognizedFields != nil { + dict = signed.UnrecognizedFields + } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion dict["version"] = signed.Version @@ -881,7 +893,10 @@ func (signed *TargetsType) UnmarshalJSON(data []byte) error { } func (signed MetaFiles) MarshalJSON() ([]byte, error) { - dict := signed.UnrecognizedFields + dict := map[string]any{} + if signed.UnrecognizedFields != nil { + dict = signed.UnrecognizedFields + } if signed.Length != 0 { dict["length"] = signed.Length } @@ -916,7 +931,10 @@ func (signed *MetaFiles) UnmarshalJSON(data []byte) error { } func (signed TargetFiles) MarshalJSON() ([]byte, error) { - dict := signed.UnrecognizedFields + dict := map[string]any{} + if signed.UnrecognizedFields != nil { + dict = signed.UnrecognizedFields + } dict["length"] = signed.Length dict["hashes"] = signed.Hashes if signed.Custom != nil { @@ -945,7 +963,10 @@ func (signed *TargetFiles) UnmarshalJSON(data []byte) error { } func (k *Key) MarshalJSON() ([]byte, error) { - dict := k.UnrecognizedFields + dict := map[string]any{} + if k.UnrecognizedFields != nil { + dict = k.UnrecognizedFields + } dict["keytype"] = k.Type dict["scheme"] = k.Scheme dict["keyval"] = k.Value @@ -976,7 +997,10 @@ func (k *Key) UnmarshalJSON(data []byte) error { } func (meta *Metadata[T]) MarshalJSON() ([]byte, error) { - dict := meta.UnrecognizedFields + dict := map[string]any{} + if meta.UnrecognizedFields != nil { + dict = meta.UnrecognizedFields + } dict["signed"] = meta.Signed dict["signatures"] = meta.Signatures return json.Marshal(dict) @@ -1043,7 +1067,10 @@ func (meta *Metadata[T]) UnmarshalJSON(data []byte) error { } func (s Signature) MarshalJSON() ([]byte, error) { - dict := s.UnrecognizedFields + dict := map[string]any{} + if s.UnrecognizedFields != nil { + dict = s.UnrecognizedFields + } dict["keyid"] = s.KeyID dict["sig"] = s.Signature return json.Marshal(dict) @@ -1068,7 +1095,10 @@ func (s *Signature) UnmarshalJSON(data []byte) error { } func (kv KeyVal) MarshalJSON() ([]byte, error) { - dict := kv.UnrecognizedFields + dict := map[string]any{} + if kv.UnrecognizedFields != nil { + dict = kv.UnrecognizedFields + } dict["public"] = kv.PublicKey return json.Marshal(dict) } @@ -1091,7 +1121,10 @@ func (kv *KeyVal) UnmarshalJSON(data []byte) error { } func (r *Role) MarshalJSON() ([]byte, error) { - dict := r.UnrecognizedFields + dict := map[string]any{} + if r.UnrecognizedFields != nil { + dict = r.UnrecognizedFields + } dict["keyids"] = r.KeyIDs dict["threshold"] = r.Threshold return json.Marshal(dict) @@ -1116,7 +1149,10 @@ func (r *Role) UnmarshalJSON(data []byte) error { } func (d *Delegations) MarshalJSON() ([]byte, error) { - dict := d.UnrecognizedFields + dict := map[string]any{} + if d.UnrecognizedFields != nil { + dict = d.UnrecognizedFields + } dict["keys"] = d.Keys dict["roles"] = d.Roles return json.Marshal(dict) @@ -1141,13 +1177,21 @@ func (d *Delegations) UnmarshalJSON(data []byte) error { } func (d DelegatedRole) MarshalJSON() ([]byte, error) { - dict := d.UnrecognizedFields + dict := map[string]any{} + if d.UnrecognizedFields != nil { + dict = d.UnrecognizedFields + } dict["name"] = d.Name dict["keyids"] = d.KeyIDs dict["threshold"] = d.Threshold dict["terminating"] = d.Terminating - dict["paths"] = d.Paths - if d.PathHashPrefixes != nil { + // make sure we have only one of the two (per spec) + if d.Paths != nil && d.PathHashPrefixes != nil { + return nil, ErrValue{Msg: "failed to marshal: not allowed to have both \"paths\" and \"path_hash_prefixes\" present"} + } + if d.Paths != nil { + dict["paths"] = d.Paths + } else if d.PathHashPrefixes != nil { dict["path_hash_prefixes"] = d.PathHashPrefixes } return json.Marshal(dict) diff --git a/metadata/types.go b/metadata/types.go index c2f39a37..c21fd820 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -157,6 +157,6 @@ type DelegatedRole struct { Threshold int `json:"threshold"` Terminating bool `json:"terminating"` PathHashPrefixes []string `json:"path_hash_prefixes,omitempty"` - Paths []string `json:"paths"` + Paths []string `json:"paths,omitempty"` UnrecognizedFields map[string]any `json:"-"` } From 0ec31d1100dd5c8d696b8d2606ef8e7742529ac6 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 21 Feb 2023 00:07:50 +0200 Subject: [PATCH 062/208] docs: update the readme Signed-off-by: Radoslav Dimitrov --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2eee753a..d8d3fb4e 100644 --- a/README.md +++ b/README.md @@ -52,47 +52,47 @@ The example highlights the following functionality supported by the metadata API * writing and reading metadata files * root key rotation -## Roadmap +There's also a [client_example.go](examples/client/client_example.go) which demonstrates how to implement a client using the [updater](metadata/updater/updater.go) package. + +* it uses [https://jku.github.io/tuf-demo](https://jku.github.io/tuf-demo), a live TUF repository hosted on GitHub +* shows an example of how to initialize a client +* shows an example of how to download a target file +* it's worth noting that the repository is based on python-tuf so it also highlights the interoperability between the two implementations + +## Overview of the implementation ---------------------------- -### :white_check_mark: - Implement the `metadata` API +### The `metadata` package -* The `metadata` API provides access to a Metadata file abstraction that closely +* The `metadata` package provides access to a Metadata file abstraction that closely follows the TUF specification’s document formats. This API handles de/serialization to and from files and bytes, covers also the process to create and verify metadata signatures and makes it easier to access and modify metadata content. It is purely focused on individual pieces of Metadata and provides no concepts like “repository” or “update workflow”. -### :white_check_mark: - Recreate the `basic_repo.py` example - -* The example demonstrates how to *manually* create and -maintain repository metadata using the low-level Metadata API. - -### :white_check_mark: - Implement client API - `trustedmetadata` package +### The `trustedmetadata` package * A `TrustedMetadata` instance ensures that the collection of metadata in it is valid and trusted through the whole client update workflow. It provides easy ways to update the metadata with the caller making decisions on what is updated. -### :white_check_mark: - Implement client API - `config` package +### The `config` package -* The `config` package is used to store ``Updater`` configuration. +* The `config` package is used to store configuration for an ``Updater`` instance. -### :white_check_mark: - Implement client API - `fetcher` package +### The `fetcher` package * The `fetcher` package defines an interface for abstract network download. -### :white_check_mark: - Implement client API - `updater` package +### The `updater` package * The `updater` package provides an implementation of the TUF client workflow. It provides ways to query and download target files securely, while handling the TUF update workflow behind the scenes. It is implemented on top of the Metadata API and can be used to implement various TUF clients with relatively little effort. -### :soon: - Implement repository API (standalone package built on top of metadata, to be split into several other tasks) - ## Documentation ---------------------------- From 9c80731c5842b243a2cca6d7b799110dcefb6d3c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 22 Feb 2023 12:53:55 +0200 Subject: [PATCH 063/208] fix: add workaround to support sslib key type value of ecdsa Signed-off-by: Radoslav Dimitrov --- metadata/keys.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/metadata/keys.go b/metadata/keys.go index 798d326e..32d11256 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -26,12 +26,13 @@ import ( ) const ( - KeyTypeEd25519 = "ed25519" - KeyTypeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" - KeyTypeRSASSA_PSS_SHA256 = "rsa" - KeySchemeEd25519 = "ed25519" - KeySchemeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" - KeySchemeRSASSA_PSS_SHA256 = "rsassa-pss-sha256" + KeyTypeEd25519 = "ed25519" + KeyTypeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" + KeyTypeECDSA_SHA2_P256_SSLIB = "ecdsa" + KeyTypeRSASSA_PSS_SHA256 = "rsa" + KeySchemeEd25519 = "ed25519" + KeySchemeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" + KeySchemeRSASSA_PSS_SHA256 = "rsassa-pss-sha256" ) // ToPublicKey generate crypto.PublicKey from metadata type Key @@ -51,7 +52,7 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { return nil, err } return rsaKey, nil - case KeyTypeECDSA_SHA2_P256, "ecdsa": // handle "ecdsa" too as python-tuf keys are using it for keytype instead of https://theupdateframework.github.io/specification/latest/index.html#keytype-ecdsa-sha2-nistp256 + case KeyTypeECDSA_SHA2_P256, KeyTypeECDSA_SHA2_P256_SSLIB: // handle "ecdsa" too as python-tuf/sslib keys are using it for keytype instead of https://theupdateframework.github.io/specification/latest/index.html#keytype-ecdsa-sha2-nistp256 publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) if err != nil { return nil, err From b62a1aa01cac22cdd908601c1378b4a0a83ca0ed Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 23 Feb 2023 14:32:49 +0200 Subject: [PATCH 064/208] feat: add support for succinct roles and hashbin delegations Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 2 +- metadata/metadata.go | 419 +++++++++++++++++++++--------- metadata/types.go | 13 +- 3 files changed, 314 insertions(+), 120 deletions(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 4a970031..405eb141 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -29,7 +29,7 @@ const ( baseURL = "https://jku.github.io/tuf-demo" baseURLMetadataDir = "metadata" baseURLTargetsDir = "targets" - targetName = "file1.txt" + targetName = "demo/succinctly-delegated-5.txt" verbosity = log.InfoLevel ) diff --git a/metadata/metadata.go b/metadata/metadata.go index 0715246a..3d4ed14e 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -16,14 +16,18 @@ import ( "crypto" "crypto/sha256" "crypto/sha512" + "encoding/binary" "encoding/hex" "encoding/json" "errors" "fmt" "hash" "io" + "math" "os" "path/filepath" + "strconv" + "strings" "time" "github.com/secure-systems-lab/go-securesystemslib/cjson" @@ -46,7 +50,7 @@ func Root(expires ...time.Time) *Metadata[RootType] { Threshold: 1, } } - log.Debugf("Created a metadata of type %s expiring at %s\n", ROOT, expires[0]) + log.Debugf("Created a metadata of type %s\n", ROOT) return &Metadata[RootType]{ Signed: RootType{ Type: ROOT, @@ -67,7 +71,7 @@ func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s expiring at %s\n", SNAPSHOT, expires[0]) + log.Debugf("Created a metadata of type %s\n", SNAPSHOT) return &Metadata[SnapshotType]{ Signed: SnapshotType{ Type: SNAPSHOT, @@ -90,7 +94,7 @@ func Timestamp(expires ...time.Time) *Metadata[TimestampType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s expiring at %s\n", TIMESTAMP, expires[0]) + log.Debugf("Created a metadata of type %s\n", TIMESTAMP) return &Metadata[TimestampType]{ Signed: TimestampType{ Type: TIMESTAMP, @@ -113,7 +117,7 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s expiring at %s\n", TARGETS, expires[0]) + log.Debugf("Created a metadata of type %s\n", TARGETS) return &Metadata[TargetsType]{ Signed: TargetsType{ Type: TARGETS, @@ -232,67 +236,90 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { return sig, nil } -// VerifyDelegate verifies that “delegated_metadata“ is signed with the required -// threshold of keys for the delegated role “delegated_role“ -func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadata any) error { +// VerifyDelegate verifies that delegatedMetadata is signed with the required +// threshold of keys for the delegated role delegatedRole +func (meta *Metadata[T]) VerifyDelegate(delegatedRole string, delegatedMetadata any) error { + i := any(meta) + signingKeys := map[string]bool{} var keys map[string]*Key var roleKeyIDs []string var roleThreshold int - signing_keys := map[string]bool{} - i := any(meta) - log.Debugf("Verifying %s\n", delegated_role) + + log.Debugf("Verifying %s\n", delegatedRole) + // collect keys, keyIDs and threshold based on delegator type switch i := i.(type) { + // Root delegator case *Metadata[RootType]: keys = i.Signed.Keys - if role, ok := (*i).Signed.Roles[delegated_role]; ok { + if role, ok := (*i).Signed.Roles[delegatedRole]; ok { roleKeyIDs = role.KeyIDs roleThreshold = role.Threshold } else { - return ErrValue{Msg: fmt.Sprintf("no delegation found for %s", delegated_role)} + // the delegated role was not found, no need to proceed + return ErrValue{Msg: fmt.Sprintf("no delegation found for %s", delegatedRole)} } + // Targets delegator case *Metadata[TargetsType]: + if i.Signed.Delegations == nil { + return ErrValue{Msg: "no delegations found"} + } keys = i.Signed.Delegations.Keys - for _, v := range i.Signed.Delegations.Roles { - if v.Name == delegated_role { - roleKeyIDs = v.KeyIDs - roleThreshold = v.Threshold - break + if i.Signed.Delegations.Roles != nil { + found := false + for _, v := range i.Signed.Delegations.Roles { + if v.Name == delegatedRole { + found = true + roleKeyIDs = v.KeyIDs + roleThreshold = v.Threshold + break + } + } + // the delegated role was not found, no need to proceed + if !found { + return ErrValue{Msg: fmt.Sprintf("no delegation found for %s", delegatedRole)} } + } else if i.Signed.Delegations.SuccinctRoles != nil { + roleKeyIDs = i.Signed.Delegations.SuccinctRoles.KeyIDs + roleThreshold = i.Signed.Delegations.SuccinctRoles.Threshold } default: return ErrType{Msg: "call is valid only on delegator metadata (should be either root or targets)"} } // if there are no keyIDs for that role it means there's no delegation found if len(roleKeyIDs) == 0 { - return ErrValue{Msg: fmt.Sprintf("no delegation found for %s", delegated_role)} + return ErrValue{Msg: fmt.Sprintf("no delegation found for %s", delegatedRole)} } // loop through each role keyID - for _, v := range roleKeyIDs { + for _, keyID := range roleKeyIDs { + key, ok := keys[keyID] + if !ok { + return ErrValue{Msg: fmt.Sprintf("key with ID %s not found in %s keyids", keyID, delegatedRole)} + } sign := Signature{} var payload []byte // convert to a PublicKey type - key, err := keys[v].ToPublicKey() + publicKey, err := key.ToPublicKey() if err != nil { return err } // use corresponding hash function for key type hash := crypto.Hash(0) - if keys[v].Type != KeyTypeEd25519 { + if key.Type != KeyTypeEd25519 { hash = crypto.SHA256 } // load a verifier based on that key - verifier, err := signature.LoadVerifier(key, hash) + verifier, err := signature.LoadVerifier(publicKey, hash) if err != nil { return err } // collect the signature for that key and build the payload we'll verify // based on the Signed part of the delegated metadata - switch d := delegated_metadata.(type) { + switch d := delegatedMetadata.(type) { case *Metadata[RootType]: - for _, s := range d.Signatures { - if s.KeyID == v { - sign = s + for _, signature := range d.Signatures { + if signature.KeyID == keyID { + sign = signature } } payload, err = cjson.EncodeCanonical(d.Signed) @@ -300,9 +327,9 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat return err } case *Metadata[SnapshotType]: - for _, s := range d.Signatures { - if s.KeyID == v { - sign = s + for _, signature := range d.Signatures { + if signature.KeyID == keyID { + sign = signature } } payload, err = cjson.EncodeCanonical(d.Signed) @@ -310,9 +337,9 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat return err } case *Metadata[TimestampType]: - for _, s := range d.Signatures { - if s.KeyID == v { - sign = s + for _, signature := range d.Signatures { + if signature.KeyID == keyID { + sign = signature } } payload, err = cjson.EncodeCanonical(d.Signed) @@ -320,9 +347,9 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat return err } case *Metadata[TargetsType]: - for _, s := range d.Signatures { - if s.KeyID == v { - sign = s + for _, signature := range d.Signatures { + if signature.KeyID == keyID { + sign = signature } } payload, err = cjson.EncodeCanonical(d.Signed) @@ -335,19 +362,19 @@ func (meta *Metadata[T]) VerifyDelegate(delegated_role string, delegated_metadat // verify if the signature for that payload corresponds to the given key if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err != nil { // failed to verify the metadata with that key ID - log.Debugf("Failed to verify %s with key ID %s\n", delegated_role, v) + log.Debugf("Failed to verify %s with key ID %s\n", delegatedRole, keyID) } else { // save the verified keyID only if verification passed - signing_keys[v] = true - log.Debugf("Verified %s with key ID %s\n", delegated_role, v) + signingKeys[keyID] = true + log.Debugf("Verified %s with key ID %s\n", delegatedRole, keyID) } } // check if the amount of valid signatures is enough - if len(signing_keys) < roleThreshold { - log.Infof("Verifying %s failed, not enough signatures, got %d, want %d\n", delegated_role, len(signing_keys), roleThreshold) - return ErrUnsignedMetadata{Msg: fmt.Sprintf("Verifying %s failed, not enough signatures, got %d, want %d", delegated_role, len(signing_keys), roleThreshold)} + if len(signingKeys) < roleThreshold { + log.Infof("Verifying %s failed, not enough signatures, got %d, want %d\n", delegatedRole, len(signingKeys), roleThreshold) + return ErrUnsignedMetadata{Msg: fmt.Sprintf("Verifying %s failed, not enough signatures, got %d, want %d", delegatedRole, len(signingKeys), roleThreshold)} } - log.Infof("Verified %s successfully\n", delegated_role) + log.Infof("Verified %s successfully\n", delegatedRole) return nil } @@ -470,13 +497,19 @@ func (meta *Metadata[T]) ClearSignatures() { // IsDelegatedPath determines whether the given "targetFilepath" is in one of // the paths that "DelegatedRole" is trusted to provide func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) { - if len(role.PathHashPrefixes) > 0 { - // TODO: handle succinct roles - return false, nil - } else if len(role.Paths) > 0 { + if len(role.Paths) > 0 { + // standard delegations for _, pathPattern := range role.Paths { return filepath.Match(pathPattern, targetFilepath) } + } else if len(role.PathHashPrefixes) > 0 { + // hash bin delegations - calculate the hash of the filepath to determine in which bin to find the target. + targetFilepathHash := sha256.Sum256([]byte(targetFilepath)) + for _, pathHashPrefix := range role.PathHashPrefixes { + if strings.HasPrefix(string(targetFilepathHash[:]), pathHashPrefix) { + return true, nil + } + } } return false, nil } @@ -485,18 +518,92 @@ func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) // delegated roles who are responsible for targetFilepath func (role *Delegations) GetRolesForTarget(targetFilepath string) map[string]bool { res := map[string]bool{} - if len(role.Roles) > 0 { + // standard delegations + if role.Roles != nil { for _, r := range role.Roles { ok, err := r.IsDelegatedPath(targetFilepath) if err == nil && ok { res[r.Name] = r.Terminating } } + } else if role.SuccinctRoles != nil { + // SuccinctRoles delegations + res = role.SuccinctRoles.GetRolesForTarget(targetFilepath) + } + return res +} + +// GetRolesForTarget calculate the name of the delegated role responsible for "targetFilepath". +// The target at path "targetFilepath" is assigned to a bin by casting +// the left-most "BitLength" of bits of the file path hash digest to +// int, using it as bin index between 0 and “2**BitLength - 1“. +func (role *SuccinctRoles) GetRolesForTarget(targetFilepath string) map[string]bool { + // calculate the suffixLen value based on the total number of bins in + // hex. If bit_length = 10 then numberOfBins = 1024 or bin names will + // have a suffix between "000" and "3ff" in hex and suffixLen will be 3 + // meaning the third bin will have a suffix of "003" + numberOfBins := math.Pow(2, float64(role.BitLength)) + // suffixLen is calculated based on "numberOfBins - 1" as the name + // of the last bin contains the number "numberOfBins -1" as a suffix. + suffixLen := len(strconv.FormatInt(int64(numberOfBins-1), 16)) + + targetFilepathHash := sha256.Sum256([]byte(targetFilepath)) + // we can't ever need more than 4 bytes (32 bits) + hashBytes := targetFilepathHash[:4] + + // right shift hash bytes, so that we only have the leftmost + // bit_length bits that we care about + shiftValue := 32 - role.BitLength + binNumber := binary.BigEndian.Uint32(hashBytes) >> shiftValue + // add zero padding if necessary and cast to hex the suffix + suffix := fmt.Sprintf("%0*x", suffixLen, binNumber) + // we consider all succinct_roles as terminating. + // for more information read TAP 15. + return map[string]bool{fmt.Sprintf("%s-%s", role.NamePrefix, suffix): true} +} + +// GetRoles returns the names of all different delegated roles +func (role *SuccinctRoles) GetRoles() []string { + res := []string{} + numberOfBins := int(math.Pow(2, float64(role.BitLength))) + suffixLen := len(strconv.FormatInt(int64(numberOfBins-1), 16)) + + for binNumber := 0; binNumber < numberOfBins; binNumber++ { + suffix := fmt.Sprintf("%0*x", suffixLen, binNumber) + res = append(res, fmt.Sprintf("%s-%s", role.NamePrefix, suffix)) } - // TODO: handle succinct roles return res } +// IsDelegatedRole returns whether the given roleName is in one of +// the delegated roles that “SuccinctRoles“ represents +func (role *SuccinctRoles) IsDelegatedRole(roleName string) bool { + numberOfBins := int(math.Pow(2, float64(role.BitLength))) + suffixLen := len(strconv.FormatInt(int64(numberOfBins-1), 16)) + + expectedPrefix := fmt.Sprintf("%s-", role.NamePrefix) + + // check if the roleName prefix is what we would expect + if !strings.HasPrefix(roleName, expectedPrefix) { + return false + } + + // check if the roleName suffix length is what we would expect + suffix := roleName[len(expectedPrefix):] + if len(suffix) != suffixLen { + return false + } + + // make sure suffix is hex value and get bin number + value, err := strconv.ParseInt(suffix, 16, 64) + if err != nil { + return false + } + + // check if the bin we calculated is indeed within the range of what we support + return (value >= 0) && (int(value) < numberOfBins) +} + // fromBytes return a *Metadata[T] object from bytes and verifies // that the data corresponds to the caller struct type func fromBytes[T Roles](data []byte) (*Metadata[T], error) { @@ -645,25 +752,37 @@ func (signed *RootType) RevokeKey(keyID, role string) error { // AddKey adds new signing key for delegated role "role" // key: Signing key to be added for “role“. // role: Name of the role, for which “key“ is added. +// If SuccinctRoles is used then the "role" argument can be ignored. func (signed *TargetsType) AddKey(key *Key, role string) error { // check if Delegations are even present if signed.Delegations == nil { return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } - // loop through all delegated roles - for i, d := range signed.Delegations.Roles { - // if role is found - if d.Name == role { - // add key if keyID is not already part of keyIDs for that role - if !slices.Contains(d.KeyIDs, key.ID()) { - signed.Delegations.Roles[i].KeyIDs = append(signed.Delegations.Roles[i].KeyIDs, key.ID()) - signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? - return nil + // standard delegated roles + if signed.Delegations.Roles != nil { + // loop through all delegated roles + for i, d := range signed.Delegations.Roles { + // if role is found + if d.Name == role { + // add key if keyID is not already part of keyIDs for that role + if !slices.Contains(d.KeyIDs, key.ID()) { + signed.Delegations.Roles[i].KeyIDs = append(signed.Delegations.Roles[i].KeyIDs, key.ID()) + signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? + return nil + } + log.Debugf("Delegated role %s already has keyID %s\n", role, key.ID()) } - log.Debugf("Delegated role %s already has keyID %s\n", role, key.ID()) } + } else if signed.Delegations.SuccinctRoles != nil { + // add key if keyID is not already part of keyIDs for the SuccinctRoles role + if !slices.Contains(signed.Delegations.SuccinctRoles.KeyIDs, key.ID()) { + signed.Delegations.SuccinctRoles.KeyIDs = append(signed.Delegations.SuccinctRoles.KeyIDs, key.ID()) + signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? + return nil + } + log.Debugf("SuccinctRoles role already has keyID %s\n", key.ID()) + } - // TODO: Handle succinct roles return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } @@ -675,35 +794,61 @@ func (signed *TargetsType) RevokeKey(keyID string, role string) error { if signed.Delegations == nil { return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } - // loop through all delegated roles - for i, d := range signed.Delegations.Roles { - // if role is found - if d.Name == role { - // check if keyID is present in keyIDs for that role - if !slices.Contains(d.KeyIDs, keyID) { - return ErrValue{Msg: fmt.Sprintf("key with id %s is not used by %s", keyID, role)} - } - // remove keyID from role - filteredKeyIDs := []string{} - for _, k := range signed.Delegations.Roles[i].KeyIDs { - if k != keyID { - filteredKeyIDs = append(filteredKeyIDs, k) + // standard delegated roles + if signed.Delegations.Roles != nil { + found := false + // loop through all delegated roles + for i, d := range signed.Delegations.Roles { + // if role is found + if d.Name == role { + found = true + // check if keyID is present in keyIDs for that role + if !slices.Contains(d.KeyIDs, keyID) { + return ErrValue{Msg: fmt.Sprintf("key with id %s is not used by %s", keyID, role)} } - } - // overwrite the old keyID slice for that role - signed.Delegations.Roles[i].KeyIDs = filteredKeyIDs - // check if keyID is used by other roles too - for _, r := range signed.Delegations.Roles { - if slices.Contains(r.KeyIDs, keyID) { - return nil + // remove keyID from role + filteredKeyIDs := []string{} + for _, k := range signed.Delegations.Roles[i].KeyIDs { + if k != keyID { + filteredKeyIDs = append(filteredKeyIDs, k) + } } + // overwrite the old keyID slice for that role + signed.Delegations.Roles[i].KeyIDs = filteredKeyIDs + // check if keyID is used by other roles too + for _, r := range signed.Delegations.Roles { + if slices.Contains(r.KeyIDs, keyID) { + return nil + } + } + // delete the keyID from Keys if it's not used anywhere else + delete(signed.Delegations.Keys, keyID) + return nil } - // delete the keyID from Keys if it's not used anywhere else - delete(signed.Delegations.Keys, keyID) - return nil } + // we haven't found the delegated role + if !found { + return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} + } + } else if signed.Delegations.SuccinctRoles != nil { + // check if keyID is used by SuccinctRoles role + if !slices.Contains(signed.Delegations.SuccinctRoles.KeyIDs, keyID) { + return ErrValue{Msg: fmt.Sprintf("key with id %s is not used by SuccinctRoles", keyID)} + } + // remove keyID from the SuccinctRoles role + filteredKeyIDs := []string{} + for _, k := range signed.Delegations.SuccinctRoles.KeyIDs { + if k != keyID { + filteredKeyIDs = append(filteredKeyIDs, k) + } + } + // overwrite the old keyID slice for SuccinctRoles role + signed.Delegations.SuccinctRoles.KeyIDs = filteredKeyIDs + + // delete the keyID from Keys since it can not be used anywhere else + delete(signed.Delegations.Keys, keyID) + return nil } - // TODO: Handle succinct roles return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } @@ -962,27 +1107,27 @@ func (signed *TargetFiles) UnmarshalJSON(data []byte) error { return nil } -func (k *Key) MarshalJSON() ([]byte, error) { +func (key *Key) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if k.UnrecognizedFields != nil { - dict = k.UnrecognizedFields + if key.UnrecognizedFields != nil { + dict = key.UnrecognizedFields } - dict["keytype"] = k.Type - dict["scheme"] = k.Scheme - dict["keyval"] = k.Value - if k.Custom != nil { - dict["custom"] = k.Custom + dict["keytype"] = key.Type + dict["scheme"] = key.Scheme + dict["keyval"] = key.Value + if key.Custom != nil { + dict["custom"] = key.Custom } return json.Marshal(dict) } -func (k *Key) UnmarshalJSON(data []byte) error { +func (key *Key) UnmarshalJSON(data []byte) error { type Alias Key var a Alias if err := json.Unmarshal(data, &a); err != nil { return err } - *k = Key(a) + *key = Key(a) var dict map[string]any if err := json.Unmarshal(data, &dict); err != nil { @@ -992,7 +1137,7 @@ func (k *Key) UnmarshalJSON(data []byte) error { delete(dict, "scheme") delete(dict, "keyval") delete(dict, "custom") - k.UnrecognizedFields = dict + key.UnrecognizedFields = dict return nil } @@ -1120,23 +1265,23 @@ func (kv *KeyVal) UnmarshalJSON(data []byte) error { return nil } -func (r *Role) MarshalJSON() ([]byte, error) { +func (role *Role) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if r.UnrecognizedFields != nil { - dict = r.UnrecognizedFields + if role.UnrecognizedFields != nil { + dict = role.UnrecognizedFields } - dict["keyids"] = r.KeyIDs - dict["threshold"] = r.Threshold + dict["keyids"] = role.KeyIDs + dict["threshold"] = role.Threshold return json.Marshal(dict) } -func (r *Role) UnmarshalJSON(data []byte) error { +func (role *Role) UnmarshalJSON(data []byte) error { type Alias Role var a Alias if err := json.Unmarshal(data, &a); err != nil { return err } - *r = Role(a) + *role = Role(a) var dict map[string]any if err := json.Unmarshal(data, &dict); err != nil { @@ -1144,7 +1289,7 @@ func (r *Role) UnmarshalJSON(data []byte) error { } delete(dict, "keyids") delete(dict, "threshold") - r.UnrecognizedFields = dict + role.UnrecognizedFields = dict return nil } @@ -1153,8 +1298,13 @@ func (d *Delegations) MarshalJSON() ([]byte, error) { if d.UnrecognizedFields != nil { dict = d.UnrecognizedFields } + // only one is allowed dict["keys"] = d.Keys - dict["roles"] = d.Roles + if d.Roles != nil { + dict["roles"] = d.Roles + } else if d.SuccinctRoles != nil { + dict["succinct_roles"] = d.SuccinctRoles + } return json.Marshal(dict) } @@ -1172,38 +1322,39 @@ func (d *Delegations) UnmarshalJSON(data []byte) error { } delete(dict, "keys") delete(dict, "roles") + delete(dict, "succinct_roles") d.UnrecognizedFields = dict return nil } -func (d DelegatedRole) MarshalJSON() ([]byte, error) { +func (role DelegatedRole) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if d.UnrecognizedFields != nil { - dict = d.UnrecognizedFields + if role.UnrecognizedFields != nil { + dict = role.UnrecognizedFields } - dict["name"] = d.Name - dict["keyids"] = d.KeyIDs - dict["threshold"] = d.Threshold - dict["terminating"] = d.Terminating + dict["name"] = role.Name + dict["keyids"] = role.KeyIDs + dict["threshold"] = role.Threshold + dict["terminating"] = role.Terminating // make sure we have only one of the two (per spec) - if d.Paths != nil && d.PathHashPrefixes != nil { + if role.Paths != nil && role.PathHashPrefixes != nil { return nil, ErrValue{Msg: "failed to marshal: not allowed to have both \"paths\" and \"path_hash_prefixes\" present"} } - if d.Paths != nil { - dict["paths"] = d.Paths - } else if d.PathHashPrefixes != nil { - dict["path_hash_prefixes"] = d.PathHashPrefixes + if role.Paths != nil { + dict["paths"] = role.Paths + } else if role.PathHashPrefixes != nil { + dict["path_hash_prefixes"] = role.PathHashPrefixes } return json.Marshal(dict) } -func (d *DelegatedRole) UnmarshalJSON(data []byte) error { +func (role *DelegatedRole) UnmarshalJSON(data []byte) error { type Alias DelegatedRole var a Alias if err := json.Unmarshal(data, &a); err != nil { return err } - *d = DelegatedRole(a) + *role = DelegatedRole(a) var dict map[string]any if err := json.Unmarshal(data, &dict); err != nil { @@ -1215,6 +1366,38 @@ func (d *DelegatedRole) UnmarshalJSON(data []byte) error { delete(dict, "terminating") delete(dict, "paths") delete(dict, "path_hash_prefixes") - d.UnrecognizedFields = dict + role.UnrecognizedFields = dict + return nil +} + +func (role *SuccinctRoles) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if role.UnrecognizedFields != nil { + dict = role.UnrecognizedFields + } + dict["keyids"] = role.KeyIDs + dict["threshold"] = role.Threshold + dict["bit_length"] = role.BitLength + dict["name_prefix"] = role.NamePrefix + return json.Marshal(dict) +} + +func (role *SuccinctRoles) UnmarshalJSON(data []byte) error { + type Alias SuccinctRoles + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *role = SuccinctRoles(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keyids") + delete(dict, "threshold") + delete(dict, "bit_length") + delete(dict, "name_prefix") + role.UnrecognizedFields = dict return nil } diff --git a/metadata/types.go b/metadata/types.go index c21fd820..506b6032 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -146,7 +146,8 @@ type TargetFiles struct { // Delegations is an optional object which represents delegation roles and their corresponding keys type Delegations struct { Keys map[string]*Key `json:"keys"` - Roles []DelegatedRole `json:"roles"` + Roles []DelegatedRole `json:"roles,omitempty"` + SuccinctRoles *SuccinctRoles `json:"succinct_roles,omitempty"` UnrecognizedFields map[string]any `json:"-"` } @@ -160,3 +161,13 @@ type DelegatedRole struct { Paths []string `json:"paths,omitempty"` UnrecognizedFields map[string]any `json:"-"` } + +// SuccinctRoles represents a delegation graph that covers all targets, +// distributing them uniformly over the delegated roles (i.e. bins) in the graph. +type SuccinctRoles struct { + KeyIDs []string `json:"keyids"` + Threshold int `json:"threshold"` + BitLength int `json:"bit_length"` + NamePrefix string `json:"name_prefix"` + UnrecognizedFields map[string]any `json:"-"` +} From df3e810408fa7c02144dfe032d1964d783ef452b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 24 Feb 2023 22:45:16 +0200 Subject: [PATCH 065/208] chore: add an option to specify trusted root path in Updater Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 16 ++- .../repository/testdata/1.go-scripts.json | 22 ---- examples/repository/testdata/1.root.json | 83 ------------- examples/repository/testdata/1.snapshot.json | 19 --- examples/repository/testdata/1.targets.json | 22 ---- examples/repository/testdata/2.root.json | 87 -------------- examples/repository/testdata/2.snapshot.json | 22 ---- examples/repository/testdata/2.targets.json | 39 ------ examples/repository/testdata/3.root.json | 111 ------------------ examples/repository/testdata/timestamp.json | 19 --- go.mod | 3 + go.sum | 8 ++ metadata/updater/updater.go | 13 +- 13 files changed, 34 insertions(+), 430 deletions(-) delete mode 100644 examples/repository/testdata/1.go-scripts.json delete mode 100644 examples/repository/testdata/1.root.json delete mode 100644 examples/repository/testdata/1.snapshot.json delete mode 100644 examples/repository/testdata/1.targets.json delete mode 100644 examples/repository/testdata/2.root.json delete mode 100644 examples/repository/testdata/2.snapshot.json delete mode 100644 examples/repository/testdata/2.targets.json delete mode 100644 examples/repository/testdata/3.root.json delete mode 100644 examples/repository/testdata/timestamp.json diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 405eb141..44dc0cd7 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -33,6 +33,15 @@ const ( verbosity = log.InfoLevel ) +// The following config is used to fetch a target from a local RSTUF deployment +// const ( +// baseURL = "http://127.0.0.1:8080" +// baseURLMetadataDir = "" +// baseURLTargetsDir = "" +// targetName = "file2.tar.gz" +// verbosity = log.InfoLevel +// ) + func main() { // set debug level log.SetLevel(verbosity) @@ -44,7 +53,7 @@ func main() { } // initialize client with Trust-On-First-Use - err = InitTrustOnFirstUse() + err = InitTrustOnFirstUse(localMetadataDir) if err != nil { log.Fatal("Trust-On-First-Use failed: ", err) } @@ -79,7 +88,7 @@ func InitEnvironment() (string, error) { } // InitTrustOnFirstUse initialize local trusted metadata (Trust-On-First-Use) -func InitTrustOnFirstUse() error { +func InitTrustOnFirstUse(metadataDir string) error { // download the initial root metadata so we can bootstrap Trust-On-First-Use rootURL, err := url.JoinPath(baseURL, baseURLMetadataDir, "1.root.json") if err != nil { @@ -106,7 +115,7 @@ func InitTrustOnFirstUse() error { } // write the downloaded root metadata to file - err = os.WriteFile("root.json", data, 0644) + err = os.WriteFile(filepath.Join(metadataDir, "root.json"), data, 0644) if err != nil { return fmt.Errorf("failed to write root.json metadata: %w", err) } @@ -126,6 +135,7 @@ func DownloadTarget(localMetadataDir, target string) error { metadataBaseURL, targetsBaseURL, filepath.Join(localMetadataDir, "download"), + localMetadataDir, nil) if err != nil { return fmt.Errorf("failed to create Updater instance: %w", err) diff --git a/examples/repository/testdata/1.go-scripts.json b/examples/repository/testdata/1.go-scripts.json deleted file mode 100644 index b408f7de..00000000 --- a/examples/repository/testdata/1.go-scripts.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0.31", - "version": 1, - "expires": "2022-12-16T00:00:16.544976Z", - "targets": { - "repository/basic_repository.go": { - "length": 23594, - "hashes": { - "sha256": "105490713c14383c130878c1eb0f4837e4f0b47bcaaff285115c3413e6eed5f4" - } - } - } - }, - "signatures": [ - { - "keyid": "a40e836cb2c2b4ebec806dabc04776d859c74bd6346e9c3e4cc88157d68fffc9", - "sig": "fd9112808c961129e0e2a0cd4524451c77901d5577b38a1bbc9ce7b4e2b7fbc0a2c281d0966ea328058e0b2f7a94ee6afb4c47f1e08704dd71e45fef6b5fae0d" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/1.root.json b/examples/repository/testdata/1.root.json deleted file mode 100644 index 1d20d415..00000000 --- a/examples/repository/testdata/1.root.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0.31", - "consistent_snapshot": true, - "version": 1, - "expires": "2023-12-09T00:00:16.538097Z", - "keys": { - "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "077d70bef29d5b496b22561be7be17af95e318a556cdfb195fe1a6b140a7eac7" - } - }, - "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "04fa05d46a50ef8a35afd6c8f67c5b752f9824922f7e41af848b2a2edc8cff25" - } - }, - "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "b1647e286d229259065b227e86c2a84eb0d88141abba09579b8b2ddb06ad16ec" - } - }, - "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "81ab7f1c19b5a0fc12be460993dda3338e8405ee751690d352016b8538daef76" - } - }, - "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "7ad61ccd09b5b4459e87e8e5a6b8c834bcaa26a20d8f844cfb8dc14636a1b5be" - } - } - }, - "roles": { - "root": { - "keyids": [ - "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", - "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4" - ], - "threshold": 2 - }, - "snapshot": { - "keyids": [ - "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9" - ], - "threshold": 1 - } - } - }, - "signatures": [ - { - "keyid": "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", - "sig": "4f3f91e4a13aada1213232f5f3bb84399a21da5348e7525aa442abbb6897e32d3b1d4f3a1f091323695fa514dd84df56c35599318fefb631177170365682e60e" - }, - { - "keyid": "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", - "sig": "db1d5e1d5233127850acd20f97fe4a1d22660dfea816ca31a9e56c32c434429b581df2385c896f501bb26bcad88d9001ad995d6548c345ad0306bd5214c74b07" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/1.snapshot.json b/examples/repository/testdata/1.snapshot.json deleted file mode 100644 index 2fbe9ab8..00000000 --- a/examples/repository/testdata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0.31", - "version": 1, - "expires": "2022-12-16T00:00:16.538096Z", - "meta": { - "targets.json": { - "version": 1 - } - } - }, - "signatures": [ - { - "keyid": "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3", - "sig": "2c817d996706610509ecddba407a80f8e3fd235399c9dbf22a1e4f7fd6fe20f629666ffb04e110f719bde56770f63bf03c758e7118fe1629d8c6da9d2cc5e10e" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/1.targets.json b/examples/repository/testdata/1.targets.json deleted file mode 100644 index ddb74038..00000000 --- a/examples/repository/testdata/1.targets.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0.31", - "version": 1, - "expires": "2022-12-16T00:00:16.536956Z", - "targets": { - "repository/basic_repository.go": { - "length": 23594, - "hashes": { - "sha256": "105490713c14383c130878c1eb0f4837e4f0b47bcaaff285115c3413e6eed5f4" - } - } - } - }, - "signatures": [ - { - "keyid": "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78", - "sig": "b4531e7087f08bae58b0138001829b594ccc31085f93a5849cf0327a07bb79180ccff8c02728c5aec29d1fec13433249951e9474eb9bd2cb3711efe3e76d320e" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/2.root.json b/examples/repository/testdata/2.root.json deleted file mode 100644 index 01350310..00000000 --- a/examples/repository/testdata/2.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0.31", - "consistent_snapshot": true, - "version": 2, - "expires": "2023-12-09T00:00:16.538097Z", - "keys": { - "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "077d70bef29d5b496b22561be7be17af95e318a556cdfb195fe1a6b140a7eac7" - } - }, - "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "6fcdb8fc3fda4dab409ed144f8fd9eb908fd73c2242c59a5a89f3ed80f911c81" - } - }, - "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "b1647e286d229259065b227e86c2a84eb0d88141abba09579b8b2ddb06ad16ec" - } - }, - "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "81ab7f1c19b5a0fc12be460993dda3338e8405ee751690d352016b8538daef76" - } - }, - "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "7ad61ccd09b5b4459e87e8e5a6b8c834bcaa26a20d8f844cfb8dc14636a1b5be" - } - } - }, - "roles": { - "root": { - "keyids": [ - "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", - "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5" - ], - "threshold": 2 - }, - "snapshot": { - "keyids": [ - "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9" - ], - "threshold": 1 - } - } - }, - "signatures": [ - { - "keyid": "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", - "sig": "3b10bfcb0f5e71fec7949f1165dd2e9175eebbee075ba8e8eeea7ebb6debf642b56030082a0e11b06a1a7fabe34a542456645f2f8a803997adcbbae6b5ba9805" - }, - { - "keyid": "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", - "sig": "5c247a72ca3426b8c89419a153994c85127d8cfba90ae584e0f0fe5f126705dfc90294f33207f4a810f9f07458dae071cfb366aac83e51c84c7a85c075ff240b" - }, - { - "keyid": "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5", - "sig": "f56a4d7b5c063c4425ca2e1cfa5509946bede3d66dd6b13252948f8ce8550d5f8213e4add944ecfe46c2f193564863cec1ae37718fa396e2b170743f7eaae703" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/2.snapshot.json b/examples/repository/testdata/2.snapshot.json deleted file mode 100644 index fcb00e6d..00000000 --- a/examples/repository/testdata/2.snapshot.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signed": { - "_type": "snapshot", - "spec_version": "1.0.31", - "version": 2, - "expires": "2022-12-16T00:00:16.538096Z", - "meta": { - "go-scripts": { - "version": 1 - }, - "targets.json": { - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3", - "sig": "eb1f29892d804c2a20ab0346e6303f0593542c5f9c8401e1b32e705570a62f9a8f251003fa8970c0e33bb257db428b21fa524c070fc5bc8a86ec6458d0e58c06" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/2.targets.json b/examples/repository/testdata/2.targets.json deleted file mode 100644 index e776cf26..00000000 --- a/examples/repository/testdata/2.targets.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "signed": { - "_type": "targets", - "spec_version": "1.0.31", - "version": 2, - "expires": "2023-12-09T00:00:16.544996Z", - "targets": {}, - "delegations": { - "keys": { - "a40e836cb2c2b4ebec806dabc04776d859c74bd6346e9c3e4cc88157d68fffc9": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "51befa736b161c783cbe1c017142e57cd520193ddfa36b0b5b7ba46bb5b0a4dc" - } - } - }, - "roles": [ - { - "name": "go-scripts", - "keyids": [ - "a40e836cb2c2b4ebec806dabc04776d859c74bd6346e9c3e4cc88157d68fffc9" - ], - "threshold": 1, - "terminating": true, - "paths": [ - "*.go" - ] - } - ] - } - }, - "signatures": [ - { - "keyid": "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78", - "sig": "34387ad53b0373b7c9008060f753038baa33216ca267bea07de7ff6b7034546d9561ffe50fe936521df7488d85a28c9d72981270567ed694f38a919abc79bf04" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/3.root.json b/examples/repository/testdata/3.root.json deleted file mode 100644 index b76717db..00000000 --- a/examples/repository/testdata/3.root.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "signed": { - "_type": "root", - "spec_version": "1.0.31", - "consistent_snapshot": true, - "version": 3, - "expires": "2023-12-09T00:00:16.538097Z", - "keys": { - "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "077d70bef29d5b496b22561be7be17af95e318a556cdfb195fe1a6b140a7eac7" - } - }, - "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "6fcdb8fc3fda4dab409ed144f8fd9eb908fd73c2242c59a5a89f3ed80f911c81" - } - }, - "878488d81d52dc7b297741795406694694c4295393175991b09cb0fa3d44f880": { - "keytype": "rsa", - "scheme": "rsassa-pss-sha256", - "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxSSy2UWTWlco3hYH1FUD\nn8COxD3GQ+ZQNntu5yOrA7yfd/01M5GJr00ZY2MObkohCR2d0jAu6iKx4k8PWw7y\nFXMmRVykQsO0QdYcJ4akTnnQFbmzZmpbwIN4NE0D89T26N5BZS8mzZynPu72Z2hJ\nPKK27bqMRrI74JbvRAx/3cUgPFBqI+FhSK91hSWjimueLSQYWOijNaLK29vjl5Fl\nMp8r5PGZCO9AqFSoQXaqBhqBbYYHxf1wJvC8xfFs+U7UoP7i24dfYlh4krpeZu4A\npxEHAHr+bcXpEJzmx2YLh3iVpNkkMmwSDhPCCssAYkYSkrRc7GLocjOBQn7xcmE4\nDwIDAQAB\n-----END PUBLIC KEY-----\n" - } - }, - "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "b1647e286d229259065b227e86c2a84eb0d88141abba09579b8b2ddb06ad16ec" - } - }, - "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "81ab7f1c19b5a0fc12be460993dda3338e8405ee751690d352016b8538daef76" - } - }, - "c57c3014545136c441db830691bc23f4aa29d60595125400164c2ce59868a6d8": { - "keytype": "ecdsa-sha2-nistp256", - "scheme": "ecdsa-sha2-nistp256", - "keyval": { - "public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEE+kjMtMydvRRHFA1Jr2MdpaSoM54\nXI9RgIhsDqFrN3DwqtYnUkqvoTsWTo5yNQ+tBazulma/UrXEcBLItx/7jA==\n-----END PUBLIC KEY-----\n" - } - }, - "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9": { - "keytype": "ed25519", - "scheme": "ed25519", - "keyval": { - "public": "7ad61ccd09b5b4459e87e8e5a6b8c834bcaa26a20d8f844cfb8dc14636a1b5be" - } - } - }, - "roles": { - "root": { - "keyids": [ - "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", - "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5", - "878488d81d52dc7b297741795406694694c4295393175991b09cb0fa3d44f880", - "c57c3014545136c441db830691bc23f4aa29d60595125400164c2ce59868a6d8" - ], - "threshold": 4 - }, - "snapshot": { - "keyids": [ - "9c9339d2bb57c8beaa8fc69b3e7a90815fc9d29ff2016ae25a2bf5ab08a554a3" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "246d2f02a5d61c4607e0bed71650fb61eee23f9910146624cb82d4da66a0ba78" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9" - ], - "threshold": 1 - } - } - }, - "signatures": [ - { - "keyid": "4c85fc93a6c4df5bca6711fcb5e97a79bd35fdb3f4a18e2cf7df48feb81aa2ff", - "sig": "6ffc88e9674f2454b23d8dd83c0e5018100bcb094e3a27e98096a8e547477f4744765d482b00422f6945b919aed7e724bf1584431704d89f0066125c802a8300" - }, - { - "keyid": "a7d0e234685dd269a0215a307f5e1e7f22d41bcaabe704dc94b9ef0cbc4790f4", - "sig": "b1c6a0a0bcf5aab0be11d35c09c486ab63273f449b732f71f15c84376844548620bb0e7d7bfd26af34fbd80b29f65a1d3fb8629bb90f1f4ec292a55bbb41ab00" - }, - { - "keyid": "7e13cffd767c8cfd001624b9e68cfeb41dba24931125a293e0cce221dd4053c5", - "sig": "c6cfa0d2f9e7b9d1da78ddf2b536ac1952c0cadb61a4ca51a65ccf8dd5cf33e956c5122b9d6c57c01ec903962d6101d4c0c929fb5393421721a2207713a9870c" - }, - { - "keyid": "878488d81d52dc7b297741795406694694c4295393175991b09cb0fa3d44f880", - "sig": "8325b1664ad03735d3e49abc11a2223eeef1c676760392ea0dc54a29ec9315f9af243257c52546ed0c8020125035a0c82d0b215539dda17dff759312f6ff9f97a38200840b08d1eea3d2aa8d1110c392f2cc52b0c0314e7576b4b2c8bca7a411cdeb76510a9b0523ae6aeac590376dcee8898c6f05390bd1c76182fcfaa0870e30b5406b3c838d7cad43c87aeca337feebc0f24f2f5536eb52f4912cd9b98bdd26f91ad09b30a5474eb94086bfb0be056feb7e737ae266cfe67abf1b08a7b5897a2e98ce079eb9e6a6c07988302b751fe9caa5fbb9d52a4d459cf46010865e5d74daaf5f971dd266dfeeefd45c464e75f6428378153c607e82bef6e87c55d81a" - }, - { - "keyid": "c57c3014545136c441db830691bc23f4aa29d60595125400164c2ce59868a6d8", - "sig": "3045022002c83535467b1ca00ced690affa83bf60e0fe4ebfd1db8f8fdc2eba78860eccf022100c93c4522b2af690b52fb449036874c543016cd21961c40487fe6be16d4946a71" - } - ] -} \ No newline at end of file diff --git a/examples/repository/testdata/timestamp.json b/examples/repository/testdata/timestamp.json deleted file mode 100644 index 69221209..00000000 --- a/examples/repository/testdata/timestamp.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signed": { - "_type": "timestamp", - "spec_version": "1.0.31", - "version": 2, - "expires": "2022-12-10T00:00:16.538096Z", - "meta": { - "snapshot.json": { - "version": 2 - } - } - }, - "signatures": [ - { - "keyid": "ea890e76d6be8f6c5f028efd24b0d99596beb0c3141c9186e3269441d158e3a9", - "sig": "657cf4584d34950f5685694d5dee0888767a732386647fd23d57e62c32e1d58fadc3c70cce2220b49bcb9d2d5d9f86c9bf22e8ab94c978f0722ab55c628ee10a" - } - ] -} \ No newline at end of file diff --git a/go.mod b/go.mod index efbf7ca1..8e8a2c90 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 github.com/sigstore/sigstore v1.5.1 github.com/sirupsen/logrus v1.9.0 + github.com/spf13/cobra v1.6.0 github.com/stretchr/testify v1.8.1 golang.org/x/crypto v0.6.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a @@ -15,9 +16,11 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-containerregistry v0.12.1 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.7.0 // indirect diff --git a/go.sum b/go.sum index a8b8d768..e02bb088 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -16,6 +17,8 @@ github.com/google/go-containerregistry v0.12.1 h1:W1mzdNUTx4Zla4JaixCRLhORcR7G6K github.com/google/go-containerregistry v0.12.1/go.mod h1:sdIK+oHQO7B93xI8UweYdl887YhuIwg9vz8BSLH3+8k= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= @@ -31,12 +34,17 @@ github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPk github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= github.com/sigstore/sigstore v1.5.1 h1:iUou0QJW8eQKMUkTXbFyof9ZOblDtfaW2Sn2+QI8Tcs= github.com/sigstore/sigstore v1.5.1/go.mod h1:3i6UTWVNtFwOtbgG63FZZNID4vO9KcO8AszIJlaNI8k= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= +github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index a242c052..05c812ed 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -68,7 +68,13 @@ type Updater struct { } // New creates a new Updater instance and loads trusted root metadata -func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir string, f fetcher.Fetcher) (*Updater, error) { +func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir, trustedRootDir string, f fetcher.Fetcher) (*Updater, error) { + // local path of the trusted root metadata file used for bootstrapping + rootPath := metadata.ROOT + if trustedRootDir != "" { + rootPath = filepath.Join(trustedRootDir, rootPath) + } + // use the built-in download fetcher if nothing is provided if f == nil { f = &fetcher.DefaultFetcher{} @@ -82,8 +88,9 @@ func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir string, f fetche config: config.New(), fetcher: f, } + // load the root metadata file used for bootstrapping trust - rootBytes, err := updater.loadLocalMetadata(metadata.ROOT) + rootBytes, err := updater.loadLocalMetadata(rootPath) if err != nil { return nil, err } @@ -556,7 +563,7 @@ func (update *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, // loadLocalMetadata reads a local .json file and returns its bytes func (update *Updater) loadLocalMetadata(roleName string) ([]byte, error) { - roleName = fmt.Sprintf("%s.json", url.QueryEscape(roleName)) + roleName = fmt.Sprintf("%s.json", roleName) return readFile(roleName) } From 089c15b6cd5dc3f9bff29ad39b32786ccb36cf68 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 24 Feb 2023 22:45:57 +0200 Subject: [PATCH 066/208] feat: add initial tuf-client cli Signed-off-by: Radoslav Dimitrov --- cli/tufclient/README.md | 33 +++++++ cli/tufclient/cmd/main.go | 9 ++ cli/tufclient/cmd/metadata/root.json | 89 +++++++++++++++++ cli/tufclient/get.go | 132 +++++++++++++++++++++++++ cli/tufclient/init.go | 141 +++++++++++++++++++++++++++ cli/tufclient/reset.go | 74 ++++++++++++++ cli/tufclient/root.go | 48 +++++++++ 7 files changed, 526 insertions(+) create mode 100644 cli/tufclient/README.md create mode 100644 cli/tufclient/cmd/main.go create mode 100644 cli/tufclient/cmd/metadata/root.json create mode 100644 cli/tufclient/get.go create mode 100644 cli/tufclient/init.go create mode 100644 cli/tufclient/reset.go create mode 100644 cli/tufclient/root.go diff --git a/cli/tufclient/README.md b/cli/tufclient/README.md new file mode 100644 index 00000000..ab2562ac --- /dev/null +++ b/cli/tufclient/README.md @@ -0,0 +1,33 @@ +# go-tuf-metadata client CLI + +## Overview + +The CLI provides three commands: + +* `tuf-client init` - Initialize the client with trusted root.json metadata (Trust-On-First-Use) +* `tuf-client get` - Download a target file +* `tuf-client reset` - Resets the local environment. Warning: this deletes both the metadata and download folders and all of their contents + +All commands except reset require the URL of the TUF repository passed as a flag via `--url/u` + +Run `tuf-client help` from the command line to get more detailed usage +information. + +## Examples + +```bash +# Initialize by providing a root.json +$ tuf-client init --url https://jku.github.io/tuf-demo/metadata -f root.json + +# Initialize without providing a root.json +$ tuf-client init --url https://jku.github.io/tuf-demo/metadata + +# Get a target +$ tuf-client get --url https://jku.github.io/tuf-demo/metadata demo/succinctly-delegated-5.txt + +# Get a target by providing a URL of where target files are located +$ tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt + +# Reset your local environment +$ tuf-client reset +``` diff --git a/cli/tufclient/cmd/main.go b/cli/tufclient/cmd/main.go new file mode 100644 index 00000000..6e53443a --- /dev/null +++ b/cli/tufclient/cmd/main.go @@ -0,0 +1,9 @@ +package main + +import ( + tufclient "github.com/rdimitrov/go-tuf-metadata/cli/tufclient" +) + +func main() { + tufclient.Execute() +} diff --git a/cli/tufclient/cmd/metadata/root.json b/cli/tufclient/cmd/metadata/root.json new file mode 100644 index 00000000..862da9cd --- /dev/null +++ b/cli/tufclient/cmd/metadata/root.json @@ -0,0 +1,89 @@ +{ + "signatures": [ + { + "keyid": "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775", + "sig": "969bdec36d6f3dc59c17202a8528bb356a6ea54d7cc96bb371eee48e240192bcacd5051388245144aaca1039d3eb7062e0876795e81e1d566f8ded2c284aee0f" + }, + { + "keyid": "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3", + "sig": "edfaf3c538a023e7cf5b263ae4e63c33c94a2bfc9fe80859c4934d4a66b015b65b901ec5d5290ea524339e6a40b5b8db8a9561f3c103e2ae87b9ee032a9e3001" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2021-07-18T13:37:38Z", + "keys": { + "38600820f11a5f7d7ff42e6dfc9b03fd60272a3be6f895da2d882cea8bb1e20f": { + "keyid": "38600820f11a5f7d7ff42e6dfc9b03fd60272a3be6f895da2d882cea8bb1e20f", + "keytype": "ed25519", + "keyval": { + "public": "50f48659665b3eeb22d49374e183197eef8e42876a5cb909c91ab77e42b1ecc6" + }, + "scheme": "ed25519" + }, + "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3": { + "keyid": "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3", + "keytype": "ed25519", + "keyval": { + "public": "18eb2483196b7aa25fafb81276c704f7903cc9b1e34cadc4eaf677b7a674d6f5" + }, + "scheme": "ed25519" + }, + "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775": { + "keyid": "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775", + "keytype": "ed25519", + "keyval": { + "public": "921ecc86ee91fdd3a5514023df19cd859159467764f60fc41e1eeac850351161" + }, + "scheme": "ed25519" + }, + "8f3c2794f24426014fc26adcbb8efd94411fce881fa60fc8725a899115750efa": { + "keyid": "8f3c2794f24426014fc26adcbb8efd94411fce881fa60fc8725a899115750efa", + "keytype": "ed25519", + "keyval": { + "public": "89576917d160284384a47759eec1fc0f5b746ca3dfad813ee30875c32bac369c" + }, + "scheme": "ed25519" + }, + "9d78543b508f99a95a3c31fad3cffef0644134f1a028b30501acc12058c7c3e8": { + "keyid": "9d78543b508f99a95a3c31fad3cffef0644134f1a028b30501acc12058c7c3e8", + "keytype": "ed25519", + "keyval": { + "public": "04ef3356fb5cd00975dfce9f8f42d5b12b7b83f8ba15c2e98fd041514c74beb2" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3", + "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775" + ], + "threshold": 2 + }, + "snapshot": { + "keyids": [ + "9d78543b508f99a95a3c31fad3cffef0644134f1a028b30501acc12058c7c3e8" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "8f3c2794f24426014fc26adcbb8efd94411fce881fa60fc8725a899115750efa" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "38600820f11a5f7d7ff42e6dfc9b03fd60272a3be6f895da2d882cea8bb1e20f" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.19", + "version": 1, + "x-tufrepo-expiry-period": 86400 + } +} \ No newline at end of file diff --git a/cli/tufclient/get.go b/cli/tufclient/get.go new file mode 100644 index 00000000..c8f1b83d --- /dev/null +++ b/cli/tufclient/get.go @@ -0,0 +1,132 @@ +package tufclient + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/updater" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +var targetsURL string + +type localConfig struct { + MetadataDir string + DownloadDir string + MetadataURL string + TargetsURL string +} + +var getCmd = &cobra.Command{ + Use: "get", + Aliases: []string{"g"}, + Short: "Download a target file", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + return GetCmd(args[0]) + }, +} + +func init() { + getCmd.Flags().StringVarP(&targetsURL, "targetsURL", "t", "", "URL of where the target files are hosted") + rootCmd.AddCommand(getCmd) +} + +func GetCmd(target string) error { + // handle verbosity level + if Verbosity { + log.SetLevel(log.DebugLevel) + } + + // verify the client environment was initialized and fetch path names + env, err := verifyEnv() + if err != nil { + return err + } + + // create an Updater instance + up, err := updater.New( + env.MetadataDir, + env.MetadataURL, + env.TargetsURL, + env.DownloadDir, + env.MetadataDir, + nil) + if err != nil { + return fmt.Errorf("failed to create Updater instance: %w", err) + } + + // try to build the top-level metadata + err = up.Refresh() + if err != nil { + return fmt.Errorf("failed to refresh trusted metadata: %w", err) + } + + // search if the desired target is available + targetInfo, err := up.GetTargetInfo(target) + if err != nil { + return fmt.Errorf("target %s not found: %w", target, err) + } + + // target is available, so let's see if the target is already present locally + path, err := up.FindCachedTarget(targetInfo, "") + if err != nil { + return fmt.Errorf("failed while finding a cached target: %w", err) + } + + if path != "" { + fmt.Printf("Target %s is already present at - %s\n", target, path) + return nil + } + + // target is not present locally, so let's try to download it + path, err = up.DownloadTarget(targetInfo, "", "") + if err != nil { + return fmt.Errorf("failed to download target file %s - %w", target, err) + } + + if path != "" { + fmt.Printf("Successfully downloaded target %s at - %s\n", target, path) + return nil + } + return nil +} + +func verifyEnv() (*localConfig, error) { + // get working directory + cwd, err := os.Getwd() + if err != nil { + return nil, err + } + // if no targetsURL is set, we expect that the target files are located at the same location where the metadata is + if targetsURL == "" { + targetsURL = RepositoryURL + } + // start populating what we need + env := &localConfig{ + MetadataDir: filepath.Join(cwd, "metadata"), + DownloadDir: filepath.Join(cwd, "download"), + MetadataURL: RepositoryURL, + TargetsURL: targetsURL, + } + + // verify there's local metadata folder + _, err = os.Stat(env.MetadataDir) + if err != nil { + return nil, fmt.Errorf("no local metadata folder: %w", err) + } + // verify there's local download folder + _, err = os.Stat(env.DownloadDir) + if err != nil { + return nil, fmt.Errorf("no local download folder: %w", err) + } + // verify there's a local root.json available for bootstrapping trust + _, err = os.Stat(fmt.Sprintf("%s/%s.json", env.MetadataDir, metadata.ROOT)) + if err != nil { + return nil, fmt.Errorf("no local download folder: %w", err) + } + return env, nil +} diff --git a/cli/tufclient/init.go b/cli/tufclient/init.go new file mode 100644 index 00000000..4073791d --- /dev/null +++ b/cli/tufclient/init.go @@ -0,0 +1,141 @@ +package tufclient + +import ( + "fmt" + "io" + "net/http" + "net/url" + "os" + "path/filepath" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +var rootPath string + +var initCmd = &cobra.Command{ + Use: "init", + Aliases: []string{"i"}, + Short: "Initialize the client with trusted root.json metadata (Trust-On-First-Use)", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + return InitializeCmd() + }, +} + +func init() { + initCmd.Flags().StringVarP(&rootPath, "file", "f", "", "location of the trusted root metadata file") + rootCmd.AddCommand(initCmd) +} + +func InitializeCmd() error { + copyTrusted := true + // handle verbosity level + if Verbosity { + log.SetLevel(log.DebugLevel) + } + + // prepare the local environment + localMetadataDir, err := prepareEnvironment() + if err != nil { + return err + } + + // if there's no root.json file passed, try to download the 1.root.json from the repository URL + if rootPath == "" { + fmt.Printf("No root.json file was provided. Let's try to download one from %s\n", RepositoryURL) + rootPath, err = fetchTrustedRoot(localMetadataDir) + if err != nil { + return err + } + rootPath = fmt.Sprintf("%s/%s.json", rootPath, metadata.ROOT) + // no need to copy root.json to the metadata folder as we already download it in the expected location + copyTrusted = false + } + + // read the content of root.json + rootBytes, err := ReadFile(rootPath) + if err != nil { + return err + } + + // verify the content + _, err = trustedmetadata.New(rootBytes) + if err != nil { + return err + } + + // Save the trusted root.json file to the metadata folder so it is available for future operations (if we haven't downloaded it) + if copyTrusted { + err = os.WriteFile(filepath.Join(localMetadataDir, rootPath), rootBytes, 0644) + if err != nil { + return err + } + } + + fmt.Println("Initialization successful") + + return nil +} + +// prepareEnvironment prepares the local environment +func prepareEnvironment() (string, error) { + // get working directory + cwd, err := os.Getwd() + if err != nil { + return "", fmt.Errorf("failed to get current working directory: %w", err) + } + metadataPath := filepath.Join(cwd, "metadata") + downloadPath := filepath.Join(cwd, "download") + + // create a folder for storing the artifacts + err = os.Mkdir(metadataPath, 0750) + if err != nil { + return "", fmt.Errorf("failed to create local metadata folder: %w", err) + } + + // create a destination folder for storing the downloaded target + err = os.Mkdir(downloadPath, 0750) + if err != nil { + return "", fmt.Errorf("failed to create download folder: %w", err) + } + return metadataPath, nil +} + +// fetchTrustedRoot downloads the initial root metadata +func fetchTrustedRoot(metadataDir string) (string, error) { + // download the initial root metadata so we can bootstrap Trust-On-First-Use + rootURL, err := url.JoinPath(RepositoryURL, "1.root.json") + if err != nil { + return "", fmt.Errorf("failed to create URL path for 1.root.json: %w", err) + } + + req, err := http.NewRequest("GET", rootURL, nil) + if err != nil { + return "", fmt.Errorf("failed to create http request: %w", err) + } + + client := http.DefaultClient + + res, err := client.Do(req) + if err != nil { + return "", fmt.Errorf("failed to executed the http request: %w", err) + } + + defer res.Body.Close() + + data, err := io.ReadAll(res.Body) + if err != nil { + return "", fmt.Errorf("failed to read the http request body: %w", err) + } + + // write the downloaded root metadata to file + err = os.WriteFile(filepath.Join(metadataDir, "root.json"), data, 0644) + if err != nil { + return "", fmt.Errorf("failed to write root.json metadata: %w", err) + } + return metadataDir, nil +} diff --git a/cli/tufclient/reset.go b/cli/tufclient/reset.go new file mode 100644 index 00000000..3fa7baf8 --- /dev/null +++ b/cli/tufclient/reset.go @@ -0,0 +1,74 @@ +package tufclient + +import ( + "fmt" + "os" + "path/filepath" + "strings" + + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +var resetCmd = &cobra.Command{ + Use: "reset", + Aliases: []string{"r"}, + Short: "Resets the local environment. Warning: this deletes both the metadata and download folders and all of their contents", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + return ResetCmd() + }, +} + +func init() { + rootCmd.AddCommand(resetCmd) +} + +func ResetCmd() error { + // get working directory + cwd, err := os.Getwd() + if err != nil { + return fmt.Errorf("failed to get current working directory: %w", err) + } + + // folders to delete + metadataPath := filepath.Join(cwd, "metadata") + downloadPath := filepath.Join(cwd, "download") + + // warning: deletes the metadata folder and all of its contents + fmt.Printf("Warning: Are you sure you want to delete the \"%s\" folder and all of its contents? (y/n)\n", metadataPath) + if askForConfirmation() { + os.RemoveAll(metadataPath) + fmt.Printf("Folder %s was successfully deleted\n", metadataPath) + } else { + fmt.Printf("Folder \"%s\" was not deleted\n", metadataPath) + } + + // warning: deletes the download folder and all of its contents + fmt.Printf("Warning: Are you sure you want to delete the \"%s\" folder and all of its contents? (y/n)\n", downloadPath) + if askForConfirmation() { + os.RemoveAll(downloadPath) + fmt.Printf("Folder %s was successfully deleted\n", downloadPath) + } else { + fmt.Printf("Folder \"%s\" was not deleted\n", downloadPath) + } + + return nil +} + +func askForConfirmation() bool { + var response string + _, err := fmt.Scanln(&response) + if err != nil { + log.Fatal(err) + } + switch strings.ToLower(response) { + case "y", "yes": + return true + case "n", "no": + return false + default: + fmt.Println("I'm sorry but I didn't get what you meant, please type (y)es or (n)o and then press enter:") + return askForConfirmation() + } +} diff --git a/cli/tufclient/root.go b/cli/tufclient/root.go new file mode 100644 index 00000000..73e4a3dc --- /dev/null +++ b/cli/tufclient/root.go @@ -0,0 +1,48 @@ +package tufclient + +import ( + "io" + "os" + + "github.com/spf13/cobra" +) + +var Verbosity bool +var RepositoryURL string + +var rootCmd = &cobra.Command{ + Use: "tuf-client", + Short: "tuf-client - a client-side CLI tool for The Update Framework (TUF)", + Long: `tuf-client is a CLI tool that implements the client workflow specified by the The Update Framework (TUF) specification. + +The tuf-client can be used to query for available targets and to download them in a secure manner. + +All downloaded files are verified by signed metadata.`, + Run: func(cmd *cobra.Command, args []string) { + + }, +} + +func Execute() { + rootCmd.PersistentFlags().BoolVarP(&Verbosity, "verbose", "v", false, "verbose output") + rootCmd.PersistentFlags().StringVarP(&RepositoryURL, "url", "u", "", "URL of the TUF repository") + rootCmd.MarkFlagRequired("url") + + if err := rootCmd.Execute(); err != nil { + os.Exit(1) + } +} + +// ReadFile reads the content of a file and return its bytes +func ReadFile(name string) ([]byte, error) { + in, err := os.Open(name) + if err != nil { + return nil, err + } + defer in.Close() + data, err := io.ReadAll(in) + if err != nil { + return nil, err + } + return data, nil +} From 48ff83e3397e610da8fa6541f783977aa2ad7063 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 24 Feb 2023 23:07:08 +0200 Subject: [PATCH 067/208] docs: update readme.md for client cli Signed-off-by: Radoslav Dimitrov --- cli/tufclient/README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/cli/tufclient/README.md b/cli/tufclient/README.md index ab2562ac..101d736a 100644 --- a/cli/tufclient/README.md +++ b/cli/tufclient/README.md @@ -1,4 +1,4 @@ -# go-tuf-metadata client CLI +# tuf-client CLI ## Overview @@ -8,24 +8,35 @@ The CLI provides three commands: * `tuf-client get` - Download a target file * `tuf-client reset` - Resets the local environment. Warning: this deletes both the metadata and download folders and all of their contents -All commands except reset require the URL of the TUF repository passed as a flag via `--url/u` +All commands except `reset` require the URL of the TUF repository passed as a flag via `--url/u` -Run `tuf-client help` from the command line to get more detailed usage -information. +Run `tuf-client help` from the command line to get more detailed usage information. -## Examples +## Usage ```bash # Initialize by providing a root.json +# +# Usage: tuf-client init --url -f root.json +# $ tuf-client init --url https://jku.github.io/tuf-demo/metadata -f root.json # Initialize without providing a root.json +# +# Usage: tuf-client init --url +# $ tuf-client init --url https://jku.github.io/tuf-demo/metadata -# Get a target +# Get a target +# +# Usage: tuf-client get --url +# $ tuf-client get --url https://jku.github.io/tuf-demo/metadata demo/succinctly-delegated-5.txt # Get a target by providing a URL of where target files are located +# +# Usage: tuf-client get --url -t +# $ tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt # Reset your local environment From 4bc9ce9ce5f7348fab2e268dbab5bfd2c308a3a3 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 24 Feb 2023 23:32:37 +0200 Subject: [PATCH 068/208] tests: fix custom field tests Signed-off-by: Radoslav Dimitrov --- metadata/metadata_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 0ce4cb95..189b2673 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -342,23 +342,23 @@ func TestCustomField(t *testing.T) { root.Signed.Custom = &testCustomJSON rootJSON, err := root.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"root\",\"spec_version\":\"1.0.31\",\"consistent_snapshot\":true,\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"custom\":{\"test\":true}},\"signatures\":[]}"), rootJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"signatures\":[]}"), rootJSON) targets := Targets(expire) targets.Signed.Custom = &testCustomJSON targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"spec_version\":\"1.0.31\",\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"targets\":{},\"custom\":{\"test\":true}},\"signatures\":[]}"), targetsJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{},\"version\":1},\"signatures\":[]}"), targetsJSON) snapshot := Snapshot(expire) snapshot.Signed.Custom = &testCustomJSON snapshotJSON, err := snapshot.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"spec_version\":\"1.0.31\",\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"custom\":{\"test\":true}},\"signatures\":[]}"), snapshotJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"signatures\":[]}"), snapshotJSON) timestamp := Timestamp(expire) timestamp.Signed.Custom = &testCustomJSON timestampJSON, err := timestamp.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"spec_version\":\"1.0.31\",\"version\":1,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"custom\":{\"test\":true}},\"signatures\":[]}"), timestampJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"signatures\":[]}"), timestampJSON) } From 22df3da2b1b7f96d6ae4a45fb9c54176ecd4d690 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 25 Feb 2023 00:40:15 +0200 Subject: [PATCH 069/208] fix: update golangci-lint config and fix reported errors Signed-off-by: Radoslav Dimitrov --- .golangci.yml | 24 +++++++++++------------- cli/tufclient/init.go | 3 ++- cli/tufclient/root.go | 5 ++++- metadata/metadata.go | 7 ++----- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9cc682f2..e4c45b85 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,18 +9,16 @@ # # SPDX-License-Identifier: BSD-2-Clause run: - # Lint using Go 1.17, since some linters are disabled by default for Go 1.18 - # until generics are supported. - # See https://github.com/golangci/golangci-lint/issues/2649 - go: "1.17" - -linters: - disable-all: true + linters: enable: - - staticcheck - gofmt - - govet - - gosimple - - unused - - typecheck - - forbidigo + - bodyclose + - contextcheck + - errname + - gocyclo + - godot + - godox + - misspell + - stylecheck + - whitespace + - gocritic diff --git a/cli/tufclient/init.go b/cli/tufclient/init.go index 4073791d..2332c31c 100644 --- a/cli/tufclient/init.go +++ b/cli/tufclient/init.go @@ -46,7 +46,8 @@ func InitializeCmd() error { // if there's no root.json file passed, try to download the 1.root.json from the repository URL if rootPath == "" { - fmt.Printf("No root.json file was provided. Let's try to download one from %s\n", RepositoryURL) + + fmt.Printf("No root.json file was provided. Trying to download one from %s\n", RepositoryURL) rootPath, err = fetchTrustedRoot(localMetadataDir) if err != nil { return err diff --git a/cli/tufclient/root.go b/cli/tufclient/root.go index 73e4a3dc..ee90c407 100644 --- a/cli/tufclient/root.go +++ b/cli/tufclient/root.go @@ -26,7 +26,10 @@ All downloaded files are verified by signed metadata.`, func Execute() { rootCmd.PersistentFlags().BoolVarP(&Verbosity, "verbose", "v", false, "verbose output") rootCmd.PersistentFlags().StringVarP(&RepositoryURL, "url", "u", "", "URL of the TUF repository") - rootCmd.MarkFlagRequired("url") + err := rootCmd.MarkFlagRequired("url") + if err != nil { + os.Exit(1) + } if err := rootCmd.Execute(); err != nil { os.Exit(1) diff --git a/metadata/metadata.go b/metadata/metadata.go index 3d4ed14e..b596db56 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -796,12 +796,10 @@ func (signed *TargetsType) RevokeKey(keyID string, role string) error { } // standard delegated roles if signed.Delegations.Roles != nil { - found := false // loop through all delegated roles for i, d := range signed.Delegations.Roles { // if role is found if d.Name == role { - found = true // check if keyID is present in keyIDs for that role if !slices.Contains(d.KeyIDs, keyID) { return ErrValue{Msg: fmt.Sprintf("key with id %s is not used by %s", keyID, role)} @@ -827,9 +825,7 @@ func (signed *TargetsType) RevokeKey(keyID string, role string) error { } } // we haven't found the delegated role - if !found { - return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} - } + return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } else if signed.Delegations.SuccinctRoles != nil { // check if keyID is used by SuccinctRoles role if !slices.Contains(signed.Delegations.SuccinctRoles.KeyIDs, keyID) { @@ -1127,6 +1123,7 @@ func (key *Key) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &a); err != nil { return err } + // nolint *key = Key(a) var dict map[string]any From aa227e490c0e2a7e0a5280ead4fc6a9750871b6b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 25 Feb 2023 00:45:42 +0200 Subject: [PATCH 070/208] chore: remove false check for client_example.go Signed-off-by: Radoslav Dimitrov --- cli/tufclient/get.go | 6 ++---- examples/client/client_example.go | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cli/tufclient/get.go b/cli/tufclient/get.go index c8f1b83d..00130cc5 100644 --- a/cli/tufclient/get.go +++ b/cli/tufclient/get.go @@ -88,10 +88,8 @@ func GetCmd(target string) error { return fmt.Errorf("failed to download target file %s - %w", target, err) } - if path != "" { - fmt.Printf("Successfully downloaded target %s at - %s\n", target, path) - return nil - } + fmt.Printf("Successfully downloaded target %s at - %s\n", target, path) + return nil } diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 44dc0cd7..1c76ea0a 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -129,6 +129,7 @@ func InitTrustOnFirstUse(metadataDir string) error { func DownloadTarget(localMetadataDir, target string) error { metadataBaseURL, _ := url.JoinPath(baseURL, baseURLMetadataDir) targetsBaseURL, _ := url.JoinPath(baseURL, baseURLTargetsDir) + // create a new Updater instance up, err := updater.New( localMetadataDir, @@ -167,9 +168,8 @@ func DownloadTarget(localMetadataDir, target string) error { if err != nil { return fmt.Errorf("failed to download target file %s - %w", target, err) } - if path != "" { - log.Infof("Successfully downloaded target %s at - %s\n", target, path) - return nil - } + + log.Infof("Successfully downloaded target %s at - %s\n", target, path) + return nil } From 5636b723871712e39b0ecee5f71e04183d6cbadc Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 25 Feb 2023 00:57:39 +0200 Subject: [PATCH 071/208] fix: codeql reported error Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index b596db56..66aeee65 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -578,7 +578,7 @@ func (role *SuccinctRoles) GetRoles() []string { // IsDelegatedRole returns whether the given roleName is in one of // the delegated roles that “SuccinctRoles“ represents func (role *SuccinctRoles) IsDelegatedRole(roleName string) bool { - numberOfBins := int(math.Pow(2, float64(role.BitLength))) + numberOfBins := int64(math.Pow(2, float64(role.BitLength))) suffixLen := len(strconv.FormatInt(int64(numberOfBins-1), 16)) expectedPrefix := fmt.Sprintf("%s-", role.NamePrefix) @@ -601,7 +601,7 @@ func (role *SuccinctRoles) IsDelegatedRole(roleName string) bool { } // check if the bin we calculated is indeed within the range of what we support - return (value >= 0) && (int(value) < numberOfBins) + return (value >= 0) && (value < numberOfBins) } // fromBytes return a *Metadata[T] object from bytes and verifies From f403fad5ce5ccd9a1b44ab187911c95107a952b3 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 25 Feb 2023 01:54:17 +0200 Subject: [PATCH 072/208] chore: refactor package layout for tuf-client cli Signed-off-by: Radoslav Dimitrov --- cli/{tufclient => tuf-client}/README.md | 0 cli/{tufclient => tuf-client/cmd}/get.go | 2 +- cli/{tufclient => tuf-client/cmd}/init.go | 2 +- cli/{tufclient => tuf-client/cmd}/reset.go | 2 +- cli/{tufclient => tuf-client/cmd}/root.go | 7 +- cli/tuf-client/main.go | 9 +++ cli/tufclient/cmd/main.go | 9 --- cli/tufclient/cmd/metadata/root.json | 89 ---------------------- 8 files changed, 14 insertions(+), 106 deletions(-) rename cli/{tufclient => tuf-client}/README.md (100%) rename cli/{tufclient => tuf-client/cmd}/get.go (99%) rename cli/{tufclient => tuf-client/cmd}/init.go (99%) rename cli/{tufclient => tuf-client/cmd}/reset.go (99%) rename cli/{tufclient => tuf-client/cmd}/root.go (92%) create mode 100644 cli/tuf-client/main.go delete mode 100644 cli/tufclient/cmd/main.go delete mode 100644 cli/tufclient/cmd/metadata/root.json diff --git a/cli/tufclient/README.md b/cli/tuf-client/README.md similarity index 100% rename from cli/tufclient/README.md rename to cli/tuf-client/README.md diff --git a/cli/tufclient/get.go b/cli/tuf-client/cmd/get.go similarity index 99% rename from cli/tufclient/get.go rename to cli/tuf-client/cmd/get.go index 00130cc5..a63afecc 100644 --- a/cli/tufclient/get.go +++ b/cli/tuf-client/cmd/get.go @@ -1,4 +1,4 @@ -package tufclient +package cmd import ( "fmt" diff --git a/cli/tufclient/init.go b/cli/tuf-client/cmd/init.go similarity index 99% rename from cli/tufclient/init.go rename to cli/tuf-client/cmd/init.go index 2332c31c..0cfa4284 100644 --- a/cli/tufclient/init.go +++ b/cli/tuf-client/cmd/init.go @@ -1,4 +1,4 @@ -package tufclient +package cmd import ( "fmt" diff --git a/cli/tufclient/reset.go b/cli/tuf-client/cmd/reset.go similarity index 99% rename from cli/tufclient/reset.go rename to cli/tuf-client/cmd/reset.go index 3fa7baf8..44909944 100644 --- a/cli/tufclient/reset.go +++ b/cli/tuf-client/cmd/reset.go @@ -1,4 +1,4 @@ -package tufclient +package cmd import ( "fmt" diff --git a/cli/tufclient/root.go b/cli/tuf-client/cmd/root.go similarity index 92% rename from cli/tufclient/root.go rename to cli/tuf-client/cmd/root.go index ee90c407..df619424 100644 --- a/cli/tufclient/root.go +++ b/cli/tuf-client/cmd/root.go @@ -1,4 +1,4 @@ -package tufclient +package cmd import ( "io" @@ -26,10 +26,7 @@ All downloaded files are verified by signed metadata.`, func Execute() { rootCmd.PersistentFlags().BoolVarP(&Verbosity, "verbose", "v", false, "verbose output") rootCmd.PersistentFlags().StringVarP(&RepositoryURL, "url", "u", "", "URL of the TUF repository") - err := rootCmd.MarkFlagRequired("url") - if err != nil { - os.Exit(1) - } + _ = rootCmd.MarkFlagRequired("url") if err := rootCmd.Execute(); err != nil { os.Exit(1) diff --git a/cli/tuf-client/main.go b/cli/tuf-client/main.go new file mode 100644 index 00000000..718e7757 --- /dev/null +++ b/cli/tuf-client/main.go @@ -0,0 +1,9 @@ +package main + +import ( + tufclient "github.com/rdimitrov/go-tuf-metadata/cli/tuf-client/cmd" +) + +func main() { + tufclient.Execute() +} diff --git a/cli/tufclient/cmd/main.go b/cli/tufclient/cmd/main.go deleted file mode 100644 index 6e53443a..00000000 --- a/cli/tufclient/cmd/main.go +++ /dev/null @@ -1,9 +0,0 @@ -package main - -import ( - tufclient "github.com/rdimitrov/go-tuf-metadata/cli/tufclient" -) - -func main() { - tufclient.Execute() -} diff --git a/cli/tufclient/cmd/metadata/root.json b/cli/tufclient/cmd/metadata/root.json deleted file mode 100644 index 862da9cd..00000000 --- a/cli/tufclient/cmd/metadata/root.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "signatures": [ - { - "keyid": "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775", - "sig": "969bdec36d6f3dc59c17202a8528bb356a6ea54d7cc96bb371eee48e240192bcacd5051388245144aaca1039d3eb7062e0876795e81e1d566f8ded2c284aee0f" - }, - { - "keyid": "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3", - "sig": "edfaf3c538a023e7cf5b263ae4e63c33c94a2bfc9fe80859c4934d4a66b015b65b901ec5d5290ea524339e6a40b5b8db8a9561f3c103e2ae87b9ee032a9e3001" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2021-07-18T13:37:38Z", - "keys": { - "38600820f11a5f7d7ff42e6dfc9b03fd60272a3be6f895da2d882cea8bb1e20f": { - "keyid": "38600820f11a5f7d7ff42e6dfc9b03fd60272a3be6f895da2d882cea8bb1e20f", - "keytype": "ed25519", - "keyval": { - "public": "50f48659665b3eeb22d49374e183197eef8e42876a5cb909c91ab77e42b1ecc6" - }, - "scheme": "ed25519" - }, - "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3": { - "keyid": "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3", - "keytype": "ed25519", - "keyval": { - "public": "18eb2483196b7aa25fafb81276c704f7903cc9b1e34cadc4eaf677b7a674d6f5" - }, - "scheme": "ed25519" - }, - "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775": { - "keyid": "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775", - "keytype": "ed25519", - "keyval": { - "public": "921ecc86ee91fdd3a5514023df19cd859159467764f60fc41e1eeac850351161" - }, - "scheme": "ed25519" - }, - "8f3c2794f24426014fc26adcbb8efd94411fce881fa60fc8725a899115750efa": { - "keyid": "8f3c2794f24426014fc26adcbb8efd94411fce881fa60fc8725a899115750efa", - "keytype": "ed25519", - "keyval": { - "public": "89576917d160284384a47759eec1fc0f5b746ca3dfad813ee30875c32bac369c" - }, - "scheme": "ed25519" - }, - "9d78543b508f99a95a3c31fad3cffef0644134f1a028b30501acc12058c7c3e8": { - "keyid": "9d78543b508f99a95a3c31fad3cffef0644134f1a028b30501acc12058c7c3e8", - "keytype": "ed25519", - "keyval": { - "public": "04ef3356fb5cd00975dfce9f8f42d5b12b7b83f8ba15c2e98fd041514c74beb2" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "45a9577ca483f358bda4a21af93b7660b82bd9c0e1930a6b7d521b42897a0fa3", - "4c56de5b62fd064fc94453b680dfd3faf6a01baaab3beac296920f0ccfa22775" - ], - "threshold": 2 - }, - "snapshot": { - "keyids": [ - "9d78543b508f99a95a3c31fad3cffef0644134f1a028b30501acc12058c7c3e8" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "8f3c2794f24426014fc26adcbb8efd94411fce881fa60fc8725a899115750efa" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "38600820f11a5f7d7ff42e6dfc9b03fd60272a3be6f895da2d882cea8bb1e20f" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.19", - "version": 1, - "x-tufrepo-expiry-period": 86400 - } -} \ No newline at end of file From e3ee90753b301249bb98fff6fb34fb3ddaae0329 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:14:57 +0200 Subject: [PATCH 073/208] chore(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#8) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8e8a2c90..efdf1cce 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/sigstore/sigstore v1.5.1 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.0 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 golang.org/x/crypto v0.6.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) diff --git a/go.sum b/go.sum index e02bb088..80e2366f 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,8 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 h1:1i/Afw3rmaR1gF3sfVkG2X6ldkikQwA9zY380LrR5YI= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= From c09e2c009519dde3e08e0943df8ca87226ee208c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:15:20 +0200 Subject: [PATCH 074/208] chore(deps): bump github.com/sigstore/sigstore from 1.5.1 to 1.5.2 (#9) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index efdf1cce..f69fb4d9 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 - github.com/sigstore/sigstore v1.5.1 + github.com/sigstore/sigstore v1.5.2 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.0 github.com/stretchr/testify v1.8.2 @@ -15,7 +15,7 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-containerregistry v0.12.1 // indirect + github.com/google/go-containerregistry v0.13.0 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -27,8 +27,8 @@ require ( golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect - google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect - google.golang.org/grpc v1.51.0 // indirect + google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect + google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 80e2366f..58d91b21 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -13,8 +13,8 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-containerregistry v0.12.1 h1:W1mzdNUTx4Zla4JaixCRLhORcR7G6KxE5hHl5fkPsp8= -github.com/google/go-containerregistry v0.12.1/go.mod h1:sdIK+oHQO7B93xI8UweYdl887YhuIwg9vz8BSLH3+8k= +github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k= +github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= @@ -22,7 +22,7 @@ github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf h1:ndns1qx/5dL43g16EQkPV/i8+b3l5bYQwLeoSBe7tS8= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf/go.mod h1:aGkAgvWY/IUcVFfuly53REpfv5edu25oij+qHRFaraA= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -37,8 +37,8 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= -github.com/sigstore/sigstore v1.5.1 h1:iUou0QJW8eQKMUkTXbFyof9ZOblDtfaW2Sn2+QI8Tcs= -github.com/sigstore/sigstore v1.5.1/go.mod h1:3i6UTWVNtFwOtbgG63FZZNID4vO9KcO8AszIJlaNI8k= +github.com/sigstore/sigstore v1.5.2 h1:rvZSPJDH2ysoc8kjW9v4nv1UX3XwSA8y4x6Dk7hA0D4= +github.com/sigstore/sigstore v1.5.2/go.mod h1:wxhp9KoaOpeb1VLKILruD283KJqPSqX+3TuBByVDZ6E= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= @@ -73,10 +73,10 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc h1:ijGwO+0vL2hJt5gaygqP2j6PfflOBrRot0IczKbmtio= +google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= From 2a429c741b5544329159f8c349b34ee16ebbbbbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:17:21 +0200 Subject: [PATCH 075/208] chore(deps): bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#10) Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f69fb4d9..3b2ebe75 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 github.com/sigstore/sigstore v1.5.2 github.com/sirupsen/logrus v1.9.0 - github.com/spf13/cobra v1.6.0 + github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.2 golang.org/x/crypto v0.6.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a diff --git a/go.sum b/go.sum index 58d91b21..ddb3f331 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/sigstore/sigstore v1.5.2 h1:rvZSPJDH2ysoc8kjW9v4nv1UX3XwSA8y4x6Dk7hA0 github.com/sigstore/sigstore v1.5.2/go.mod h1:wxhp9KoaOpeb1VLKILruD283KJqPSqX+3TuBByVDZ6E= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From cbe1d3bfd7d16f34083c1999cf463f33b805a435 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 14:50:27 +0200 Subject: [PATCH 076/208] chore: delete NOTES.md file Signed-off-by: Radoslav Dimitrov --- NOTES.md | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 NOTES.md diff --git a/NOTES.md b/NOTES.md deleted file mode 100644 index ca9d9826..00000000 --- a/NOTES.md +++ /dev/null @@ -1,14 +0,0 @@ -# Notes - -* Check fuzzing - https://go.dev/doc/tutorial/fuzz -* Add the option to set custom key ID -* Add creating a metadata from init struct -* Support for hashbin delegations and succint roles -* Verify we don't discard custom fields when converting, i.e. for keys and such -* Verify and fix if needed the format of which keys are stored - ed25519 should be hex only -* Revisit the design - should we use generics or just 4 different types for each metadata? -* Investigate whether depending on `sigstore/signatures` can cause dependency cycle and if so, how to avoid it? -* Add support for storing/loading metadata and target files from AWS S3 buckets -* Make sure keys can be unmarshalled - https://github.com/theupdateframework/go-tuf/issues/363#issuecomment-1227340241 -* Revisit logging -* Searching through delegations From 5eadd5f3c109f250c964d9d45b18582a4a785e67 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 17:09:57 +0200 Subject: [PATCH 077/208] chore: add license notes and template the tuf repository cli Signed-off-by: Radoslav Dimitrov --- cli/README.md | 9 +++++++ cli/tuf-client/cmd/get.go | 19 ++++++++++++-- cli/tuf-client/cmd/init.go | 19 ++++++++++++-- cli/tuf-client/cmd/reset.go | 22 +++++++++++++--- cli/tuf-client/cmd/root.go | 23 ++++++++++++++-- cli/tuf-client/main.go | 11 ++++++++ cli/tuf/README.md | 5 ++++ cli/tuf/cmd/init.go | 44 +++++++++++++++++++++++++++++++ cli/tuf/cmd/root.go | 52 +++++++++++++++++++++++++++++++++++++ cli/tuf/main.go | 25 ++++++++++++++++++ 10 files changed, 219 insertions(+), 10 deletions(-) create mode 100644 cli/README.md create mode 100644 cli/tuf/README.md create mode 100644 cli/tuf/cmd/init.go create mode 100644 cli/tuf/cmd/root.go create mode 100644 cli/tuf/main.go diff --git a/cli/README.md b/cli/README.md new file mode 100644 index 00000000..a3239e9c --- /dev/null +++ b/cli/README.md @@ -0,0 +1,9 @@ +# tuf and tuf-client CLI tools + +## Overview + +The following CLIs are experimental replacements of the CLI tools provided by the go-tuf package: + +* [tuf-client](tuf-client/README.md) - a CLI tool that implements the client workflow specified by the The Update Framework (TUF) specification + +* [tuf](tuf/README.md) - Not implemented diff --git a/cli/tuf-client/cmd/get.go b/cli/tuf-client/cmd/get.go index a63afecc..e1f786a5 100644 --- a/cli/tuf-client/cmd/get.go +++ b/cli/tuf-client/cmd/get.go @@ -1,3 +1,14 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package cmd import ( @@ -26,6 +37,10 @@ var getCmd = &cobra.Command{ Short: "Download a target file", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { + if RepositoryURL == "" { + fmt.Println("Error: required flag(s) \"url\" not set") + os.Exit(1) + } return GetCmd(args[0]) }, } @@ -105,8 +120,8 @@ func verifyEnv() (*localConfig, error) { } // start populating what we need env := &localConfig{ - MetadataDir: filepath.Join(cwd, "metadata"), - DownloadDir: filepath.Join(cwd, "download"), + MetadataDir: filepath.Join(cwd, DefaultMetadataDir), + DownloadDir: filepath.Join(cwd, DefaultDownloadDir), MetadataURL: RepositoryURL, TargetsURL: targetsURL, } diff --git a/cli/tuf-client/cmd/init.go b/cli/tuf-client/cmd/init.go index 0cfa4284..42b7a5ae 100644 --- a/cli/tuf-client/cmd/init.go +++ b/cli/tuf-client/cmd/init.go @@ -1,3 +1,14 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package cmd import ( @@ -22,6 +33,10 @@ var initCmd = &cobra.Command{ Short: "Initialize the client with trusted root.json metadata (Trust-On-First-Use)", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) error { + if RepositoryURL == "" { + fmt.Println("Error: required flag(s) \"url\" not set") + os.Exit(1) + } return InitializeCmd() }, } @@ -89,8 +104,8 @@ func prepareEnvironment() (string, error) { if err != nil { return "", fmt.Errorf("failed to get current working directory: %w", err) } - metadataPath := filepath.Join(cwd, "metadata") - downloadPath := filepath.Join(cwd, "download") + metadataPath := filepath.Join(cwd, DefaultMetadataDir) + downloadPath := filepath.Join(cwd, DefaultDownloadDir) // create a folder for storing the artifacts err = os.Mkdir(metadataPath, 0750) diff --git a/cli/tuf-client/cmd/reset.go b/cli/tuf-client/cmd/reset.go index 44909944..b2e5cfb9 100644 --- a/cli/tuf-client/cmd/reset.go +++ b/cli/tuf-client/cmd/reset.go @@ -1,3 +1,14 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package cmd import ( @@ -10,6 +21,8 @@ import ( "github.com/spf13/cobra" ) +var ForceDelete bool + var resetCmd = &cobra.Command{ Use: "reset", Aliases: []string{"r"}, @@ -21,6 +34,7 @@ var resetCmd = &cobra.Command{ } func init() { + resetCmd.Flags().BoolVarP(&ForceDelete, "force", "f", false, "force delete without waiting for confirmation") rootCmd.AddCommand(resetCmd) } @@ -32,12 +46,12 @@ func ResetCmd() error { } // folders to delete - metadataPath := filepath.Join(cwd, "metadata") - downloadPath := filepath.Join(cwd, "download") + metadataPath := filepath.Join(cwd, DefaultMetadataDir) + downloadPath := filepath.Join(cwd, DefaultDownloadDir) // warning: deletes the metadata folder and all of its contents fmt.Printf("Warning: Are you sure you want to delete the \"%s\" folder and all of its contents? (y/n)\n", metadataPath) - if askForConfirmation() { + if ForceDelete || askForConfirmation() { os.RemoveAll(metadataPath) fmt.Printf("Folder %s was successfully deleted\n", metadataPath) } else { @@ -46,7 +60,7 @@ func ResetCmd() error { // warning: deletes the download folder and all of its contents fmt.Printf("Warning: Are you sure you want to delete the \"%s\" folder and all of its contents? (y/n)\n", downloadPath) - if askForConfirmation() { + if ForceDelete || askForConfirmation() { os.RemoveAll(downloadPath) fmt.Printf("Folder %s was successfully deleted\n", downloadPath) } else { diff --git a/cli/tuf-client/cmd/root.go b/cli/tuf-client/cmd/root.go index df619424..29a604b0 100644 --- a/cli/tuf-client/cmd/root.go +++ b/cli/tuf-client/cmd/root.go @@ -1,3 +1,14 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package cmd import ( @@ -7,6 +18,11 @@ import ( "github.com/spf13/cobra" ) +const ( + DefaultMetadataDir = "tuf_metadata" + DefaultDownloadDir = "tuf_download" +) + var Verbosity bool var RepositoryURL string @@ -19,14 +35,17 @@ The tuf-client can be used to query for available targets and to download them i All downloaded files are verified by signed metadata.`, Run: func(cmd *cobra.Command, args []string) { - + // show the help message if no command has been used + if len(args) == 0 { + cmd.Help() + os.Exit(0) + } }, } func Execute() { rootCmd.PersistentFlags().BoolVarP(&Verbosity, "verbose", "v", false, "verbose output") rootCmd.PersistentFlags().StringVarP(&RepositoryURL, "url", "u", "", "URL of the TUF repository") - _ = rootCmd.MarkFlagRequired("url") if err := rootCmd.Execute(); err != nil { os.Exit(1) diff --git a/cli/tuf-client/main.go b/cli/tuf-client/main.go index 718e7757..e6acd2e6 100644 --- a/cli/tuf-client/main.go +++ b/cli/tuf-client/main.go @@ -1,5 +1,16 @@ package main +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + import ( tufclient "github.com/rdimitrov/go-tuf-metadata/cli/tuf-client/cmd" ) diff --git a/cli/tuf/README.md b/cli/tuf/README.md new file mode 100644 index 00000000..dc3e296f --- /dev/null +++ b/cli/tuf/README.md @@ -0,0 +1,5 @@ +# tuf CLI + +## Overview + +Not implemented diff --git a/cli/tuf/cmd/init.go b/cli/tuf/cmd/init.go new file mode 100644 index 00000000..9e43d90f --- /dev/null +++ b/cli/tuf/cmd/init.go @@ -0,0 +1,44 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package cmd + +import ( + "fmt" + + log "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +var initCmd = &cobra.Command{ + Use: "init", + Aliases: []string{"i"}, + Short: "Initialize a repository", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + return InitializeCmd() + }, +} + +func init() { + rootCmd.AddCommand(initCmd) +} + +func InitializeCmd() error { + // handle verbosity level + if Verbosity { + log.SetLevel(log.DebugLevel) + } + + fmt.Println("Initialization successful") + + return nil +} diff --git a/cli/tuf/cmd/root.go b/cli/tuf/cmd/root.go new file mode 100644 index 00000000..3c34fefc --- /dev/null +++ b/cli/tuf/cmd/root.go @@ -0,0 +1,52 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package cmd + +import ( + "io" + "os" + + "github.com/spf13/cobra" +) + +var Verbosity bool + +var rootCmd = &cobra.Command{ + Use: "tuf", + Short: "tuf - a repository-side CLI tool for The Update Framework (TUF)", + Long: "tuf - a repository-side CLI tool for The Update Framework (TUF)", + Run: func(cmd *cobra.Command, args []string) { + + }, +} + +func Execute() { + rootCmd.PersistentFlags().BoolVarP(&Verbosity, "verbose", "v", false, "verbose output") + + if err := rootCmd.Execute(); err != nil { + os.Exit(1) + } +} + +// ReadFile reads the content of a file and return its bytes +func ReadFile(name string) ([]byte, error) { + in, err := os.Open(name) + if err != nil { + return nil, err + } + defer in.Close() + data, err := io.ReadAll(in) + if err != nil { + return nil, err + } + return data, nil +} diff --git a/cli/tuf/main.go b/cli/tuf/main.go new file mode 100644 index 00000000..fe6c10e3 --- /dev/null +++ b/cli/tuf/main.go @@ -0,0 +1,25 @@ +package main + +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +import ( + "fmt" + "os" + + tuf "github.com/rdimitrov/go-tuf-metadata/cli/tuf/cmd" +) + +func main() { + fmt.Println("Not implemented") + os.Exit(1) + tuf.Execute() +} From e5831a4b14c06b03dc2631513363bf4e713f6c57 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 17:10:21 +0200 Subject: [PATCH 078/208] chore: add Makefile Signed-off-by: Radoslav Dimitrov --- Makefile | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..6ee45090 --- /dev/null +++ b/Makefile @@ -0,0 +1,66 @@ +# Copyright 2022-2023 VMware, Inc. +# +# This product is licensed to you under the BSD-2 license (the "License"). +# You may not use this product except in compliance with the BSD-2 License. +# This product may include a number of subcomponents with separate copyright +# notices and license terms. Your use of these subcomponents is subject to +# the terms and conditions of the subcomponent's license, as noted in the +# LICENSE file. +# +# SPDX-License-Identifier: BSD-2-Clause + +# We want to use bash +SHELL:=/bin/bash + +# Set environment variables +CLIS:=tuf-client # tuf + +# Default target +.PHONY: default +default: build + +# Build +.PHONY: build +build: $(addprefix build-, $(CLIS)) + +# Target for building a Go binary +.PHONY: build-% +build-%: + @echo "Building $*" + @go build -o $* cli/$*/main.go + +# Test target +.PHONY: test +test: + @go test ./... + +# Linting target +.PHONY: lint +lint: + @golangci-lint run + +# Target for demoing the examples/client/client_example.go +.PHONY: example-client +example-client: + @echo "Executing the following example - client/client_example.go" + @cd examples/client/ && go run . + +# Target for demoing the examples/repository/basic_repository.go +.PHONY: example-repository +example-repository: + @echo "Executing the following example - repository/basic_repository.go" + @cd examples/repository/ && go run . + +# Target for demoing the tuf-client cli +.PHONY: example-tuf-client-cli +example-tuf-client-cli: build-tuf-client + @echo "Clearing any leftover artifacts..." + @./tuf-client reset --force + @echo "Initializing the following https://jku.github.io/tuf-demo/ TUF repository" + @sleep 2 + @./tuf-client init --url https://jku.github.io/tuf-demo/metadata + @echo "Downloading the following target file - demo/succinctly-delegated-5.txt" + @sleep 2 + @./tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt + + From 901c6d6ad44f6a5719bd6d3e582fd179e16208a4 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 17:49:17 +0200 Subject: [PATCH 079/208] chore: update readme Signed-off-by: Radoslav Dimitrov --- README.md | 50 ++++++++++++++++++++------------------ cli/README.md | 6 ++++- cli/tuf-client/README.md | 12 +++++++++ cli/tuf-client/cmd/root.go | 2 +- cli/tuf/README.md | 4 +++ examples/README.md | 33 +++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 examples/README.md diff --git a/README.md b/README.md index d8d3fb4e..bec217e5 100644 --- a/README.md +++ b/README.md @@ -32,34 +32,38 @@ by various tech companies and open source organizations. Please see [TUF's website](https://theupdateframework.com/) for more information about TUF! -## Getting started +## Overview ---------------------------- -See the [basic_repository.go](examples/repository/basic_repository.go) example which demonstrates how to *manually* create and -maintain repository metadata using the low-level Metadata API. +The `go-tuf-metadata` project provides the following functionality: -The example highlights the following functionality supported by the metadata API: - -* creation of top-level metadata -* target file handling +* creation, reading and writing of metadata +* easy and straightforward object oriented approach for interacting with metadata * consistent snapshots -* key management (supports ED25519, RSA and ECDSA key types) -* top-level delegation and signing thresholds -* metadata verification -* target delegation -* in-band and out-of-band metadata signing -* writing and reading metadata files -* root key rotation - -There's also a [client_example.go](examples/client/client_example.go) which demonstrates how to implement a client using the [updater](metadata/updater/updater.go) package. - -* it uses [https://jku.github.io/tuf-demo](https://jku.github.io/tuf-demo), a live TUF repository hosted on GitHub -* shows an example of how to initialize a client -* shows an example of how to download a target file -* it's worth noting that the repository is based on python-tuf so it also highlights the interoperability between the two implementations - -## Overview of the implementation +* signing and verifying metadata +* ED25519, RSA and ECDSA key types referenced by the latest TUF specification +* top-level role delegation +* target delegation via standard and hash bin delegations +* use of succinct hash bin delegations which significantly reduce the size of metadata +* support for unrecognized fields withing the metadata (preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) + +## CLI + +---------------------------- + +* [tuf-client](cli/tuf-client/) - a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification. To try it - run `make example-tuf-client-cli` + +## Examples + +---------------------------- + +* [basic_repository.go](examples/repository/basic_repository.go) example which demonstrates how to *manually* create and +maintain repository metadata using the low-level Metadata API. To try it - run `make example-repository` (the artifacts will be located at `examples/repository/`). + +* [client_example.go](examples/client/client_example.go) which demonstrates how to implement a client using the [updater](metadata/updater/updater.go) package. To try it - run `make example-client` (the artifacts will be located at `examples/client/`) + +## Package details ---------------------------- diff --git a/cli/README.md b/cli/README.md index a3239e9c..d4b40235 100644 --- a/cli/README.md +++ b/cli/README.md @@ -1,9 +1,13 @@ # tuf and tuf-client CLI tools +---------------------------- + ## Overview +---------------------------- + The following CLIs are experimental replacements of the CLI tools provided by the go-tuf package: -* [tuf-client](tuf-client/README.md) - a CLI tool that implements the client workflow specified by the The Update Framework (TUF) specification +* [tuf-client](tuf-client/README.md) - a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification * [tuf](tuf/README.md) - Not implemented diff --git a/cli/tuf-client/README.md b/cli/tuf-client/README.md index 101d736a..c7eea6bc 100644 --- a/cli/tuf-client/README.md +++ b/cli/tuf-client/README.md @@ -1,7 +1,17 @@ # tuf-client CLI +---------------------------- + ## Overview +---------------------------- + +`tuf-client` is a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification. + +The tuf-client can be used to query for available targets and to download them in a secure manner. + +All downloaded files are verified by signed metadata. + The CLI provides three commands: * `tuf-client init` - Initialize the client with trusted root.json metadata (Trust-On-First-Use) @@ -14,6 +24,8 @@ Run `tuf-client help` from the command line to get more detailed usage informati ## Usage +---------------------------- + ```bash # Initialize by providing a root.json # diff --git a/cli/tuf-client/cmd/root.go b/cli/tuf-client/cmd/root.go index 29a604b0..ce293a8a 100644 --- a/cli/tuf-client/cmd/root.go +++ b/cli/tuf-client/cmd/root.go @@ -29,7 +29,7 @@ var RepositoryURL string var rootCmd = &cobra.Command{ Use: "tuf-client", Short: "tuf-client - a client-side CLI tool for The Update Framework (TUF)", - Long: `tuf-client is a CLI tool that implements the client workflow specified by the The Update Framework (TUF) specification. + Long: `tuf-client is a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification. The tuf-client can be used to query for available targets and to download them in a secure manner. diff --git a/cli/tuf/README.md b/cli/tuf/README.md index dc3e296f..f6dd0b92 100644 --- a/cli/tuf/README.md +++ b/cli/tuf/README.md @@ -1,5 +1,9 @@ # tuf CLI +---------------------------- + ## Overview +---------------------------- + Not implemented diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..e8968766 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,33 @@ +# Examples + +---------------------------- + +## Basic repository + +---------------------------- + +See the [basic_repository.go](repository/basic_repository.go) example which demonstrates how to *manually* create and +maintain repository metadata using the low-level Metadata API. + +The example highlights the following functionality supported by the metadata API: + +* creation of top-level metadata +* target file handling +* consistent snapshots +* key management (supports ED25519, RSA and ECDSA key types) +* top-level delegation and signing thresholds +* metadata verification +* target delegation +* in-band and out-of-band metadata signing +* writing and reading metadata files +* root key rotation + +## Client example + +---------------------------- +There's also a [client_example.go](client/client_example.go) which demonstrates how to implement a client using the [updater](metadata/updater/updater.go) package. + +* it uses [https://jku.github.io/tuf-demo](https://jku.github.io/tuf-demo), a live TUF repository hosted on GitHub +* shows an example of how to initialize a client +* shows an example of how to download a target file +* the repository is based on python-tuf so it also highlights the interoperability between the two implementations From d7d6c3cacfb07e8ed1a0dc3269872d249c53e255 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 17:50:43 +0200 Subject: [PATCH 080/208] docs: fix typo Signed-off-by: Radoslav Dimitrov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bec217e5..6ba03ae7 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The `go-tuf-metadata` project provides the following functionality: * top-level role delegation * target delegation via standard and hash bin delegations * use of succinct hash bin delegations which significantly reduce the size of metadata -* support for unrecognized fields withing the metadata (preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) +* support for unrecognized fields within the metadata (preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) ## CLI From 01743a1c64bee6b8c020efcf41caba5632efdb6d Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 17:52:35 +0200 Subject: [PATCH 081/208] docs: update readme.md Signed-off-by: Radoslav Dimitrov --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ba03ae7..5dae733b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ secure content delivery and updates. It protects against various types of supply chain attacks and provides resilience to compromise. -go-tuf-metadata is started from the idea of providing a Go implementation of TUF that is heavily influenced by the +[go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) is started from the idea of providing a Go implementation of TUF that is heavily influenced by the design decisions made in [python-tuf](https://github.com/theupdateframework/python-tuf). ## About The Update Framework @@ -36,7 +36,7 @@ Please see [TUF's website](https://theupdateframework.com/) for more information ---------------------------- -The `go-tuf-metadata` project provides the following functionality: +The [go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) project provides the following functionality: * creation, reading and writing of metadata * easy and straightforward object oriented approach for interacting with metadata From 0b9b4bc51aa59737c054e7987d4e89a70adf599b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 17:53:15 +0200 Subject: [PATCH 082/208] docs: update readme.md Signed-off-by: Radoslav Dimitrov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5dae733b..19b106b6 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The [go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) project prov * top-level role delegation * target delegation via standard and hash bin delegations * use of succinct hash bin delegations which significantly reduce the size of metadata -* support for unrecognized fields within the metadata (preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) +* support for unrecognized fields within the metadata (i.e. preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) ## CLI From 9d0057d4253a317bfd77b8f213e57db4922d2632 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 17:54:39 +0200 Subject: [PATCH 083/208] docs: update readme.md Signed-off-by: Radoslav Dimitrov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 19b106b6..1e8f9e6a 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The [go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) project prov * ED25519, RSA and ECDSA key types referenced by the latest TUF specification * top-level role delegation * target delegation via standard and hash bin delegations -* use of succinct hash bin delegations which significantly reduce the size of metadata +* support of [succinct hash bin delegations](https://github.com/theupdateframework/taps/blob/master/tap15.md) which significantly reduce the size of metadata * support for unrecognized fields within the metadata (i.e. preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) ## CLI From 84ce7d27a0d471d61cbd5389565c9f5949a0dc87 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 27 Feb 2023 18:01:39 +0200 Subject: [PATCH 084/208] chore: update readme and fix linting error Signed-off-by: Radoslav Dimitrov --- README.md | 28 +++++++++++++++++----------- cli/tuf-client/cmd/root.go | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1e8f9e6a..a415a461 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ secure content delivery and updates. It protects against various types of supply chain attacks and provides resilience to compromise. -[go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) is started from the idea of providing a Go implementation of TUF that is heavily influenced by the +[go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) started from the idea of providing a Go implementation of TUF that is heavily influenced by the design decisions made in [python-tuf](https://github.com/theupdateframework/python-tuf). ## About The Update Framework @@ -28,7 +28,7 @@ re-implement to fit their needs. TUF is hosted by the [Linux Foundation](https://www.linuxfoundation.org/) as part of the [Cloud Native Computing Foundation](https://www.cncf.io/) (CNCF) and its design is [used in production](https://theupdateframework.io/adoptions/) -by various tech companies and open source organizations. +by various tech companies and open-source organizations. Please see [TUF's website](https://theupdateframework.com/) for more information about TUF! @@ -38,11 +38,11 @@ Please see [TUF's website](https://theupdateframework.com/) for more information The [go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) project provides the following functionality: -* creation, reading and writing of metadata -* easy and straightforward object oriented approach for interacting with metadata +* creation, reading, and writing of metadata +* an easy object-oriented approach for interacting with metadata * consistent snapshots * signing and verifying metadata -* ED25519, RSA and ECDSA key types referenced by the latest TUF specification +* ED25519, RSA, and ECDSA key types referenced by the latest TUF specification * top-level role delegation * target delegation via standard and hash bin delegations * support of [succinct hash bin delegations](https://github.com/theupdateframework/taps/blob/master/tap15.md) which significantly reduce the size of metadata @@ -52,16 +52,22 @@ The [go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) project prov ---------------------------- -* [tuf-client](cli/tuf-client/) - a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification. To try it - run `make example-tuf-client-cli` +* [tuf-client](cli/tuf-client/) - a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification. + +To try it - run `make example-tuf-client-cli` ## Examples ---------------------------- * [basic_repository.go](examples/repository/basic_repository.go) example which demonstrates how to *manually* create and -maintain repository metadata using the low-level Metadata API. To try it - run `make example-repository` (the artifacts will be located at `examples/repository/`). +maintain repository metadata using the low-level Metadata API. + +To try it - run `make example-repository` (the artifacts will be located at `examples/repository/`). + +* [client_example.go](examples/client/client_example.go) which demonstrates how to implement a client using the [updater](metadata/updater/updater.go) package. -* [client_example.go](examples/client/client_example.go) which demonstrates how to implement a client using the [updater](metadata/updater/updater.go) package. To try it - run `make example-client` (the artifacts will be located at `examples/client/`) +To try it - run `make example-client` (the artifacts will be located at `examples/client/`) ## Package details @@ -71,7 +77,7 @@ maintain repository metadata using the low-level Metadata API. To try it - run ` * The `metadata` package provides access to a Metadata file abstraction that closely follows the TUF specification’s document formats. This API handles de/serialization -to and from files and bytes, covers also the process to create and verify metadata +to and from files and bytes. It also covers the process of creating and verifying metadata signatures and makes it easier to access and modify metadata content. It is purely focused on individual pieces of Metadata and provides no concepts like “repository” or “update workflow”. @@ -84,7 +90,7 @@ the metadata with the caller making decisions on what is updated. ### The `config` package -* The `config` package is used to store configuration for an ``Updater`` instance. +* The `config` package stores configuration for an ``Updater`` instance. ### The `fetcher` package @@ -93,7 +99,7 @@ the metadata with the caller making decisions on what is updated. ### The `updater` package * The `updater` package provides an implementation of the TUF client workflow. -It provides ways to query and download target files securely, while handling the +It provides ways to query and download target files securely while handling the TUF update workflow behind the scenes. It is implemented on top of the Metadata API and can be used to implement various TUF clients with relatively little effort. diff --git a/cli/tuf-client/cmd/root.go b/cli/tuf-client/cmd/root.go index ce293a8a..d2de6274 100644 --- a/cli/tuf-client/cmd/root.go +++ b/cli/tuf-client/cmd/root.go @@ -37,7 +37,7 @@ All downloaded files are verified by signed metadata.`, Run: func(cmd *cobra.Command, args []string) { // show the help message if no command has been used if len(args) == 0 { - cmd.Help() + _ = cmd.Help() os.Exit(0) } }, From 8c39f795330bcf0ff93b0a88d9a8e1d1ba6d8f5c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 28 Feb 2023 10:50:12 +0200 Subject: [PATCH 085/208] chore: remove custom field from metafiles object Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 4 ---- metadata/types.go | 9 ++++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 66aeee65..055394b6 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -1045,9 +1045,6 @@ func (signed MetaFiles) MarshalJSON() ([]byte, error) { dict["hashes"] = signed.Hashes } dict["version"] = signed.Version - if signed.Custom != nil { - dict["custom"] = signed.Custom - } return json.Marshal(dict) } @@ -1066,7 +1063,6 @@ func (signed *MetaFiles) UnmarshalJSON(data []byte) error { delete(dict, "length") delete(dict, "hashes") delete(dict, "version") - delete(dict, "custom") signed.UnrecognizedFields = dict return nil } diff --git a/metadata/types.go b/metadata/types.go index 506b6032..e32d6051 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -127,11 +127,10 @@ type Hashes map[string]HexBytes // MetaFiles represents the value portion of METAFILES in TUF (used in Snapshot and Timestamp metadata). Used to store information about a particular meta file. type MetaFiles struct { - Length int64 `json:"length,omitempty"` - Hashes Hashes `json:"hashes,omitempty"` - Version int64 `json:"version"` - Custom *json.RawMessage `json:"custom,omitempty"` - UnrecognizedFields map[string]any `json:"-"` + Length int64 `json:"length,omitempty"` + Hashes Hashes `json:"hashes,omitempty"` + Version int64 `json:"version"` + UnrecognizedFields map[string]any `json:"-"` } // TargetFiles represents the value portion of TARGETS in TUF (used Targets metadata). Used to store information about a particular target file. From 9d92f469df138927da6b8f33a2a7fadacc47abf3 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 1 Mar 2023 16:55:52 +0200 Subject: [PATCH 086/208] chore: update readme and directory layout for cli Signed-off-by: Radoslav Dimitrov --- Makefile | 10 +++++++++- README.md | 12 ++++-------- examples/README.md | 16 +++++++++++++--- {cli => examples/cli}/README.md | 0 {cli => examples/cli}/tuf-client/README.md | 2 +- {cli => examples/cli}/tuf-client/cmd/get.go | 0 {cli => examples/cli}/tuf-client/cmd/init.go | 2 +- {cli => examples/cli}/tuf-client/cmd/reset.go | 0 {cli => examples/cli}/tuf-client/cmd/root.go | 0 {cli => examples/cli}/tuf-client/main.go | 2 +- {cli => examples/cli}/tuf/README.md | 0 {cli => examples/cli}/tuf/cmd/init.go | 0 {cli => examples/cli}/tuf/cmd/root.go | 0 {cli => examples/cli}/tuf/main.go | 2 +- 14 files changed, 30 insertions(+), 16 deletions(-) rename {cli => examples/cli}/README.md (100%) rename {cli => examples/cli}/tuf-client/README.md (98%) rename {cli => examples/cli}/tuf-client/cmd/get.go (100%) rename {cli => examples/cli}/tuf-client/cmd/init.go (99%) rename {cli => examples/cli}/tuf-client/cmd/reset.go (100%) rename {cli => examples/cli}/tuf-client/cmd/root.go (100%) rename {cli => examples/cli}/tuf-client/main.go (87%) rename {cli => examples/cli}/tuf/README.md (100%) rename {cli => examples/cli}/tuf/cmd/init.go (100%) rename {cli => examples/cli}/tuf/cmd/root.go (100%) rename {cli => examples/cli}/tuf/main.go (90%) diff --git a/Makefile b/Makefile index 6ee45090..7ece7bbb 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ build: $(addprefix build-, $(CLIS)) .PHONY: build-% build-%: @echo "Building $*" - @go build -o $* cli/$*/main.go + @go build -o $* examples/cli/$*/main.go # Test target .PHONY: test @@ -63,4 +63,12 @@ example-tuf-client-cli: build-tuf-client @sleep 2 @./tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt +# Linting target +.PHONY: clear +clear: + @rm -rf examples/repository/tmp* + @rm -rf examples/client/tmp* + @rm -rf tuf_download + @rm -rf tuf_metadata + @rm tuf-client diff --git a/README.md b/README.md index a415a461..8e7f3299 100644 --- a/README.md +++ b/README.md @@ -48,14 +48,6 @@ The [go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) project prov * support of [succinct hash bin delegations](https://github.com/theupdateframework/taps/blob/master/tap15.md) which significantly reduce the size of metadata * support for unrecognized fields within the metadata (i.e. preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) -## CLI - ----------------------------- - -* [tuf-client](cli/tuf-client/) - a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification. - -To try it - run `make example-tuf-client-cli` - ## Examples ---------------------------- @@ -69,6 +61,10 @@ To try it - run `make example-repository` (the artifacts will be located at `exa To try it - run `make example-client` (the artifacts will be located at `examples/client/`) +* [tuf-client CLI](examples/cli/tuf-client/) - a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification. + +To try it - run `make example-tuf-client-cli` + ## Package details ---------------------------- diff --git a/examples/README.md b/examples/README.md index e8968766..ccaa6c0f 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,7 +2,7 @@ ---------------------------- -## Basic repository +## Repository ---------------------------- @@ -14,7 +14,7 @@ The example highlights the following functionality supported by the metadata API * creation of top-level metadata * target file handling * consistent snapshots -* key management (supports ED25519, RSA and ECDSA key types) +* support a mixture of key types - ED25519, RSA and ECDSA * top-level delegation and signing thresholds * metadata verification * target delegation @@ -22,7 +22,7 @@ The example highlights the following functionality supported by the metadata API * writing and reading metadata files * root key rotation -## Client example +## Client ---------------------------- There's also a [client_example.go](client/client_example.go) which demonstrates how to implement a client using the [updater](metadata/updater/updater.go) package. @@ -31,3 +31,13 @@ There's also a [client_example.go](client/client_example.go) which demonstrates * shows an example of how to initialize a client * shows an example of how to download a target file * the repository is based on python-tuf so it also highlights the interoperability between the two implementations + +## CLI tools + +---------------------------- + +The following CLIs are experimental replacements of the CLI tools provided by the go-tuf package. At some point these will be moved to a separate repository. + +* [tuf-client](cli/tuf-client/README.md) - a CLI tool that implements the client workflow specified by The Update Framework (TUF) specification + +* [tuf](cli/tuf/README.md) - Not implemented diff --git a/cli/README.md b/examples/cli/README.md similarity index 100% rename from cli/README.md rename to examples/cli/README.md diff --git a/cli/tuf-client/README.md b/examples/cli/tuf-client/README.md similarity index 98% rename from cli/tuf-client/README.md rename to examples/cli/tuf-client/README.md index c7eea6bc..fc8653d4 100644 --- a/cli/tuf-client/README.md +++ b/examples/cli/tuf-client/README.md @@ -14,7 +14,7 @@ All downloaded files are verified by signed metadata. The CLI provides three commands: -* `tuf-client init` - Initialize the client with trusted root.json metadata (Trust-On-First-Use) +* `tuf-client init` - Initialize the client with trusted root.json metadata * `tuf-client get` - Download a target file * `tuf-client reset` - Resets the local environment. Warning: this deletes both the metadata and download folders and all of their contents diff --git a/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go similarity index 100% rename from cli/tuf-client/cmd/get.go rename to examples/cli/tuf-client/cmd/get.go diff --git a/cli/tuf-client/cmd/init.go b/examples/cli/tuf-client/cmd/init.go similarity index 99% rename from cli/tuf-client/cmd/init.go rename to examples/cli/tuf-client/cmd/init.go index 42b7a5ae..e87bbda2 100644 --- a/cli/tuf-client/cmd/init.go +++ b/examples/cli/tuf-client/cmd/init.go @@ -30,7 +30,7 @@ var rootPath string var initCmd = &cobra.Command{ Use: "init", Aliases: []string{"i"}, - Short: "Initialize the client with trusted root.json metadata (Trust-On-First-Use)", + Short: "Initialize the client with trusted root.json metadata", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) error { if RepositoryURL == "" { diff --git a/cli/tuf-client/cmd/reset.go b/examples/cli/tuf-client/cmd/reset.go similarity index 100% rename from cli/tuf-client/cmd/reset.go rename to examples/cli/tuf-client/cmd/reset.go diff --git a/cli/tuf-client/cmd/root.go b/examples/cli/tuf-client/cmd/root.go similarity index 100% rename from cli/tuf-client/cmd/root.go rename to examples/cli/tuf-client/cmd/root.go diff --git a/cli/tuf-client/main.go b/examples/cli/tuf-client/main.go similarity index 87% rename from cli/tuf-client/main.go rename to examples/cli/tuf-client/main.go index e6acd2e6..bbea26b9 100644 --- a/cli/tuf-client/main.go +++ b/examples/cli/tuf-client/main.go @@ -12,7 +12,7 @@ package main // SPDX-License-Identifier: BSD-2-Clause import ( - tufclient "github.com/rdimitrov/go-tuf-metadata/cli/tuf-client/cmd" + tufclient "github.com/rdimitrov/go-tuf-metadata/examples/cli/tuf-client/cmd" ) func main() { diff --git a/cli/tuf/README.md b/examples/cli/tuf/README.md similarity index 100% rename from cli/tuf/README.md rename to examples/cli/tuf/README.md diff --git a/cli/tuf/cmd/init.go b/examples/cli/tuf/cmd/init.go similarity index 100% rename from cli/tuf/cmd/init.go rename to examples/cli/tuf/cmd/init.go diff --git a/cli/tuf/cmd/root.go b/examples/cli/tuf/cmd/root.go similarity index 100% rename from cli/tuf/cmd/root.go rename to examples/cli/tuf/cmd/root.go diff --git a/cli/tuf/main.go b/examples/cli/tuf/main.go similarity index 90% rename from cli/tuf/main.go rename to examples/cli/tuf/main.go index fe6c10e3..730d3505 100644 --- a/cli/tuf/main.go +++ b/examples/cli/tuf/main.go @@ -15,7 +15,7 @@ import ( "fmt" "os" - tuf "github.com/rdimitrov/go-tuf-metadata/cli/tuf/cmd" + tuf "github.com/rdimitrov/go-tuf-metadata/examples/cli/tuf/cmd" ) func main() { From f2fb66ce31b46bcc652f9f136675cb7472e4e03b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 1 Mar 2023 17:08:13 +0200 Subject: [PATCH 087/208] chore: change tuf-client cli target flag name Signed-off-by: Radoslav Dimitrov --- examples/cli/tuf-client/cmd/get.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index e1f786a5..8e048e62 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -46,7 +46,7 @@ var getCmd = &cobra.Command{ } func init() { - getCmd.Flags().StringVarP(&targetsURL, "targetsURL", "t", "", "URL of where the target files are hosted") + getCmd.Flags().StringVarP(&targetsURL, "turl", "t", "", "URL of where the target files are hosted") rootCmd.AddCommand(getCmd) } From 4c66e3b11cafeabfe47c60e123a5682da3b1d170 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 1 Mar 2023 17:59:13 +0200 Subject: [PATCH 088/208] chore: make clear ignore if not exists Signed-off-by: Radoslav Dimitrov --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7ece7bbb..d059c678 100644 --- a/Makefile +++ b/Makefile @@ -70,5 +70,5 @@ clear: @rm -rf examples/client/tmp* @rm -rf tuf_download @rm -rf tuf_metadata - @rm tuf-client + @rm -f tuf-client From df623696ad8945d950aa067ffaefc0141f5f409d Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 2 Mar 2023 00:51:37 +0200 Subject: [PATCH 089/208] chore: add example make target with root-signing repository Signed-off-by: Radoslav Dimitrov --- Makefile | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d059c678..f7523225 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,17 @@ SHELL:=/bin/bash # Set environment variables CLIS:=tuf-client # tuf +GOLANGCI_LINT_DIR = $(shell pwd)/bin +GOLANGCI_LINT_BIN = $(GOLANGCI_LINT_DIR)/golangci-lint # Default target .PHONY: default default: build +##################### +# build section +##################### + # Build .PHONY: build build: $(addprefix build-, $(CLIS)) @@ -29,15 +35,26 @@ build-%: @echo "Building $*" @go build -o $* examples/cli/$*/main.go +##################### +# test section +##################### + # Test target .PHONY: test test: - @go test ./... + go test ./... + +##################### +# lint section +##################### -# Linting target .PHONY: lint lint: - @golangci-lint run + golangci-lint run -n + +##################### +# examples section +##################### # Target for demoing the examples/client/client_example.go .PHONY: example-client @@ -55,15 +72,29 @@ example-repository: .PHONY: example-tuf-client-cli example-tuf-client-cli: build-tuf-client @echo "Clearing any leftover artifacts..." - @./tuf-client reset --force + ./tuf-client reset --force @echo "Initializing the following https://jku.github.io/tuf-demo/ TUF repository" @sleep 2 - @./tuf-client init --url https://jku.github.io/tuf-demo/metadata + ./tuf-client init --url https://jku.github.io/tuf-demo/metadata @echo "Downloading the following target file - demo/succinctly-delegated-5.txt" @sleep 2 - @./tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt + ./tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt + +# Target for demoing the tuf-client cli with root-signing repo +.PHONY: example-root-signing +example-root-signing: build-tuf-client + @echo "Clearing any leftover artifacts..." + ./tuf-client reset --force + @echo "Downloading the initial root of trust" + @curl -L "https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository/5.root.json" > root.json + @echo "Initializing the following https://github.com/sigstore/root-signing/repository/repository TUF repository" + @sleep 2 + ./tuf-client init --url https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository --file root.json + @echo "Downloading the following target file - rekor.pub" + @sleep 2 + ./tuf-client get --url https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository --turl https://raw.githubusercontent.com/sigstore/root-signing/main/targets rekor.pub -# Linting target +# Clear target .PHONY: clear clear: @rm -rf examples/repository/tmp* @@ -71,4 +102,5 @@ clear: @rm -rf tuf_download @rm -rf tuf_metadata @rm -f tuf-client + @rm -f root.json From 5e8d3bada4fb4c59bcb37014183b22f26536143b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 2 Mar 2023 00:58:51 +0200 Subject: [PATCH 090/208] chore: remove leftover env vars in makefile Signed-off-by: Radoslav Dimitrov --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index f7523225..d0df0285 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,6 @@ SHELL:=/bin/bash # Set environment variables CLIS:=tuf-client # tuf -GOLANGCI_LINT_DIR = $(shell pwd)/bin -GOLANGCI_LINT_BIN = $(GOLANGCI_LINT_DIR)/golangci-lint # Default target .PHONY: default From 6a77989c6229bbb6ec3c7ecaa313bf48ee0a4131 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 13:48:34 +0200 Subject: [PATCH 091/208] chore(deps): bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#29) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](https://github.com/golang/crypto/compare/v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 3b2ebe75..d52284b6 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.2 - golang.org/x/crypto v0.6.0 + golang.org/x/crypto v0.7.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) @@ -23,10 +23,10 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/term v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/go.sum b/go.sum index ddb3f331..ec85f5bf 100644 --- a/go.sum +++ b/go.sum @@ -59,19 +59,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc h1:ijGwO+0vL2hJt5gaygqP2j6PfflOBrRot0IczKbmtio= google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= From cb70d504af5de5e3acf5327757e67eb50dc81f65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 13:48:54 +0200 Subject: [PATCH 092/208] chore(deps): bump github.com/sigstore/sigstore from 1.5.2 to 1.6.0 (#28) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.5.2 to 1.6.0. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.5.2...v1.6.0) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index d52284b6..336fd31e 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 - github.com/sigstore/sigstore v1.5.2 + github.com/sigstore/sigstore v1.6.0 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.2 @@ -21,7 +21,7 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 // indirect + github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/sys v0.6.0 // indirect diff --git a/go.sum b/go.sum index ec85f5bf..63d50d6a 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,8 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= -github.com/sigstore/sigstore v1.5.2 h1:rvZSPJDH2ysoc8kjW9v4nv1UX3XwSA8y4x6Dk7hA0D4= -github.com/sigstore/sigstore v1.5.2/go.mod h1:wxhp9KoaOpeb1VLKILruD283KJqPSqX+3TuBByVDZ6E= +github.com/sigstore/sigstore v1.6.0 h1:0fYHVoUlPU3WM8o3U1jT9SI2lqQE68XbG+qWncXaZC8= +github.com/sigstore/sigstore v1.6.0/go.mod h1:+55pf6HZ15kf60c08W+GH95JQbAcnVyUBquQGSVdsto= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= @@ -53,8 +53,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 h1:1i/Afw3rmaR1gF3sfVkG2X6ldkikQwA9zY380LrR5YI= -github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY= +github.com/theupdateframework/go-tuf v0.5.2 h1:habfDzTmpbzBLIFGWa2ZpVhYvFBoK0C1onC3a4zuPRA= +github.com/theupdateframework/go-tuf v0.5.2/go.mod h1:SyMV5kg5n4uEclsyxXJZI2UxPFJNDc4Y+r7wv+MlvTA= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= From 44e84f383da800c23073957e683b84d15e212210 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 14:39:36 +0200 Subject: [PATCH 093/208] chore: test against root-signing sigstore repo Signed-off-by: Radoslav Dimitrov --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d0df0285..d9f12ea2 100644 --- a/Makefile +++ b/Makefile @@ -84,17 +84,17 @@ example-root-signing: build-tuf-client @echo "Clearing any leftover artifacts..." ./tuf-client reset --force @echo "Downloading the initial root of trust" - @curl -L "https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository/5.root.json" > root.json - @echo "Initializing the following https://github.com/sigstore/root-signing/repository/repository TUF repository" + @curl -L "https://sigstore-tuf-root.storage.googleapis.com/5.root.json" > root.json + @echo "Initializing the following https://sigstore-tuf-root.storage.googleapis.com TUF repository" @sleep 2 - ./tuf-client init --url https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository --file root.json + ./tuf-client init --url https://sigstore-tuf-root.storage.googleapis.com --file root.json @echo "Downloading the following target file - rekor.pub" @sleep 2 - ./tuf-client get --url https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository --turl https://raw.githubusercontent.com/sigstore/root-signing/main/targets rekor.pub + ./tuf-client get --url https://sigstore-tuf-root.storage.googleapis.com --turl https://raw.githubusercontent.com/sigstore/root-signing/main/targets rekor.pub -# Clear target -.PHONY: clear -clear: +# Clean target +.PHONY: clean +clean: @rm -rf examples/repository/tmp* @rm -rf examples/client/tmp* @rm -rf tuf_download From 987667857fbaaaff8bc2e89b94edf1b643e4618e Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 14:40:58 +0200 Subject: [PATCH 094/208] chore: remove custom field from top-level metadata Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 20 ----------------- metadata/metadata_test.go | 47 ++++++++++++++++++++++++++++++--------- metadata/types.go | 17 +++++--------- 3 files changed, 43 insertions(+), 41 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 055394b6..7dd50227 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -885,9 +885,6 @@ func (signed RootType) MarshalJSON() ([]byte, error) { dict["expires"] = signed.Expires dict["keys"] = signed.Keys dict["roles"] = signed.Roles - if signed.Custom != nil { - dict["custom"] = signed.Custom - } return json.Marshal(dict) } @@ -910,7 +907,6 @@ func (signed *RootType) UnmarshalJSON(data []byte) error { delete(dict, "expires") delete(dict, "keys") delete(dict, "roles") - delete(dict, "custom") signed.UnrecognizedFields = dict return nil } @@ -925,9 +921,6 @@ func (signed SnapshotType) MarshalJSON() ([]byte, error) { dict["version"] = signed.Version dict["expires"] = signed.Expires dict["meta"] = signed.Meta - if signed.Custom != nil { - dict["custom"] = signed.Custom - } return json.Marshal(dict) } @@ -948,7 +941,6 @@ func (signed *SnapshotType) UnmarshalJSON(data []byte) error { delete(dict, "version") delete(dict, "expires") delete(dict, "meta") - delete(dict, "custom") signed.UnrecognizedFields = dict return nil } @@ -963,9 +955,6 @@ func (signed TimestampType) MarshalJSON() ([]byte, error) { dict["version"] = signed.Version dict["expires"] = signed.Expires dict["meta"] = signed.Meta - if signed.Custom != nil { - dict["custom"] = signed.Custom - } return json.Marshal(dict) } @@ -986,7 +975,6 @@ func (signed *TimestampType) UnmarshalJSON(data []byte) error { delete(dict, "version") delete(dict, "expires") delete(dict, "meta") - delete(dict, "custom") signed.UnrecognizedFields = dict return nil } @@ -1004,9 +992,6 @@ func (signed TargetsType) MarshalJSON() ([]byte, error) { if signed.Delegations != nil { dict["delegations"] = signed.Delegations } - if signed.Custom != nil { - dict["custom"] = signed.Custom - } return json.Marshal(dict) } @@ -1028,7 +1013,6 @@ func (signed *TargetsType) UnmarshalJSON(data []byte) error { delete(dict, "expires") delete(dict, "targets") delete(dict, "delegations") - delete(dict, "custom") signed.UnrecognizedFields = dict return nil } @@ -1107,9 +1091,6 @@ func (key *Key) MarshalJSON() ([]byte, error) { dict["keytype"] = key.Type dict["scheme"] = key.Scheme dict["keyval"] = key.Value - if key.Custom != nil { - dict["custom"] = key.Custom - } return json.Marshal(dict) } @@ -1129,7 +1110,6 @@ func (key *Key) UnmarshalJSON(data []byte) error { delete(dict, "keytype") delete(dict, "scheme") delete(dict, "keyval") - delete(dict, "custom") key.UnrecognizedFields = dict return nil } diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 189b2673..eb43ab89 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -13,6 +13,7 @@ package metadata import ( "encoding/json" + "fmt" "testing" "time" @@ -334,31 +335,57 @@ func TestIsExpiredTargets(t *testing.T) { assert.False(t, meta.Signed.IsExpired(time.Now().UTC())) } -func TestCustomField(t *testing.T) { +func TestUnrecognizedField(t *testing.T) { + // fixed expire expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) - testCustomJSON := json.RawMessage([]byte(`{"test":true}`)) + + // unrecognized field to test + testUnrecognizedField := map[string]any{"test": "true"} root := Root(expire) - root.Signed.Custom = &testCustomJSON + root.Signed.UnrecognizedFields = testUnrecognizedField rootJSON, err := root.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"signatures\":[]}"), rootJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1},\"signatures\":[]}"), rootJSON) targets := Targets(expire) - targets.Signed.Custom = &testCustomJSON + targets.Signed.UnrecognizedFields = testUnrecognizedField targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{},\"version\":1},\"signatures\":[]}"), targetsJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), targetsJSON) snapshot := Snapshot(expire) - snapshot.Signed.Custom = &testCustomJSON + snapshot.Signed.UnrecognizedFields = testUnrecognizedField snapshotJSON, err := snapshot.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"signatures\":[]}"), snapshotJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"meta\":{\"targets.json\":{\"version\":1}},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), snapshotJSON) timestamp := Timestamp(expire) - timestamp.Signed.Custom = &testCustomJSON + timestamp.Signed.UnrecognizedFields = testUnrecognizedField timestampJSON, err := timestamp.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"custom\":{\"test\":true},\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"signatures\":[]}"), timestampJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"meta\":{\"snapshot.json\":{\"version\":1}},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), timestampJSON) +} + +func TestTargetFilesCustomdField(t *testing.T) { + // fixed expire + expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) + + // custom JSON to test + testCustomJSON := json.RawMessage([]byte(`{"test":true}`)) + + // create a targets metadata + targets := Targets(expire) + assert.NotNil(t, targets) + + // create a targetfile with the custom JSON + targetFile := TargetFile() + targetFile.Custom = &testCustomJSON + + // add the targetfile to targets metadata + targets.Signed.Targets["testTarget"] = *targetFile + targetsJSON, err := targets.ToBytes(false) + assert.NoError(t, err) + fmt.Println(string(targetsJSON)) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{\"testTarget\":{\"custom\":{\"test\":true},\"hashes\":{},\"length\":0}},\"version\":1},\"signatures\":[]}"), targetsJSON) } diff --git a/metadata/types.go b/metadata/types.go index e32d6051..3636481c 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -60,7 +60,6 @@ type RootType struct { Expires time.Time `json:"expires"` Keys map[string]*Key `json:"keys"` Roles map[string]*Role `json:"roles"` - Custom *json.RawMessage `json:"custom,omitempty"` UnrecognizedFields map[string]any `json:"-"` } @@ -71,7 +70,6 @@ type SnapshotType struct { Version int64 `json:"version"` Expires time.Time `json:"expires"` Meta map[string]MetaFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` UnrecognizedFields map[string]any `json:"-"` } @@ -83,7 +81,6 @@ type TargetsType struct { Expires time.Time `json:"expires"` Targets map[string]TargetFiles `json:"targets"` Delegations *Delegations `json:"delegations,omitempty"` - Custom *json.RawMessage `json:"custom,omitempty"` UnrecognizedFields map[string]any `json:"-"` } @@ -94,19 +91,17 @@ type TimestampType struct { Version int64 `json:"version"` Expires time.Time `json:"expires"` Meta map[string]MetaFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` UnrecognizedFields map[string]any `json:"-"` } // Key represents a key in TUF type Key struct { - Type string `json:"keytype"` - Scheme string `json:"scheme"` - Value KeyVal `json:"keyval"` - Custom *json.RawMessage `json:"custom,omitempty"` - id string `json:"-"` - idOnce sync.Once `json:"-"` - UnrecognizedFields map[string]any `json:"-"` + Type string `json:"keytype"` + Scheme string `json:"scheme"` + Value KeyVal `json:"keyval"` + id string `json:"-"` + idOnce sync.Once `json:"-"` + UnrecognizedFields map[string]any `json:"-"` } type KeyVal struct { From 20ed0bfea994fdbd112f12d22709bad918d1bd86 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 18:12:09 +0200 Subject: [PATCH 095/208] fix: hash-prefixed target files support Signed-off-by: Radoslav Dimitrov --- Makefile | 2 +- examples/cli/tuf-client/cmd/get.go | 8 ++++++++ examples/client/client_example.go | 2 ++ metadata/config/config.go | 2 +- metadata/updater/updater.go | 14 +++++++++----- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d9f12ea2..879d25cd 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,7 @@ example-root-signing: build-tuf-client ./tuf-client init --url https://sigstore-tuf-root.storage.googleapis.com --file root.json @echo "Downloading the following target file - rekor.pub" @sleep 2 - ./tuf-client get --url https://sigstore-tuf-root.storage.googleapis.com --turl https://raw.githubusercontent.com/sigstore/root-signing/main/targets rekor.pub + ./tuf-client get --url https://sigstore-tuf-root.storage.googleapis.com --turl https://sigstore-tuf-root.storage.googleapis.com/targets --prefixed rekor.pub # Clean target .PHONY: clean diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 8e048e62..83f97dbb 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -17,12 +17,14 @@ import ( "path/filepath" "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/updater" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) var targetsURL string +var useHashedTargetFiles bool type localConfig struct { MetadataDir string @@ -47,6 +49,7 @@ var getCmd = &cobra.Command{ func init() { getCmd.Flags().StringVarP(&targetsURL, "turl", "t", "", "URL of where the target files are hosted") + getCmd.Flags().BoolVarP(&useHashedTargetFiles, "prefixed", "p", false, "Use hash-prefixed target files when using consistent snapshots.") rootCmd.AddCommand(getCmd) } @@ -62,6 +65,10 @@ func GetCmd(target string) error { return err } + // updater configuration + cfg := config.New() // default config + cfg.PrefixTargetsWithHash = useHashedTargetFiles + // create an Updater instance up, err := updater.New( env.MetadataDir, @@ -69,6 +76,7 @@ func GetCmd(target string) error { env.TargetsURL, env.DownloadDir, env.MetadataDir, + cfg, nil) if err != nil { return fmt.Errorf("failed to create Updater instance: %w", err) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 1c76ea0a..68c9d8a0 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -21,6 +21,7 @@ import ( log "github.com/sirupsen/logrus" + "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/updater" ) @@ -137,6 +138,7 @@ func DownloadTarget(localMetadataDir, target string) error { targetsBaseURL, filepath.Join(localMetadataDir, "download"), localMetadataDir, + config.New(), // default config nil) if err != nil { return fmt.Errorf("failed to create Updater instance: %w", err) diff --git a/metadata/config/config.go b/metadata/config/config.go index 2166ab33..5c5ceae5 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -31,6 +31,6 @@ func New() *UpdaterConfig { TimestampMaxLength: 16384, // bytes SnapshotMaxLength: 2000000, // bytes TargetsMaxLength: 5000000, // bytes - PrefixTargetsWithHash: false, + PrefixTargetsWithHash: false, // do not use hash-prefixed target files in case of consistent snapshots } } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 05c812ed..8a492946 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -68,7 +68,7 @@ type Updater struct { } // New creates a new Updater instance and loads trusted root metadata -func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir, trustedRootDir string, f fetcher.Fetcher) (*Updater, error) { +func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir, trustedRootDir string, cfg *config.UpdaterConfig, f fetcher.Fetcher) (*Updater, error) { // local path of the trusted root metadata file used for bootstrapping rootPath := metadata.ROOT if trustedRootDir != "" { @@ -79,13 +79,14 @@ func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir, trustedRootDir if f == nil { f = &fetcher.DefaultFetcher{} } + // create an updater instance updater := &Updater{ metadataDir: metadataDir, metadataBaseUrl: ensureTrailingSlash(metadataBaseUrl), targetBaseUrl: ensureTrailingSlash(targetBaseUrl), targetDir: targetDir, - config: config.New(), + config: cfg, fetcher: f, } @@ -180,9 +181,12 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath } dirName, baseName, ok := strings.Cut(targetFilePath, "/") if !ok { - return "", metadata.ErrValue{Msg: fmt.Sprintf("error handling targetFilePath %s, no separator found", targetFilePath)} + // . + targetFilePath = fmt.Sprintf("%s.%s", hashes, dirName) + } else { + // /. + targetFilePath = fmt.Sprintf("%s/%s.%s", dirName, hashes, baseName) } - targetFilePath = fmt.Sprintf("%s/%s.%s", dirName, hashes, baseName) } fullURL := fmt.Sprintf("%s%s", targetBaseURL, targetFilePath) data, err := update.fetcher.DownloadFile(fullURL, targetFile.Length) @@ -198,7 +202,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath if err != nil { return "", err } - log.Infof("Downloaded target %s\n", targetFile.Path) + log.Infof("Downloaded target %s", targetFile.Path) return filePath, nil } From 0a12f5aaa25676d5ea2e7e9fd1b8a072cb0e3c38 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 18:29:29 +0200 Subject: [PATCH 096/208] fix: make hash prefixed targetfiles enabled by default Signed-off-by: Radoslav Dimitrov --- Makefile | 4 ++-- examples/cli/tuf-client/README.md | 6 ++++-- examples/cli/tuf-client/cmd/get.go | 6 +++--- examples/client/client_example.go | 5 ++++- metadata/config/config.go | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 879d25cd..d0c8b210 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ example-tuf-client-cli: build-tuf-client ./tuf-client init --url https://jku.github.io/tuf-demo/metadata @echo "Downloading the following target file - demo/succinctly-delegated-5.txt" @sleep 2 - ./tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt + ./tuf-client get --url https://jku.github.io/tuf-demo/metadata --turl https://jku.github.io/tuf-demo/targets --nonprefixed demo/succinctly-delegated-5.txt # Target for demoing the tuf-client cli with root-signing repo .PHONY: example-root-signing @@ -90,7 +90,7 @@ example-root-signing: build-tuf-client ./tuf-client init --url https://sigstore-tuf-root.storage.googleapis.com --file root.json @echo "Downloading the following target file - rekor.pub" @sleep 2 - ./tuf-client get --url https://sigstore-tuf-root.storage.googleapis.com --turl https://sigstore-tuf-root.storage.googleapis.com/targets --prefixed rekor.pub + ./tuf-client get --url https://sigstore-tuf-root.storage.googleapis.com --turl https://sigstore-tuf-root.storage.googleapis.com/targets rekor.pub # Clean target .PHONY: clean diff --git a/examples/cli/tuf-client/README.md b/examples/cli/tuf-client/README.md index fc8653d4..5813a628 100644 --- a/examples/cli/tuf-client/README.md +++ b/examples/cli/tuf-client/README.md @@ -47,9 +47,11 @@ $ tuf-client get --url https://jku.github.io/tuf-demo/metadata demo/succinctly-d # Get a target by providing a URL of where target files are located # -# Usage: tuf-client get --url -t +# Usage: tuf-client get --url -t # -$ tuf-client get --url https://jku.github.io/tuf-demo/metadata -t https://jku.github.io/tuf-demo/targets demo/succinctly-delegated-5.txt +# Use --nonprefixed for non-prefixed target files +# +$ tuf-client get --url https://jku.github.io/tuf-demo/metadata --turl https://jku.github.io/tuf-demo/targets --nonprefixed demo/succinctly-delegated-5.txt # Reset your local environment $ tuf-client reset diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 83f97dbb..06d966ff 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -24,7 +24,7 @@ import ( ) var targetsURL string -var useHashedTargetFiles bool +var useNonHashPrefixedTargetFiles bool type localConfig struct { MetadataDir string @@ -49,7 +49,7 @@ var getCmd = &cobra.Command{ func init() { getCmd.Flags().StringVarP(&targetsURL, "turl", "t", "", "URL of where the target files are hosted") - getCmd.Flags().BoolVarP(&useHashedTargetFiles, "prefixed", "p", false, "Use hash-prefixed target files when using consistent snapshots.") + getCmd.Flags().BoolVarP(&useNonHashPrefixedTargetFiles, "nonprefixed", "", false, "Do not use hash-prefixed target files with consistent snapshots") rootCmd.AddCommand(getCmd) } @@ -67,7 +67,7 @@ func GetCmd(target string) error { // updater configuration cfg := config.New() // default config - cfg.PrefixTargetsWithHash = useHashedTargetFiles + cfg.PrefixTargetsWithHash = !useNonHashPrefixedTargetFiles // create an Updater instance up, err := updater.New( diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 68c9d8a0..291a36e4 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -131,6 +131,9 @@ func DownloadTarget(localMetadataDir, target string) error { metadataBaseURL, _ := url.JoinPath(baseURL, baseURLMetadataDir) targetsBaseURL, _ := url.JoinPath(baseURL, baseURLTargetsDir) + cfg := config.New() // default config + cfg.PrefixTargetsWithHash = false // do not use hash-prefixed target files with consistent snapshots + // create a new Updater instance up, err := updater.New( localMetadataDir, @@ -138,7 +141,7 @@ func DownloadTarget(localMetadataDir, target string) error { targetsBaseURL, filepath.Join(localMetadataDir, "download"), localMetadataDir, - config.New(), // default config + cfg, nil) if err != nil { return fmt.Errorf("failed to create Updater instance: %w", err) diff --git a/metadata/config/config.go b/metadata/config/config.go index 5c5ceae5..6193da15 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -31,6 +31,6 @@ func New() *UpdaterConfig { TimestampMaxLength: 16384, // bytes SnapshotMaxLength: 2000000, // bytes TargetsMaxLength: 5000000, // bytes - PrefixTargetsWithHash: false, // do not use hash-prefixed target files in case of consistent snapshots + PrefixTargetsWithHash: true, // use hash-prefixed target files with consistent snapshots } } From 0f30f9b64e68f14ae0bbaa7796c92c0fa9b4c9eb Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 20:45:20 +0200 Subject: [PATCH 097/208] chore: improve handling for unrecognised fields Signed-off-by: Radoslav Dimitrov --- examples/repository/basic_repository.go | 10 ++-- metadata/metadata.go | 76 ++++++++++++++----------- metadata/metadata_test.go | 2 +- metadata/types.go | 38 ++++++------- metadata/updater/updater.go | 2 +- 5 files changed, 68 insertions(+), 60 deletions(-) diff --git a/examples/repository/basic_repository.go b/examples/repository/basic_repository.go index da9b6cb9..39699e7d 100644 --- a/examples/repository/basic_repository.go +++ b/examples/repository/basic_repository.go @@ -81,7 +81,7 @@ func main() { if err != nil { panic(fmt.Sprintln("basic_repository.go:", "generating target file info failed", err)) } - roles.Targets("targets").Signed.Targets[targetPath] = *targetFileInfo + roles.Targets("targets").Signed.Targets[targetPath] = targetFileInfo // Snapshot (consistency) // ---------------------- @@ -305,7 +305,7 @@ func main() { // Create a new targets role, akin to how we created top-level targets above, and // add target file info from above according to the delegatee's responsibility. delegatee := metadata.Targets(helperExpireIn(7)) - delegatee.Signed.Targets[targetPath] = *targetFileInfo + delegatee.Signed.Targets[targetPath] = targetFileInfo roles.SetTargets(delegateeName, delegatee) // Delegator @@ -351,12 +351,12 @@ func main() { roles.Targets("targets").Signed.Version += 1 // Update snapshot to account for changed and new targets(delegatee) metadata - roles.Snapshot().Signed.Meta["targets.json"] = *metadata.MetaFile(roles.Targets("targets").Signed.Version) - roles.Snapshot().Signed.Meta[fmt.Sprintf("%s.json", delegateeName)] = *metadata.MetaFile(1) + roles.Snapshot().Signed.Meta["targets.json"] = metadata.MetaFile(roles.Targets("targets").Signed.Version) + roles.Snapshot().Signed.Meta[fmt.Sprintf("%s.json", delegateeName)] = metadata.MetaFile(1) roles.Snapshot().Signed.Version += 1 // Update timestamp to account for changed snapshot metadata - roles.Timestamp().Signed.Meta["snapshot.json"] = *metadata.MetaFile(roles.Snapshot().Signed.Version) + roles.Timestamp().Signed.Meta["snapshot.json"] = metadata.MetaFile(roles.Snapshot().Signed.Version) roles.Timestamp().Signed.Version += 1 // Sign and write metadata for all changed roles, i.e. all but root diff --git a/metadata/metadata.go b/metadata/metadata.go index 7dd50227..a521ef2f 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -78,7 +78,7 @@ func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { SpecVersion: SPECIFICATION_VERSION, Version: 1, Expires: expires[0], - Meta: map[string]MetaFiles{ + Meta: map[string]*MetaFiles{ "targets.json": { Version: 1, }, @@ -101,7 +101,7 @@ func Timestamp(expires ...time.Time) *Metadata[TimestampType] { SpecVersion: SPECIFICATION_VERSION, Version: 1, Expires: expires[0], - Meta: map[string]MetaFiles{ + Meta: map[string]*MetaFiles{ "snapshot.json": { Version: 1, }, @@ -124,7 +124,7 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { SpecVersion: SPECIFICATION_VERSION, Version: 1, Expires: expires[0], - Targets: map[string]TargetFiles{}, + Targets: map[string]*TargetFiles{}, }, Signatures: []Signature{}, } @@ -875,8 +875,8 @@ func (b HexBytes) String() string { func (signed RootType) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if signed.UnrecognizedFields != nil { - dict = signed.UnrecognizedFields + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion @@ -913,8 +913,8 @@ func (signed *RootType) UnmarshalJSON(data []byte) error { func (signed SnapshotType) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if signed.UnrecognizedFields != nil { - dict = signed.UnrecognizedFields + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion @@ -947,8 +947,8 @@ func (signed *SnapshotType) UnmarshalJSON(data []byte) error { func (signed TimestampType) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if signed.UnrecognizedFields != nil { - dict = signed.UnrecognizedFields + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion @@ -981,8 +981,8 @@ func (signed *TimestampType) UnmarshalJSON(data []byte) error { func (signed TargetsType) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if signed.UnrecognizedFields != nil { - dict = signed.UnrecognizedFields + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) } dict["_type"] = signed.Type dict["spec_version"] = signed.SpecVersion @@ -1017,15 +1017,16 @@ func (signed *TargetsType) UnmarshalJSON(data []byte) error { return nil } -func (signed MetaFiles) MarshalJSON() ([]byte, error) { +func (signed *MetaFiles) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if signed.UnrecognizedFields != nil { - dict = signed.UnrecognizedFields + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) } + // length and hashes are optional if signed.Length != 0 { dict["length"] = signed.Length } - if signed.Hashes != nil { + if len(signed.Hashes) != 0 { dict["hashes"] = signed.Hashes } dict["version"] = signed.Version @@ -1051,10 +1052,10 @@ func (signed *MetaFiles) UnmarshalJSON(data []byte) error { return nil } -func (signed TargetFiles) MarshalJSON() ([]byte, error) { +func (signed *TargetFiles) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if signed.UnrecognizedFields != nil { - dict = signed.UnrecognizedFields + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) } dict["length"] = signed.Length dict["hashes"] = signed.Hashes @@ -1085,8 +1086,8 @@ func (signed *TargetFiles) UnmarshalJSON(data []byte) error { func (key *Key) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if key.UnrecognizedFields != nil { - dict = key.UnrecognizedFields + if len(key.UnrecognizedFields) != 0 { + copyMapValues(key.UnrecognizedFields, dict) } dict["keytype"] = key.Type dict["scheme"] = key.Scheme @@ -1116,8 +1117,8 @@ func (key *Key) UnmarshalJSON(data []byte) error { func (meta *Metadata[T]) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if meta.UnrecognizedFields != nil { - dict = meta.UnrecognizedFields + if len(meta.UnrecognizedFields) != 0 { + copyMapValues(meta.UnrecognizedFields, dict) } dict["signed"] = meta.Signed dict["signatures"] = meta.Signatures @@ -1186,8 +1187,8 @@ func (meta *Metadata[T]) UnmarshalJSON(data []byte) error { func (s Signature) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if s.UnrecognizedFields != nil { - dict = s.UnrecognizedFields + if len(s.UnrecognizedFields) != 0 { + copyMapValues(s.UnrecognizedFields, dict) } dict["keyid"] = s.KeyID dict["sig"] = s.Signature @@ -1214,8 +1215,8 @@ func (s *Signature) UnmarshalJSON(data []byte) error { func (kv KeyVal) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if kv.UnrecognizedFields != nil { - dict = kv.UnrecognizedFields + if len(kv.UnrecognizedFields) != 0 { + copyMapValues(kv.UnrecognizedFields, dict) } dict["public"] = kv.PublicKey return json.Marshal(dict) @@ -1240,8 +1241,8 @@ func (kv *KeyVal) UnmarshalJSON(data []byte) error { func (role *Role) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if role.UnrecognizedFields != nil { - dict = role.UnrecognizedFields + if len(role.UnrecognizedFields) != 0 { + copyMapValues(role.UnrecognizedFields, dict) } dict["keyids"] = role.KeyIDs dict["threshold"] = role.Threshold @@ -1268,8 +1269,8 @@ func (role *Role) UnmarshalJSON(data []byte) error { func (d *Delegations) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if d.UnrecognizedFields != nil { - dict = d.UnrecognizedFields + if len(d.UnrecognizedFields) != 0 { + copyMapValues(d.UnrecognizedFields, dict) } // only one is allowed dict["keys"] = d.Keys @@ -1302,8 +1303,8 @@ func (d *Delegations) UnmarshalJSON(data []byte) error { func (role DelegatedRole) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if role.UnrecognizedFields != nil { - dict = role.UnrecognizedFields + if len(role.UnrecognizedFields) != 0 { + copyMapValues(role.UnrecognizedFields, dict) } dict["name"] = role.Name dict["keyids"] = role.KeyIDs @@ -1345,8 +1346,8 @@ func (role *DelegatedRole) UnmarshalJSON(data []byte) error { func (role *SuccinctRoles) MarshalJSON() ([]byte, error) { dict := map[string]any{} - if role.UnrecognizedFields != nil { - dict = role.UnrecognizedFields + if len(role.UnrecognizedFields) != 0 { + copyMapValues(role.UnrecognizedFields, dict) } dict["keyids"] = role.KeyIDs dict["threshold"] = role.Threshold @@ -1374,3 +1375,10 @@ func (role *SuccinctRoles) UnmarshalJSON(data []byte) error { role.UnrecognizedFields = dict return nil } + +// copyMapValues copies the values of the src map to dst +func copyMapValues(src, dst map[string]any) { + for k, v := range src { + dst[k] = v + } +} diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index eb43ab89..cad9f82d 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -383,7 +383,7 @@ func TestTargetFilesCustomdField(t *testing.T) { targetFile.Custom = &testCustomJSON // add the targetfile to targets metadata - targets.Signed.Targets["testTarget"] = *targetFile + targets.Signed.Targets["testTarget"] = targetFile targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) fmt.Println(string(targetsJSON)) diff --git a/metadata/types.go b/metadata/types.go index 3636481c..6da81ec3 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -65,33 +65,33 @@ type RootType struct { // SnapshotType represents the Signed portion of a snapshot metadata type SnapshotType struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta map[string]MetaFiles `json:"meta"` - UnrecognizedFields map[string]any `json:"-"` + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Meta map[string]*MetaFiles `json:"meta"` + UnrecognizedFields map[string]any `json:"-"` } // TargetsType represents the Signed portion of a targets metadata type TargetsType struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Targets map[string]TargetFiles `json:"targets"` - Delegations *Delegations `json:"delegations,omitempty"` - UnrecognizedFields map[string]any `json:"-"` + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Targets map[string]*TargetFiles `json:"targets"` + Delegations *Delegations `json:"delegations,omitempty"` + UnrecognizedFields map[string]any `json:"-"` } // TimestampType represents the Signed portion of a timestamp metadata type TimestampType struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta map[string]MetaFiles `json:"meta"` - UnrecognizedFields map[string]any `json:"-"` + Type string `json:"_type"` + SpecVersion string `json:"spec_version"` + Version int64 `json:"version"` + Expires time.Time `json:"expires"` + Meta map[string]*MetaFiles `json:"meta"` + UnrecognizedFields map[string]any `json:"-"` } // Key represents a key in TUF diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 8a492946..f46f1505 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -480,7 +480,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. log.Debugf("Found target in current role %s\n", delegation.Role) // Probably not pretty, but populate TargetFiles.Path since this is not handled in fromBytes() target.Path = targetFilePath - return &target, nil + return target, nil } // after pre-order check, add current role to set of visited roles visitedRoleNames[delegation.Role] = true From 88b46cb2e6e04ded06caf5c0389c18e8bd890773 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 21:20:23 +0200 Subject: [PATCH 098/208] tests: update unrecognised field tests Signed-off-by: Radoslav Dimitrov --- metadata/metadata_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index cad9f82d..245401a7 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -79,7 +79,7 @@ func TestDefaultValuesSnapshot(t *testing.T) { assert.Equal(t, int64(1), meta.Signed.Version) // Targets meta - assert.Equal(t, map[string]MetaFiles{"targets.json": {Version: 1}}, meta.Signed.Meta) + assert.Equal(t, map[string]*MetaFiles{"targets.json": {Version: 1}}, meta.Signed.Meta) // Signatures assert.Equal(t, []Signature{}, meta.Signatures) @@ -107,7 +107,7 @@ func TestDefaultValuesTimestamp(t *testing.T) { assert.Equal(t, int64(1), meta.Signed.Version) // Snapshot meta - assert.Equal(t, map[string]MetaFiles{"snapshot.json": {Version: 1}}, meta.Signed.Meta) + assert.Equal(t, map[string]*MetaFiles{"snapshot.json": {Version: 1}}, meta.Signed.Meta) // Signatures assert.Equal(t, []Signature{}, meta.Signatures) @@ -135,7 +135,7 @@ func TestDefaultValuesTargets(t *testing.T) { assert.Equal(t, int64(1), meta.Signed.Version) // Target files - assert.Equal(t, map[string]TargetFiles{}, meta.Signed.Targets) + assert.Equal(t, map[string]*TargetFiles{}, meta.Signed.Targets) // Signatures assert.Equal(t, []Signature{}, meta.Signatures) @@ -352,19 +352,19 @@ func TestUnrecognizedField(t *testing.T) { targets.Signed.UnrecognizedFields = testUnrecognizedField targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), targetsJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), targetsJSON) snapshot := Snapshot(expire) snapshot.Signed.UnrecognizedFields = testUnrecognizedField snapshotJSON, err := snapshot.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"meta\":{\"targets.json\":{\"version\":1}},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), snapshotJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1},\"signatures\":[]}"), snapshotJSON) timestamp := Timestamp(expire) timestamp.Signed.UnrecognizedFields = testUnrecognizedField timestampJSON, err := timestamp.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"meta\":{\"snapshot.json\":{\"version\":1}},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), timestampJSON) + assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1},\"signatures\":[]}"), timestampJSON) } func TestTargetFilesCustomdField(t *testing.T) { From 1392149880cf6cde7b5abc7f964fffd72932e1fa Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 21:24:24 +0200 Subject: [PATCH 099/208] chore: fix typo Signed-off-by: Radoslav Dimitrov --- metadata/metadata_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 245401a7..9d0f2235 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -13,7 +13,6 @@ package metadata import ( "encoding/json" - "fmt" "testing" "time" @@ -367,7 +366,7 @@ func TestUnrecognizedField(t *testing.T) { assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1},\"signatures\":[]}"), timestampJSON) } -func TestTargetFilesCustomdField(t *testing.T) { +func TestTargetFilesCustomField(t *testing.T) { // fixed expire expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) @@ -386,6 +385,5 @@ func TestTargetFilesCustomdField(t *testing.T) { targets.Signed.Targets["testTarget"] = targetFile targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) - fmt.Println(string(targetsJSON)) assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{\"testTarget\":{\"custom\":{\"test\":true},\"hashes\":{},\"length\":0}},\"version\":1},\"signatures\":[]}"), targetsJSON) } From ffb58d45ca067a3e98e1bc9a96b9683483834b90 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 7 Mar 2023 21:33:52 +0200 Subject: [PATCH 100/208] chore: remove obsolete new lines Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 4 +-- metadata/metadata.go | 34 ++++++++++----------- metadata/trustedmetadata/trustedmetadata.go | 14 ++++----- metadata/updater/updater.go | 18 +++++------ 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 291a36e4..258a6d45 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -165,7 +165,7 @@ func DownloadTarget(localMetadataDir, target string) error { return fmt.Errorf("failed while finding a cached target: %w", err) } if path != "" { - log.Infof("Target %s is already present at - %s\n", target, path) + log.Infof("Target %s is already present at - %s", target, path) } // target is not present locally, so let's try to download it @@ -174,7 +174,7 @@ func DownloadTarget(localMetadataDir, target string) error { return fmt.Errorf("failed to download target file %s - %w", target, err) } - log.Infof("Successfully downloaded target %s at - %s\n", target, path) + log.Infof("Successfully downloaded target %s at - %s", target, path) return nil } diff --git a/metadata/metadata.go b/metadata/metadata.go index a521ef2f..49c3f38c 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -50,7 +50,7 @@ func Root(expires ...time.Time) *Metadata[RootType] { Threshold: 1, } } - log.Debugf("Created a metadata of type %s\n", ROOT) + log.Debugf("Created a metadata of type %s", ROOT) return &Metadata[RootType]{ Signed: RootType{ Type: ROOT, @@ -71,7 +71,7 @@ func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s\n", SNAPSHOT) + log.Debugf("Created a metadata of type %s", SNAPSHOT) return &Metadata[SnapshotType]{ Signed: SnapshotType{ Type: SNAPSHOT, @@ -94,7 +94,7 @@ func Timestamp(expires ...time.Time) *Metadata[TimestampType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s\n", TIMESTAMP) + log.Debugf("Created a metadata of type %s", TIMESTAMP) return &Metadata[TimestampType]{ Signed: TimestampType{ Type: TIMESTAMP, @@ -117,7 +117,7 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s\n", TARGETS) + log.Debugf("Created a metadata of type %s", TARGETS) return &Metadata[TargetsType]{ Signed: TargetsType{ Type: TARGETS, @@ -142,7 +142,7 @@ func TargetFile() *TargetFiles { func MetaFile(version int64) *MetaFiles { if version < 1 { // attempting to set incorrect version - log.Debugf("Attempting to set incorrect version of %d for MetaFile\n", version) + log.Debugf("Attempting to set incorrect version of %d for MetaFile", version) version = 1 } return &MetaFiles{ @@ -168,7 +168,7 @@ func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { return nil, err } *meta = *m - log.Debugf("Loaded metadata from file %s\n", name) + log.Debugf("Loaded metadata from file %s", name) return meta, nil } @@ -194,7 +194,7 @@ func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { // ToFile save metadata to file func (meta *Metadata[T]) ToFile(name string, pretty bool) error { - log.Debugf("Writing metadata to file %s\n", name) + log.Debugf("Writing metadata to file %s", name) data, err := meta.ToBytes(pretty) if err != nil { return err @@ -232,7 +232,7 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { // update the Signatures part meta.Signatures = append(meta.Signatures, *sig) // return the new signature - log.Infof("Signed metadata with key ID: %s\n", key.ID()) + log.Infof("Signed metadata with key ID: %s", key.ID()) return sig, nil } @@ -245,7 +245,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegatedRole string, delegatedMetadata var roleKeyIDs []string var roleThreshold int - log.Debugf("Verifying %s\n", delegatedRole) + log.Debugf("Verifying %s", delegatedRole) // collect keys, keyIDs and threshold based on delegator type switch i := i.(type) { @@ -362,19 +362,19 @@ func (meta *Metadata[T]) VerifyDelegate(delegatedRole string, delegatedMetadata // verify if the signature for that payload corresponds to the given key if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err != nil { // failed to verify the metadata with that key ID - log.Debugf("Failed to verify %s with key ID %s\n", delegatedRole, keyID) + log.Debugf("Failed to verify %s with key ID %s", delegatedRole, keyID) } else { // save the verified keyID only if verification passed signingKeys[keyID] = true - log.Debugf("Verified %s with key ID %s\n", delegatedRole, keyID) + log.Debugf("Verified %s with key ID %s", delegatedRole, keyID) } } // check if the amount of valid signatures is enough if len(signingKeys) < roleThreshold { - log.Infof("Verifying %s failed, not enough signatures, got %d, want %d\n", delegatedRole, len(signingKeys), roleThreshold) + log.Infof("Verifying %s failed, not enough signatures, got %d, want %d", delegatedRole, len(signingKeys), roleThreshold) return ErrUnsignedMetadata{Msg: fmt.Sprintf("Verifying %s failed, not enough signatures, got %d, want %d", delegatedRole, len(signingKeys), roleThreshold)} } - log.Infof("Verified %s successfully\n", delegatedRole) + log.Infof("Verified %s successfully", delegatedRole) return nil } @@ -437,7 +437,7 @@ func (f *TargetFiles) VerifyLengthHashes(data []byte) error { // FromFile generate TargetFiles from file func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { - log.Debugf("Generating target file from file %s\n", localPath) + log.Debugf("Generating target file from file %s", localPath) // open file in, err := os.Open(localPath) if err != nil { @@ -454,7 +454,7 @@ func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles // FromBytes generate TargetFiles from bytes func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) (*TargetFiles, error) { - log.Debugf("Generating target file from bytes %s\n", localPath) + log.Debugf("Generating target file from bytes %s", localPath) var hasher hash.Hash targetFile := &TargetFiles{ Hashes: map[string]HexBytes{}, @@ -770,7 +770,7 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? return nil } - log.Debugf("Delegated role %s already has keyID %s\n", role, key.ID()) + log.Debugf("Delegated role %s already has keyID %s", role, key.ID()) } } } else if signed.Delegations.SuccinctRoles != nil { @@ -780,7 +780,7 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? return nil } - log.Debugf("SuccinctRoles role already has keyID %s\n", key.ID()) + log.Debugf("SuccinctRoles role already has keyID %s", key.ID()) } return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 271bcc9f..f631a95d 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -79,7 +79,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ } // save root if verified trusted.Root = newRoot - log.Infof("Updated root v%d\n", trusted.Root.Signed.Version) + log.Infof("Updated root v%d", trusted.Root.Signed.Version) return trusted.Root, nil } @@ -122,7 +122,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata } // keep using old timestamp if versions are equal if newTimestamp.Signed.Version == trusted.Timestamp.Signed.Version { - log.Debugf("New timestamp version %d equals the old one %d\n", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) + log.Debugf("New timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) return nil, metadata.ErrEqualVersionNumber{Msg: fmt.Sprintf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version)} } // prevent rolling back snapshot version @@ -136,7 +136,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata // protection of new timestamp: expiry is checked in UpdateSnapshot() // save root if verified trusted.Timestamp = newTimestamp - log.Infof("Updated timestamp v%d\n", trusted.Timestamp.Signed.Version) + log.Infof("Updated timestamp v%d", trusted.Timestamp.Signed.Version) // timestamp is loaded: error if it is not valid _final_ timestamp err = trusted.checkFinalTimestamp() @@ -221,7 +221,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo // expiry not checked to allow old snapshot to be used for rollback // protection of new snapshot: it is checked when targets is updated trusted.Snapshot = newSnapshot - log.Infof("Updated snapshot v%d\n", trusted.Snapshot.Signed.Version) + log.Infof("Updated snapshot v%d", trusted.Snapshot.Signed.Version) // snapshot is loaded, but we error if it's not valid _final_ snapshot err = trusted.checkFinalSnapshot() @@ -274,7 +274,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN if !ok { return nil, metadata.ErrRuntime{Msg: "cannot load targets before delegator"} } - log.Debugf("Updating %s delegated by %s\n", roleName, delegatorName) + log.Debugf("Updating %s delegated by %s", roleName, delegatorName) // Verify against the hashes in snapshot, if any meta, ok := trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] if !ok { @@ -313,7 +313,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN return nil, metadata.ErrExpiredMetadata{Msg: fmt.Sprintf("new %s is expired", roleName)} } trusted.Targets[roleName] = newDelegate - log.Infof("Updated %s v%d\n", roleName, trusted.Targets[roleName].Signed.Version) + log.Infof("Updated %s v%d", roleName, trusted.Targets[roleName].Signed.Version) return trusted.Targets[roleName], nil } @@ -337,6 +337,6 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { } // save root if verified trusted.Root = newRoot - log.Infof("Loaded trusted root v%d\n", trusted.Root.Signed.Version) + log.Infof("Loaded trusted root v%d", trusted.Root.Signed.Version) return nil } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index f46f1505..7268b591 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -353,7 +353,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad data, err := update.loadLocalMetadata(roleName) if err != nil { // this means there's no existing local target file so we should proceed downloading it without the need to UpdateDelegatedTargets - log.Debugf("Local %s does not exist\n", roleName) + log.Debugf("Local %s does not exist", roleName) } else { // successfully read a local targets metadata, so let's try to verify and load it to the trusted metadata set delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) @@ -361,19 +361,19 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad // this means targets verification/loading failed if errors.Is(err, metadata.ErrRepository{}) { // local target file is not valid, proceed downloading from remote; note that this error type includes several other subset errors - log.Debugf("Local %s is not valid\n", roleName) + log.Debugf("Local %s is not valid", roleName) } else { // another error return nil, err } } else { // this means targets verification/loading succeeded - log.Debugf("Local %s is valid: not downloading new one\n", roleName) + log.Debugf("Local %s is valid: not downloading new one", roleName) return delegatedTargets, nil } } // local "roleName" does not exist or is invalid, update from remote - log.Debugf("Failed to load local %s\n", roleName) + log.Debugf("Failed to load local %s", roleName) if update.trusted.Snapshot == nil { return nil, fmt.Errorf("trusted snapshot not set") } @@ -466,7 +466,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // skip any visited current role to prevent cycles _, ok := visitedRoleNames[delegation.Role] if ok { - log.Debugf("Skipping visited current role %s\n", delegation.Role) + log.Debugf("Skipping visited current role %s", delegation.Role) continue } // the metadata for delegation.Role must be downloaded/updated before @@ -477,7 +477,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } target, ok := targets.Signed.Targets[targetFilePath] if ok { - log.Debugf("Found target in current role %s\n", delegation.Role) + log.Debugf("Found target in current role %s", delegation.Role) // Probably not pretty, but populate TargetFiles.Path since this is not handled in fromBytes() target.Path = targetFilePath return target, nil @@ -490,7 +490,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // delegated roles roles := targets.Signed.Delegations.GetRolesForTarget(targetFilePath) for child, terminating := range roles { - log.Debugf("Adding child role %s\n", child) + log.Debugf("Adding child role %s", child) childRolesToVisit = append(childRolesToVisit, roleParentTuple{Role: child, Parent: delegation.Role}) if terminating { log.Debug("Not backtracking to other roles") @@ -506,7 +506,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } } if len(delegationsToVisit) > 0 { - log.Debugf("%d roles left to visit, but allowed at most %d delegations\n", + log.Debugf("%d roles left to visit, but allowed at most %d delegations", len(delegationsToVisit), update.config.MaxDelegations) } @@ -532,7 +532,7 @@ func (update *Updater) persistMetadata(roleName string, data []byte) error { // delete the temporary file if there was an error while writing errRemove := os.Remove(file.Name()) if errRemove != nil { - log.Debugf("Failed to delete temporary file: %s\n", file.Name()) + log.Debugf("Failed to delete temporary file: %s", file.Name()) } return err } From 89455cef8f222308b3cce4ed3d44692b0414ef48 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 9 Mar 2023 20:58:12 +0200 Subject: [PATCH 101/208] feat: add support for getting all top-level targets Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 5 +++++ metadata/updater/updater.go | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 49c3f38c..b027642f 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -1003,6 +1003,11 @@ func (signed *TargetsType) UnmarshalJSON(data []byte) error { } *signed = TargetsType(s) + // populate the path field for each target + for name, targetFile := range signed.Targets { + targetFile.Path = name + } + var dict map[string]any if err := json.Unmarshal(data, &dict); err != nil { return err diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 7268b591..0ca8b033 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -478,8 +478,6 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. target, ok := targets.Signed.Targets[targetFilePath] if ok { log.Debugf("Found target in current role %s", delegation.Role) - // Probably not pretty, but populate TargetFiles.Path since this is not handled in fromBytes() - target.Path = targetFilePath return target, nil } // after pre-order check, add current role to set of visited roles @@ -571,6 +569,11 @@ func (update *Updater) loadLocalMetadata(roleName string) ([]byte, error) { return readFile(roleName) } +// GetTopLevelTargets returns the top-level target files +func (update *Updater) GetTopLevelTargets() map[string]*metadata.TargetFiles { + return update.trusted.Targets[metadata.TARGETS].Signed.Targets +} + // ensureTrailingSlash ensures url ends with a slash func ensureTrailingSlash(url string) string { if strings.HasSuffix(url, "/") { From f3dbc5d4391f468298f7f40983a879e3e1512668 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 02:00:01 +0200 Subject: [PATCH 102/208] chore: support GetTrustedMetadataSet() with Updater Signed-off-by: Radoslav Dimitrov --- metadata/updater/updater.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 0ca8b033..ee10a32a 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -574,6 +574,11 @@ func (update *Updater) GetTopLevelTargets() map[string]*metadata.TargetFiles { return update.trusted.Targets[metadata.TARGETS].Signed.Targets } +// GetTrustedMetadataSet returns the trusted metadata set +func (update *Updater) GetTrustedMetadataSet() trustedmetadata.TrustedMetadata { + return *update.trusted +} + // ensureTrailingSlash ensures url ends with a slash func ensureTrailingSlash(url string) string { if strings.HasSuffix(url, "/") { From 6e95a29bff64bf416e8dbffb77af10c218f5d46f Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 17:46:07 +0200 Subject: [PATCH 103/208] feat: add option to disable local cache and refactor config usage Signed-off-by: Radoslav Dimitrov --- examples/cli/tuf-client/cmd/get.go | 14 +++-- examples/client/client_example.go | 17 +++--- metadata/config/config.go | 54 ++++++++++++++----- metadata/updater/updater.go | 87 +++++++++++++----------------- 4 files changed, 90 insertions(+), 82 deletions(-) diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 06d966ff..978f7e13 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -67,17 +67,15 @@ func GetCmd(target string) error { // updater configuration cfg := config.New() // default config + cfg.LocalTrustedRootPath = env.MetadataDir + cfg.LocalMetadataDir = env.MetadataDir + cfg.LocalTargetsDir = env.DownloadDir + cfg.RemoteMetadataURL = env.MetadataURL + cfg.RemoteTargetsURL = env.TargetsURL cfg.PrefixTargetsWithHash = !useNonHashPrefixedTargetFiles // create an Updater instance - up, err := updater.New( - env.MetadataDir, - env.MetadataURL, - env.TargetsURL, - env.DownloadDir, - env.MetadataDir, - cfg, - nil) + up, err := updater.New(cfg) if err != nil { return fmt.Errorf("failed to create Updater instance: %w", err) } diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 258a6d45..bfc54221 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -131,18 +131,17 @@ func DownloadTarget(localMetadataDir, target string) error { metadataBaseURL, _ := url.JoinPath(baseURL, baseURLMetadataDir) targetsBaseURL, _ := url.JoinPath(baseURL, baseURLTargetsDir) - cfg := config.New() // default config + // create updater configuration + cfg := config.New(localMetadataDir) // default config + // cfg.LocalTrustedRootPath = localMetadataDir + cfg.LocalMetadataDir = localMetadataDir + cfg.LocalTargetsDir = filepath.Join(localMetadataDir, "download") + cfg.RemoteMetadataURL = metadataBaseURL + cfg.RemoteTargetsURL = targetsBaseURL cfg.PrefixTargetsWithHash = false // do not use hash-prefixed target files with consistent snapshots // create a new Updater instance - up, err := updater.New( - localMetadataDir, - metadataBaseURL, - targetsBaseURL, - filepath.Join(localMetadataDir, "download"), - localMetadataDir, - cfg, - nil) + up, err := updater.New(cfg) if err != nil { return fmt.Errorf("failed to create Updater instance: %w", err) } diff --git a/metadata/config/config.go b/metadata/config/config.go index 6193da15..343b2f4c 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -11,26 +11,52 @@ package config +import ( + "fmt" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" +) + type UpdaterConfig struct { - MaxRootRotations int64 - MaxDelegations int - RootMaxLength int64 - TimestampMaxLength int64 - SnapshotMaxLength int64 - TargetsMaxLength int64 + // TUF configuration + MaxRootRotations int64 + MaxDelegations int + RootMaxLength int64 + TimestampMaxLength int64 + SnapshotMaxLength int64 + TargetsMaxLength int64 + // Updater configuration + Fetcher fetcher.Fetcher + LocalTrustedRootPath string + LocalMetadataDir string + LocalTargetsDir string + RemoteMetadataURL string + RemoteTargetsURL string + DisableLocalCache bool PrefixTargetsWithHash bool } // New creates a new UpdaterConfig instance used by the Updater to // store configuration -func New() *UpdaterConfig { +func New(rootPath ...string) *UpdaterConfig { + // if no rootPath is provided, default to looking for the root.json in the current working directory + trustedRootPath := fmt.Sprintf("%s.json", metadata.ROOT) + if len(rootPath) != 0 { + trustedRootPath = rootPath[0] + } return &UpdaterConfig{ - MaxRootRotations: 32, - MaxDelegations: 32, - RootMaxLength: 512000, // bytes - TimestampMaxLength: 16384, // bytes - SnapshotMaxLength: 2000000, // bytes - TargetsMaxLength: 5000000, // bytes - PrefixTargetsWithHash: true, // use hash-prefixed target files with consistent snapshots + // TUF configuration + MaxRootRotations: 32, + MaxDelegations: 32, + RootMaxLength: 512000, // bytes + TimestampMaxLength: 16384, // bytes + SnapshotMaxLength: 2000000, // bytes + TargetsMaxLength: 5000000, // bytes + // Updater configuration + Fetcher: &fetcher.DefaultFetcher{}, // use the default built-in download fetcher + LocalTrustedRootPath: trustedRootPath, // local path to trusted root.json + DisableLocalCache: false, // enable local caching of trusted metadata + PrefixTargetsWithHash: true, // use hash-prefixed target files with consistent snapshots } } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index ee10a32a..d1d03d74 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -25,18 +25,12 @@ import ( "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/config" - "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" log "github.com/sirupsen/logrus" ) // Client update workflow implementation - -type roleParentTuple struct { - Role string - Parent string -} - +// // The "Updater" provides an implementation of the TUF client workflow (ref. https://theupdateframework.github.io/specification/latest/#detailed-client-workflow). // "Updater" provides an API to query available targets and to download them in a // secure manner: All downloaded files are verified by signed metadata. @@ -58,40 +52,27 @@ type roleParentTuple struct { // - DownloadTarget() downloads a target file and ensures it is // verified correct by the metadata. type Updater struct { - metadataDir string - metadataBaseUrl string - targetDir string - targetBaseUrl string - trusted *trustedmetadata.TrustedMetadata - config *config.UpdaterConfig - fetcher fetcher.Fetcher + trusted *trustedmetadata.TrustedMetadata + cfg *config.UpdaterConfig } -// New creates a new Updater instance and loads trusted root metadata -func New(metadataDir, metadataBaseUrl, targetBaseUrl, targetDir, trustedRootDir string, cfg *config.UpdaterConfig, f fetcher.Fetcher) (*Updater, error) { - // local path of the trusted root metadata file used for bootstrapping - rootPath := metadata.ROOT - if trustedRootDir != "" { - rootPath = filepath.Join(trustedRootDir, rootPath) - } - - // use the built-in download fetcher if nothing is provided - if f == nil { - f = &fetcher.DefaultFetcher{} - } +type roleParentTuple struct { + Role string + Parent string +} +// New creates a new Updater instance and loads trusted root metadata +func New(config *config.UpdaterConfig) (*Updater, error) { // create an updater instance updater := &Updater{ - metadataDir: metadataDir, - metadataBaseUrl: ensureTrailingSlash(metadataBaseUrl), - targetBaseUrl: ensureTrailingSlash(targetBaseUrl), - targetDir: targetDir, - config: cfg, - fetcher: f, + cfg: config, + } + // suffix with root.json in case it's a directory path + if !strings.HasSuffix(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) { + updater.cfg.LocalTrustedRootPath = filepath.Join(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) } - // load the root metadata file used for bootstrapping trust - rootBytes, err := updater.loadLocalMetadata(rootPath) + rootBytes, err := updater.loadLocalMetadata(updater.cfg.LocalTrustedRootPath) if err != nil { return nil, err } @@ -163,16 +144,16 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath } } if targetBaseURL == "" { - if update.targetBaseUrl == "" { + if update.cfg.RemoteTargetsURL == "" { return "", metadata.ErrValue{Msg: "targetBaseURL must be set in either DownloadTarget() or the Updater struct"} } - targetBaseURL = update.targetBaseUrl + targetBaseURL = ensureTrailingSlash(update.cfg.RemoteTargetsURL) } else { targetBaseURL = ensureTrailingSlash(targetBaseURL) } targetFilePath := targetFile.Path consistentSnapshot := update.trusted.Root.Signed.ConsistentSnapshot - if consistentSnapshot && update.config.PrefixTargetsWithHash { + if consistentSnapshot && update.cfg.PrefixTargetsWithHash { hashes := "" // get first hex value of hashes for _, v := range targetFile.Hashes { @@ -189,7 +170,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath } } fullURL := fmt.Sprintf("%s%s", targetBaseURL, targetFilePath) - data, err := update.fetcher.DownloadFile(fullURL, targetFile.Length) + data, err := update.cfg.Fetcher.DownloadFile(fullURL, targetFile.Length) if err != nil { return "", err } @@ -258,7 +239,7 @@ func (update *Updater) loadTimestamp() error { // all okay, local timestamp exists and it is valid, nevertheless proceed with downloading from remote } // load from remote (whether local load succeeded or not) - data, err = update.downloadMetadata(metadata.TIMESTAMP, update.config.TimestampMaxLength, "") + data, err = update.downloadMetadata(metadata.TIMESTAMP, update.cfg.TimestampMaxLength, "") if err != nil { return err } @@ -317,7 +298,7 @@ func (update *Updater) loadSnapshot() error { // extract the length of the snapshot metadata to be downloaded length := snapshotMeta.Length if length == 0 { - length = update.config.SnapshotMaxLength + length = update.cfg.SnapshotMaxLength } // extract which snapshot version should be downloaded in case of consistent snapshots version := "" @@ -382,7 +363,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad // extract the length of the target metadata to be downloaded length := metaInfo.Length if length == 0 { - length = update.config.TargetsMaxLength + length = update.cfg.TargetsMaxLength } // extract which target metadata version should be downloaded in case of consistent snapshots version := "" @@ -413,11 +394,11 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad func (update *Updater) loadRoot() error { // calculate boundaries lowerBound := update.trusted.Root.Signed.Version + 1 - upperBound := lowerBound + update.config.MaxRootRotations + upperBound := lowerBound + update.cfg.MaxRootRotations // loop until we find the latest available version of root (download -> verify -> load -> persist) for nextVersion := lowerBound; nextVersion <= upperBound; nextVersion++ { - data, err := update.downloadMetadata(metadata.ROOT, update.config.RootMaxLength, strconv.FormatInt(nextVersion, 10)) + data, err := update.downloadMetadata(metadata.ROOT, update.cfg.RootMaxLength, strconv.FormatInt(nextVersion, 10)) if err != nil { // downloading the root metadata failed for some reason var downloadErr metadata.ErrDownloadHTTP @@ -459,7 +440,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. }} visitedRoleNames := map[string]bool{} // pre-order depth-first traversal of the graph of target delegations - for len(visitedRoleNames) <= update.config.MaxDelegations && len(delegationsToVisit) > 0 { + for len(visitedRoleNames) <= update.cfg.MaxDelegations && len(delegationsToVisit) > 0 { // pop the role name from the top of the stack delegation := delegationsToVisit[len(delegationsToVisit)-1] delegationsToVisit = delegationsToVisit[:len(delegationsToVisit)-1] @@ -506,7 +487,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. if len(delegationsToVisit) > 0 { log.Debugf("%d roles left to visit, but allowed at most %d delegations", len(delegationsToVisit), - update.config.MaxDelegations) + update.cfg.MaxDelegations) } // if this point is reached then target is not found, return nil return nil, fmt.Errorf("target %s not found", targetFilePath) @@ -514,7 +495,12 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // persistMetadata writes metadata to disk atomically to avoid data loss func (update *Updater) persistMetadata(roleName string, data []byte) error { - fileName := filepath.Join(update.metadataDir, fmt.Sprintf("%s.json", url.QueryEscape(roleName))) + // do not persist the metadata if we have disabled local caching + if update.cfg.DisableLocalCache { + return nil + } + // caching enabled, proceed with persisting the metadata locally + fileName := filepath.Join(update.cfg.LocalMetadataDir, fmt.Sprintf("%s.json", url.QueryEscape(roleName))) cwd, err := os.Getwd() if err != nil { return err @@ -544,28 +530,27 @@ func (update *Updater) persistMetadata(roleName string, data []byte) error { // downloadMetadata download a metadata file and return it as bytes func (update *Updater) downloadMetadata(roleName string, length int64, version string) ([]byte, error) { - urlPath := update.metadataBaseUrl + urlPath := ensureTrailingSlash(update.cfg.RemoteMetadataURL) // build urlPath if version == "" { urlPath = fmt.Sprintf("%s%s.json", urlPath, url.QueryEscape(roleName)) } else { urlPath = fmt.Sprintf("%s%s.%s.json", urlPath, version, url.QueryEscape(roleName)) } - return update.fetcher.DownloadFile(urlPath, length) + return update.cfg.Fetcher.DownloadFile(urlPath, length) } // generateTargetFilePath generates path from TargetFiles func (update *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, error) { - if update.targetDir == "" { + if update.cfg.LocalTargetsDir == "" { return "", metadata.ErrValue{Msg: "target_dir must be set if filepath is not given"} } // Use URL encoded target path as filename - return url.JoinPath(update.targetDir, url.QueryEscape(tf.Path)) + return url.JoinPath(update.cfg.LocalTargetsDir, url.QueryEscape(tf.Path)) } // loadLocalMetadata reads a local .json file and returns its bytes func (update *Updater) loadLocalMetadata(roleName string) ([]byte, error) { - roleName = fmt.Sprintf("%s.json", roleName) return readFile(roleName) } From 90c6f65050bc70916659ef57fe2ec05a76fd557d Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 17:49:02 +0200 Subject: [PATCH 104/208] chore: pass trusted root path directly to config in examples Signed-off-by: Radoslav Dimitrov --- examples/cli/tuf-client/cmd/get.go | 3 +-- examples/client/client_example.go | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 978f7e13..223ebada 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -66,8 +66,7 @@ func GetCmd(target string) error { } // updater configuration - cfg := config.New() // default config - cfg.LocalTrustedRootPath = env.MetadataDir + cfg := config.New(env.MetadataDir) // default config cfg.LocalMetadataDir = env.MetadataDir cfg.LocalTargetsDir = env.DownloadDir cfg.RemoteMetadataURL = env.MetadataURL diff --git a/examples/client/client_example.go b/examples/client/client_example.go index bfc54221..4dc1a87f 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -133,7 +133,6 @@ func DownloadTarget(localMetadataDir, target string) error { // create updater configuration cfg := config.New(localMetadataDir) // default config - // cfg.LocalTrustedRootPath = localMetadataDir cfg.LocalMetadataDir = localMetadataDir cfg.LocalTargetsDir = filepath.Join(localMetadataDir, "download") cfg.RemoteMetadataURL = metadataBaseURL From c81a12cb862009423d3c88874b6e09c869e995a8 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 18:46:40 +0200 Subject: [PATCH 105/208] chore: return byte representation of a target Signed-off-by: Radoslav Dimitrov --- examples/cli/tuf-client/cmd/get.go | 4 +-- examples/client/client_example.go | 4 +-- metadata/updater/updater.go | 42 ++++++++++++++++++------------ 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 223ebada..037ac135 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -92,7 +92,7 @@ func GetCmd(target string) error { } // target is available, so let's see if the target is already present locally - path, err := up.FindCachedTarget(targetInfo, "") + path, _, err := up.FindCachedTarget(targetInfo, "") if err != nil { return fmt.Errorf("failed while finding a cached target: %w", err) } @@ -103,7 +103,7 @@ func GetCmd(target string) error { } // target is not present locally, so let's try to download it - path, err = up.DownloadTarget(targetInfo, "", "") + path, _, err = up.DownloadTarget(targetInfo, "", "") if err != nil { return fmt.Errorf("failed to download target file %s - %w", target, err) } diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 4dc1a87f..0fb794de 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -158,7 +158,7 @@ func DownloadTarget(localMetadataDir, target string) error { } // target is available, so let's see if the target is already present locally - path, err := up.FindCachedTarget(targetInfo, "") + path, _, err := up.FindCachedTarget(targetInfo, "") if err != nil { return fmt.Errorf("failed while finding a cached target: %w", err) } @@ -167,7 +167,7 @@ func DownloadTarget(localMetadataDir, target string) error { } // target is not present locally, so let's try to download it - path, err = up.DownloadTarget(targetInfo, "", "") + path, _, err = up.DownloadTarget(targetInfo, "", "") if err != nil { return fmt.Errorf("failed to download target file %s - %w", target, err) } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index d1d03d74..2d9979f8 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -135,17 +135,17 @@ func (update *Updater) GetTargetInfo(targetPath string) (*metadata.TargetFiles, } // DownloadTarget downloads the target file specified by targetFile -func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, error) { +func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, []byte, error) { var err error if filePath == "" { filePath, err = update.generateTargetFilePath(targetFile) if err != nil { - return "", err + return "", nil, err } } if targetBaseURL == "" { if update.cfg.RemoteTargetsURL == "" { - return "", metadata.ErrValue{Msg: "targetBaseURL must be set in either DownloadTarget() or the Updater struct"} + return "", nil, metadata.ErrValue{Msg: "targetBaseURL must be set in either DownloadTarget() or the Updater struct"} } targetBaseURL = ensureTrailingSlash(update.cfg.RemoteTargetsURL) } else { @@ -172,30 +172,37 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath fullURL := fmt.Sprintf("%s%s", targetBaseURL, targetFilePath) data, err := update.cfg.Fetcher.DownloadFile(fullURL, targetFile.Length) if err != nil { - return "", err + return "", nil, err } err = targetFile.VerifyLengthHashes(data) if err != nil { - return "", err + return "", nil, err } - // write the data content to file - err = os.WriteFile(filePath, data, 0644) - if err != nil { - return "", err + + // do not persist the target file if cache is disabled + if !update.cfg.DisableLocalCache { + err = os.WriteFile(filePath, data, 0644) + if err != nil { + return "", nil, err + } } log.Infof("Downloaded target %s", targetFile.Path) - return filePath, nil + return filePath, data, nil } // FindCachedTarget checks whether a local file is an up to date target -func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePath string) (string, error) { +func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePath string) (string, []byte, error) { var err error targetFilePath := "" + // do not look for cached target file if cache is disabled + if update.cfg.DisableLocalCache { + return "", nil, nil + } // get its path if not provided if filePath == "" { targetFilePath, err = update.generateTargetFilePath(targetFile) if err != nil { - return "", err + return "", nil, err } } else { targetFilePath = filePath @@ -204,16 +211,16 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa data, err := readFile(targetFilePath) if err != nil { // do not want to return err, instead we say that there's no cached target available - return "", nil + return "", nil, nil } // verify if the length and hashes of this target file match the expected values err = targetFile.VerifyLengthHashes(data) if err != nil { // do not want to return err, instead we say that there's no cached target available - return "", nil + return "", nil, nil } // if all okay, return its path - return targetFilePath, nil + return targetFilePath, data, nil } // loadTimestamp load local and remote timestamp metadata @@ -542,8 +549,9 @@ func (update *Updater) downloadMetadata(roleName string, length int64, version s // generateTargetFilePath generates path from TargetFiles func (update *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, error) { - if update.cfg.LocalTargetsDir == "" { - return "", metadata.ErrValue{Msg: "target_dir must be set if filepath is not given"} + // LocalTargetsDir can be omitted if caching is disabled + if update.cfg.LocalTargetsDir == "" && !update.cfg.DisableLocalCache { + return "", metadata.ErrValue{Msg: "LocalTargetsDir must be set if filepath is not given"} } // Use URL encoded target path as filename return url.JoinPath(update.cfg.LocalTargetsDir, url.QueryEscape(tf.Path)) From 287a9172989464cc1eb9e54a01156708f48af8a4 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 19:08:36 +0200 Subject: [PATCH 106/208] feat: add support for bootstrapping a TUF client using root.json bytes Signed-off-by: Radoslav Dimitrov --- metadata/config/config.go | 1 + metadata/updater/updater.go | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/metadata/config/config.go b/metadata/config/config.go index 343b2f4c..65d053df 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -29,6 +29,7 @@ type UpdaterConfig struct { // Updater configuration Fetcher fetcher.Fetcher LocalTrustedRootPath string + LocalTrustedRootBytes []byte LocalMetadataDir string LocalTargetsDir string RemoteMetadataURL string diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 2d9979f8..f3dd22e5 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -67,17 +67,22 @@ func New(config *config.UpdaterConfig) (*Updater, error) { updater := &Updater{ cfg: config, } - // suffix with root.json in case it's a directory path - if !strings.HasSuffix(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) { - updater.cfg.LocalTrustedRootPath = filepath.Join(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) - } - // load the root metadata file used for bootstrapping trust - rootBytes, err := updater.loadLocalMetadata(updater.cfg.LocalTrustedRootPath) - if err != nil { - return nil, err + // check in case we bootstrap using an already provided root.json byte content + if len(updater.cfg.LocalTrustedRootBytes) == 0 { + // if not, then we try to load a root.json file from a local path + // suffix with root.json in case it's a directory path + if !strings.HasSuffix(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) { + updater.cfg.LocalTrustedRootPath = filepath.Join(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) + } + // load the root metadata file used for bootstrapping trust + rootBytes, err := updater.loadLocalMetadata(updater.cfg.LocalTrustedRootPath) + if err != nil { + return nil, err + } + updater.cfg.LocalTrustedRootBytes = rootBytes } - // create a new trusted metadata instance - trustedMetadataSet, err := trustedmetadata.New(rootBytes) + // create a new trusted metadata instance using the trusted root.json + trustedMetadataSet, err := trustedmetadata.New(updater.cfg.LocalTrustedRootBytes) if err != nil { return nil, err } From 9f93f6973a9d5a1ba7cd7d0b00598f3fb15bbae6 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 20:29:27 +0200 Subject: [PATCH 107/208] feat: add support for comparing target files Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/metadata/metadata.go b/metadata/metadata.go index b027642f..418a3b84 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -14,6 +14,7 @@ package metadata import ( "bytes" "crypto" + "crypto/hmac" "crypto/sha256" "crypto/sha512" "encoding/binary" @@ -435,6 +436,24 @@ func (f *TargetFiles) VerifyLengthHashes(data []byte) error { return nil } +// Equal checks whether the source target file matches another +func (source *TargetFiles) Equal(expected TargetFiles) bool { + if source.Length == expected.Length && source.Hashes.Equal(expected.Hashes) { + return true + } + return false +} + +// EqualFromBytes checks whether the source target file matches another (from bytes) +func (source *TargetFiles) EqualFromBytes(expectedBytes []byte) bool { + // create target file from bytes + expected, err := TargetFile().FromBytes("", expectedBytes) + if err == nil && source.Equal(*expected) { + return true + } + return false +} + // FromFile generate TargetFiles from file func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { log.Debugf("Generating target file from file %s", localPath) @@ -1387,3 +1406,19 @@ func copyMapValues(src, dst map[string]any) { dst[k] = v } } + +// Equal checks whether one hash set equals another +func (source Hashes) Equal(expected Hashes) bool { + hashChecked := false + for typ, hash := range expected { + if h, ok := source[typ]; ok { + // hash type match found + hashChecked = true + if !hmac.Equal(h, hash) { + // hash values don't match + return false + } + } + } + return hashChecked +} From 4c1b11a67ad89bc2ee4fc76f5634a16aa3dd7403 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 22:26:03 +0200 Subject: [PATCH 108/208] chore: move all marshal/unmarshal methods to a separate file Signed-off-by: Radoslav Dimitrov --- metadata/marshal.go | 554 ++++++++++++++++++++++++++++++++++ metadata/metadata.go | 686 +++++-------------------------------------- 2 files changed, 630 insertions(+), 610 deletions(-) create mode 100644 metadata/marshal.go diff --git a/metadata/marshal.go b/metadata/marshal.go new file mode 100644 index 00000000..a67d81ad --- /dev/null +++ b/metadata/marshal.go @@ -0,0 +1,554 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package metadata + +import ( + "encoding/hex" + "encoding/json" + "errors" +) + +// The following marshal/unmarshal methods override the default behavior for for each TUF type +// in order to support unrecognized fields + +func (signed RootType) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) + } + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["consistent_snapshot"] = signed.ConsistentSnapshot + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["keys"] = signed.Keys + dict["roles"] = signed.Roles + return json.Marshal(dict) +} + +func (signed *RootType) UnmarshalJSON(data []byte) error { + type Alias RootType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = RootType(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "consistent_snapshot") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "keys") + delete(dict, "roles") + signed.UnrecognizedFields = dict + return nil +} + +func (signed SnapshotType) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) + } + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["meta"] = signed.Meta + return json.Marshal(dict) +} + +func (signed *SnapshotType) UnmarshalJSON(data []byte) error { + type Alias SnapshotType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = SnapshotType(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "meta") + signed.UnrecognizedFields = dict + return nil +} + +func (signed TimestampType) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) + } + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["meta"] = signed.Meta + return json.Marshal(dict) +} + +func (signed *TimestampType) UnmarshalJSON(data []byte) error { + type Alias TimestampType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = TimestampType(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "meta") + signed.UnrecognizedFields = dict + return nil +} + +func (signed TargetsType) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) + } + dict["_type"] = signed.Type + dict["spec_version"] = signed.SpecVersion + dict["version"] = signed.Version + dict["expires"] = signed.Expires + dict["targets"] = signed.Targets + if signed.Delegations != nil { + dict["delegations"] = signed.Delegations + } + return json.Marshal(dict) +} + +func (signed *TargetsType) UnmarshalJSON(data []byte) error { + type Alias TargetsType + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = TargetsType(s) + + // populate the path field for each target + for name, targetFile := range signed.Targets { + targetFile.Path = name + } + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "_type") + delete(dict, "spec_version") + delete(dict, "version") + delete(dict, "expires") + delete(dict, "targets") + delete(dict, "delegations") + signed.UnrecognizedFields = dict + return nil +} + +func (signed *MetaFiles) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) + } + // length and hashes are optional + if signed.Length != 0 { + dict["length"] = signed.Length + } + if len(signed.Hashes) != 0 { + dict["hashes"] = signed.Hashes + } + dict["version"] = signed.Version + return json.Marshal(dict) +} + +func (signed *MetaFiles) UnmarshalJSON(data []byte) error { + type Alias MetaFiles + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = MetaFiles(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "length") + delete(dict, "hashes") + delete(dict, "version") + signed.UnrecognizedFields = dict + return nil +} + +func (signed *TargetFiles) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(signed.UnrecognizedFields) != 0 { + copyMapValues(signed.UnrecognizedFields, dict) + } + dict["length"] = signed.Length + dict["hashes"] = signed.Hashes + if signed.Custom != nil { + dict["custom"] = signed.Custom + } + return json.Marshal(dict) +} + +func (signed *TargetFiles) UnmarshalJSON(data []byte) error { + type Alias TargetFiles + var s Alias + if err := json.Unmarshal(data, &s); err != nil { + return err + } + *signed = TargetFiles(s) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "length") + delete(dict, "hashes") + delete(dict, "custom") + signed.UnrecognizedFields = dict + return nil +} + +func (key *Key) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(key.UnrecognizedFields) != 0 { + copyMapValues(key.UnrecognizedFields, dict) + } + dict["keytype"] = key.Type + dict["scheme"] = key.Scheme + dict["keyval"] = key.Value + return json.Marshal(dict) +} + +func (key *Key) UnmarshalJSON(data []byte) error { + type Alias Key + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + // nolint + *key = Key(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keytype") + delete(dict, "scheme") + delete(dict, "keyval") + key.UnrecognizedFields = dict + return nil +} + +func (meta *Metadata[T]) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(meta.UnrecognizedFields) != 0 { + copyMapValues(meta.UnrecognizedFields, dict) + } + dict["signed"] = meta.Signed + dict["signatures"] = meta.Signatures + return json.Marshal(dict) +} + +func (meta *Metadata[T]) UnmarshalJSON(data []byte) error { + tmp := any(new(T)) + var m map[string]any + if err := json.Unmarshal(data, &m); err != nil { + return err + } + switch tmp.(type) { + case *RootType: + dict := struct { + Signed RootType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + case *SnapshotType: + dict := struct { + Signed SnapshotType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + case *TimestampType: + dict := struct { + Signed TimestampType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + case *TargetsType: + dict := struct { + Signed TargetsType `json:"signed"` + Signatures []Signature `json:"signatures"` + }{} + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + var i interface{} = dict.Signed + meta.Signed = i.(T) + meta.Signatures = dict.Signatures + default: + return ErrValue{Msg: "unrecognized metadata type"} + } + delete(m, "signed") + delete(m, "signatures") + meta.UnrecognizedFields = m + return nil +} + +func (s Signature) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(s.UnrecognizedFields) != 0 { + copyMapValues(s.UnrecognizedFields, dict) + } + dict["keyid"] = s.KeyID + dict["sig"] = s.Signature + return json.Marshal(dict) +} + +func (s *Signature) UnmarshalJSON(data []byte) error { + type Alias Signature + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *s = Signature(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keyid") + delete(dict, "sig") + s.UnrecognizedFields = dict + return nil +} + +func (kv KeyVal) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(kv.UnrecognizedFields) != 0 { + copyMapValues(kv.UnrecognizedFields, dict) + } + dict["public"] = kv.PublicKey + return json.Marshal(dict) +} + +func (kv *KeyVal) UnmarshalJSON(data []byte) error { + type Alias KeyVal + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *kv = KeyVal(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "public") + kv.UnrecognizedFields = dict + return nil +} + +func (role *Role) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(role.UnrecognizedFields) != 0 { + copyMapValues(role.UnrecognizedFields, dict) + } + dict["keyids"] = role.KeyIDs + dict["threshold"] = role.Threshold + return json.Marshal(dict) +} + +func (role *Role) UnmarshalJSON(data []byte) error { + type Alias Role + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *role = Role(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keyids") + delete(dict, "threshold") + role.UnrecognizedFields = dict + return nil +} + +func (d *Delegations) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(d.UnrecognizedFields) != 0 { + copyMapValues(d.UnrecognizedFields, dict) + } + // only one is allowed + dict["keys"] = d.Keys + if d.Roles != nil { + dict["roles"] = d.Roles + } else if d.SuccinctRoles != nil { + dict["succinct_roles"] = d.SuccinctRoles + } + return json.Marshal(dict) +} + +func (d *Delegations) UnmarshalJSON(data []byte) error { + type Alias Delegations + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *d = Delegations(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keys") + delete(dict, "roles") + delete(dict, "succinct_roles") + d.UnrecognizedFields = dict + return nil +} + +func (role DelegatedRole) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(role.UnrecognizedFields) != 0 { + copyMapValues(role.UnrecognizedFields, dict) + } + dict["name"] = role.Name + dict["keyids"] = role.KeyIDs + dict["threshold"] = role.Threshold + dict["terminating"] = role.Terminating + // make sure we have only one of the two (per spec) + if role.Paths != nil && role.PathHashPrefixes != nil { + return nil, ErrValue{Msg: "failed to marshal: not allowed to have both \"paths\" and \"path_hash_prefixes\" present"} + } + if role.Paths != nil { + dict["paths"] = role.Paths + } else if role.PathHashPrefixes != nil { + dict["path_hash_prefixes"] = role.PathHashPrefixes + } + return json.Marshal(dict) +} + +func (role *DelegatedRole) UnmarshalJSON(data []byte) error { + type Alias DelegatedRole + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *role = DelegatedRole(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "name") + delete(dict, "keyids") + delete(dict, "threshold") + delete(dict, "terminating") + delete(dict, "paths") + delete(dict, "path_hash_prefixes") + role.UnrecognizedFields = dict + return nil +} + +func (role *SuccinctRoles) MarshalJSON() ([]byte, error) { + dict := map[string]any{} + if len(role.UnrecognizedFields) != 0 { + copyMapValues(role.UnrecognizedFields, dict) + } + dict["keyids"] = role.KeyIDs + dict["threshold"] = role.Threshold + dict["bit_length"] = role.BitLength + dict["name_prefix"] = role.NamePrefix + return json.Marshal(dict) +} + +func (role *SuccinctRoles) UnmarshalJSON(data []byte) error { + type Alias SuccinctRoles + var a Alias + if err := json.Unmarshal(data, &a); err != nil { + return err + } + *role = SuccinctRoles(a) + + var dict map[string]any + if err := json.Unmarshal(data, &dict); err != nil { + return err + } + delete(dict, "keyids") + delete(dict, "threshold") + delete(dict, "bit_length") + delete(dict, "name_prefix") + role.UnrecognizedFields = dict + return nil +} + +func (b *HexBytes) UnmarshalJSON(data []byte) error { + if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { + return errors.New("tuf: invalid JSON hex bytes") + } + res := make([]byte, hex.DecodedLen(len(data)-2)) + _, err := hex.Decode(res, data[1:len(data)-1]) + if err != nil { + return err + } + *b = res + return nil +} + +func (b HexBytes) MarshalJSON() ([]byte, error) { + res := make([]byte, hex.EncodedLen(len(b))+2) + res[0] = '"' + res[len(res)-1] = '"' + hex.Encode(res[1:], b) + return res, nil +} + +func (b HexBytes) String() string { + return hex.EncodeToString(b) +} diff --git a/metadata/metadata.go b/metadata/metadata.go index 418a3b84..ac2900e4 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -20,7 +20,6 @@ import ( "encoding/binary" "encoding/hex" "encoding/json" - "errors" "fmt" "hash" "io" @@ -623,101 +622,6 @@ func (role *SuccinctRoles) IsDelegatedRole(roleName string) bool { return (value >= 0) && (value < numberOfBins) } -// fromBytes return a *Metadata[T] object from bytes and verifies -// that the data corresponds to the caller struct type -func fromBytes[T Roles](data []byte) (*Metadata[T], error) { - meta := &Metadata[T]{} - // verify that the type we used to create the object is the same as the type of the metadata file - if err := checkType[T](data); err != nil { - return nil, err - } - // if all is okay, unmarshal meta to the desired Metadata[T] type - if err := json.Unmarshal(data, meta); err != nil { - return nil, err - } - // Make sure signature key IDs are unique - if err := checkUniqueSignatures(*meta); err != nil { - return nil, err - } - return meta, nil -} - -// checkUniqueSignatures verifies if the signature key IDs are unique for that metadata -func checkUniqueSignatures[T Roles](meta Metadata[T]) error { - signatures := []string{} - for _, sig := range meta.Signatures { - if slices.Contains(signatures, sig.KeyID) { - return ErrValue{Msg: fmt.Sprintf("multiple signatures found for key ID %s", sig.KeyID)} - } - signatures = append(signatures, sig.KeyID) - } - return nil -} - -// checkType verifies if the generic type used to create the object is the same as the type of the metadata file in bytes -func checkType[T Roles](data []byte) error { - var m map[string]any - i := any(new(T)) - if err := json.Unmarshal(data, &m); err != nil { - return err - } - signedType := m["signed"].(map[string]any)["_type"].(string) - switch i.(type) { - case *RootType: - if ROOT != signedType { - return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", ROOT, signedType)} - } - case *SnapshotType: - if SNAPSHOT != signedType { - return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", SNAPSHOT, signedType)} - } - case *TimestampType: - if TIMESTAMP != signedType { - return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", TIMESTAMP, signedType)} - } - case *TargetsType: - if TARGETS != signedType { - return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", TARGETS, signedType)} - } - default: - return ErrValue{Msg: fmt.Sprintf("unrecognized metadata type - %s", signedType)} - } - // all okay - return nil -} - -// verifyLength verifies if the passed data has the corresponding length -func verifyLength(data []byte, length int64) error { - len, err := io.Copy(io.Discard, bytes.NewReader(data)) - if err != nil { - return err - } - if length != len { - return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("length verification failed - expected %d, got %d", length, len)} - } - return nil -} - -// verifyHashes verifies if the hash of the passed data corresponds to it -func verifyHashes(data []byte, hashes Hashes) error { - var hasher hash.Hash - for k, v := range hashes { - switch k { - case "sha256": - hasher = sha256.New() - case "sha512": - hasher = sha512.New() - default: - return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("hash verification failed - unknown hashing algorithm - %s", k)} - } - hasher.Write(data) - if hex.EncodeToString(v) != hex.EncodeToString(hasher.Sum(nil)) { - return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("hash verification failed - mismatch for algorithm %s", k)} - } - } - return nil -} - // AddKey adds new signing key for delegated role "role" // keyID: Identifier of the key to be added for “role“. // key: Signing key to be added for “role“. @@ -867,558 +771,120 @@ func (signed *TargetsType) RevokeKey(keyID string, role string) error { return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} } -func (b *HexBytes) UnmarshalJSON(data []byte) error { - if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { - return errors.New("tuf: invalid JSON hex bytes") - } - res := make([]byte, hex.DecodedLen(len(data)-2)) - _, err := hex.Decode(res, data[1:len(data)-1]) - if err != nil { - return err - } - *b = res - return nil -} - -func (b HexBytes) MarshalJSON() ([]byte, error) { - res := make([]byte, hex.EncodedLen(len(b))+2) - res[0] = '"' - res[len(res)-1] = '"' - hex.Encode(res[1:], b) - return res, nil -} - -func (b HexBytes) String() string { - return hex.EncodeToString(b) -} - -func (signed RootType) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(signed.UnrecognizedFields) != 0 { - copyMapValues(signed.UnrecognizedFields, dict) - } - dict["_type"] = signed.Type - dict["spec_version"] = signed.SpecVersion - dict["consistent_snapshot"] = signed.ConsistentSnapshot - dict["version"] = signed.Version - dict["expires"] = signed.Expires - dict["keys"] = signed.Keys - dict["roles"] = signed.Roles - return json.Marshal(dict) -} - -func (signed *RootType) UnmarshalJSON(data []byte) error { - type Alias RootType - var s Alias - if err := json.Unmarshal(data, &s); err != nil { - return err - } - *signed = RootType(s) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err - } - delete(dict, "_type") - delete(dict, "spec_version") - delete(dict, "consistent_snapshot") - delete(dict, "version") - delete(dict, "expires") - delete(dict, "keys") - delete(dict, "roles") - signed.UnrecognizedFields = dict - return nil -} - -func (signed SnapshotType) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(signed.UnrecognizedFields) != 0 { - copyMapValues(signed.UnrecognizedFields, dict) - } - dict["_type"] = signed.Type - dict["spec_version"] = signed.SpecVersion - dict["version"] = signed.Version - dict["expires"] = signed.Expires - dict["meta"] = signed.Meta - return json.Marshal(dict) -} - -func (signed *SnapshotType) UnmarshalJSON(data []byte) error { - type Alias SnapshotType - var s Alias - if err := json.Unmarshal(data, &s); err != nil { - return err - } - *signed = SnapshotType(s) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err +// Equal checks whether one hash set equals another +func (source Hashes) Equal(expected Hashes) bool { + hashChecked := false + for typ, hash := range expected { + if h, ok := source[typ]; ok { + // hash type match found + hashChecked = true + if !hmac.Equal(h, hash) { + // hash values don't match + return false + } + } } - delete(dict, "_type") - delete(dict, "spec_version") - delete(dict, "version") - delete(dict, "expires") - delete(dict, "meta") - signed.UnrecognizedFields = dict - return nil -} - -func (signed TimestampType) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(signed.UnrecognizedFields) != 0 { - copyMapValues(signed.UnrecognizedFields, dict) - } - dict["_type"] = signed.Type - dict["spec_version"] = signed.SpecVersion - dict["version"] = signed.Version - dict["expires"] = signed.Expires - dict["meta"] = signed.Meta - return json.Marshal(dict) + return hashChecked } -func (signed *TimestampType) UnmarshalJSON(data []byte) error { - type Alias TimestampType - var s Alias - if err := json.Unmarshal(data, &s); err != nil { - return err - } - *signed = TimestampType(s) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err +// copyMapValues copies the values of the src map to dst +func copyMapValues(src, dst map[string]any) { + for k, v := range src { + dst[k] = v } - delete(dict, "_type") - delete(dict, "spec_version") - delete(dict, "version") - delete(dict, "expires") - delete(dict, "meta") - signed.UnrecognizedFields = dict - return nil } -func (signed TargetsType) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(signed.UnrecognizedFields) != 0 { - copyMapValues(signed.UnrecognizedFields, dict) - } - dict["_type"] = signed.Type - dict["spec_version"] = signed.SpecVersion - dict["version"] = signed.Version - dict["expires"] = signed.Expires - dict["targets"] = signed.Targets - if signed.Delegations != nil { - dict["delegations"] = signed.Delegations - } - return json.Marshal(dict) -} - -func (signed *TargetsType) UnmarshalJSON(data []byte) error { - type Alias TargetsType - var s Alias - if err := json.Unmarshal(data, &s); err != nil { +// verifyLength verifies if the passed data has the corresponding length +func verifyLength(data []byte, length int64) error { + len, err := io.Copy(io.Discard, bytes.NewReader(data)) + if err != nil { return err } - *signed = TargetsType(s) - - // populate the path field for each target - for name, targetFile := range signed.Targets { - targetFile.Path = name - } - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err + if length != len { + return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("length verification failed - expected %d, got %d", length, len)} } - delete(dict, "_type") - delete(dict, "spec_version") - delete(dict, "version") - delete(dict, "expires") - delete(dict, "targets") - delete(dict, "delegations") - signed.UnrecognizedFields = dict return nil } -func (signed *MetaFiles) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(signed.UnrecognizedFields) != 0 { - copyMapValues(signed.UnrecognizedFields, dict) - } - // length and hashes are optional - if signed.Length != 0 { - dict["length"] = signed.Length - } - if len(signed.Hashes) != 0 { - dict["hashes"] = signed.Hashes - } - dict["version"] = signed.Version - return json.Marshal(dict) -} - -func (signed *MetaFiles) UnmarshalJSON(data []byte) error { - type Alias MetaFiles - var s Alias - if err := json.Unmarshal(data, &s); err != nil { - return err - } - *signed = MetaFiles(s) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err +// verifyHashes verifies if the hash of the passed data corresponds to it +func verifyHashes(data []byte, hashes Hashes) error { + var hasher hash.Hash + for k, v := range hashes { + switch k { + case "sha256": + hasher = sha256.New() + case "sha512": + hasher = sha512.New() + default: + return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("hash verification failed - unknown hashing algorithm - %s", k)} + } + hasher.Write(data) + if hex.EncodeToString(v) != hex.EncodeToString(hasher.Sum(nil)) { + return ErrLengthOrHashMismatch{Msg: fmt.Sprintf("hash verification failed - mismatch for algorithm %s", k)} + } } - delete(dict, "length") - delete(dict, "hashes") - delete(dict, "version") - signed.UnrecognizedFields = dict return nil } -func (signed *TargetFiles) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(signed.UnrecognizedFields) != 0 { - copyMapValues(signed.UnrecognizedFields, dict) - } - dict["length"] = signed.Length - dict["hashes"] = signed.Hashes - if signed.Custom != nil { - dict["custom"] = signed.Custom +// fromBytes return a *Metadata[T] object from bytes and verifies +// that the data corresponds to the caller struct type +func fromBytes[T Roles](data []byte) (*Metadata[T], error) { + meta := &Metadata[T]{} + // verify that the type we used to create the object is the same as the type of the metadata file + if err := checkType[T](data); err != nil { + return nil, err } - return json.Marshal(dict) -} - -func (signed *TargetFiles) UnmarshalJSON(data []byte) error { - type Alias TargetFiles - var s Alias - if err := json.Unmarshal(data, &s); err != nil { - return err + // if all is okay, unmarshal meta to the desired Metadata[T] type + if err := json.Unmarshal(data, meta); err != nil { + return nil, err } - *signed = TargetFiles(s) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err + // Make sure signature key IDs are unique + if err := checkUniqueSignatures(*meta); err != nil { + return nil, err } - delete(dict, "length") - delete(dict, "hashes") - delete(dict, "custom") - signed.UnrecognizedFields = dict - return nil -} - -func (key *Key) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(key.UnrecognizedFields) != 0 { - copyMapValues(key.UnrecognizedFields, dict) - } - dict["keytype"] = key.Type - dict["scheme"] = key.Scheme - dict["keyval"] = key.Value - return json.Marshal(dict) + return meta, nil } -func (key *Key) UnmarshalJSON(data []byte) error { - type Alias Key - var a Alias - if err := json.Unmarshal(data, &a); err != nil { - return err - } - // nolint - *key = Key(a) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err +// checkUniqueSignatures verifies if the signature key IDs are unique for that metadata +func checkUniqueSignatures[T Roles](meta Metadata[T]) error { + signatures := []string{} + for _, sig := range meta.Signatures { + if slices.Contains(signatures, sig.KeyID) { + return ErrValue{Msg: fmt.Sprintf("multiple signatures found for key ID %s", sig.KeyID)} + } + signatures = append(signatures, sig.KeyID) } - delete(dict, "keytype") - delete(dict, "scheme") - delete(dict, "keyval") - key.UnrecognizedFields = dict return nil } -func (meta *Metadata[T]) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(meta.UnrecognizedFields) != 0 { - copyMapValues(meta.UnrecognizedFields, dict) - } - dict["signed"] = meta.Signed - dict["signatures"] = meta.Signatures - return json.Marshal(dict) -} - -func (meta *Metadata[T]) UnmarshalJSON(data []byte) error { - tmp := any(new(T)) +// checkType verifies if the generic type used to create the object is the same as the type of the metadata file in bytes +func checkType[T Roles](data []byte) error { var m map[string]any + i := any(new(T)) if err := json.Unmarshal(data, &m); err != nil { return err } - switch tmp.(type) { + signedType := m["signed"].(map[string]any)["_type"].(string) + switch i.(type) { case *RootType: - dict := struct { - Signed RootType `json:"signed"` - Signatures []Signature `json:"signatures"` - }{} - if err := json.Unmarshal(data, &dict); err != nil { - return err + if ROOT != signedType { + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", ROOT, signedType)} } - var i interface{} = dict.Signed - meta.Signed = i.(T) - meta.Signatures = dict.Signatures case *SnapshotType: - dict := struct { - Signed SnapshotType `json:"signed"` - Signatures []Signature `json:"signatures"` - }{} - if err := json.Unmarshal(data, &dict); err != nil { - return err + if SNAPSHOT != signedType { + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", SNAPSHOT, signedType)} } - var i interface{} = dict.Signed - meta.Signed = i.(T) - meta.Signatures = dict.Signatures case *TimestampType: - dict := struct { - Signed TimestampType `json:"signed"` - Signatures []Signature `json:"signatures"` - }{} - if err := json.Unmarshal(data, &dict); err != nil { - return err + if TIMESTAMP != signedType { + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", TIMESTAMP, signedType)} } - var i interface{} = dict.Signed - meta.Signed = i.(T) - meta.Signatures = dict.Signatures case *TargetsType: - dict := struct { - Signed TargetsType `json:"signed"` - Signatures []Signature `json:"signatures"` - }{} - if err := json.Unmarshal(data, &dict); err != nil { - return err + if TARGETS != signedType { + return ErrValue{Msg: fmt.Sprintf("expected metadata type %s, got - %s", TARGETS, signedType)} } - var i interface{} = dict.Signed - meta.Signed = i.(T) - meta.Signatures = dict.Signatures default: - return ErrValue{Msg: "unrecognized metadata type"} - } - delete(m, "signed") - delete(m, "signatures") - meta.UnrecognizedFields = m - return nil -} - -func (s Signature) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(s.UnrecognizedFields) != 0 { - copyMapValues(s.UnrecognizedFields, dict) - } - dict["keyid"] = s.KeyID - dict["sig"] = s.Signature - return json.Marshal(dict) -} - -func (s *Signature) UnmarshalJSON(data []byte) error { - type Alias Signature - var a Alias - if err := json.Unmarshal(data, &a); err != nil { - return err - } - *s = Signature(a) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err - } - delete(dict, "keyid") - delete(dict, "sig") - s.UnrecognizedFields = dict - return nil -} - -func (kv KeyVal) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(kv.UnrecognizedFields) != 0 { - copyMapValues(kv.UnrecognizedFields, dict) - } - dict["public"] = kv.PublicKey - return json.Marshal(dict) -} - -func (kv *KeyVal) UnmarshalJSON(data []byte) error { - type Alias KeyVal - var a Alias - if err := json.Unmarshal(data, &a); err != nil { - return err - } - *kv = KeyVal(a) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err - } - delete(dict, "public") - kv.UnrecognizedFields = dict - return nil -} - -func (role *Role) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(role.UnrecognizedFields) != 0 { - copyMapValues(role.UnrecognizedFields, dict) - } - dict["keyids"] = role.KeyIDs - dict["threshold"] = role.Threshold - return json.Marshal(dict) -} - -func (role *Role) UnmarshalJSON(data []byte) error { - type Alias Role - var a Alias - if err := json.Unmarshal(data, &a); err != nil { - return err - } - *role = Role(a) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err - } - delete(dict, "keyids") - delete(dict, "threshold") - role.UnrecognizedFields = dict - return nil -} - -func (d *Delegations) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(d.UnrecognizedFields) != 0 { - copyMapValues(d.UnrecognizedFields, dict) - } - // only one is allowed - dict["keys"] = d.Keys - if d.Roles != nil { - dict["roles"] = d.Roles - } else if d.SuccinctRoles != nil { - dict["succinct_roles"] = d.SuccinctRoles - } - return json.Marshal(dict) -} - -func (d *Delegations) UnmarshalJSON(data []byte) error { - type Alias Delegations - var a Alias - if err := json.Unmarshal(data, &a); err != nil { - return err - } - *d = Delegations(a) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err - } - delete(dict, "keys") - delete(dict, "roles") - delete(dict, "succinct_roles") - d.UnrecognizedFields = dict - return nil -} - -func (role DelegatedRole) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(role.UnrecognizedFields) != 0 { - copyMapValues(role.UnrecognizedFields, dict) - } - dict["name"] = role.Name - dict["keyids"] = role.KeyIDs - dict["threshold"] = role.Threshold - dict["terminating"] = role.Terminating - // make sure we have only one of the two (per spec) - if role.Paths != nil && role.PathHashPrefixes != nil { - return nil, ErrValue{Msg: "failed to marshal: not allowed to have both \"paths\" and \"path_hash_prefixes\" present"} - } - if role.Paths != nil { - dict["paths"] = role.Paths - } else if role.PathHashPrefixes != nil { - dict["path_hash_prefixes"] = role.PathHashPrefixes - } - return json.Marshal(dict) -} - -func (role *DelegatedRole) UnmarshalJSON(data []byte) error { - type Alias DelegatedRole - var a Alias - if err := json.Unmarshal(data, &a); err != nil { - return err - } - *role = DelegatedRole(a) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err - } - delete(dict, "name") - delete(dict, "keyids") - delete(dict, "threshold") - delete(dict, "terminating") - delete(dict, "paths") - delete(dict, "path_hash_prefixes") - role.UnrecognizedFields = dict - return nil -} - -func (role *SuccinctRoles) MarshalJSON() ([]byte, error) { - dict := map[string]any{} - if len(role.UnrecognizedFields) != 0 { - copyMapValues(role.UnrecognizedFields, dict) - } - dict["keyids"] = role.KeyIDs - dict["threshold"] = role.Threshold - dict["bit_length"] = role.BitLength - dict["name_prefix"] = role.NamePrefix - return json.Marshal(dict) -} - -func (role *SuccinctRoles) UnmarshalJSON(data []byte) error { - type Alias SuccinctRoles - var a Alias - if err := json.Unmarshal(data, &a); err != nil { - return err - } - *role = SuccinctRoles(a) - - var dict map[string]any - if err := json.Unmarshal(data, &dict); err != nil { - return err + return ErrValue{Msg: fmt.Sprintf("unrecognized metadata type - %s", signedType)} } - delete(dict, "keyids") - delete(dict, "threshold") - delete(dict, "bit_length") - delete(dict, "name_prefix") - role.UnrecognizedFields = dict + // all okay return nil } - -// copyMapValues copies the values of the src map to dst -func copyMapValues(src, dst map[string]any) { - for k, v := range src { - dst[k] = v - } -} - -// Equal checks whether one hash set equals another -func (source Hashes) Equal(expected Hashes) bool { - hashChecked := false - for typ, hash := range expected { - if h, ok := source[typ]; ok { - // hash type match found - hashChecked = true - if !hmac.Equal(h, hash) { - // hash values don't match - return false - } - } - } - return hashChecked -} From 120f108f273855b911a9e817b1266693f3abf219 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 10 Mar 2023 22:28:26 +0200 Subject: [PATCH 109/208] chore: move copyMapValues to marshal.go Signed-off-by: Radoslav Dimitrov --- metadata/marshal.go | 7 +++++++ metadata/metadata.go | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/metadata/marshal.go b/metadata/marshal.go index a67d81ad..e3a7214c 100644 --- a/metadata/marshal.go +++ b/metadata/marshal.go @@ -552,3 +552,10 @@ func (b HexBytes) MarshalJSON() ([]byte, error) { func (b HexBytes) String() string { return hex.EncodeToString(b) } + +// copyMapValues copies the values of the src map to dst +func copyMapValues(src, dst map[string]any) { + for k, v := range src { + dst[k] = v + } +} diff --git a/metadata/metadata.go b/metadata/metadata.go index ac2900e4..115f3d5d 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -787,13 +787,6 @@ func (source Hashes) Equal(expected Hashes) bool { return hashChecked } -// copyMapValues copies the values of the src map to dst -func copyMapValues(src, dst map[string]any) { - for k, v := range src { - dst[k] = v - } -} - // verifyLength verifies if the passed data has the corresponding length func verifyLength(data []byte, length int64) error { len, err := io.Copy(io.Discard, bytes.NewReader(data)) From 9b722b5199238bdd2e2dc3e1a8326f9c699d54e0 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 11 Mar 2023 00:43:56 +0200 Subject: [PATCH 110/208] chore: update client example Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 40 +++++++++++++------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 0fb794de..5ad970da 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -27,40 +27,30 @@ import ( // The following config is used to fetch a target from Jussi's GitHub repository example const ( - baseURL = "https://jku.github.io/tuf-demo" - baseURLMetadataDir = "metadata" - baseURLTargetsDir = "targets" - targetName = "demo/succinctly-delegated-5.txt" - verbosity = log.InfoLevel + metadataURL = "https://jku.github.io/tuf-demo/metadata" + targetsURL = "https://jku.github.io/tuf-demo/targets" + targetName = "demo/succinctly-delegated-5.txt" + verbosity = log.InfoLevel ) -// The following config is used to fetch a target from a local RSTUF deployment -// const ( -// baseURL = "http://127.0.0.1:8080" -// baseURLMetadataDir = "" -// baseURLTargetsDir = "" -// targetName = "file2.tar.gz" -// verbosity = log.InfoLevel -// ) - func main() { // set debug level log.SetLevel(verbosity) // initialize environment - temporary folders, etc. - localMetadataDir, err := InitEnvironment() + metadataDir, err := InitEnvironment() if err != nil { log.Fatal("Failed to initialize environment: ", err) } // initialize client with Trust-On-First-Use - err = InitTrustOnFirstUse(localMetadataDir) + err = InitTrustOnFirstUse(metadataDir) if err != nil { log.Fatal("Trust-On-First-Use failed: ", err) } // download the desired target - err = DownloadTarget(localMetadataDir, targetName) + err = DownloadTarget(metadataDir, targetName) if err != nil { log.Fatal("Download failed: ", err) } @@ -73,7 +63,6 @@ func InitEnvironment() (string, error) { if err != nil { return "", fmt.Errorf("failed to get current working directory: %w", err) } - // create a temporary folder for storing the demo artifacts tmpDir, err := os.MkdirTemp(cwd, "tmp") if err != nil { @@ -90,8 +79,14 @@ func InitEnvironment() (string, error) { // InitTrustOnFirstUse initialize local trusted metadata (Trust-On-First-Use) func InitTrustOnFirstUse(metadataDir string) error { + // check if there's already a local root.json available for bootstrapping trust + _, err := os.Stat(filepath.Join(metadataDir, "root.json")) + if err == nil { + return nil + } + // download the initial root metadata so we can bootstrap Trust-On-First-Use - rootURL, err := url.JoinPath(baseURL, baseURLMetadataDir, "1.root.json") + rootURL, err := url.JoinPath(metadataURL, "1.root.json") if err != nil { return fmt.Errorf("failed to create URL path for 1.root.json: %w", err) } @@ -128,15 +123,12 @@ func InitTrustOnFirstUse(metadataDir string) error { // get the target information, verifies if the target is already cached, and in case it // is not cached, downloads the target file. func DownloadTarget(localMetadataDir, target string) error { - metadataBaseURL, _ := url.JoinPath(baseURL, baseURLMetadataDir) - targetsBaseURL, _ := url.JoinPath(baseURL, baseURLTargetsDir) - // create updater configuration cfg := config.New(localMetadataDir) // default config cfg.LocalMetadataDir = localMetadataDir cfg.LocalTargetsDir = filepath.Join(localMetadataDir, "download") - cfg.RemoteMetadataURL = metadataBaseURL - cfg.RemoteTargetsURL = targetsBaseURL + cfg.RemoteMetadataURL = metadataURL + cfg.RemoteTargetsURL = targetsURL cfg.PrefixTargetsWithHash = false // do not use hash-prefixed target files with consistent snapshots // create a new Updater instance From aa3d6eab2cd8c9c2b52f58ecb2402b15382deda5 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 11 Mar 2023 00:45:31 +0200 Subject: [PATCH 111/208] fix: wrong path to loadLocalMetadata and error comparing Signed-off-by: Radoslav Dimitrov --- metadata/updater/updater.go | 42 ++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index f3dd22e5..f66ba350 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -70,9 +70,19 @@ func New(config *config.UpdaterConfig) (*Updater, error) { // check in case we bootstrap using an already provided root.json byte content if len(updater.cfg.LocalTrustedRootBytes) == 0 { // if not, then we try to load a root.json file from a local path - // suffix with root.json in case it's a directory path - if !strings.HasSuffix(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) { - updater.cfg.LocalTrustedRootPath = filepath.Join(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) + // trim the extension in case it's a filename path + fileInfo, err := os.Stat(updater.cfg.LocalTrustedRootPath) + if err != nil { + return nil, err + } + if fileInfo.IsDir() { + // directory path, add "root" to it + updater.cfg.LocalTrustedRootPath = filepath.Join(updater.cfg.LocalTrustedRootPath, metadata.ROOT) + } else { + // file path, remove ".json" from it + if strings.HasSuffix(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) { + updater.cfg.LocalTrustedRootPath = strings.TrimSuffix(updater.cfg.LocalTrustedRootPath, ".json") + } } // load the root metadata file used for bootstrapping trust rootBytes, err := updater.loadLocalMetadata(updater.cfg.LocalTrustedRootPath) @@ -231,7 +241,7 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa // loadTimestamp load local and remote timestamp metadata func (update *Updater) loadTimestamp() error { // try to read local timestamp - data, err := update.loadLocalMetadata(metadata.TIMESTAMP) + data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, metadata.TIMESTAMP)) if err != nil { // this means there's no existing local timestamp so we should proceed downloading it without the need to UpdateTimestamp log.Debug("Local timestamp does not exist") @@ -239,7 +249,8 @@ func (update *Updater) loadTimestamp() error { // local timestamp exists, let's try to verify it and load it to the trusted metadata set _, err := update.trusted.UpdateTimestamp(data) if err != nil { - if errors.Is(err, metadata.ErrRepository{}) { + var tmpErr metadata.ErrRepository + if errors.As(err, &tmpErr) { // local timestamp is not valid, proceed downloading from remote; note that this error type includes several other subset errors log.Debug("Local timestamp is not valid") } else { @@ -258,7 +269,8 @@ func (update *Updater) loadTimestamp() error { // try to verify and load the newly downloaded timestamp _, err = update.trusted.UpdateTimestamp(data) if err != nil { - if errors.Is(err, metadata.ErrEqualVersionNumber{}) { + var tmpErr metadata.ErrEqualVersionNumber + if errors.As(err, &tmpErr) { // if the new timestamp version is the same as current, discard the // new timestamp; this is normal and it shouldn't raise any error return nil @@ -278,7 +290,7 @@ func (update *Updater) loadTimestamp() error { // loadSnapshot load local (and if needed remote) snapshot metadata func (update *Updater) loadSnapshot() error { // try to read local snapshot - data, err := update.loadLocalMetadata(metadata.SNAPSHOT) + data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, metadata.SNAPSHOT)) if err != nil { // this means there's no existing local snapshot so we should proceed downloading it without the need to UpdateSnapshot log.Debug("Local snapshot does not exist") @@ -287,7 +299,8 @@ func (update *Updater) loadSnapshot() error { _, err = update.trusted.UpdateSnapshot(data, true) if err != nil { // this means snapshot verification/loading failed - if errors.Is(err, metadata.ErrRepository{}) { + var tmpErr metadata.ErrRepository + if errors.As(err, &tmpErr) { // local snapshot is not valid, proceed downloading from remote; note that this error type includes several other subset errors log.Debug("Local snapshot is not valid") } else { @@ -343,7 +356,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad return role, nil } // try to read local targets - data, err := update.loadLocalMetadata(roleName) + data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, roleName)) if err != nil { // this means there's no existing local target file so we should proceed downloading it without the need to UpdateDelegatedTargets log.Debugf("Local %s does not exist", roleName) @@ -352,7 +365,8 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) if err != nil { // this means targets verification/loading failed - if errors.Is(err, metadata.ErrRepository{}) { + var tmpErr metadata.ErrRepository + if errors.As(err, &tmpErr) { // local target file is not valid, proceed downloading from remote; note that this error type includes several other subset errors log.Debugf("Local %s is not valid", roleName) } else { @@ -413,9 +427,9 @@ func (update *Updater) loadRoot() error { data, err := update.downloadMetadata(metadata.ROOT, update.cfg.RootMaxLength, strconv.FormatInt(nextVersion, 10)) if err != nil { // downloading the root metadata failed for some reason - var downloadErr metadata.ErrDownloadHTTP - if errors.As(err, &downloadErr) { - if downloadErr.StatusCode != http.StatusNotFound && downloadErr.StatusCode != http.StatusForbidden { + var tmpErr metadata.ErrDownloadHTTP + if errors.As(err, &tmpErr) { + if tmpErr.StatusCode != http.StatusNotFound && tmpErr.StatusCode != http.StatusForbidden { // unexpected HTTP status code return err } @@ -564,7 +578,7 @@ func (update *Updater) generateTargetFilePath(tf *metadata.TargetFiles) (string, // loadLocalMetadata reads a local .json file and returns its bytes func (update *Updater) loadLocalMetadata(roleName string) ([]byte, error) { - return readFile(roleName) + return readFile(fmt.Sprintf("%s.json", roleName)) } // GetTopLevelTargets returns the top-level target files From 4b13803cbd0ed0eaabd08037a9f8eff0dc9e4f1e Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 11 Mar 2023 00:58:25 +0200 Subject: [PATCH 112/208] chore: update client example Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 5ad970da..8b1820b4 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -27,10 +27,11 @@ import ( // The following config is used to fetch a target from Jussi's GitHub repository example const ( - metadataURL = "https://jku.github.io/tuf-demo/metadata" - targetsURL = "https://jku.github.io/tuf-demo/targets" - targetName = "demo/succinctly-delegated-5.txt" - verbosity = log.InfoLevel + metadataURL = "https://jku.github.io/tuf-demo/metadata" + targetsURL = "https://jku.github.io/tuf-demo/targets" + targetName = "demo/succinctly-delegated-5.txt" + verbosity = log.InfoLevel + generateRandomFolder = false ) func main() { @@ -58,22 +59,26 @@ func main() { // InitEnvironment prepares the local environment - temporary folders, etc. func InitEnvironment() (string, error) { + var tmpDir string // get working directory cwd, err := os.Getwd() if err != nil { return "", fmt.Errorf("failed to get current working directory: %w", err) } - // create a temporary folder for storing the demo artifacts - tmpDir, err := os.MkdirTemp(cwd, "tmp") - if err != nil { - return "", fmt.Errorf("failed to create a temporary folder: %w", err) + if generateRandomFolder { + tmpDir = filepath.Join(cwd, "tmp") + // create a temporary folder for storing the demo artifacts + os.Mkdir(tmpDir, 0750) + } else { + // create a temporary folder for storing the demo artifacts + tmpDir, err = os.MkdirTemp(cwd, "tmp") + if err != nil { + return "", fmt.Errorf("failed to create a temporary folder: %w", err) + } } // create a destination folder for storing the downloaded target - err = os.Mkdir(filepath.Join(tmpDir, "download"), 0750) - if err != nil { - return "", fmt.Errorf("failed to create a download folder: %w", err) - } + os.Mkdir(filepath.Join(tmpDir, "download"), 0750) return tmpDir, nil } From 36d1bc36b4e829699ba8a080b1db83f89e1cf561 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 11 Mar 2023 02:06:17 +0200 Subject: [PATCH 113/208] chore: remove duplicated function Signed-off-by: Radoslav Dimitrov --- metadata/metadata.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/metadata/metadata.go b/metadata/metadata.go index 115f3d5d..84573142 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -443,16 +443,6 @@ func (source *TargetFiles) Equal(expected TargetFiles) bool { return false } -// EqualFromBytes checks whether the source target file matches another (from bytes) -func (source *TargetFiles) EqualFromBytes(expectedBytes []byte) bool { - // create target file from bytes - expected, err := TargetFile().FromBytes("", expectedBytes) - if err == nil && source.Equal(*expected) { - return true - } - return false -} - // FromFile generate TargetFiles from file func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { log.Debugf("Generating target file from file %s", localPath) From 7bda5a09dcfd583ff2fdcc941f707a07ff295342 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 15 Mar 2023 20:55:58 +0200 Subject: [PATCH 114/208] chore: initialize client only with root bytes Signed-off-by: Radoslav Dimitrov --- metadata/config/config.go | 34 +++++++++++++++++++--------- metadata/updater/updater.go | 44 ++++++++++++++----------------------- 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/metadata/config/config.go b/metadata/config/config.go index 65d053df..6c43bb61 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -12,9 +12,9 @@ package config import ( - "fmt" + "net/url" + "os" - "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" ) @@ -28,8 +28,7 @@ type UpdaterConfig struct { TargetsMaxLength int64 // Updater configuration Fetcher fetcher.Fetcher - LocalTrustedRootPath string - LocalTrustedRootBytes []byte + LocalTrustedRoot []byte LocalMetadataDir string LocalTargetsDir string RemoteMetadataURL string @@ -40,11 +39,11 @@ type UpdaterConfig struct { // New creates a new UpdaterConfig instance used by the Updater to // store configuration -func New(rootPath ...string) *UpdaterConfig { - // if no rootPath is provided, default to looking for the root.json in the current working directory - trustedRootPath := fmt.Sprintf("%s.json", metadata.ROOT) - if len(rootPath) != 0 { - trustedRootPath = rootPath[0] +func New(remoteURL string, rootBytes []byte) (*UpdaterConfig, error) { + // Default URL for target files - /targets + targetsURL, err := url.JoinPath(remoteURL, "targets") + if err != nil { + return nil, err } return &UpdaterConfig{ // TUF configuration @@ -56,8 +55,23 @@ func New(rootPath ...string) *UpdaterConfig { TargetsMaxLength: 5000000, // bytes // Updater configuration Fetcher: &fetcher.DefaultFetcher{}, // use the default built-in download fetcher - LocalTrustedRootPath: trustedRootPath, // local path to trusted root.json + LocalTrustedRoot: rootBytes, // trusted root.json + RemoteMetadataURL: remoteURL, // URL of where the TUF metadata is + RemoteTargetsURL: targetsURL, // URL of where the target files should be downloaded from DisableLocalCache: false, // enable local caching of trusted metadata PrefixTargetsWithHash: true, // use hash-prefixed target files with consistent snapshots + }, nil +} + +func (cfg *UpdaterConfig) EnsurePathsExist() error { + if cfg.DisableLocalCache { + return nil + } + for _, path := range []string{cfg.LocalMetadataDir, cfg.LocalTargetsDir} { + err := os.MkdirAll(path, os.ModePerm) + if err != nil { + return err + } } + return nil } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index f66ba350..05943368 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -63,40 +63,28 @@ type roleParentTuple struct { // New creates a new Updater instance and loads trusted root metadata func New(config *config.UpdaterConfig) (*Updater, error) { + // make sure the trusted root metadata and remote URL were provided + if len(config.LocalTrustedRoot) == 0 || len(config.RemoteMetadataURL) == 0 { + return nil, fmt.Errorf("no initial trusted root metadata or remote URL provided") + } + // create a new trusted metadata instance using the trusted root.json + trustedMetadataSet, err := trustedmetadata.New(config.LocalTrustedRoot) + if err != nil { + return nil, err + } // create an updater instance updater := &Updater{ - cfg: config, - } - // check in case we bootstrap using an already provided root.json byte content - if len(updater.cfg.LocalTrustedRootBytes) == 0 { - // if not, then we try to load a root.json file from a local path - // trim the extension in case it's a filename path - fileInfo, err := os.Stat(updater.cfg.LocalTrustedRootPath) - if err != nil { - return nil, err - } - if fileInfo.IsDir() { - // directory path, add "root" to it - updater.cfg.LocalTrustedRootPath = filepath.Join(updater.cfg.LocalTrustedRootPath, metadata.ROOT) - } else { - // file path, remove ".json" from it - if strings.HasSuffix(updater.cfg.LocalTrustedRootPath, fmt.Sprintf("%s.json", metadata.ROOT)) { - updater.cfg.LocalTrustedRootPath = strings.TrimSuffix(updater.cfg.LocalTrustedRootPath, ".json") - } - } - // load the root metadata file used for bootstrapping trust - rootBytes, err := updater.loadLocalMetadata(updater.cfg.LocalTrustedRootPath) - if err != nil { - return nil, err - } - updater.cfg.LocalTrustedRootBytes = rootBytes + cfg: config, + trusted: trustedMetadataSet, // save trusted metadata set } - // create a new trusted metadata instance using the trusted root.json - trustedMetadataSet, err := trustedmetadata.New(updater.cfg.LocalTrustedRootBytes) + // ensure paths exist, doesn't do anything if caching is disabled + err = updater.cfg.EnsurePathsExist() if err != nil { return nil, err } - updater.trusted = trustedMetadataSet + // persist the initial root metadata to the local metadata folder + updater.persistMetadata(metadata.ROOT, updater.cfg.LocalTrustedRoot) + // all okay, return the updater instance return updater, nil } From 214dbcab56c3b5264686456e7492c093918f1a50 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 15 Mar 2023 20:57:01 +0200 Subject: [PATCH 115/208] chore: update examples with the new init format Signed-off-by: Radoslav Dimitrov --- examples/cli/tuf-client/cmd/get.go | 11 +++++++++-- examples/client/client_example.go | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 037ac135..16694409 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -64,12 +64,19 @@ func GetCmd(target string) error { if err != nil { return err } + // read the trusted root metadata + rootBytes, err := os.ReadFile(filepath.Join(env.MetadataDir, "root.json")) + if err != nil { + return err + } // updater configuration - cfg := config.New(env.MetadataDir) // default config + cfg, err := config.New(env.MetadataURL, rootBytes) // default config + if err != nil { + return err + } cfg.LocalMetadataDir = env.MetadataDir cfg.LocalTargetsDir = env.DownloadDir - cfg.RemoteMetadataURL = env.MetadataURL cfg.RemoteTargetsURL = env.TargetsURL cfg.PrefixTargetsWithHash = !useNonHashPrefixedTargetFiles diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 8b1820b4..5aa26cfe 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -128,11 +128,17 @@ func InitTrustOnFirstUse(metadataDir string) error { // get the target information, verifies if the target is already cached, and in case it // is not cached, downloads the target file. func DownloadTarget(localMetadataDir, target string) error { + rootBytes, err := os.ReadFile(filepath.Join(localMetadataDir, "root.json")) + if err != nil { + return err + } // create updater configuration - cfg := config.New(localMetadataDir) // default config + cfg, err := config.New(metadataURL, rootBytes) // default config + if err != nil { + return err + } cfg.LocalMetadataDir = localMetadataDir cfg.LocalTargetsDir = filepath.Join(localMetadataDir, "download") - cfg.RemoteMetadataURL = metadataURL cfg.RemoteTargetsURL = targetsURL cfg.PrefixTargetsWithHash = false // do not use hash-prefixed target files with consistent snapshots From 1e7460769926399a520c239e5caca76387877dcd Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 15 Mar 2023 21:13:25 +0200 Subject: [PATCH 116/208] feat: implement TAP4 - multirepo package Signed-off-by: Radoslav Dimitrov --- Makefile | 9 + README.md | 8 + examples/multirepo/.DS_Store | Bin 0 -> 6148 bytes examples/multirepo/client/README.md | 8 + examples/multirepo/client/client_example.go | 159 +++++++++ examples/multirepo/client/root.json | 71 ++++ examples/multirepo/repository/README.md | 7 + .../multirepo/repository/generate_metadata.go | 186 +++++++++++ .../multirepo/repository/metadata/1.root.json | 71 ++++ .../repository/metadata/1.snapshot.json | 19 ++ .../repository/metadata/1.targets.json | 34 ++ .../repository/metadata/timestamp.json | 19 ++ ...52e2aecc034e12e8a395b3e3de69475f3.map.json | 21 ++ .../multirepo/repository/targets/map.json | 21 ++ ...58545d522e35d222ccf58fea87ccccf4.root.json | 156 +++++++++ .../targets/root-signing-github/root.json | 156 +++++++++ ...58545d522e35d222ccf58fea87ccccf4.root.json | 156 +++++++++ .../targets/root-signing-google/root.json | 156 +++++++++ metadata/multirepo/multirepo.go | 314 ++++++++++++++++++ 19 files changed, 1571 insertions(+) create mode 100644 examples/multirepo/.DS_Store create mode 100644 examples/multirepo/client/README.md create mode 100644 examples/multirepo/client/client_example.go create mode 100644 examples/multirepo/client/root.json create mode 100644 examples/multirepo/repository/README.md create mode 100644 examples/multirepo/repository/generate_metadata.go create mode 100644 examples/multirepo/repository/metadata/1.root.json create mode 100644 examples/multirepo/repository/metadata/1.snapshot.json create mode 100644 examples/multirepo/repository/metadata/1.targets.json create mode 100644 examples/multirepo/repository/metadata/timestamp.json create mode 100644 examples/multirepo/repository/targets/c3ff474341f3d79dbacfb6e6a2a1c1352e2aecc034e12e8a395b3e3de69475f3.map.json create mode 100644 examples/multirepo/repository/targets/map.json create mode 100644 examples/multirepo/repository/targets/root-signing-github/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json create mode 100644 examples/multirepo/repository/targets/root-signing-github/root.json create mode 100644 examples/multirepo/repository/targets/root-signing-google/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json create mode 100644 examples/multirepo/repository/targets/root-signing-google/root.json create mode 100644 metadata/multirepo/multirepo.go diff --git a/Makefile b/Makefile index d0c8b210..99c8dcfa 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,12 @@ example-repository: @echo "Executing the following example - repository/basic_repository.go" @cd examples/repository/ && go run . +# Target for demoing the examples/multirepo/client/client_example.go +.PHONY: example-multirepo +example-multirepo: + @echo "Executing the following example - multirepo/client/client_example.go" + @cd examples/multirepo/client/ && go run . + # Target for demoing the tuf-client cli .PHONY: example-tuf-client-cli example-tuf-client-cli: build-tuf-client @@ -95,6 +101,9 @@ example-root-signing: build-tuf-client # Clean target .PHONY: clean clean: + @rm -rf examples/multirepo/client/bootstrap/ + @rm -rf examples/multirepo/client/download/ + @rm -rf examples/multirepo/client/metadata/ @rm -rf examples/repository/tmp* @rm -rf examples/client/tmp* @rm -rf tuf_download diff --git a/README.md b/README.md index 8e7f3299..f29cd371 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,10 @@ To try it - run `make example-client` (the artifacts will be located at `example To try it - run `make example-tuf-client-cli` +* [multi-repository client example (TAP4)](examples/multirepo/client/client_example.go) which demonstrates how to implement a multi-repository TUF client using the [multirepo](metadata/multirepo/multirepo.go) package. + +To try it - run `make example-multirepo` + ## Package details ---------------------------- @@ -99,6 +103,10 @@ It provides ways to query and download target files securely while handling the TUF update workflow behind the scenes. It is implemented on top of the Metadata API and can be used to implement various TUF clients with relatively little effort. +### The `multirepo` package + +* The `multirepo` package provides an implementation of [TAP 4 - Multiple repository consensus on entrusted targets](https://github.com/theupdateframework/taps/blob/master/tap4.md). It provides a secure search for particular targets across multiple repositories. It provides the functionality for how multiple repositories with separate roots of trust can be required to sign off on the same targets, effectively creating an AND relation and ensuring any files obtained can be trusted. It offers a way to initialize multiple repositories using a `map.json` file and also mechanisms to query and download target files securely. It is implemented on top of the Updater API and can be used to implement various multi-repository TUF clients with relatively little effort. + ## Documentation ---------------------------- diff --git a/examples/multirepo/.DS_Store b/examples/multirepo/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..225dd86c5094e936110bae1afccd8b3df1a35b24 GIT binary patch literal 6148 zcmeHKJ5Iw;5S)b+k!VsoEJpc3oVx@o-kOERb3P^#G0^WOR^NU19DIf); zz_$YaeQ0#Yu5d_//root.json + rootBytes, err := client.getRoot(repoName) + if err != nil { + return err + } + + // path of where each of the repository's metadata files will be persisted + metadataDir := filepath.Join(client.cfg.LocalMetadataDir, repoName) + + // location of where the target files will be downloaded (propagated to each client from the multi-repo config) + // WARNING: Do note that using a single folder for storing targets from various repositories might lead to a conflict + targetsDir := client.cfg.LocalTargetsDir + if len(client.cfg.LocalTargetsDir) == 0 { + // if it was not set, create a targets folder under each repository so there's no chance of conflict + targetsDir = filepath.Join(metadataDir, "targets") + } + + // ensure paths exist, doesn't do anything if caching is disabled + err = client.cfg.EnsurePathsExist() + if err != nil { + return err + } + + // default config for a TUF Client + cfg, err := config.New(repoURL[0], rootBytes) // support only one mirror for the time being + if err != nil { + return err + } + cfg.LocalMetadataDir = metadataDir + cfg.LocalTargetsDir = targetsDir + cfg.DisableLocalCache = client.cfg.DisableLocalCache // propagate global cache policy + + // create a new Updater instance for each repository + repoTUFClient, err := updater.New(cfg) + if err != nil { + return fmt.Errorf("failed to create Updater instance: %w", err) + } + + // save the client + client.TUFClients[repoName] = repoTUFClient + log.Debugf("Successfully initialized %s - %s", repoName, repoURL) + } + return nil +} + +// Refresh refreshes all repository clients +func (client *MultiRepoClient) Refresh() error { + // loop through each initialized TUF client and refresh it + for name, repoTUFClient := range client.TUFClients { + log.Infof("Refreshing %s", name) + err := repoTUFClient.Refresh() + if err != nil { + return err + } + } + return nil +} + +// GetTopLevelTargets returns the top-level target files for all repositories +func (client *MultiRepoClient) GetTopLevelTargets() (map[string]*MultiRepoTargetFiles, error) { + // collection of all target files for all clients + result := map[string]*MultiRepoTargetFiles{} + // loop through each repository + for repo, tufClient := range client.TUFClients { + // get top level targets for each repository + targetFiles := tufClient.GetTopLevelTargets() + // loop through all top level targets for this client + for targetName, targetFile := range targetFiles { + // check if this target file is already present in the collection + if val, ok := result[targetName]; ok { + // target file is already present + if val.TargetFile.Equal(*targetFile) { + // same target file present in multiple repositories + // update the repo list only + val.Repositories = append(val.Repositories, repo) + } else { + // target files for same target name but from different repositories don't match + // TODO: decide if this should raise an error + return nil, fmt.Errorf("target info conflict for same target file name") + } + } else { + // new target file, so save it + result[targetName] = &MultiRepoTargetFiles{ + Repositories: []string{repo}, + TargetFile: targetFile, + } + } + } + } + // went over all clients, so the collection should be complete + return result, nil +} + +// GetTargetInfo returns metadata.TargetFiles instance with information +// for targetPath and a list of repositories that serve the matching target. +// It implements the TAP 4 search algorithm. +func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.TargetFiles, []string, error) { + terminated := false + // loop through each mapping + for _, eachMap := range client.cfg.RepoMap.Mapping { + // loop through each path for this mapping + for _, pathPattern := range eachMap.Paths { + // check if the targetPath matches each path mapping + patternMatched, err := filepath.Match(pathPattern, targetPath) + if err != nil { + // error looking for a match + return nil, nil, err + } else { + if patternMatched { + // if there's a pattern match, loop through all of the repositories listed for that mapping + // and verify if all serve the same target infos + var targetInfo *metadata.TargetFiles + var repositories []string + threshold := 0 + for _, repoName := range eachMap.Repositories { + newTargetInfo, err := client.TUFClients[repoName].GetTargetInfo(targetPath) + if err != nil { + // failed to get target info for the given target + // there's probably no such target + // no need to proceed if this is a terminating mapping + if eachMap.Terminating { + return nil, nil, fmt.Errorf("failed to get target info for", targetPath) + } + // proceed trying to get target info from the next repository + continue + } + // if there's no target info saved yet, save it and + if targetInfo == nil && newTargetInfo != nil { + targetInfo = newTargetInfo + threshold += 1 // this should definitely just make threshold equals to 1 + repositories = append(repositories, repoName) + continue + } + // compare the existing one with the new one + if targetInfo.Equal(*newTargetInfo) { + // they are equal, so we just bump the threshold counter + threshold += 1 + repositories = append(repositories, repoName) + // try to do an early exit + if eachMap.Threshold <= threshold { + // we have enough repositories with matching target infos so safely return + return targetInfo, repositories, nil + } + continue + } + } + // exit if we have matched threshold + if eachMap.Threshold <= threshold { + // we have enough repositories with matching target infos so safely return + return targetInfo, repositories, nil + } + // if we are here, we haven't found enough target infos to match the threshold number + // for this mapping + if eachMap.Terminating { + // stop the search if this was a terminating map + terminated = eachMap.Terminating + break + } + } + } + // no match, continue looking at the next path pattern from this mapping + } + // stop the search if this was a terminating map, otherwise continue with the next mapping + if terminated { + break + } + } + return nil, nil, fmt.Errorf("target info not found") +} + +// DownloadTarget downloads the target file specified by targetFile +func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, []byte, error) { + for _, repoName := range repos { + targetPath, targetBytes, err := client.TUFClients[repoName].DownloadTarget(targetFile, filePath, targetBaseURL) + if err != nil { + // try downloading the target from the next available repository + continue + } + log.Info(fmt.Sprintf("Downloaded target %s from %s", targetFile.Path, repoName)) + // we got the target for this target info, so return it + return targetPath, targetBytes, nil + } + // error out as we haven't succeeded downloading the target file + return "", nil, fmt.Errorf("failed to download target file ", targetFile.Path) +} + +func (client *MultiRepoClient) getRoot(name string) ([]byte, error) { + return os.ReadFile(filepath.Join(client.cfg.BootstrapDir, name, "root.json")) +} + +func (client *MultiRepoClient) loadMap() error { + // read the map file + mapBytes, err := os.ReadFile(filepath.Join(client.cfg.BootstrapDir, DefaultRepoMapFileName)) + if err != nil { + return err + } + // unmarshal the map file + if err := json.Unmarshal(mapBytes, &client.cfg.RepoMap); err != nil { + return err + } + return nil +} + +func (cfg *MultiRepoConfig) EnsurePathsExist() error { + if cfg.DisableLocalCache { + return nil + } + for _, path := range []string{cfg.LocalMetadataDir, cfg.LocalTargetsDir} { + err := os.MkdirAll(path, os.ModePerm) + if err != nil { + return err + } + } + return nil +} From d2b439cb4d3a7a82e5f1d46b5c374396532573f0 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 02:13:01 +0200 Subject: [PATCH 117/208] chore: fix linting Signed-off-by: Radoslav Dimitrov --- metadata/multirepo/multirepo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index cdc36bdf..bd056789 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -218,7 +218,7 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe // there's probably no such target // no need to proceed if this is a terminating mapping if eachMap.Terminating { - return nil, nil, fmt.Errorf("failed to get target info for", targetPath) + return nil, nil, fmt.Errorf("failed to get target info for %s", targetPath) } // proceed trying to get target info from the next repository continue @@ -280,7 +280,7 @@ func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metada return targetPath, targetBytes, nil } // error out as we haven't succeeded downloading the target file - return "", nil, fmt.Errorf("failed to download target file ", targetFile.Path) + return "", nil, fmt.Errorf("failed to download target file %s", targetFile.Path) } func (client *MultiRepoClient) getRoot(name string) ([]byte, error) { From ff563e3575594bd75c052c890ffca1f33329e0dd Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 02:19:00 +0200 Subject: [PATCH 118/208] chore: fix linting Signed-off-by: Radoslav Dimitrov --- metadata/updater/updater.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 05943368..60d4d322 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -83,7 +83,10 @@ func New(config *config.UpdaterConfig) (*Updater, error) { return nil, err } // persist the initial root metadata to the local metadata folder - updater.persistMetadata(metadata.ROOT, updater.cfg.LocalTrustedRoot) + err = updater.persistMetadata(metadata.ROOT, updater.cfg.LocalTrustedRoot) + if err != nil { + return nil, err + } // all okay, return the updater instance return updater, nil } From fc11a253186e630c8b0a82bdd8bb335c4c1cce9b Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 02:28:11 +0200 Subject: [PATCH 119/208] chore: fix remote url for multirepo example and update readme files Signed-off-by: Radoslav Dimitrov --- README.md | 2 ++ examples/README.md | 10 ++++++++++ examples/multirepo/.DS_Store | Bin 6148 -> 0 bytes examples/multirepo/client/client_example.go | 6 ++---- 4 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 examples/multirepo/.DS_Store diff --git a/README.md b/README.md index f29cd371..9ea05d69 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ The [go-tuf-metadata](https://github.com/rdimitrov/go-tuf-metadata) project prov * target delegation via standard and hash bin delegations * support of [succinct hash bin delegations](https://github.com/theupdateframework/taps/blob/master/tap15.md) which significantly reduce the size of metadata * support for unrecognized fields within the metadata (i.e. preserved and accessible through `root.Signed.UnrecognizedFields["some-unknown-field"]`, also used for verifying/signing (if included in the Signed portion of the metadata)) +* TUF client API +* TUF multi-repository client API (implements [TAP 4 - Multiple repository consensus on entrusted targets](https://github.com/theupdateframework/taps/blob/master/tap4.md)) ## Examples diff --git a/examples/README.md b/examples/README.md index ccaa6c0f..3b85ca49 100644 --- a/examples/README.md +++ b/examples/README.md @@ -32,6 +32,16 @@ There's also a [client_example.go](client/client_example.go) which demonstrates * shows an example of how to download a target file * the repository is based on python-tuf so it also highlights the interoperability between the two implementations +## Multi-repository client + +---------------------------- +There's a [client_example.go](multirepo/client/client_example.go) which demonstrates how to implement a multi-repository client using the [multirepo](metadata/multirepo/multirepo.go) package which implements [TAP 4 - Multiple repository consensus on entrusted targets](https://github.com/theupdateframework/taps/blob/master/tap4.md). The example consists of the following: + +* The `map.json` along with the root files for each repository are distributed via a trusted repository used for initialization + * The metadata, these target files and the script generating them are located in the [examples/multirepo/repository](../repository/) folder +* These files are then used to bootstrap the multi-repository TUF client +* Shows the API provided by the `multirepo` package + ## CLI tools ---------------------------- diff --git a/examples/multirepo/.DS_Store b/examples/multirepo/.DS_Store deleted file mode 100644 index 225dd86c5094e936110bae1afccd8b3df1a35b24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJ5Iw;5S)b+k!VsoEJpc3oVx@o-kOERb3P^#G0^WOR^NU19DIf); zz_$YaeQ0#Yu5d_ Date: Thu, 16 Mar 2023 02:30:06 +0200 Subject: [PATCH 120/208] chore: remove unused variable Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/client_example.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index 80ae68bc..e499acac 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -24,10 +24,9 @@ import ( ) const ( - metadataURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/metadata" - targetsURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/targets" - verbosity = log.InfoLevel - generateRandomFolder = false + metadataURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/metadata" + targetsURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/targets" + verbosity = log.InfoLevel ) func main() { From 9a83127b1471496f8c7406a91ba95ec6a668cfca Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 12:20:06 +0200 Subject: [PATCH 121/208] chore: fix when we exit during multi-repo target lookup Signed-off-by: Radoslav Dimitrov --- metadata/multirepo/multirepo.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index bd056789..76922de7 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -107,7 +107,7 @@ func (client *MultiRepoClient) initTUFClients() error { metadataDir := filepath.Join(client.cfg.LocalMetadataDir, repoName) // location of where the target files will be downloaded (propagated to each client from the multi-repo config) - // WARNING: Do note that using a single folder for storing targets from various repositories might lead to a conflict + // WARNING: Do note that using a single folder for storing targets from various repositories as it might lead to a conflict targetsDir := client.cfg.LocalTargetsDir if len(client.cfg.LocalTargetsDir) == 0 { // if it was not set, create a targets folder under each repository so there's no chance of conflict @@ -173,9 +173,9 @@ func (client *MultiRepoClient) GetTopLevelTargets() (map[string]*MultiRepoTarget // update the repo list only val.Repositories = append(val.Repositories, repo) } else { - // target files for same target name but from different repositories don't match + // target files have the same target name but have different target infos // TODO: decide if this should raise an error - return nil, fmt.Errorf("target info conflict for same target file name") + return nil, fmt.Errorf("target name conflict") } } else { // new target file, so save it @@ -216,21 +216,17 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe if err != nil { // failed to get target info for the given target // there's probably no such target - // no need to proceed if this is a terminating mapping - if eachMap.Terminating { - return nil, nil, fmt.Errorf("failed to get target info for %s", targetPath) - } - // proceed trying to get target info from the next repository + // skip the rest and proceed trying to get target info from the next repository continue } - // if there's no target info saved yet, save it and + // if there's no target info saved yet, save it if targetInfo == nil && newTargetInfo != nil { targetInfo = newTargetInfo - threshold += 1 // this should definitely just make threshold equals to 1 + threshold += 1 repositories = append(repositories, repoName) continue } - // compare the existing one with the new one + // compare the existing one with what we got if targetInfo.Equal(*newTargetInfo) { // they are equal, so we just bump the threshold counter threshold += 1 @@ -242,8 +238,11 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe } continue } + // at this point there was a target info with that name in this repository but it didn't match + // proceed with searching for this target in the next repository } - // exit if we have matched threshold + // we went through all repositories listed in that mapping + // exit if we have matched the threshold if eachMap.Threshold <= threshold { // we have enough repositories with matching target infos so safely return return targetInfo, repositories, nil @@ -264,6 +263,7 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe break } } + // looped through all mappings and there was nothing, not even a terminating one return nil, nil, fmt.Errorf("target info not found") } From 47c4d5e6ce1f0fe20492b90fd39575cf34e59036 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 14:08:07 +0200 Subject: [PATCH 122/208] chore: update client example Signed-off-by: Radoslav Dimitrov --- examples/client/client_example.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 5aa26cfe..ccc17a0b 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -65,7 +65,7 @@ func InitEnvironment() (string, error) { if err != nil { return "", fmt.Errorf("failed to get current working directory: %w", err) } - if generateRandomFolder { + if !generateRandomFolder { tmpDir = filepath.Join(cwd, "tmp") // create a temporary folder for storing the demo artifacts os.Mkdir(tmpDir, 0750) From 61253c85682f9a06d37e60b21331e2401e5b4017 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 20:42:22 +0200 Subject: [PATCH 123/208] chore: add another mapping to the multi-repo example Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/root.json | 30 +++++++++---------- .../multirepo/repository/metadata/1.root.json | 30 +++++++++---------- .../repository/metadata/1.snapshot.json | 6 ++-- .../repository/metadata/1.targets.json | 10 +++---- .../repository/metadata/timestamp.json | 6 ++-- ...dd694d7cb364e1817932fa61ce5238f9.map.json} | 6 ++++ .../multirepo/repository/targets/map.json | 6 ++++ 7 files changed, 53 insertions(+), 41 deletions(-) rename examples/multirepo/repository/targets/{c3ff474341f3d79dbacfb6e6a2a1c1352e2aecc034e12e8a395b3e3de69475f3.map.json => 96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json} (79%) diff --git a/examples/multirepo/client/root.json b/examples/multirepo/client/root.json index cea7b7f2..bb393f64 100644 --- a/examples/multirepo/client/root.json +++ b/examples/multirepo/client/root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-14T17:36:50.827918Z", + "expires": "2024-03-15T18:38:24.137644Z", "keys": { - "06007701bbb2c4d97336a7634d4581f18eabe587158a9c7f92954bdac5640ca7": { + "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710": { "keytype": "ed25519", "keyval": { - "public": "79c6a80408ecf470d2ac5ab5a4cb13388ca3d36aa98934d954220a2386378f9a" + "public": "56f3fee91edcb04a7cb35e1e723e0a50408637455235a1167b1fcffeac16a4d4" }, "scheme": "ed25519" }, - "47455847fc2595db840b099265115ccbc9c40893759b565cec42fe2ebec5e59e": { + "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a": { "keytype": "ed25519", "keyval": { - "public": "395f1db56ec12b41b184afb25c1cb3db6d01f8051387f871e50209fa4454a629" + "public": "63687ab9356ba65e767f08daa4f4371ba65ec5b6bdbe3aa91e833324004ba15e" }, "scheme": "ed25519" }, - "57291d507f3efabdb8586ea85775e03425c723870a001a335b97fb6325ec98fe": { + "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb": { "keytype": "ed25519", "keyval": { - "public": "04797b052ea70c38bb909e505b33a6a51028ada99c8b1f31bb0ee6f9f23d6cf4" + "public": "4b03110ea91e92a886d0a520a0fec95a0da765f780b647dfb4754c3d6f89450f" }, "scheme": "ed25519" }, - "cb3e8149d8a4d817c94cbfdd52a933d6128c60bbaafe5a32d795d27771b61d65": { + "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627": { "keytype": "ed25519", "keyval": { - "public": "5dcc1f2b0f7a5e2176292adb703be1e2a3be843a9c6c17996db5413cdde567a7" + "public": "47824b1a81704117f7aea34f5e88e576957394dd3d37432a30c080fc31dfa563" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "06007701bbb2c4d97336a7634d4581f18eabe587158a9c7f92954bdac5640ca7" + "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627" ], "threshold": 1 }, "snapshot": { "keyids": [ - "47455847fc2595db840b099265115ccbc9c40893759b565cec42fe2ebec5e59e" + "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710" ], "threshold": 1 }, "targets": { "keyids": [ - "57291d507f3efabdb8586ea85775e03425c723870a001a335b97fb6325ec98fe" + "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb" ], "threshold": 1 }, "timestamp": { "keyids": [ - "cb3e8149d8a4d817c94cbfdd52a933d6128c60bbaafe5a32d795d27771b61d65" + "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "06007701bbb2c4d97336a7634d4581f18eabe587158a9c7f92954bdac5640ca7", - "sig": "d2a12f7a510e9e856574a39daaba70259d7e08c55fef57d64e465ab954468d0e43b900f5aed391320ec1657a29b15bef29a6f5adfa8d6f9b075b6f140219d50f" + "keyid": "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627", + "sig": "3ab0f638111ad4b9d27bab61e2603d9c07cca65d68bc2664fb30a6e06b7eca44986b5f1c60aec4ed3f882e9bc0ff6ff5d38f6f8e5c39d5fc97ea7c76b50f4d0c" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.root.json b/examples/multirepo/repository/metadata/1.root.json index cea7b7f2..bb393f64 100644 --- a/examples/multirepo/repository/metadata/1.root.json +++ b/examples/multirepo/repository/metadata/1.root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-14T17:36:50.827918Z", + "expires": "2024-03-15T18:38:24.137644Z", "keys": { - "06007701bbb2c4d97336a7634d4581f18eabe587158a9c7f92954bdac5640ca7": { + "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710": { "keytype": "ed25519", "keyval": { - "public": "79c6a80408ecf470d2ac5ab5a4cb13388ca3d36aa98934d954220a2386378f9a" + "public": "56f3fee91edcb04a7cb35e1e723e0a50408637455235a1167b1fcffeac16a4d4" }, "scheme": "ed25519" }, - "47455847fc2595db840b099265115ccbc9c40893759b565cec42fe2ebec5e59e": { + "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a": { "keytype": "ed25519", "keyval": { - "public": "395f1db56ec12b41b184afb25c1cb3db6d01f8051387f871e50209fa4454a629" + "public": "63687ab9356ba65e767f08daa4f4371ba65ec5b6bdbe3aa91e833324004ba15e" }, "scheme": "ed25519" }, - "57291d507f3efabdb8586ea85775e03425c723870a001a335b97fb6325ec98fe": { + "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb": { "keytype": "ed25519", "keyval": { - "public": "04797b052ea70c38bb909e505b33a6a51028ada99c8b1f31bb0ee6f9f23d6cf4" + "public": "4b03110ea91e92a886d0a520a0fec95a0da765f780b647dfb4754c3d6f89450f" }, "scheme": "ed25519" }, - "cb3e8149d8a4d817c94cbfdd52a933d6128c60bbaafe5a32d795d27771b61d65": { + "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627": { "keytype": "ed25519", "keyval": { - "public": "5dcc1f2b0f7a5e2176292adb703be1e2a3be843a9c6c17996db5413cdde567a7" + "public": "47824b1a81704117f7aea34f5e88e576957394dd3d37432a30c080fc31dfa563" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "06007701bbb2c4d97336a7634d4581f18eabe587158a9c7f92954bdac5640ca7" + "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627" ], "threshold": 1 }, "snapshot": { "keyids": [ - "47455847fc2595db840b099265115ccbc9c40893759b565cec42fe2ebec5e59e" + "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710" ], "threshold": 1 }, "targets": { "keyids": [ - "57291d507f3efabdb8586ea85775e03425c723870a001a335b97fb6325ec98fe" + "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb" ], "threshold": 1 }, "timestamp": { "keyids": [ - "cb3e8149d8a4d817c94cbfdd52a933d6128c60bbaafe5a32d795d27771b61d65" + "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "06007701bbb2c4d97336a7634d4581f18eabe587158a9c7f92954bdac5640ca7", - "sig": "d2a12f7a510e9e856574a39daaba70259d7e08c55fef57d64e465ab954468d0e43b900f5aed391320ec1657a29b15bef29a6f5adfa8d6f9b075b6f140219d50f" + "keyid": "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627", + "sig": "3ab0f638111ad4b9d27bab61e2603d9c07cca65d68bc2664fb30a6e06b7eca44986b5f1c60aec4ed3f882e9bc0ff6ff5d38f6f8e5c39d5fc97ea7c76b50f4d0c" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.snapshot.json b/examples/multirepo/repository/metadata/1.snapshot.json index 43371786..e51c04c4 100644 --- a/examples/multirepo/repository/metadata/1.snapshot.json +++ b/examples/multirepo/repository/metadata/1.snapshot.json @@ -1,7 +1,7 @@ { "signed": { "_type": "snapshot", - "expires": "2023-05-14T16:36:50.827916Z", + "expires": "2023-05-15T17:38:24.137642Z", "meta": { "targets.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "47455847fc2595db840b099265115ccbc9c40893759b565cec42fe2ebec5e59e", - "sig": "2c6fb3a41e3fde03887f5cd116a9a1d209141c41a3d025498d307c2a50c149c77e73dd7ac739830b01af95db4cdc516e611a6886d957bf7ae1732813e9ad050e" + "keyid": "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710", + "sig": "4b663cd05f062c2b7e49bbfbd7c178b9b8e44f7e164b8af3a03ffab786460f0fa509046f7fb7368d069d7afa0833b755c854d59817da026f3e77ab4c186b7e02" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.targets.json b/examples/multirepo/repository/metadata/1.targets.json index 4deab67f..2e8e4f1b 100644 --- a/examples/multirepo/repository/metadata/1.targets.json +++ b/examples/multirepo/repository/metadata/1.targets.json @@ -1,14 +1,14 @@ { "signed": { "_type": "targets", - "expires": "2023-05-14T16:36:50.822761Z", + "expires": "2023-05-15T17:38:24.13436Z", "spec_version": "1.0.31", "targets": { "map.json": { "hashes": { - "sha256": "c3ff474341f3d79dbacfb6e6a2a1c1352e2aecc034e12e8a395b3e3de69475f3" + "sha256": "96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9" }, - "length": 548 + "length": 692 }, "root-signing-github/root.json": { "hashes": { @@ -27,8 +27,8 @@ }, "signatures": [ { - "keyid": "57291d507f3efabdb8586ea85775e03425c723870a001a335b97fb6325ec98fe", - "sig": "e8747c1d0dc481e993e505f16eedfaa62804756d5269a894ea72d145997ead021371f2e22e56927aae2cbc530cb6c86a7c5e31c4e7dd26bcb43adf3f73d08504" + "keyid": "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb", + "sig": "e6144a6d49fddb3b55edc75ebb988c87292955e4cce3c10ee81ede5c4b1c3ab700e93de04331eeff9d5c15d31b1e296ac66d4ec4dee3b9f3f722fb39fd5ea50a" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/timestamp.json b/examples/multirepo/repository/metadata/timestamp.json index d4aca20b..5d39367a 100644 --- a/examples/multirepo/repository/metadata/timestamp.json +++ b/examples/multirepo/repository/metadata/timestamp.json @@ -1,7 +1,7 @@ { "signed": { "_type": "timestamp", - "expires": "2023-05-14T16:36:50.827917Z", + "expires": "2023-05-15T17:38:24.137643Z", "meta": { "snapshot.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "cb3e8149d8a4d817c94cbfdd52a933d6128c60bbaafe5a32d795d27771b61d65", - "sig": "6ac5d27755b4a5a8e4f31d45dbe1b2e7ce825d7fd1e92521cbf17c5655e66d3e4da8758fee8691e2c19b09d34a809fc1baae3d0ef44e5f1c97b6aba3d183e90f" + "keyid": "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a", + "sig": "43949cb8675943642dd677d1471ae2596c826a0d2f3b34883455111cfe1008f03ff14a026ee1223ba4b3bf5f9644b35a870cadc0c40f096a36b6454f1fa5a805" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/targets/c3ff474341f3d79dbacfb6e6a2a1c1352e2aecc034e12e8a395b3e3de69475f3.map.json b/examples/multirepo/repository/targets/96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json similarity index 79% rename from examples/multirepo/repository/targets/c3ff474341f3d79dbacfb6e6a2a1c1352e2aecc034e12e8a395b3e3de69475f3.map.json rename to examples/multirepo/repository/targets/96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json index d9081e37..b827d154 100644 --- a/examples/multirepo/repository/targets/c3ff474341f3d79dbacfb6e6a2a1c1352e2aecc034e12e8a395b3e3de69475f3.map.json +++ b/examples/multirepo/repository/targets/96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json @@ -11,6 +11,12 @@ "threshold": 2, "terminating": false }, + { + "paths": ["*.json"], + "repositories": ["root-signing-google"], + "threshold": 1, + "terminating": false + }, { "paths": ["*"], "repositories": ["root-signing-github"], diff --git a/examples/multirepo/repository/targets/map.json b/examples/multirepo/repository/targets/map.json index d9081e37..b827d154 100644 --- a/examples/multirepo/repository/targets/map.json +++ b/examples/multirepo/repository/targets/map.json @@ -11,6 +11,12 @@ "threshold": 2, "terminating": false }, + { + "paths": ["*.json"], + "repositories": ["root-signing-google"], + "threshold": 1, + "terminating": false + }, { "paths": ["*"], "repositories": ["root-signing-github"], From 037b37aa7c4f502acd47ce0697fd8801eff1bab3 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 20:49:04 +0200 Subject: [PATCH 124/208] chore: add demo targets to multi repo to download Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/client_example.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index e499acac..9d785e35 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -56,7 +56,7 @@ func main() { // Get target info for the given target fmt.Printf("Searching for a target using the multi-repository TUF client\n\n") - targetInfo, repositories, err := client.GetTargetInfo("fulcio_v1.crt.pem") // rekor.pub + targetInfo, repositories, err := client.GetTargetInfo("rekor.pub") // rekor.pub trusted_root.json fulcio_v1.crt.pem if err != nil { panic(err) } From 0c4f6fb56fb7be0210090a002c0d322072fe413a Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 16 Mar 2023 21:04:19 +0200 Subject: [PATCH 125/208] chore: look for cached target too in multirepo client Signed-off-by: Radoslav Dimitrov --- metadata/multirepo/multirepo.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index 76922de7..f196c22a 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -270,13 +270,25 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe // DownloadTarget downloads the target file specified by targetFile func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, []byte, error) { for _, repoName := range repos { - targetPath, targetBytes, err := client.TUFClients[repoName].DownloadTarget(targetFile, filePath, targetBaseURL) + // see if the target is already present locally + targetPath, targetBytes, err := client.TUFClients[repoName].FindCachedTarget(targetFile, filePath) if err != nil { + return "", nil, err + } + if len(targetPath) != 0 && len(targetBytes) != 0 { + // we already got the target for this target info cached locally, so return it + log.Info(fmt.Sprintf("Target %s already present locally from %s", targetFile.Path, repoName)) + return targetPath, targetBytes, nil + } + // not present locally, so let's try to download it + targetPath, targetBytes, err = client.TUFClients[repoName].DownloadTarget(targetFile, filePath, targetBaseURL) + if err != nil { + // TODO: decide if we should error if one repository serves the expected target info, but we fail to download the actual target // try downloading the target from the next available repository continue } - log.Info(fmt.Sprintf("Downloaded target %s from %s", targetFile.Path, repoName)) // we got the target for this target info, so return it + log.Info(fmt.Sprintf("Downloaded target %s from %s", targetFile.Path, repoName)) return targetPath, targetBytes, nil } // error out as we haven't succeeded downloading the target file From b1f771879983fb4bc15165ae7db7969d1bbf75e6 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 20 Mar 2023 15:24:41 +0200 Subject: [PATCH 126/208] fix: handle error type comparision properly Signed-off-by: Radoslav Dimitrov --- metadata/errors.go | 14 +++++++------- metadata/updater/updater.go | 12 ++++-------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/metadata/errors.go b/metadata/errors.go index 8322b853..5e21b232 100644 --- a/metadata/errors.go +++ b/metadata/errors.go @@ -32,7 +32,7 @@ func (e ErrUnsignedMetadata) Error() string { // ErrUnsignedMetadata is a subset of ErrRepository func (e ErrUnsignedMetadata) Is(target error) bool { - return target == ErrRepository{} + return target == ErrRepository{} || target == ErrUnsignedMetadata{} } // ErrBadVersionNumber - An error for metadata that contains an invalid version number @@ -46,7 +46,7 @@ func (e ErrBadVersionNumber) Error() string { // ErrBadVersionNumber is a subset of ErrRepository func (e ErrBadVersionNumber) Is(target error) bool { - return target == ErrRepository{} + return target == ErrRepository{} || target == ErrBadVersionNumber{} } // ErrEqualVersionNumber - An error for metadata containing a previously verified version number @@ -60,7 +60,7 @@ func (e ErrEqualVersionNumber) Error() string { // ErrEqualVersionNumber is a subset of both ErrRepository and ErrBadVersionNumber func (e ErrEqualVersionNumber) Is(target error) bool { - return target == ErrRepository{} || target == ErrBadVersionNumber{} + return target == ErrRepository{} || target == ErrBadVersionNumber{} || target == ErrEqualVersionNumber{} } // ErrExpiredMetadata - Indicate that a TUF Metadata file has expired @@ -74,7 +74,7 @@ func (e ErrExpiredMetadata) Error() string { // ErrExpiredMetadata is a subset of ErrRepository func (e ErrExpiredMetadata) Is(target error) bool { - return target == ErrRepository{} + return target == ErrRepository{} || target == ErrExpiredMetadata{} } // ErrLengthOrHashMismatch - An error while checking the length and hash values of an object @@ -88,7 +88,7 @@ func (e ErrLengthOrHashMismatch) Error() string { // ErrLengthOrHashMismatch is a subset of ErrRepository func (e ErrLengthOrHashMismatch) Is(target error) bool { - return target == ErrRepository{} + return target == ErrRepository{} || target == ErrLengthOrHashMismatch{} } // Download errors @@ -113,7 +113,7 @@ func (e ErrDownloadLengthMismatch) Error() string { // ErrDownloadLengthMismatch is a subset of ErrDownload func (e ErrDownloadLengthMismatch) Is(target error) bool { - return target == ErrDownload{} + return target == ErrDownload{} || target == ErrDownloadLengthMismatch{} } // ErrDownloadHTTP - Returned by Fetcher interface implementations for HTTP errors @@ -128,7 +128,7 @@ func (e ErrDownloadHTTP) Error() string { // ErrDownloadHTTP is a subset of ErrDownload func (e ErrDownloadHTTP) Is(target error) bool { - return target == ErrDownload{} + return target == ErrDownload{} || target == ErrDownloadHTTP{} } // ValueError diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 60d4d322..1a79dc8c 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -240,8 +240,7 @@ func (update *Updater) loadTimestamp() error { // local timestamp exists, let's try to verify it and load it to the trusted metadata set _, err := update.trusted.UpdateTimestamp(data) if err != nil { - var tmpErr metadata.ErrRepository - if errors.As(err, &tmpErr) { + if errors.Is(err, metadata.ErrRepository{}) { // local timestamp is not valid, proceed downloading from remote; note that this error type includes several other subset errors log.Debug("Local timestamp is not valid") } else { @@ -260,8 +259,7 @@ func (update *Updater) loadTimestamp() error { // try to verify and load the newly downloaded timestamp _, err = update.trusted.UpdateTimestamp(data) if err != nil { - var tmpErr metadata.ErrEqualVersionNumber - if errors.As(err, &tmpErr) { + if errors.Is(err, metadata.ErrEqualVersionNumber{}) { // if the new timestamp version is the same as current, discard the // new timestamp; this is normal and it shouldn't raise any error return nil @@ -290,8 +288,7 @@ func (update *Updater) loadSnapshot() error { _, err = update.trusted.UpdateSnapshot(data, true) if err != nil { // this means snapshot verification/loading failed - var tmpErr metadata.ErrRepository - if errors.As(err, &tmpErr) { + if errors.Is(err, metadata.ErrRepository{}) { // local snapshot is not valid, proceed downloading from remote; note that this error type includes several other subset errors log.Debug("Local snapshot is not valid") } else { @@ -356,8 +353,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) if err != nil { // this means targets verification/loading failed - var tmpErr metadata.ErrRepository - if errors.As(err, &tmpErr) { + if errors.Is(err, metadata.ErrRepository{}) { // local target file is not valid, proceed downloading from remote; note that this error type includes several other subset errors log.Debugf("Local %s is not valid", roleName) } else { From 0d151ba9ec1cb136ba682a8f1c59164be91ea2fa Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 20 Mar 2023 20:32:37 +0200 Subject: [PATCH 127/208] chore: change multirepo client to initialize from bytes Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/client_example.go | 55 ++++++++++------ metadata/multirepo/multirepo.go | 69 ++++++++------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index 9d785e35..0d5500d8 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -15,6 +15,7 @@ import ( "fmt" "os" "path/filepath" + "strings" log "github.com/sirupsen/logrus" @@ -35,14 +36,14 @@ func main() { // Bootstrap TUF fmt.Printf("Bootstrapping the initial TUF repo - fetching map.json file and necessary trusted root files\n\n") - targetsDir, err := BootstrapTUF() // returns the path to map.json and the trusted root files + mapBytes, trustedRoots, err := BootstrapTUF() // returns the map.json and the trusted root files if err != nil { panic(err) } // Initialize the multi-repository TUF client fmt.Printf("Initializing the multi-repository TUF client with the given map.json file\n\n") - client, err := InitMultiRepoTUF(targetsDir) + client, err := InitMultiRepoTUF(mapBytes, trustedRoots) if err != nil { panic(err) } @@ -69,30 +70,33 @@ func main() { } } -func BootstrapTUF() (string, error) { +// BootstrapTUF returns the map file and the related trusted root metadata files +func BootstrapTUF() ([]byte, map[string][]byte, error) { + trustedRoots := map[string][]byte{} + mapBytes := []byte{} // get working directory cwd, err := os.Getwd() if err != nil { - return "", fmt.Errorf("failed to get current working directory: %w", err) + return nil, nil, fmt.Errorf("failed to get current working directory: %w", err) } - targetsDir := filepath.Join(cwd, "bootstrap/targets") + // ensure the necessary folder layout err = os.MkdirAll(targetsDir, os.ModePerm) if err != nil { - return "", err + return nil, nil, err } // read the trusted root metadata rootBytes, err := os.ReadFile(filepath.Join(cwd, "root.json")) if err != nil { - return "", err + return nil, nil, err } // create updater configuration cfg, err := config.New(metadataURL, rootBytes) // default config if err != nil { - return "", err + return nil, nil, err } cfg.LocalMetadataDir = filepath.Join(cwd, "bootstrap") cfg.LocalTargetsDir = targetsDir @@ -101,42 +105,55 @@ func BootstrapTUF() (string, error) { // create a new Updater instance up, err := updater.New(cfg) if err != nil { - return "", fmt.Errorf("failed to create Updater instance: %w", err) + return nil, nil, fmt.Errorf("failed to create Updater instance: %w", err) } - // try to build the top-level metadata + // build the top-level metadata err = up.Refresh() if err != nil { - return "", fmt.Errorf("failed to refresh trusted metadata: %w", err) + return nil, nil, fmt.Errorf("failed to refresh trusted metadata: %w", err) } + + // download all target files for name, targetInfo := range up.GetTopLevelTargets() { // see if the target is already present locally path, _, err := up.FindCachedTarget(targetInfo, "") if err != nil { - return "", fmt.Errorf("failed while finding a cached target: %w", err) + return nil, nil, fmt.Errorf("failed while finding a cached target: %w", err) } if path != "" { log.Infof("Target %s is already present at - %s", name, path) } + // target is not present locally, so let's try to download it // keeping the same path layout as its target path expectedTargetLocation := filepath.Join(targetsDir, name) dirName, _ := filepath.Split(expectedTargetLocation) err = os.MkdirAll(dirName, os.ModePerm) if err != nil { - return "", err + return nil, nil, err } - // download targets - path, _, err = up.DownloadTarget(targetInfo, expectedTargetLocation, "") + + // download targets (we don't have to actually store them other than for the sake of the example) + path, bytes, err := up.DownloadTarget(targetInfo, expectedTargetLocation, "") if err != nil { - return "", fmt.Errorf("failed to download target file %s - %w", name, err) + return nil, nil, fmt.Errorf("failed to download target file %s - %w", name, err) + } + + // populate the return values + if name == "map.json" { + mapBytes = bytes + } else { + repositoryName := strings.Split(name, string(os.PathSeparator)) + trustedRoots[repositoryName[0]] = bytes } log.Infof("Successfully downloaded target %s at - %s", name, path) } - return cfg.LocalTargetsDir, nil + + return mapBytes, trustedRoots, nil } -func InitMultiRepoTUF(bootstrapDir string) (*multirepo.MultiRepoClient, error) { +func InitMultiRepoTUF(mapBytes []byte, trustedRoots map[string][]byte) (*multirepo.MultiRepoClient, error) { // get working directory cwd, err := os.Getwd() if err != nil { @@ -144,7 +161,7 @@ func InitMultiRepoTUF(bootstrapDir string) (*multirepo.MultiRepoClient, error) { } // create a new configuration for a multi-repository client - cfg, err := multirepo.NewConfig(bootstrapDir) + cfg, err := multirepo.NewConfig(mapBytes, trustedRoots) if err != nil { return nil, err } diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index f196c22a..cc49a834 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -12,10 +12,6 @@ import ( log "github.com/sirupsen/logrus" ) -const ( - DefaultRepoMapFileName = "map.json" -) - // The following represent the map file described in TAP 4 type Mapping struct { Paths []string `json:"paths"` @@ -32,7 +28,7 @@ type MultiRepoMapType struct { // MultiRepoConfig represents the configuration for a set of trusted TUF clients type MultiRepoConfig struct { RepoMap *MultiRepoMapType - BootstrapDir string + TrustedRoots map[string][]byte LocalMetadataDir string LocalTargetsDir string DisableLocalCache bool @@ -50,27 +46,35 @@ type MultiRepoTargetFiles struct { } // NewConfig returns configuration for a multi-repo TUF client -func NewConfig(bootstrapDir string) (*MultiRepoConfig, error) { - // verify the provided path is a directory - fileInfo, err := os.Stat(bootstrapDir) - if err != nil { +func NewConfig(repoMap []byte, roots map[string][]byte) (*MultiRepoConfig, error) { + // error if we don't have the necessary arguments + if len(repoMap) == 0 || len(roots) == 0 { + return nil, fmt.Errorf("failed to create multi-repository config: no map file and/or trusted root metadata is provided") + } + + // unmarshal the map file (note: should we expect/support unrecognized values here?) + var mapFile *MultiRepoMapType + if err := json.Unmarshal(repoMap, &mapFile); err != nil { return nil, err } - if !fileInfo.IsDir() { - return nil, fmt.Errorf("provided bootstrap path is not a directory") + + // make sure we have enough trusted root metadata files provided based on the repository list + for repo := range mapFile.Repositories { + // check if we have a trusted root metadata for this repository + _, ok := roots[repo] + if !ok { + return nil, fmt.Errorf("no trusted root metadata provided for repository", repo) + } } + return &MultiRepoConfig{ - BootstrapDir: bootstrapDir, + RepoMap: mapFile, + TrustedRoots: roots, }, nil } // New returns a multi-repository TUF client. All repositories described in the provided map file are initialized too func New(config *MultiRepoConfig) (*MultiRepoClient, error) { - // make sure the bootstrap path was provided (location of the map file and trusted root files for each repository) - if len(config.BootstrapDir) == 0 { - return nil, fmt.Errorf("no bootstrap directory provided") - } - // create a multi repo client instance client := &MultiRepoClient{ cfg: config, @@ -86,11 +90,7 @@ func New(config *MultiRepoConfig) (*MultiRepoClient, error) { // initTUFClients loop through all repositories listed in the map file and create a TUF client for each func (client *MultiRepoClient) initTUFClients() error { - // read and load the map file into config - err := client.loadMap() - if err != nil { - return err - } + // loop through each repository listed in the map file and initialize it for repoName, repoURL := range client.cfg.RepoMap.Repositories { log.Infof("Initializing %s - %s", repoName, repoURL[0]) @@ -98,9 +98,9 @@ func (client *MultiRepoClient) initTUFClients() error { // get the trusted root file from the location specified in the map file relevant to its path // NOTE: the root.json file is expected to be in a folder named after the repository it corresponds to placed in the same folder as the map file // i.e //root.json - rootBytes, err := client.getRoot(repoName) - if err != nil { - return err + rootBytes, ok := client.cfg.TrustedRoots[repoName] + if !ok { + return fmt.Errorf("failed to get trusted root metadata from config for repository", repoName) } // path of where each of the repository's metadata files will be persisted @@ -115,7 +115,7 @@ func (client *MultiRepoClient) initTUFClients() error { } // ensure paths exist, doesn't do anything if caching is disabled - err = client.cfg.EnsurePathsExist() + err := client.cfg.EnsurePathsExist() if err != nil { return err } @@ -295,23 +295,6 @@ func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metada return "", nil, fmt.Errorf("failed to download target file %s", targetFile.Path) } -func (client *MultiRepoClient) getRoot(name string) ([]byte, error) { - return os.ReadFile(filepath.Join(client.cfg.BootstrapDir, name, "root.json")) -} - -func (client *MultiRepoClient) loadMap() error { - // read the map file - mapBytes, err := os.ReadFile(filepath.Join(client.cfg.BootstrapDir, DefaultRepoMapFileName)) - if err != nil { - return err - } - // unmarshal the map file - if err := json.Unmarshal(mapBytes, &client.cfg.RepoMap); err != nil { - return err - } - return nil -} - func (cfg *MultiRepoConfig) EnsurePathsExist() error { if cfg.DisableLocalCache { return nil From 32632e62e7d214351077d10078660057dd4a7e8c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 20 Mar 2023 20:36:18 +0200 Subject: [PATCH 128/208] chore: fix linting Signed-off-by: Radoslav Dimitrov --- Makefile | 2 +- metadata/multirepo/multirepo.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 99c8dcfa..7ada0e93 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ test: .PHONY: lint lint: - golangci-lint run -n + golangci-lint run ##################### # examples section diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index cc49a834..88653bef 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -63,7 +63,7 @@ func NewConfig(repoMap []byte, roots map[string][]byte) (*MultiRepoConfig, error // check if we have a trusted root metadata for this repository _, ok := roots[repo] if !ok { - return nil, fmt.Errorf("no trusted root metadata provided for repository", repo) + return nil, fmt.Errorf("no trusted root metadata provided for repository - %s", repo) } } @@ -100,7 +100,7 @@ func (client *MultiRepoClient) initTUFClients() error { // i.e //root.json rootBytes, ok := client.cfg.TrustedRoots[repoName] if !ok { - return fmt.Errorf("failed to get trusted root metadata from config for repository", repoName) + return fmt.Errorf("failed to get trusted root metadata from config for repository - %s", repoName) } // path of where each of the repository's metadata files will be persisted From 84eb553912bb21b442116bdd937f8b075bfd5503 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 21 Mar 2023 15:04:49 +0200 Subject: [PATCH 129/208] chore: update GetTopLevelTargets and make client config public Signed-off-by: Radoslav Dimitrov --- metadata/multirepo/multirepo.go | 63 +++++++++++++++------------------ 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index 88653bef..5db15ec0 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -37,12 +37,7 @@ type MultiRepoConfig struct { // MultiRepoClient represents a multi-repository TUF client type MultiRepoClient struct { TUFClients map[string]*updater.Updater - cfg *MultiRepoConfig -} - -type MultiRepoTargetFiles struct { - Repositories []string - TargetFile *metadata.TargetFiles + Config *MultiRepoConfig } // NewConfig returns configuration for a multi-repo TUF client @@ -77,7 +72,7 @@ func NewConfig(repoMap []byte, roots map[string][]byte) (*MultiRepoConfig, error func New(config *MultiRepoConfig) (*MultiRepoClient, error) { // create a multi repo client instance client := &MultiRepoClient{ - cfg: config, + Config: config, TUFClients: map[string]*updater.Updater{}, } @@ -92,30 +87,30 @@ func New(config *MultiRepoConfig) (*MultiRepoClient, error) { func (client *MultiRepoClient) initTUFClients() error { // loop through each repository listed in the map file and initialize it - for repoName, repoURL := range client.cfg.RepoMap.Repositories { + for repoName, repoURL := range client.Config.RepoMap.Repositories { log.Infof("Initializing %s - %s", repoName, repoURL[0]) // get the trusted root file from the location specified in the map file relevant to its path // NOTE: the root.json file is expected to be in a folder named after the repository it corresponds to placed in the same folder as the map file // i.e //root.json - rootBytes, ok := client.cfg.TrustedRoots[repoName] + rootBytes, ok := client.Config.TrustedRoots[repoName] if !ok { return fmt.Errorf("failed to get trusted root metadata from config for repository - %s", repoName) } // path of where each of the repository's metadata files will be persisted - metadataDir := filepath.Join(client.cfg.LocalMetadataDir, repoName) + metadataDir := filepath.Join(client.Config.LocalMetadataDir, repoName) // location of where the target files will be downloaded (propagated to each client from the multi-repo config) // WARNING: Do note that using a single folder for storing targets from various repositories as it might lead to a conflict - targetsDir := client.cfg.LocalTargetsDir - if len(client.cfg.LocalTargetsDir) == 0 { + targetsDir := client.Config.LocalTargetsDir + if len(client.Config.LocalTargetsDir) == 0 { // if it was not set, create a targets folder under each repository so there's no chance of conflict targetsDir = filepath.Join(metadataDir, "targets") } // ensure paths exist, doesn't do anything if caching is disabled - err := client.cfg.EnsurePathsExist() + err := client.Config.EnsurePathsExist() if err != nil { return err } @@ -127,7 +122,7 @@ func (client *MultiRepoClient) initTUFClients() error { } cfg.LocalMetadataDir = metadataDir cfg.LocalTargetsDir = targetsDir - cfg.DisableLocalCache = client.cfg.DisableLocalCache // propagate global cache policy + cfg.DisableLocalCache = client.Config.DisableLocalCache // propagate global cache policy // create a new Updater instance for each repository repoTUFClient, err := updater.New(cfg) @@ -156,37 +151,37 @@ func (client *MultiRepoClient) Refresh() error { } // GetTopLevelTargets returns the top-level target files for all repositories -func (client *MultiRepoClient) GetTopLevelTargets() (map[string]*MultiRepoTargetFiles, error) { +func (client *MultiRepoClient) GetTopLevelTargets() (map[string]*metadata.TargetFiles, error) { // collection of all target files for all clients - result := map[string]*MultiRepoTargetFiles{} + result := map[string]*metadata.TargetFiles{} + // loop through each repository - for repo, tufClient := range client.TUFClients { - // get top level targets for each repository - targetFiles := tufClient.GetTopLevelTargets() - // loop through all top level targets for this client - for targetName, targetFile := range targetFiles { + for _, tufClient := range client.TUFClients { + // loop through the top level targets for each repository + for targetName := range tufClient.GetTopLevelTargets() { + // see if this target should be kept, this goes through the TAP4 search algorithm\ + targetInfo, _, err := client.GetTargetInfo(targetName) + if err != nil { + // we skip saving this target since there's no way/policy do download it with this map.json file + // possible causes like not enough repositories for that threshold, target info mismatch, etc. + return nil, err + } // check if this target file is already present in the collection if val, ok := result[targetName]; ok { // target file is already present - if val.TargetFile.Equal(*targetFile) { - // same target file present in multiple repositories - // update the repo list only - val.Repositories = append(val.Repositories, repo) - } else { + if !val.Equal(*targetInfo) { // target files have the same target name but have different target infos - // TODO: decide if this should raise an error + // this means the map.json file allows downloading two different target infos mapped to the same target name + // TODO: confirm if this should raise an error return nil, fmt.Errorf("target name conflict") } + // same target info, no need to do anything } else { - // new target file, so save it - result[targetName] = &MultiRepoTargetFiles{ - Repositories: []string{repo}, - TargetFile: targetFile, - } + // save the target + result[targetName] = targetInfo } } } - // went over all clients, so the collection should be complete return result, nil } @@ -196,7 +191,7 @@ func (client *MultiRepoClient) GetTopLevelTargets() (map[string]*MultiRepoTarget func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.TargetFiles, []string, error) { terminated := false // loop through each mapping - for _, eachMap := range client.cfg.RepoMap.Mapping { + for _, eachMap := range client.Config.RepoMap.Mapping { // loop through each path for this mapping for _, pathPattern := range eachMap.Paths { // check if the targetPath matches each path mapping From ba7cd43df386a459517a6543de42b62c85f28c4c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 21 Mar 2023 18:44:50 +0200 Subject: [PATCH 130/208] chore: update multi-repo example Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/root.json | 30 +++++++++---------- .../multirepo/repository/metadata/1.root.json | 30 +++++++++---------- .../repository/metadata/1.snapshot.json | 6 ++-- .../repository/metadata/1.targets.json | 10 +++---- .../repository/metadata/timestamp.json | 6 ++-- ...36cb75ca015daac96d1322b2dadcc82f0.map.json | 27 +++++++++++++++++ ...4dd694d7cb364e1817932fa61ce5238f9.map.json | 27 ----------------- .../multirepo/repository/targets/map.json | 20 ++++++------- 8 files changed, 78 insertions(+), 78 deletions(-) create mode 100644 examples/multirepo/repository/targets/2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json delete mode 100644 examples/multirepo/repository/targets/96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json diff --git a/examples/multirepo/client/root.json b/examples/multirepo/client/root.json index bb393f64..2fec7b91 100644 --- a/examples/multirepo/client/root.json +++ b/examples/multirepo/client/root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-15T18:38:24.137644Z", + "expires": "2024-03-20T16:42:30.474218Z", "keys": { - "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710": { + "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc": { "keytype": "ed25519", "keyval": { - "public": "56f3fee91edcb04a7cb35e1e723e0a50408637455235a1167b1fcffeac16a4d4" + "public": "ac7f5be46f4c23f55ada9b5e16c4574e64422775ae2636f0c3b9d02769200aa4" }, "scheme": "ed25519" }, - "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a": { + "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968": { "keytype": "ed25519", "keyval": { - "public": "63687ab9356ba65e767f08daa4f4371ba65ec5b6bdbe3aa91e833324004ba15e" + "public": "e65b317ff4fc9c4e4aada57d07ba2de9479512d3a7701252bbbc7dc5885cfbe5" }, "scheme": "ed25519" }, - "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb": { + "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c": { "keytype": "ed25519", "keyval": { - "public": "4b03110ea91e92a886d0a520a0fec95a0da765f780b647dfb4754c3d6f89450f" + "public": "6e4d1e2c537e322892a50608fb74d08741a144bc31b3f26456b6e20d98a52125" }, "scheme": "ed25519" }, - "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627": { + "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a": { "keytype": "ed25519", "keyval": { - "public": "47824b1a81704117f7aea34f5e88e576957394dd3d37432a30c080fc31dfa563" + "public": "6e28a2767d0a2b184cc992f9422a0b7ca4361de7ea2ff7a4a9b047e83b788701" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627" + "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a" ], "threshold": 1 }, "snapshot": { "keyids": [ - "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710" + "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc" ], "threshold": 1 }, "targets": { "keyids": [ - "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb" + "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c" ], "threshold": 1 }, "timestamp": { "keyids": [ - "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a" + "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627", - "sig": "3ab0f638111ad4b9d27bab61e2603d9c07cca65d68bc2664fb30a6e06b7eca44986b5f1c60aec4ed3f882e9bc0ff6ff5d38f6f8e5c39d5fc97ea7c76b50f4d0c" + "keyid": "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a", + "sig": "6dfaca5013b401f0c1aa8f050155956031b187f4a2e788eb1d9e3a85240cdd5ef323660ea3c7b03940016d6cb67d526dbb4e0d7ca8640cfa8140ebdef520ba03" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.root.json b/examples/multirepo/repository/metadata/1.root.json index bb393f64..2fec7b91 100644 --- a/examples/multirepo/repository/metadata/1.root.json +++ b/examples/multirepo/repository/metadata/1.root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-15T18:38:24.137644Z", + "expires": "2024-03-20T16:42:30.474218Z", "keys": { - "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710": { + "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc": { "keytype": "ed25519", "keyval": { - "public": "56f3fee91edcb04a7cb35e1e723e0a50408637455235a1167b1fcffeac16a4d4" + "public": "ac7f5be46f4c23f55ada9b5e16c4574e64422775ae2636f0c3b9d02769200aa4" }, "scheme": "ed25519" }, - "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a": { + "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968": { "keytype": "ed25519", "keyval": { - "public": "63687ab9356ba65e767f08daa4f4371ba65ec5b6bdbe3aa91e833324004ba15e" + "public": "e65b317ff4fc9c4e4aada57d07ba2de9479512d3a7701252bbbc7dc5885cfbe5" }, "scheme": "ed25519" }, - "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb": { + "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c": { "keytype": "ed25519", "keyval": { - "public": "4b03110ea91e92a886d0a520a0fec95a0da765f780b647dfb4754c3d6f89450f" + "public": "6e4d1e2c537e322892a50608fb74d08741a144bc31b3f26456b6e20d98a52125" }, "scheme": "ed25519" }, - "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627": { + "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a": { "keytype": "ed25519", "keyval": { - "public": "47824b1a81704117f7aea34f5e88e576957394dd3d37432a30c080fc31dfa563" + "public": "6e28a2767d0a2b184cc992f9422a0b7ca4361de7ea2ff7a4a9b047e83b788701" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627" + "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a" ], "threshold": 1 }, "snapshot": { "keyids": [ - "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710" + "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc" ], "threshold": 1 }, "targets": { "keyids": [ - "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb" + "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c" ], "threshold": 1 }, "timestamp": { "keyids": [ - "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a" + "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "d34115dcd17645887f4ff588460d6dec357ac2729ed4884999fa3f32b4c47627", - "sig": "3ab0f638111ad4b9d27bab61e2603d9c07cca65d68bc2664fb30a6e06b7eca44986b5f1c60aec4ed3f882e9bc0ff6ff5d38f6f8e5c39d5fc97ea7c76b50f4d0c" + "keyid": "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a", + "sig": "6dfaca5013b401f0c1aa8f050155956031b187f4a2e788eb1d9e3a85240cdd5ef323660ea3c7b03940016d6cb67d526dbb4e0d7ca8640cfa8140ebdef520ba03" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.snapshot.json b/examples/multirepo/repository/metadata/1.snapshot.json index e51c04c4..ed145717 100644 --- a/examples/multirepo/repository/metadata/1.snapshot.json +++ b/examples/multirepo/repository/metadata/1.snapshot.json @@ -1,7 +1,7 @@ { "signed": { "_type": "snapshot", - "expires": "2023-05-15T17:38:24.137642Z", + "expires": "2023-05-20T15:42:30.474215Z", "meta": { "targets.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "14968acfafc1c0ce61e8a1ca7f920d5e77e9c24e8fec6cfa9361ade1222ee710", - "sig": "4b663cd05f062c2b7e49bbfbd7c178b9b8e44f7e164b8af3a03ffab786460f0fa509046f7fb7368d069d7afa0833b755c854d59817da026f3e77ab4c186b7e02" + "keyid": "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc", + "sig": "41b33a31bbdfaf76388dbf7074d5228a8b9b9dff5ddbcb260f829b8cce4c1bdf33e6baf89b43b4ac5e1d95193b54a92aa8ebf9cdf84c426cf66f2a520f0b3403" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.targets.json b/examples/multirepo/repository/metadata/1.targets.json index 2e8e4f1b..31ae4f15 100644 --- a/examples/multirepo/repository/metadata/1.targets.json +++ b/examples/multirepo/repository/metadata/1.targets.json @@ -1,14 +1,14 @@ { "signed": { "_type": "targets", - "expires": "2023-05-15T17:38:24.13436Z", + "expires": "2023-05-20T15:42:30.466401Z", "spec_version": "1.0.31", "targets": { "map.json": { "hashes": { - "sha256": "96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9" + "sha256": "2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0" }, - "length": 692 + "length": 660 }, "root-signing-github/root.json": { "hashes": { @@ -27,8 +27,8 @@ }, "signatures": [ { - "keyid": "aff624eb56d315d26b56a1471e087b8b4a53812cfd07060774fc6b5d210994fb", - "sig": "e6144a6d49fddb3b55edc75ebb988c87292955e4cce3c10ee81ede5c4b1c3ab700e93de04331eeff9d5c15d31b1e296ac66d4ec4dee3b9f3f722fb39fd5ea50a" + "keyid": "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c", + "sig": "fadf810b70828bf18aad739ca3ece35778aaa7f6fb66860909d3d7d7163d066174b13cc6acf8c00b7290d9b837019b321913afbcbccea2c4ccb40ae290f57c06" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/timestamp.json b/examples/multirepo/repository/metadata/timestamp.json index 5d39367a..006c0cda 100644 --- a/examples/multirepo/repository/metadata/timestamp.json +++ b/examples/multirepo/repository/metadata/timestamp.json @@ -1,7 +1,7 @@ { "signed": { "_type": "timestamp", - "expires": "2023-05-15T17:38:24.137643Z", + "expires": "2023-05-20T15:42:30.474217Z", "meta": { "snapshot.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "a40850ab529af897e93bedcada6f6fb6f7b1184b74d1edee9da3a575db10d92a", - "sig": "43949cb8675943642dd677d1471ae2596c826a0d2f3b34883455111cfe1008f03ff14a026ee1223ba4b3bf5f9644b35a870cadc0c40f096a36b6454f1fa5a805" + "keyid": "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968", + "sig": "ad7ef744a66d297e1e61809ed1ac0503bd54154bd79ea8bd7a417ec539d8f7812c3b1bc38dbbccf28cf2b29b22d44f656350b4907f20ca4038a5b66953244d0b" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/targets/2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json b/examples/multirepo/repository/targets/2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json new file mode 100644 index 00000000..a494e885 --- /dev/null +++ b/examples/multirepo/repository/targets/2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json @@ -0,0 +1,27 @@ + +{ + "repositories": { + "sigstore-tuf-root": ["https://sigstore-tuf-root.storage.googleapis.com"], + "staging": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"] + }, + "mapping": [ + { + "paths": ["fulcio*", "*.json"], + "repositories": ["staging"], + "threshold": 1, + "terminating": true + }, + { + "paths": ["*.pub"], + "repositories": ["sigstore-tuf-root", "staging"], + "threshold": 2, + "terminating": false + }, + { + "paths": ["*"], + "repositories": ["sigstore-tuf-root"], + "terminating": true, + "threshold": 1 + } + ] +} diff --git a/examples/multirepo/repository/targets/96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json b/examples/multirepo/repository/targets/96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json deleted file mode 100644 index b827d154..00000000 --- a/examples/multirepo/repository/targets/96e72e1b639d4ef467c31a5f90574584dd694d7cb364e1817932fa61ce5238f9.map.json +++ /dev/null @@ -1,27 +0,0 @@ - -{ - "repositories": { - "root-signing-google": ["https://sigstore-tuf-root.storage.googleapis.com"], - "root-signing-github": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"] - }, - "mapping": [ - { - "paths": ["*.pem"], - "repositories": ["root-signing-google", "root-signing-github"], - "threshold": 2, - "terminating": false - }, - { - "paths": ["*.json"], - "repositories": ["root-signing-google"], - "threshold": 1, - "terminating": false - }, - { - "paths": ["*"], - "repositories": ["root-signing-github"], - "terminating": true, - "threshold": 1 - } - ] -} diff --git a/examples/multirepo/repository/targets/map.json b/examples/multirepo/repository/targets/map.json index b827d154..a494e885 100644 --- a/examples/multirepo/repository/targets/map.json +++ b/examples/multirepo/repository/targets/map.json @@ -1,25 +1,25 @@ { "repositories": { - "root-signing-google": ["https://sigstore-tuf-root.storage.googleapis.com"], - "root-signing-github": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"] + "sigstore-tuf-root": ["https://sigstore-tuf-root.storage.googleapis.com"], + "staging": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"] }, "mapping": [ { - "paths": ["*.pem"], - "repositories": ["root-signing-google", "root-signing-github"], - "threshold": 2, - "terminating": false + "paths": ["fulcio*", "*.json"], + "repositories": ["staging"], + "threshold": 1, + "terminating": true }, { - "paths": ["*.json"], - "repositories": ["root-signing-google"], - "threshold": 1, + "paths": ["*.pub"], + "repositories": ["sigstore-tuf-root", "staging"], + "threshold": 2, "terminating": false }, { "paths": ["*"], - "repositories": ["root-signing-github"], + "repositories": ["sigstore-tuf-root"], "terminating": true, "threshold": 1 } From 7bed7d5ed27dc09ec93d43b22715483c13033d5c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 21 Mar 2023 18:50:46 +0200 Subject: [PATCH 131/208] chore: update multi-repo example Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/root.json | 30 +++++++++---------- .../multirepo/repository/generate_metadata.go | 2 +- .../multirepo/repository/metadata/1.root.json | 30 +++++++++---------- .../repository/metadata/1.snapshot.json | 6 ++-- .../repository/metadata/1.targets.json | 10 +++---- .../repository/metadata/timestamp.json | 6 ++-- ...58545d522e35d222ccf58fea87ccccf4.root.json | 0 .../root.json | 0 ...58545d522e35d222ccf58fea87ccccf4.root.json | 0 .../root.json | 0 10 files changed, 42 insertions(+), 42 deletions(-) rename examples/multirepo/repository/targets/{root-signing-github => sigstore-tuf-root}/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json (100%) rename examples/multirepo/repository/targets/{root-signing-github => sigstore-tuf-root}/root.json (100%) rename examples/multirepo/repository/targets/{root-signing-google => staging}/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json (100%) rename examples/multirepo/repository/targets/{root-signing-google => staging}/root.json (100%) diff --git a/examples/multirepo/client/root.json b/examples/multirepo/client/root.json index 2fec7b91..f7168874 100644 --- a/examples/multirepo/client/root.json +++ b/examples/multirepo/client/root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-20T16:42:30.474218Z", + "expires": "2024-03-20T16:49:58.910995Z", "keys": { - "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc": { + "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6": { "keytype": "ed25519", "keyval": { - "public": "ac7f5be46f4c23f55ada9b5e16c4574e64422775ae2636f0c3b9d02769200aa4" + "public": "990149a8e27d18659be5c3b018cc37b176b2ec383f26b52b581741738c62530f" }, "scheme": "ed25519" }, - "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968": { + "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a": { "keytype": "ed25519", "keyval": { - "public": "e65b317ff4fc9c4e4aada57d07ba2de9479512d3a7701252bbbc7dc5885cfbe5" + "public": "ba82e11166e925f26faa2a2ac509d1773490bb3f4b2860e6b510a1079d4ea63c" }, "scheme": "ed25519" }, - "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c": { + "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc": { "keytype": "ed25519", "keyval": { - "public": "6e4d1e2c537e322892a50608fb74d08741a144bc31b3f26456b6e20d98a52125" + "public": "9e077561af74850a3321b4df9cb9606593ab30f819d1e13475b0d29f9abf99d8" }, "scheme": "ed25519" }, - "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a": { + "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa": { "keytype": "ed25519", "keyval": { - "public": "6e28a2767d0a2b184cc992f9422a0b7ca4361de7ea2ff7a4a9b047e83b788701" + "public": "71648d51b058818fcf29cb1846da3c920fad7a3ce70cacaa9a3fb5afa3bd8c1d" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a" + "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc" ], "threshold": 1 }, "snapshot": { "keyids": [ - "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc" + "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6" ], "threshold": 1 }, "targets": { "keyids": [ - "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c" + "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a" ], "threshold": 1 }, "timestamp": { "keyids": [ - "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968" + "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a", - "sig": "6dfaca5013b401f0c1aa8f050155956031b187f4a2e788eb1d9e3a85240cdd5ef323660ea3c7b03940016d6cb67d526dbb4e0d7ca8640cfa8140ebdef520ba03" + "keyid": "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc", + "sig": "cd334e4ee2fbe2b660c9f7555b00b759558987c382bc2814d6775f233856802620e2b5cd17c16f6c969b2b8c55d6cf0e1e51f52487e4dc3209baf932aaaf200c" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/generate_metadata.go b/examples/multirepo/repository/generate_metadata.go index 896bf1a9..18c4f665 100644 --- a/examples/multirepo/repository/generate_metadata.go +++ b/examples/multirepo/repository/generate_metadata.go @@ -35,7 +35,7 @@ func main() { roles.SetTargets("targets", targets) // Add each target to Targets metadata - for _, targetName := range []string{"targets/map.json", "targets/root-signing-google/root.json", "targets/root-signing-github/root.json"} { + for _, targetName := range []string{"targets/map.json", "targets/sigstore-tuf-root/root.json", "targets/staging/root.json"} { targetPath, localPath := helperGetPathForTarget(targetName) targetFileInfo, err := metadata.TargetFile().FromFile(localPath, "sha256") if err != nil { diff --git a/examples/multirepo/repository/metadata/1.root.json b/examples/multirepo/repository/metadata/1.root.json index 2fec7b91..f7168874 100644 --- a/examples/multirepo/repository/metadata/1.root.json +++ b/examples/multirepo/repository/metadata/1.root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-20T16:42:30.474218Z", + "expires": "2024-03-20T16:49:58.910995Z", "keys": { - "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc": { + "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6": { "keytype": "ed25519", "keyval": { - "public": "ac7f5be46f4c23f55ada9b5e16c4574e64422775ae2636f0c3b9d02769200aa4" + "public": "990149a8e27d18659be5c3b018cc37b176b2ec383f26b52b581741738c62530f" }, "scheme": "ed25519" }, - "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968": { + "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a": { "keytype": "ed25519", "keyval": { - "public": "e65b317ff4fc9c4e4aada57d07ba2de9479512d3a7701252bbbc7dc5885cfbe5" + "public": "ba82e11166e925f26faa2a2ac509d1773490bb3f4b2860e6b510a1079d4ea63c" }, "scheme": "ed25519" }, - "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c": { + "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc": { "keytype": "ed25519", "keyval": { - "public": "6e4d1e2c537e322892a50608fb74d08741a144bc31b3f26456b6e20d98a52125" + "public": "9e077561af74850a3321b4df9cb9606593ab30f819d1e13475b0d29f9abf99d8" }, "scheme": "ed25519" }, - "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a": { + "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa": { "keytype": "ed25519", "keyval": { - "public": "6e28a2767d0a2b184cc992f9422a0b7ca4361de7ea2ff7a4a9b047e83b788701" + "public": "71648d51b058818fcf29cb1846da3c920fad7a3ce70cacaa9a3fb5afa3bd8c1d" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a" + "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc" ], "threshold": 1 }, "snapshot": { "keyids": [ - "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc" + "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6" ], "threshold": 1 }, "targets": { "keyids": [ - "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c" + "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a" ], "threshold": 1 }, "timestamp": { "keyids": [ - "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968" + "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "e09f0cf51b3b3f12d4f88ebdcf5e3f549e881d48eb48d8d7dcb10f498b23cf9a", - "sig": "6dfaca5013b401f0c1aa8f050155956031b187f4a2e788eb1d9e3a85240cdd5ef323660ea3c7b03940016d6cb67d526dbb4e0d7ca8640cfa8140ebdef520ba03" + "keyid": "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc", + "sig": "cd334e4ee2fbe2b660c9f7555b00b759558987c382bc2814d6775f233856802620e2b5cd17c16f6c969b2b8c55d6cf0e1e51f52487e4dc3209baf932aaaf200c" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.snapshot.json b/examples/multirepo/repository/metadata/1.snapshot.json index ed145717..83cd4bba 100644 --- a/examples/multirepo/repository/metadata/1.snapshot.json +++ b/examples/multirepo/repository/metadata/1.snapshot.json @@ -1,7 +1,7 @@ { "signed": { "_type": "snapshot", - "expires": "2023-05-20T15:42:30.474215Z", + "expires": "2023-05-20T15:49:58.910994Z", "meta": { "targets.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "380484f9e38c1d100cbd973ad57733d8db5a11f1f5fe3fe2057191ce6fb223bc", - "sig": "41b33a31bbdfaf76388dbf7074d5228a8b9b9dff5ddbcb260f829b8cce4c1bdf33e6baf89b43b4ac5e1d95193b54a92aa8ebf9cdf84c426cf66f2a520f0b3403" + "keyid": "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6", + "sig": "5530e35e597de0d3f9cc6638cdf454dbdc5e54ca35124172720ab8a8769ae44fbaafef689cc50194da2cd7c2fc906c4224cd59a259911b5c04e45596daf24f07" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.targets.json b/examples/multirepo/repository/metadata/1.targets.json index 31ae4f15..5de21672 100644 --- a/examples/multirepo/repository/metadata/1.targets.json +++ b/examples/multirepo/repository/metadata/1.targets.json @@ -1,7 +1,7 @@ { "signed": { "_type": "targets", - "expires": "2023-05-20T15:42:30.466401Z", + "expires": "2023-05-20T15:49:58.909128Z", "spec_version": "1.0.31", "targets": { "map.json": { @@ -10,13 +10,13 @@ }, "length": 660 }, - "root-signing-github/root.json": { + "sigstore-tuf-root/root.json": { "hashes": { "sha256": "e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4" }, "length": 6388 }, - "root-signing-google/root.json": { + "staging/root.json": { "hashes": { "sha256": "e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4" }, @@ -27,8 +27,8 @@ }, "signatures": [ { - "keyid": "511a1263f9509a25164656d6f698af86091b29be5380cd41abaae71c1cba819c", - "sig": "fadf810b70828bf18aad739ca3ece35778aaa7f6fb66860909d3d7d7163d066174b13cc6acf8c00b7290d9b837019b321913afbcbccea2c4ccb40ae290f57c06" + "keyid": "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a", + "sig": "da6430ebf417ffaf320b3faf8a1f95aaa94c44a0d8666c64f47aa291d5a45b79041ac5308291edc6169aa5401d18afbb88f36b777d416118b3c5d98634751208" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/timestamp.json b/examples/multirepo/repository/metadata/timestamp.json index 006c0cda..e85cbfc7 100644 --- a/examples/multirepo/repository/metadata/timestamp.json +++ b/examples/multirepo/repository/metadata/timestamp.json @@ -1,7 +1,7 @@ { "signed": { "_type": "timestamp", - "expires": "2023-05-20T15:42:30.474217Z", + "expires": "2023-05-20T15:49:58.910995Z", "meta": { "snapshot.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "47f92c7217905ba475fcc4cc702ed504c37ea213403f2467814974e31e541968", - "sig": "ad7ef744a66d297e1e61809ed1ac0503bd54154bd79ea8bd7a417ec539d8f7812c3b1bc38dbbccf28cf2b29b22d44f656350b4907f20ca4038a5b66953244d0b" + "keyid": "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa", + "sig": "238bbbe39de87f2c3bb8334f369654336eda54ccadd95cd4a101175d6c6d5ca33941c2c9b930b4e7038672705cd668c7e3d17ad72dda566002d2fef2c9481f0e" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/targets/root-signing-github/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json b/examples/multirepo/repository/targets/sigstore-tuf-root/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json similarity index 100% rename from examples/multirepo/repository/targets/root-signing-github/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json rename to examples/multirepo/repository/targets/sigstore-tuf-root/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json diff --git a/examples/multirepo/repository/targets/root-signing-github/root.json b/examples/multirepo/repository/targets/sigstore-tuf-root/root.json similarity index 100% rename from examples/multirepo/repository/targets/root-signing-github/root.json rename to examples/multirepo/repository/targets/sigstore-tuf-root/root.json diff --git a/examples/multirepo/repository/targets/root-signing-google/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json b/examples/multirepo/repository/targets/staging/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json similarity index 100% rename from examples/multirepo/repository/targets/root-signing-google/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json rename to examples/multirepo/repository/targets/staging/e2a930b2d1d4053dd56e8faf66fd113658545d522e35d222ccf58fea87ccccf4.root.json diff --git a/examples/multirepo/repository/targets/root-signing-google/root.json b/examples/multirepo/repository/targets/staging/root.json similarity index 100% rename from examples/multirepo/repository/targets/root-signing-google/root.json rename to examples/multirepo/repository/targets/staging/root.json From fd677fb74fd73d42b7568fdcc0530cd1ef20467c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 21 Mar 2023 19:34:29 +0200 Subject: [PATCH 132/208] chore: update license headers Signed-off-by: Radoslav Dimitrov --- Makefile | 2 +- examples/cli/tuf-client/main.go | 4 ++-- examples/cli/tuf/main.go | 4 ++-- examples/multirepo/client/client_example.go | 4 ++-- examples/multirepo/repository/generate_metadata.go | 2 +- metadata/errors.go | 11 +++++++++++ metadata/multirepo/multirepo.go | 11 +++++++++++ 7 files changed, 30 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7ada0e93..5f029a7b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2022-2023 VMware, Inc. +# Copyright 2023 VMware, Inc. # # This product is licensed to you under the BSD-2 license (the "License"). # You may not use this product except in compliance with the BSD-2 License. diff --git a/examples/cli/tuf-client/main.go b/examples/cli/tuf-client/main.go index bbea26b9..c9bbe611 100644 --- a/examples/cli/tuf-client/main.go +++ b/examples/cli/tuf-client/main.go @@ -1,5 +1,3 @@ -package main - // Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). @@ -11,6 +9,8 @@ package main // // SPDX-License-Identifier: BSD-2-Clause +package main + import ( tufclient "github.com/rdimitrov/go-tuf-metadata/examples/cli/tuf-client/cmd" ) diff --git a/examples/cli/tuf/main.go b/examples/cli/tuf/main.go index 730d3505..4a61a98d 100644 --- a/examples/cli/tuf/main.go +++ b/examples/cli/tuf/main.go @@ -1,5 +1,3 @@ -package main - // Copyright 2022-2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). @@ -11,6 +9,8 @@ package main // // SPDX-License-Identifier: BSD-2-Clause +package main + import ( "fmt" "os" diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index 0d5500d8..ff70fca4 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -1,4 +1,4 @@ -// Copyright 2022-2023 VMware, Inc. +// Copyright 2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. @@ -57,7 +57,7 @@ func main() { // Get target info for the given target fmt.Printf("Searching for a target using the multi-repository TUF client\n\n") - targetInfo, repositories, err := client.GetTargetInfo("rekor.pub") // rekor.pub trusted_root.json fulcio_v1.crt.pem + targetInfo, repositories, err := client.GetTargetInfo("rekor.pubi") // rekor.pub trusted_root.json fulcio_v1.crt.pem if err != nil { panic(err) } diff --git a/examples/multirepo/repository/generate_metadata.go b/examples/multirepo/repository/generate_metadata.go index 18c4f665..bcc9fd23 100644 --- a/examples/multirepo/repository/generate_metadata.go +++ b/examples/multirepo/repository/generate_metadata.go @@ -1,4 +1,4 @@ -// Copyright 2022-2023 VMware, Inc. +// Copyright 2023 VMware, Inc. // // This product is licensed to you under the BSD-2 license (the "License"). // You may not use this product except in compliance with the BSD-2 License. diff --git a/metadata/errors.go b/metadata/errors.go index 5e21b232..40867203 100644 --- a/metadata/errors.go +++ b/metadata/errors.go @@ -1,3 +1,14 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package metadata import ( diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index 5db15ec0..c1e697ba 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -1,3 +1,14 @@ +// Copyright 2022-2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + package multirepo import ( From a0b45487edec8daf7ff9ae88299006b753c7efac Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 24 Mar 2023 16:08:21 +0200 Subject: [PATCH 133/208] chore: update multirepo search to fail when it finds more than one match Signed-off-by: Radoslav Dimitrov --- .gitignore | 1 + examples/multirepo/client/client_example.go | 2 +- go.mod | 3 +- go.sum | 11 ++- metadata/multirepo/multirepo.go | 75 ++++++++++++++------- 5 files changed, 63 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index e69de29b..600d2d33 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index ff70fca4..30a198e0 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -57,7 +57,7 @@ func main() { // Get target info for the given target fmt.Printf("Searching for a target using the multi-repository TUF client\n\n") - targetInfo, repositories, err := client.GetTargetInfo("rekor.pubi") // rekor.pub trusted_root.json fulcio_v1.crt.pem + targetInfo, repositories, err := client.GetTargetInfo("rekor.pub") // rekor.pub trusted_root.json fulcio_v1.crt.pem if err != nil { panic(err) } diff --git a/go.mod b/go.mod index 336fd31e..376eb38c 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,8 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-containerregistry v0.13.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/go.sum b/go.sum index 63d50d6a..1171796f 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -17,23 +18,29 @@ github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTK github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf h1:ndns1qx/5dL43g16EQkPV/i8+b3l5bYQwLeoSBe7tS8= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf/go.mod h1:aGkAgvWY/IUcVFfuly53REpfv5edu25oij+qHRFaraA= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= 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/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index c1e697ba..35d8c1ab 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -21,6 +21,7 @@ import ( "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/updater" log "github.com/sirupsen/logrus" + "golang.org/x/exp/slices" ) // The following represent the map file described in TAP 4 @@ -51,6 +52,11 @@ type MultiRepoClient struct { Config *MultiRepoConfig } +type targetMatch struct { + targetInfo *metadata.TargetFiles + repositories []string +} + // NewConfig returns configuration for a multi-repo TUF client func NewConfig(repoMap []byte, roots map[string][]byte) (*MultiRepoConfig, error) { // error if we don't have the necessary arguments @@ -214,10 +220,9 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe if patternMatched { // if there's a pattern match, loop through all of the repositories listed for that mapping // and verify if all serve the same target infos - var targetInfo *metadata.TargetFiles - var repositories []string - threshold := 0 + var matchedTargetGroups []targetMatch for _, repoName := range eachMap.Repositories { + // get target info from that repository newTargetInfo, err := client.TUFClients[repoName].GetTargetInfo(targetPath) if err != nil { // failed to get target info for the given target @@ -225,33 +230,53 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe // skip the rest and proceed trying to get target info from the next repository continue } - // if there's no target info saved yet, save it - if targetInfo == nil && newTargetInfo != nil { - targetInfo = newTargetInfo - threshold += 1 - repositories = append(repositories, repoName) - continue - } - // compare the existing one with what we got - if targetInfo.Equal(*newTargetInfo) { - // they are equal, so we just bump the threshold counter - threshold += 1 - repositories = append(repositories, repoName) - // try to do an early exit - if eachMap.Threshold <= threshold { - // we have enough repositories with matching target infos so safely return - return targetInfo, repositories, nil + found := false + // loop through all target infos we found so far + for i, target := range matchedTargetGroups { + // see if we already have found one like that + if target.targetInfo.Equal(*newTargetInfo) { + found = true + // if so, update its repository list + if slices.Contains(target.repositories, repoName) { + // we have a duplicate repository listed in the mapping + // decide if we should error out here + // nevertheless we won't take it into account when we calculate the threshold + } else { + // a new repository vouched for this target + matchedTargetGroups[i].repositories = append(target.repositories, repoName) + } } - continue } - // at this point there was a target info with that name in this repository but it didn't match + // this target as not part of the list so far, so we should add it + if !found { + matchedTargetGroups = append(matchedTargetGroups, targetMatch{ + targetInfo: newTargetInfo, + repositories: []string{repoName}, + }) + } // proceed with searching for this target in the next repository } // we went through all repositories listed in that mapping - // exit if we have matched the threshold - if eachMap.Threshold <= threshold { - // we have enough repositories with matching target infos so safely return - return targetInfo, repositories, nil + // lets see if we have matched the threshold consensus for the given target file + var result *targetMatch + for _, target := range matchedTargetGroups { + // compare thresholds for each target info we found with the value stated for its mapping + if len(target.repositories) >= eachMap.Threshold { + // this target has enough repositories signed for it + if result != nil { + // it seems there's more than one target info matching the threshold for this mapping + // it is a conflict since it's impossible to establish a consensus which of the found targets + // we should actually trust, so we error out + return nil, nil, fmt.Errorf("more than one target info matching the necessary threshold value") + } else { + // this is the first target we found matching the necessary threshold so save it + result = &target + } + } + } + // search finished, see if we have found a matching target + if result != nil { + return result.targetInfo, result.repositories, nil } // if we are here, we haven't found enough target infos to match the threshold number // for this mapping From 29c3a03a1c28c9c46430eb08d3fbf21e0a6052f8 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 24 Mar 2023 16:14:13 +0200 Subject: [PATCH 134/208] chore: update comment in multirepo Signed-off-by: Radoslav Dimitrov --- metadata/multirepo/multirepo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index 35d8c1ab..d679eeec 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -219,7 +219,7 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe } else { if patternMatched { // if there's a pattern match, loop through all of the repositories listed for that mapping - // and verify if all serve the same target infos + // and see if we can find a consensus among them to cover the threshold for that mapping var matchedTargetGroups []targetMatch for _, repoName := range eachMap.Repositories { // get target info from that repository From 0003677b1d26121df3eb296e5522813e0cda5d8d Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 24 Mar 2023 16:18:24 +0200 Subject: [PATCH 135/208] chore: update comment in multirepo.go Signed-off-by: Radoslav Dimitrov --- metadata/multirepo/multirepo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index d679eeec..72ff3bc3 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -176,7 +176,7 @@ func (client *MultiRepoClient) GetTopLevelTargets() (map[string]*metadata.Target for _, tufClient := range client.TUFClients { // loop through the top level targets for each repository for targetName := range tufClient.GetTopLevelTargets() { - // see if this target should be kept, this goes through the TAP4 search algorithm\ + // see if this target should be kept, this goes through the TAP4 search algorithm targetInfo, _, err := client.GetTargetInfo(targetName) if err != nil { // we skip saving this target since there's no way/policy do download it with this map.json file From 43b2b8b88363b0fe335f45462a02d7f32882adb0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:56:19 +0300 Subject: [PATCH 136/208] chore(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#31) Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.1 to 1.7.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.6.1...v1.7.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 376eb38c..29d6cf19 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 github.com/sigstore/sigstore v1.6.0 github.com/sirupsen/logrus v1.9.0 - github.com/spf13/cobra v1.6.1 + github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 golang.org/x/crypto v0.7.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a diff --git a/go.sum b/go.sum index 1171796f..c36e3116 100644 --- a/go.sum +++ b/go.sum @@ -18,7 +18,6 @@ github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTK github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= @@ -48,8 +47,8 @@ github.com/sigstore/sigstore v1.6.0 h1:0fYHVoUlPU3WM8o3U1jT9SI2lqQE68XbG+qWncXaZ github.com/sigstore/sigstore v1.6.0/go.mod h1:+55pf6HZ15kf60c08W+GH95JQbAcnVyUBquQGSVdsto= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From 34e03d9cf4ef8a3c937a2e3cfe4594b6aedbd257 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:56:43 +0300 Subject: [PATCH 137/208] chore(deps): bump golang.org/x/crypto from 0.7.0 to 0.8.0 (#33) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.7.0 to 0.8.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](https://github.com/golang/crypto/compare/v0.7.0...v0.8.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 29d6cf19..0377441e 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 - golang.org/x/crypto v0.7.0 + golang.org/x/crypto v0.8.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) @@ -24,10 +24,10 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/net v0.9.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/go.sum b/go.sum index c36e3116..24df26bc 100644 --- a/go.sum +++ b/go.sum @@ -65,19 +65,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc h1:ijGwO+0vL2hJt5gaygqP2j6PfflOBrRot0IczKbmtio= google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= From c8eb46b63e9d0a75e5c15394be5010940689cb24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 15:20:12 +0300 Subject: [PATCH 138/208] chore(deps): bump github.com/sigstore/sigstore from 1.6.0 to 1.6.1 (#32) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 0377441e..bc8af5d2 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 - github.com/sigstore/sigstore v1.6.0 + github.com/sigstore/sigstore v1.6.1 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 @@ -14,8 +14,8 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-containerregistry v0.13.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/go-containerregistry v0.14.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect @@ -28,9 +28,9 @@ require ( golang.org/x/sys v0.7.0 // indirect golang.org/x/term v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect - google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633 // indirect + google.golang.org/grpc v1.54.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 24df26bc..6ac17609 100644 --- a/go.sum +++ b/go.sum @@ -10,18 +10,18 @@ github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVB github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k= -github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= +github.com/google/go-containerregistry v0.14.0 h1:z58vMqHxuwvAsVwvKEkmVBz2TlgBgH5k6koEXBtlYkw= +github.com/google/go-containerregistry v0.14.0/go.mod h1:aiJ2fp/SXvkWgmYHioXnbMdlgB8eXiiYOY55gfN91Wk= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -43,8 +43,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= -github.com/sigstore/sigstore v1.6.0 h1:0fYHVoUlPU3WM8o3U1jT9SI2lqQE68XbG+qWncXaZC8= -github.com/sigstore/sigstore v1.6.0/go.mod h1:+55pf6HZ15kf60c08W+GH95JQbAcnVyUBquQGSVdsto= +github.com/sigstore/sigstore v1.6.1 h1:xKBPWrNonThuY3HIxEkef/rKmLzpgcsc5/SRLcCriLA= +github.com/sigstore/sigstore v1.6.1/go.mod h1:/payarvti6wVM+rogBlK5zGXOAwZFy3emcZrK/5rS9U= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -79,14 +79,14 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc h1:ijGwO+0vL2hJt5gaygqP2j6PfflOBrRot0IczKbmtio= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633 h1:0BOZf6qNozI3pkN3fJLwNubheHJYHhMh91GRFOWWK08= +google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= +google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From fa3eea38dc425a63e3a26e3749f62132fbb871d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 11:31:02 +0300 Subject: [PATCH 139/208] chore(deps): bump github.com/sigstore/sigstore from 1.6.1 to 1.6.2 (#34) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.6.1 to 1.6.2. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.6.1...v1.6.2) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bc8af5d2..181c48e0 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 - github.com/sigstore/sigstore v1.6.1 + github.com/sigstore/sigstore v1.6.2 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 diff --git a/go.sum b/go.sum index 6ac17609..6631511b 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= -github.com/sigstore/sigstore v1.6.1 h1:xKBPWrNonThuY3HIxEkef/rKmLzpgcsc5/SRLcCriLA= -github.com/sigstore/sigstore v1.6.1/go.mod h1:/payarvti6wVM+rogBlK5zGXOAwZFy3emcZrK/5rS9U= +github.com/sigstore/sigstore v1.6.2 h1:D03GxT3YK+ZkRmCS6SJIDCpfQ0Ypy1o6mgtXBQELtZc= +github.com/sigstore/sigstore v1.6.2/go.mod h1:eN2ynU1Lp1btxinlKXtpybsAHxm6VLQ+S9iPN0cH0wQ= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= From 992981f09e5aadb46edc58a914f91e8fc6611220 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Apr 2023 15:50:25 +0300 Subject: [PATCH 140/208] chore(deps): bump github.com/sigstore/sigstore from 1.6.2 to 1.6.3 (#35) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.6.2 to 1.6.3. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.6.2...v1.6.3) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 181c48e0..cb798dcc 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.5.0 - github.com/sigstore/sigstore v1.6.2 + github.com/sigstore/sigstore v1.6.3 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 @@ -28,7 +28,7 @@ require ( golang.org/x/sys v0.7.0 // indirect golang.org/x/term v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect diff --git a/go.sum b/go.sum index 6631511b..d2a6f7f2 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= -github.com/sigstore/sigstore v1.6.2 h1:D03GxT3YK+ZkRmCS6SJIDCpfQ0Ypy1o6mgtXBQELtZc= -github.com/sigstore/sigstore v1.6.2/go.mod h1:eN2ynU1Lp1btxinlKXtpybsAHxm6VLQ+S9iPN0cH0wQ= +github.com/sigstore/sigstore v1.6.3 h1:lt/w/fZNnrT4PjjqTYsUXn57fvE1YYfIB3SElQZ1oR4= +github.com/sigstore/sigstore v1.6.3/go.mod h1:BpLOp7N2IECbatk4sXE2toY2krw615NmwAtWs/3SJDw= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -79,8 +79,8 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633 h1:0BOZf6qNozI3pkN3fJLwNubheHJYHhMh91GRFOWWK08= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= From d7771e39214c0fa6179f4ebc2544ae6ea33fcb12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 May 2023 15:45:16 +0300 Subject: [PATCH 141/208] chore(deps): bump github.com/sigstore/sigstore from 1.6.3 to 1.6.4 (#36) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.6.3 to 1.6.4. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.6.3...v1.6.4) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index cb798dcc..0af43f68 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/rdimitrov/go-tuf-metadata go 1.19 require ( - github.com/secure-systems-lab/go-securesystemslib v0.5.0 - github.com/sigstore/sigstore v1.6.3 + github.com/secure-systems-lab/go-securesystemslib v0.6.0 + github.com/sigstore/sigstore v1.6.4 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 @@ -25,8 +25,8 @@ require ( github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.9.0 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.7.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.54.0 // indirect diff --git a/go.sum b/go.sum index d2a6f7f2..f122082d 100644 --- a/go.sum +++ b/go.sum @@ -41,10 +41,10 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5 github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/secure-systems-lab/go-securesystemslib v0.5.0 h1:oTiNu0QnulMQgN/hLK124wJD/r2f9ZhIUuKIeBsCBT8= -github.com/secure-systems-lab/go-securesystemslib v0.5.0/go.mod h1:uoCqUC0Ap7jrBSEanxT+SdACYJTVplRXWLkGMuDjXqk= -github.com/sigstore/sigstore v1.6.3 h1:lt/w/fZNnrT4PjjqTYsUXn57fvE1YYfIB3SElQZ1oR4= -github.com/sigstore/sigstore v1.6.3/go.mod h1:BpLOp7N2IECbatk4sXE2toY2krw615NmwAtWs/3SJDw= +github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LMdZGpHi4QYSH/9FZyNGqMYIA= +github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= +github.com/sigstore/sigstore v1.6.4 h1:jH4AzR7qlEH/EWzm+opSpxCfuUcjHL+LJPuQE7h40WE= +github.com/sigstore/sigstore v1.6.4/go.mod h1:pjR64lBxnjoSrAr+Ydye/FV73IfrgtoYlAI11a8xMfA= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -72,10 +72,10 @@ golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZ golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 0de8d9cf9761757fbd79912a31e405b92fe3b0e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 May 2023 15:48:54 +0300 Subject: [PATCH 142/208] chore(deps): bump golang.org/x/crypto from 0.8.0 to 0.9.0 (#38) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.8.0 to 0.9.0. - [Commits](https://github.com/golang/crypto/compare/v0.8.0...v0.9.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 0af43f68..025f96c6 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.2 - golang.org/x/crypto v0.8.0 + golang.org/x/crypto v0.9.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) @@ -24,7 +24,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect diff --git a/go.sum b/go.sum index f122082d..3fd1722f 100644 --- a/go.sum +++ b/go.sum @@ -65,12 +65,12 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= -golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 0c9a2de283fe17913ca64bd96223ac58c204f95f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 14:27:55 +0300 Subject: [PATCH 143/208] chore(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#40) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 025f96c6..e3cce284 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/sigstore/sigstore v1.6.4 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.3 golang.org/x/crypto v0.9.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) diff --git a/go.sum b/go.sum index 3fd1722f..abd2fd75 100644 --- a/go.sum +++ b/go.sum @@ -52,13 +52,9 @@ github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRM github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/theupdateframework/go-tuf v0.5.2 h1:habfDzTmpbzBLIFGWa2ZpVhYvFBoK0C1onC3a4zuPRA= github.com/theupdateframework/go-tuf v0.5.2/go.mod h1:SyMV5kg5n4uEclsyxXJZI2UxPFJNDc4Y+r7wv+MlvTA= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= From 6f101d660658d20743656f5ca490040e94fa735e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 14:28:09 +0300 Subject: [PATCH 144/208] chore(deps): bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2 (#39) Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.0 to 1.9.2. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.2) --- updated-dependencies: - dependency-name: github.com/sirupsen/logrus dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e3cce284..68b51eb0 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.6.0 github.com/sigstore/sigstore v1.6.4 - github.com/sirupsen/logrus v1.9.0 + github.com/sirupsen/logrus v1.9.2 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.3 golang.org/x/crypto v0.9.0 diff --git a/go.sum b/go.sum index abd2fd75..2f72befe 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LM github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= github.com/sigstore/sigstore v1.6.4 h1:jH4AzR7qlEH/EWzm+opSpxCfuUcjHL+LJPuQE7h40WE= github.com/sigstore/sigstore v1.6.4/go.mod h1:pjR64lBxnjoSrAr+Ydye/FV73IfrgtoYlAI11a8xMfA= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= +github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= From 18176407855c394370dc9e07f7f7d223a6207d36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:02:39 +0300 Subject: [PATCH 145/208] chore(deps): bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 (#41) Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.2 to 1.9.3. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.9.2...v1.9.3) --- updated-dependencies: - dependency-name: github.com/sirupsen/logrus dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 68b51eb0..6eda4bef 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.6.0 github.com/sigstore/sigstore v1.6.4 - github.com/sirupsen/logrus v1.9.2 + github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.3 golang.org/x/crypto v0.9.0 diff --git a/go.sum b/go.sum index 2f72befe..d1903996 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LM github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= github.com/sigstore/sigstore v1.6.4 h1:jH4AzR7qlEH/EWzm+opSpxCfuUcjHL+LJPuQE7h40WE= github.com/sigstore/sigstore v1.6.4/go.mod h1:pjR64lBxnjoSrAr+Ydye/FV73IfrgtoYlAI11a8xMfA= -github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= -github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= From b2248bee4399a229b40b4efe109f95133f159492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:02:58 +0300 Subject: [PATCH 146/208] chore(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#42) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6eda4bef..af0b6032 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/sigstore/sigstore v1.6.4 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 - github.com/stretchr/testify v1.8.3 + github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.9.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) diff --git a/go.sum b/go.sum index d1903996..d2fd333c 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/theupdateframework/go-tuf v0.5.2 h1:habfDzTmpbzBLIFGWa2ZpVhYvFBoK0C1onC3a4zuPRA= github.com/theupdateframework/go-tuf v0.5.2/go.mod h1:SyMV5kg5n4uEclsyxXJZI2UxPFJNDc4Y+r7wv+MlvTA= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= From 16b055b3439933584ad80eeb5020a281831a847f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:12:40 +0300 Subject: [PATCH 147/208] chore(deps): bump github.com/sigstore/sigstore from 1.6.4 to 1.6.5 (#43) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.6.4 to 1.6.5. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.6.4...v1.6.5) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index af0b6032..8dfe0bc7 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.6.0 - github.com/sigstore/sigstore v1.6.4 + github.com/sigstore/sigstore v1.6.5 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 @@ -15,7 +15,7 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-containerregistry v0.14.0 // indirect + github.com/google/go-containerregistry v0.15.2 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect @@ -29,7 +29,7 @@ require ( golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.54.0 // indirect + google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index d2fd333c..946ed9d7 100644 --- a/go.sum +++ b/go.sum @@ -14,14 +14,14 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-containerregistry v0.14.0 h1:z58vMqHxuwvAsVwvKEkmVBz2TlgBgH5k6koEXBtlYkw= -github.com/google/go-containerregistry v0.14.0/go.mod h1:aiJ2fp/SXvkWgmYHioXnbMdlgB8eXiiYOY55gfN91Wk= +github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= +github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= -github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -43,8 +43,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LMdZGpHi4QYSH/9FZyNGqMYIA= github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= -github.com/sigstore/sigstore v1.6.4 h1:jH4AzR7qlEH/EWzm+opSpxCfuUcjHL+LJPuQE7h40WE= -github.com/sigstore/sigstore v1.6.4/go.mod h1:pjR64lBxnjoSrAr+Ydye/FV73IfrgtoYlAI11a8xMfA= +github.com/sigstore/sigstore v1.6.5 h1:/liHIo7YPJp6sN31DzBYDOuRPmN1xbzROMBE5DLllYM= +github.com/sigstore/sigstore v1.6.5/go.mod h1:h+EoQsf9+6UKgNYxKhBcPgo4PZeEVfzAJxKRRIYhyN4= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -77,8 +77,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= From c3f90d3efcd07a93259e7f9be0a35fd8452e10a1 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 7 Jun 2023 14:04:44 +0300 Subject: [PATCH 148/208] chore: update make targets Signed-off-by: Radoslav Dimitrov --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5f029a7b..0d6e17fc 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ build-%: # Test target .PHONY: test test: - go test ./... + go test -race -covermode atomic ./... ##################### # lint section @@ -54,6 +54,10 @@ lint: # examples section ##################### +# Target for running all examples +.PHONY: example-all +example-all: example-client example-repository example-multirepo example-tuf-client-cli example-root-signing + # Target for demoing the examples/client/client_example.go .PHONY: example-client example-client: From 0fb5822efceee67d35d7813c38eb2fa6d5c1ade5 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 7 Jun 2023 14:11:00 +0300 Subject: [PATCH 149/208] chore: update metadata files for multirepo example Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/root.json | 30 +++++++++---------- .../multirepo/repository/generate_metadata.go | 4 +-- .../multirepo/repository/metadata/1.root.json | 30 +++++++++---------- .../repository/metadata/1.snapshot.json | 6 ++-- .../repository/metadata/1.targets.json | 6 ++-- .../repository/metadata/timestamp.json | 6 ++-- 6 files changed, 41 insertions(+), 41 deletions(-) diff --git a/examples/multirepo/client/root.json b/examples/multirepo/client/root.json index f7168874..77da9e7f 100644 --- a/examples/multirepo/client/root.json +++ b/examples/multirepo/client/root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-20T16:49:58.910995Z", + "expires": "2024-06-06T11:12:34.649455Z", "keys": { - "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6": { + "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c": { "keytype": "ed25519", "keyval": { - "public": "990149a8e27d18659be5c3b018cc37b176b2ec383f26b52b581741738c62530f" + "public": "4e10fe156f07e6f6e1f6fb1579105b7d3e62790b6a62dbf7727b91f82d2bc9db" }, "scheme": "ed25519" }, - "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a": { + "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255": { "keytype": "ed25519", "keyval": { - "public": "ba82e11166e925f26faa2a2ac509d1773490bb3f4b2860e6b510a1079d4ea63c" + "public": "23e5dc4eb18d5c116e76a92b02e44a7d7279622574457050b85fb8fd9260422c" }, "scheme": "ed25519" }, - "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc": { + "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba": { "keytype": "ed25519", "keyval": { - "public": "9e077561af74850a3321b4df9cb9606593ab30f819d1e13475b0d29f9abf99d8" + "public": "1603f99998ca46c35c238a2c1a2a015e0f32b38771e4fa5401348ce0a677d63f" }, "scheme": "ed25519" }, - "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa": { + "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7": { "keytype": "ed25519", "keyval": { - "public": "71648d51b058818fcf29cb1846da3c920fad7a3ce70cacaa9a3fb5afa3bd8c1d" + "public": "17454b5e7a6594e7f00ceadda10d0267b94d0118b82f541f4f69f0d327c5a41a" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc" + "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7" ], "threshold": 1 }, "snapshot": { "keyids": [ - "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6" + "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba" ], "threshold": 1 }, "targets": { "keyids": [ - "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a" + "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255" ], "threshold": 1 }, "timestamp": { "keyids": [ - "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa" + "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc", - "sig": "cd334e4ee2fbe2b660c9f7555b00b759558987c382bc2814d6775f233856802620e2b5cd17c16f6c969b2b8c55d6cf0e1e51f52487e4dc3209baf932aaaf200c" + "keyid": "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7", + "sig": "699654ed56ea398b16d1d3cdfeeed5edc9e7f03199f9e5a1eba3491d139f32f22043fdde4bd2eaa4914449ecc6ab27aef0655e487ca50fc1cf3f9e1f8f3ea906" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/generate_metadata.go b/examples/multirepo/repository/generate_metadata.go index bcc9fd23..66d2b278 100644 --- a/examples/multirepo/repository/generate_metadata.go +++ b/examples/multirepo/repository/generate_metadata.go @@ -51,11 +51,11 @@ func main() { } // Create Snapshot metadata - snapshot := metadata.Snapshot(helperExpireIn(60)) + snapshot := metadata.Snapshot(helperExpireIn(365)) roles.SetSnapshot(snapshot) // Create Timestamp metadata - timestamp := metadata.Timestamp(helperExpireIn(60)) + timestamp := metadata.Timestamp(helperExpireIn(365)) roles.SetTimestamp(timestamp) // Create Root metadata diff --git a/examples/multirepo/repository/metadata/1.root.json b/examples/multirepo/repository/metadata/1.root.json index f7168874..77da9e7f 100644 --- a/examples/multirepo/repository/metadata/1.root.json +++ b/examples/multirepo/repository/metadata/1.root.json @@ -2,33 +2,33 @@ "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-03-20T16:49:58.910995Z", + "expires": "2024-06-06T11:12:34.649455Z", "keys": { - "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6": { + "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c": { "keytype": "ed25519", "keyval": { - "public": "990149a8e27d18659be5c3b018cc37b176b2ec383f26b52b581741738c62530f" + "public": "4e10fe156f07e6f6e1f6fb1579105b7d3e62790b6a62dbf7727b91f82d2bc9db" }, "scheme": "ed25519" }, - "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a": { + "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255": { "keytype": "ed25519", "keyval": { - "public": "ba82e11166e925f26faa2a2ac509d1773490bb3f4b2860e6b510a1079d4ea63c" + "public": "23e5dc4eb18d5c116e76a92b02e44a7d7279622574457050b85fb8fd9260422c" }, "scheme": "ed25519" }, - "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc": { + "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba": { "keytype": "ed25519", "keyval": { - "public": "9e077561af74850a3321b4df9cb9606593ab30f819d1e13475b0d29f9abf99d8" + "public": "1603f99998ca46c35c238a2c1a2a015e0f32b38771e4fa5401348ce0a677d63f" }, "scheme": "ed25519" }, - "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa": { + "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7": { "keytype": "ed25519", "keyval": { - "public": "71648d51b058818fcf29cb1846da3c920fad7a3ce70cacaa9a3fb5afa3bd8c1d" + "public": "17454b5e7a6594e7f00ceadda10d0267b94d0118b82f541f4f69f0d327c5a41a" }, "scheme": "ed25519" } @@ -36,25 +36,25 @@ "roles": { "root": { "keyids": [ - "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc" + "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7" ], "threshold": 1 }, "snapshot": { "keyids": [ - "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6" + "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba" ], "threshold": 1 }, "targets": { "keyids": [ - "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a" + "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255" ], "threshold": 1 }, "timestamp": { "keyids": [ - "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa" + "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c" ], "threshold": 1 } @@ -64,8 +64,8 @@ }, "signatures": [ { - "keyid": "c5a823413783226e64e127c11350e42704b5d00d0c5cbd954d64ab388ce495fc", - "sig": "cd334e4ee2fbe2b660c9f7555b00b759558987c382bc2814d6775f233856802620e2b5cd17c16f6c969b2b8c55d6cf0e1e51f52487e4dc3209baf932aaaf200c" + "keyid": "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7", + "sig": "699654ed56ea398b16d1d3cdfeeed5edc9e7f03199f9e5a1eba3491d139f32f22043fdde4bd2eaa4914449ecc6ab27aef0655e487ca50fc1cf3f9e1f8f3ea906" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.snapshot.json b/examples/multirepo/repository/metadata/1.snapshot.json index 83cd4bba..a8d51ddc 100644 --- a/examples/multirepo/repository/metadata/1.snapshot.json +++ b/examples/multirepo/repository/metadata/1.snapshot.json @@ -1,7 +1,7 @@ { "signed": { "_type": "snapshot", - "expires": "2023-05-20T15:49:58.910994Z", + "expires": "2024-06-06T11:12:34.649453Z", "meta": { "targets.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "087287f37a5639590750cbc87311697b8e792776459f5ac07af69e3a300128e6", - "sig": "5530e35e597de0d3f9cc6638cdf454dbdc5e54ca35124172720ab8a8769ae44fbaafef689cc50194da2cd7c2fc906c4224cd59a259911b5c04e45596daf24f07" + "keyid": "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba", + "sig": "56c0125cb1897e23014cd6be60b756536ca0aacf299d155bd39849b5f43aa5c22730eeb90c6c36659678253ab43b2ce34f8d73b93f8d40176941dc57bff1420a" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.targets.json b/examples/multirepo/repository/metadata/1.targets.json index 5de21672..cd23240a 100644 --- a/examples/multirepo/repository/metadata/1.targets.json +++ b/examples/multirepo/repository/metadata/1.targets.json @@ -1,7 +1,7 @@ { "signed": { "_type": "targets", - "expires": "2023-05-20T15:49:58.909128Z", + "expires": "2023-08-06T11:12:34.64229Z", "spec_version": "1.0.31", "targets": { "map.json": { @@ -27,8 +27,8 @@ }, "signatures": [ { - "keyid": "128e64cc09b91f12cf47f50753899e8bc923015bd4d3481665c50541dd1b611a", - "sig": "da6430ebf417ffaf320b3faf8a1f95aaa94c44a0d8666c64f47aa291d5a45b79041ac5308291edc6169aa5401d18afbb88f36b777d416118b3c5d98634751208" + "keyid": "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255", + "sig": "0d98c104942b74b7ec0720451ee113ffa5604a1090b0c862660f9deb25bd1d923accb8205772b392cc0d2866c1b303a2830e918fdbc8c00441e70e66445cd90b" } ] } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/timestamp.json b/examples/multirepo/repository/metadata/timestamp.json index e85cbfc7..694a13ea 100644 --- a/examples/multirepo/repository/metadata/timestamp.json +++ b/examples/multirepo/repository/metadata/timestamp.json @@ -1,7 +1,7 @@ { "signed": { "_type": "timestamp", - "expires": "2023-05-20T15:49:58.910995Z", + "expires": "2024-06-06T11:12:34.649455Z", "meta": { "snapshot.json": { "version": 1 @@ -12,8 +12,8 @@ }, "signatures": [ { - "keyid": "f9478d73eea06b1392cd3e8802b5e048c98e31ddd53b2a39c06f89d1fb1fb8aa", - "sig": "238bbbe39de87f2c3bb8334f369654336eda54ccadd95cd4a101175d6c6d5ca33941c2c9b930b4e7038672705cd668c7e3d17ad72dda566002d2fef2c9481f0e" + "keyid": "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c", + "sig": "c9a551e1de0b3753e93bdd176d172239cb33997281446d205f03293ecdd092b2e223a0b5e925e7188786011ee02950c095a44c53004711adf7b8e0340e70bb05" } ] } \ No newline at end of file From 5d2ca98af6f0973f0936b9cc44f37f5533422309 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 7 Jun 2023 16:11:10 +0300 Subject: [PATCH 150/208] chore: update multirepo example so trusted root meta is copied to client folder Signed-off-by: Radoslav Dimitrov --- examples/multirepo/repository/generate_metadata.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/multirepo/repository/generate_metadata.go b/examples/multirepo/repository/generate_metadata.go index 66d2b278..e1349540 100644 --- a/examples/multirepo/repository/generate_metadata.go +++ b/examples/multirepo/repository/generate_metadata.go @@ -128,6 +128,12 @@ func main() { } } + // Save the created root metadata in the client folder, this is the initial trusted root metadata + err = roles.Root().ToFile(filepath.Join(cwd, "../../client/root.json"), true) + if err != nil { + panic(fmt.Sprintln("generate_metadata.go:", "saving trusted root metadata to client folder failed", err)) + } + // Verify that metadata is signed correctly // Verify root err = roles.Root().VerifyDelegate("root", roles.Root()) From 6ea63a0c4ed907372ee25ba58de282e6f511c84c Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 8 Jun 2023 13:18:53 +0300 Subject: [PATCH 151/208] chore: init goreleaser Signed-off-by: Radoslav Dimitrov --- .gitignore | 3 ++- .goreleaser.yaml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .goreleaser.yaml diff --git a/.gitignore b/.gitignore index 600d2d33..adfefb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vscode \ No newline at end of file +.vscode +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 00000000..c271b3d7 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,55 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... +builds: + - skip: true + # - env: + # - CGO_ENABLED=0 + # goos: + # - linux + # - windows + # - darwin + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of uname. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip +checksum: + name_template: "checksums.txt" +snapshot: + name_template: "{{ incpatch .Version }}-next" +source: + enabled: true +changelog: + use: github + groups: + - title: "Breaking changes" + regexp: "^.*(?:BREAKING CHANGE)|![(\\w)]*:+.*$" + order: 0 + - title: Features + regexp: "^.*feat[(\\w)]*:+.*$" + order: 1 + - title: "Bug fixes" + regexp: "^.*fix[(\\w)]*:+.*$" + order: 2 + - title: Others + order: 999 +release: + # If set to auto, will mark the release as not ready for production + # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 + prerelease: auto From 439d9024a2cc888ca463a05186a08e5335e8e9fd Mon Sep 17 00:00:00 2001 From: Ivana Atanasova Date: Tue, 13 Jun 2023 16:28:37 +0300 Subject: [PATCH 152/208] Add unit tests for config / fetcher / repo (#44) * Add unit test for metadata config This change adds tests for initializing metadata config Signed-off-by: Ivana Atanasova * Add unit tests for Fetcher This change tests the DownloadFile functionality of Fetcher covering both use-cases of failed download and a successful root role download of a real test repo Signed-off-by: Ivana Atanasova * Add unit tests for repository type This change adds test coverage for repository checking that all roles once set are as expected Signed-off-by: Ivana Atanasova --------- Signed-off-by: Ivana Atanasova --- metadata/config/config_test.go | 90 ++++++++++++++++++++++++++ metadata/fetcher/fetcher_test.go | 62 ++++++++++++++++++ metadata/repository/repository_test.go | 52 +++++++++++++++ 3 files changed, 204 insertions(+) create mode 100644 metadata/config/config_test.go create mode 100644 metadata/fetcher/fetcher_test.go create mode 100644 metadata/repository/repository_test.go diff --git a/metadata/config/config_test.go b/metadata/config/config_test.go new file mode 100644 index 00000000..afcba021 --- /dev/null +++ b/metadata/config/config_test.go @@ -0,0 +1,90 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package config + +import ( + "fmt" + "os" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNewUpdaterConfig(t *testing.T) { + + remoteURL := "somepath" + rootBytes := []byte("somerootbytes") + + updaterConfig, err := New(remoteURL, rootBytes) + + assert.NoError(t, err) + assert.NotNil(t, updaterConfig) + assert.NotNil(t, updaterConfig.Fetcher) + + assert.Equal(t, 32, updaterConfig.MaxDelegations) + assert.Equal(t, int64(32), updaterConfig.MaxRootRotations) + assert.Equal(t, int64(512000), updaterConfig.RootMaxLength) + assert.Equal(t, int64(16384), updaterConfig.TimestampMaxLength) + assert.Equal(t, int64(2000000), updaterConfig.SnapshotMaxLength) + assert.Equal(t, int64(5000000), updaterConfig.TargetsMaxLength) + assert.Equal(t, false, updaterConfig.DisableLocalCache) + assert.Equal(t, true, updaterConfig.PrefixTargetsWithHash) + assert.Equal(t, updaterConfig.RemoteMetadataURL, remoteURL) + assert.Equal(t, updaterConfig.LocalTrustedRoot, rootBytes) + assert.Equal(t, updaterConfig.RemoteTargetsURL, remoteURL+"/targets") + assert.Empty(t, updaterConfig.LocalMetadataDir) + assert.Empty(t, updaterConfig.LocalTargetsDir) +} + +func TestEnsurePathsExist(t *testing.T) { + + remoteURL := "somepath" + rootBytes := []byte("somerootbytes") + + updaterConfig, err := New(remoteURL, rootBytes) + assert.NoError(t, err) + assert.NotNil(t, updaterConfig) + + err = updaterConfig.EnsurePathsExist() + assert.Error(t, err, "mkdir : no such file or directory") + + tmp := os.TempDir() + metadataPath := fmt.Sprintf("%s/metadata", tmp) + targetsPath := fmt.Sprintf("%s/targets", tmp) + + assert.NoDirExists(t, metadataPath) + assert.NoDirExists(t, targetsPath) + + updaterConfig.LocalMetadataDir = metadataPath + updaterConfig.LocalTargetsDir = targetsPath + + updaterConfig.DisableLocalCache = true + err = updaterConfig.EnsurePathsExist() + assert.NoError(t, err) + assert.NoDirExists(t, metadataPath) + assert.NoDirExists(t, targetsPath) + + updaterConfig.DisableLocalCache = false + err = updaterConfig.EnsurePathsExist() + assert.NoError(t, err) + + assert.DirExists(t, metadataPath) + assert.DirExists(t, targetsPath) + + err = os.RemoveAll(metadataPath) + assert.NoError(t, err) + assert.NoDirExists(t, metadataPath) + + err = os.RemoveAll(targetsPath) + assert.NoError(t, err) + assert.NoDirExists(t, targetsPath) +} diff --git a/metadata/fetcher/fetcher_test.go b/metadata/fetcher/fetcher_test.go new file mode 100644 index 00000000..97486d12 --- /dev/null +++ b/metadata/fetcher/fetcher_test.go @@ -0,0 +1,62 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package fetcher + +import ( + "errors" + "testing" + "time" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/stretchr/testify/assert" +) + +const ( + exampleURL = "https://example.com/metadata/" + realUrl = "https://jku.github.io/tuf-demo/metadata/1.root.json" +) + +func TestDownloadFileWithExampleUrl(t *testing.T) { + fetcher := DefaultFetcher{httpUserAgent: ""} + + fetcher.httpUserAgent = "someUserAgent" + + data, err := fetcher.DownloadFile(exampleURL, 34) + if assert.NotNil(t, err) { + if assert.IsType(t, metadata.ErrDownloadHTTP{}, err) { + var checkErr metadata.ErrDownloadHTTP + if errors.As(err, &checkErr) { + assert.NotEqual(t, 200, checkErr.StatusCode) + assert.Equal(t, 404, checkErr.StatusCode) + } + } + } + assert.Empty(t, data) +} + +func TestDownloadFileWithRealURL(t *testing.T) { + fetcher := DefaultFetcher{httpUserAgent: ""} + + data, err := fetcher.DownloadFile(realUrl, 3000) + assert.Nil(t, err) + assert.NotEmpty(t, data) + + now := time.Now().UTC() + safeExpiry := now.Truncate(time.Second).AddDate(0, 0, 30) + mdRoot := metadata.Root(safeExpiry) + err = mdRoot.UnmarshalJSON(data) + + assert.Nil(t, err) + assert.Equal(t, mdRoot.Signed.Type, metadata.ROOT) + assert.Equal(t, mdRoot.Signed.Version, int64(1)) + assert.LessOrEqual(t, mdRoot.Signed.SpecVersion, metadata.SPECIFICATION_VERSION) +} diff --git a/metadata/repository/repository_test.go b/metadata/repository/repository_test.go new file mode 100644 index 00000000..06f87a37 --- /dev/null +++ b/metadata/repository/repository_test.go @@ -0,0 +1,52 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package repository + +import ( + "testing" + "time" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/stretchr/testify/assert" +) + +func TestNewRepository(t *testing.T) { + repo := New() + + now := time.Now().UTC() + safeExpiry := now.Truncate(time.Second).AddDate(0, 0, 30) + + root := metadata.Root(safeExpiry) + repo.SetRoot(root) + assert.Equal(t, "root", repo.Root().Signed.Type) + assert.Equal(t, int64(1), repo.Root().Signed.Version) + assert.Equal(t, metadata.SPECIFICATION_VERSION, repo.Root().Signed.SpecVersion) + + targets := metadata.Targets(safeExpiry) + repo.SetTargets("targets", targets) + assert.Equal(t, "targets", repo.Targets("targets").Signed.Type) + assert.Equal(t, int64(1), repo.Targets("targets").Signed.Version) + assert.Equal(t, metadata.SPECIFICATION_VERSION, repo.Targets("targets").Signed.SpecVersion) + + timestamp := metadata.Timestamp(safeExpiry) + repo.SetTimestamp(timestamp) + // repo.SetRoot(root) + assert.Equal(t, "timestamp", repo.Timestamp().Signed.Type) + assert.Equal(t, int64(1), repo.Timestamp().Signed.Version) + assert.Equal(t, metadata.SPECIFICATION_VERSION, repo.Timestamp().Signed.SpecVersion) + + snapshot := metadata.Snapshot(safeExpiry) + repo.SetSnapshot(snapshot) + assert.Equal(t, "snapshot", repo.Snapshot().Signed.Type) + assert.Equal(t, int64(1), repo.Snapshot().Signed.Version) + assert.Equal(t, metadata.SPECIFICATION_VERSION, repo.Snapshot().Signed.SpecVersion) +} From 214bd9a6d7594799fdb4501e20c41cbf3f2fefd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 16:35:11 +0300 Subject: [PATCH 153/208] chore(deps): bump golang.org/x/crypto from 0.9.0 to 0.10.0 (#48) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.9.0 to 0.10.0. - [Commits](https://github.com/golang/crypto/compare/v0.9.0...v0.10.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 8dfe0bc7..b770f39a 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.9.0 + golang.org/x/crypto v0.10.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) @@ -25,9 +25,9 @@ require ( github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/sys v0.9.0 // indirect + golang.org/x/term v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect diff --git a/go.sum b/go.sum index 946ed9d7..bcbed788 100644 --- a/go.sum +++ b/go.sum @@ -61,19 +61,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= From 879dae9f681a2092c9d2bf422ee644b039c8e062 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:57:51 +0300 Subject: [PATCH 154/208] chore(deps): bump github.com/sigstore/sigstore from 1.6.5 to 1.7.0 (#49) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.6.5 to 1.7.0. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.6.5...v1.7.0) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b770f39a..74c38b1a 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.6.0 - github.com/sigstore/sigstore v1.6.5 + github.com/sigstore/sigstore v1.7.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 @@ -24,7 +24,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/net v0.11.0 // indirect golang.org/x/sys v0.9.0 // indirect golang.org/x/term v0.9.0 // indirect golang.org/x/text v0.10.0 // indirect diff --git a/go.sum b/go.sum index bcbed788..baa82484 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LMdZGpHi4QYSH/9FZyNGqMYIA= github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= -github.com/sigstore/sigstore v1.6.5 h1:/liHIo7YPJp6sN31DzBYDOuRPmN1xbzROMBE5DLllYM= -github.com/sigstore/sigstore v1.6.5/go.mod h1:h+EoQsf9+6UKgNYxKhBcPgo4PZeEVfzAJxKRRIYhyN4= +github.com/sigstore/sigstore v1.7.0 h1:0jLlzxX68LtirwSTWAwRPMKhulT0aWVLmFU5ofnbtYA= +github.com/sigstore/sigstore v1.7.0/go.mod h1:0PmMzfJP2Y9+lugD0wer4e7TihR5tM7NcIs3bQNk5xg= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -65,8 +65,8 @@ golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 499364f1cd9c2a01307f7ebd8c1bd287d59e1094 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 22 Jun 2023 16:14:45 +0300 Subject: [PATCH 155/208] tests: update fetcher tests (#47) * tests: update fetcher tests Signed-off-by: Radoslav Dimitrov * fix: fix generic metadata unrecognized fields Signed-off-by: Radoslav Dimitrov --------- Signed-off-by: Radoslav Dimitrov --- metadata/fetcher/fetcher_test.go | 57 ++++++++++++++++---------------- metadata/marshal.go | 2 +- metadata/metadata_test.go | 26 +++++++++++---- 3 files changed, 49 insertions(+), 36 deletions(-) diff --git a/metadata/fetcher/fetcher_test.go b/metadata/fetcher/fetcher_test.go index 97486d12..c4e680ea 100644 --- a/metadata/fetcher/fetcher_test.go +++ b/metadata/fetcher/fetcher_test.go @@ -13,50 +13,49 @@ package fetcher import ( "errors" + "net/url" "testing" - "time" "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/stretchr/testify/assert" ) const ( - exampleURL = "https://example.com/metadata/" - realUrl = "https://jku.github.io/tuf-demo/metadata/1.root.json" + badURL = "https://somebadtufrepourl.com/metadata/" + goodURLBadPath = "https://jku.github.io/tuf-demo/metadata/badPath.json" + goodURLGoodPath = "https://jku.github.io/tuf-demo/metadata/1.root.json" + rootMaxLength = 512000 // bytes + ) -func TestDownloadFileWithExampleUrl(t *testing.T) { +func TestDefaultFetcherDownloadFileWithBadURL(t *testing.T) { fetcher := DefaultFetcher{httpUserAgent: ""} - - fetcher.httpUserAgent = "someUserAgent" - - data, err := fetcher.DownloadFile(exampleURL, 34) - if assert.NotNil(t, err) { - if assert.IsType(t, metadata.ErrDownloadHTTP{}, err) { - var checkErr metadata.ErrDownloadHTTP - if errors.As(err, &checkErr) { - assert.NotEqual(t, 200, checkErr.StatusCode) - assert.Equal(t, 404, checkErr.StatusCode) - } - } - } + data, err := fetcher.DownloadFile(badURL, rootMaxLength) + // expect error + assert.NotNil(t, err) + // of type url.Error + assert.IsType(t, &url.Error{}, err) assert.Empty(t, data) } -func TestDownloadFileWithRealURL(t *testing.T) { +func TestDefaultFetcherDownloadFileWithGoodURLMissingPath(t *testing.T) { fetcher := DefaultFetcher{httpUserAgent: ""} + data, err := fetcher.DownloadFile(goodURLBadPath, rootMaxLength) + // invalid target location, so expect error + assert.NotNil(t, err) + assert.Empty(t, data) + var checkErr metadata.ErrDownloadHTTP + if errors.As(err, &checkErr) { + // of status code 404 + assert.Equal(t, 404, checkErr.StatusCode) + } +} - data, err := fetcher.DownloadFile(realUrl, 3000) +func TestDownloadDefaultFetcherFileWithGoodURLGoodPath(t *testing.T) { + fetcher := DefaultFetcher{httpUserAgent: ""} + data, err := fetcher.DownloadFile(goodURLGoodPath, rootMaxLength) + expectedBytes := []byte{123, 10, 32, 34, 115, 105, 103, 110, 97, 116, 117, 114, 101, 115, 34, 58, 32, 91, 10, 32, 32, 123, 10, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 44, 10, 32, 32, 32, 34, 115, 105, 103, 34, 58, 32, 34, 57, 54, 57, 98, 100, 101, 99, 51, 54, 100, 54, 102, 51, 100, 99, 53, 57, 99, 49, 55, 50, 48, 50, 97, 56, 53, 50, 56, 98, 98, 51, 53, 54, 97, 54, 101, 97, 53, 52, 100, 55, 99, 99, 57, 54, 98, 98, 51, 55, 49, 101, 101, 101, 52, 56, 101, 50, 52, 48, 49, 57, 50, 98, 99, 97, 99, 100, 53, 48, 53, 49, 51, 56, 56, 50, 52, 53, 49, 52, 52, 97, 97, 99, 97, 49, 48, 51, 57, 100, 51, 101, 98, 55, 48, 54, 50, 101, 48, 56, 55, 54, 55, 57, 53, 101, 56, 49, 101, 49, 100, 53, 54, 54, 102, 56, 100, 101, 100, 50, 99, 50, 56, 52, 97, 101, 101, 48, 102, 34, 10, 32, 32, 125, 44, 10, 32, 32, 123, 10, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 34, 115, 105, 103, 34, 58, 32, 34, 101, 100, 102, 97, 102, 51, 99, 53, 51, 56, 97, 48, 50, 51, 101, 55, 99, 102, 53, 98, 50, 54, 51, 97, 101, 52, 101, 54, 51, 99, 51, 51, 99, 57, 52, 97, 50, 98, 102, 99, 57, 102, 101, 56, 48, 56, 53, 57, 99, 52, 57, 51, 52, 100, 52, 97, 54, 54, 98, 48, 49, 53, 98, 54, 53, 98, 57, 48, 49, 101, 99, 53, 100, 53, 50, 57, 48, 101, 97, 53, 50, 52, 51, 51, 57, 101, 54, 97, 52, 48, 98, 53, 98, 56, 100, 98, 56, 97, 57, 53, 54, 49, 102, 51, 99, 49, 48, 51, 101, 50, 97, 101, 56, 55, 98, 57, 101, 101, 48, 51, 50, 97, 57, 101, 51, 48, 48, 49, 34, 10, 32, 32, 125, 10, 32, 93, 44, 10, 32, 34, 115, 105, 103, 110, 101, 100, 34, 58, 32, 123, 10, 32, 32, 34, 95, 116, 121, 112, 101, 34, 58, 32, 34, 114, 111, 111, 116, 34, 44, 10, 32, 32, 34, 99, 111, 110, 115, 105, 115, 116, 101, 110, 116, 95, 115, 110, 97, 112, 115, 104, 111, 116, 34, 58, 32, 116, 114, 117, 101, 44, 10, 32, 32, 34, 101, 120, 112, 105, 114, 101, 115, 34, 58, 32, 34, 50, 48, 50, 49, 45, 48, 55, 45, 49, 56, 84, 49, 51, 58, 51, 55, 58, 51, 56, 90, 34, 44, 10, 32, 32, 34, 107, 101, 121, 115, 34, 58, 32, 123, 10, 32, 32, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 53, 48, 102, 52, 56, 54, 53, 57, 54, 54, 53, 98, 51, 101, 101, 98, 50, 50, 100, 52, 57, 51, 55, 52, 101, 49, 56, 51, 49, 57, 55, 101, 101, 102, 56, 101, 52, 50, 56, 55, 54, 97, 53, 99, 98, 57, 48, 57, 99, 57, 49, 97, 98, 55, 55, 101, 52, 50, 98, 49, 101, 99, 99, 54, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 49, 56, 101, 98, 50, 52, 56, 51, 49, 57, 54, 98, 55, 97, 97, 50, 53, 102, 97, 102, 98, 56, 49, 50, 55, 54, 99, 55, 48, 52, 102, 55, 57, 48, 51, 99, 99, 57, 98, 49, 101, 51, 52, 99, 97, 100, 99, 52, 101, 97, 102, 54, 55, 55, 98, 55, 97, 54, 55, 52, 100, 54, 102, 53, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 57, 50, 49, 101, 99, 99, 56, 54, 101, 101, 57, 49, 102, 100, 100, 51, 97, 53, 53, 49, 52, 48, 50, 51, 100, 102, 49, 57, 99, 100, 56, 53, 57, 49, 53, 57, 52, 54, 55, 55, 54, 52, 102, 54, 48, 102, 99, 52, 49, 101, 49, 101, 101, 97, 99, 56, 53, 48, 51, 53, 49, 49, 54, 49, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 56, 57, 53, 55, 54, 57, 49, 55, 100, 49, 54, 48, 50, 56, 52, 51, 56, 52, 97, 52, 55, 55, 53, 57, 101, 101, 99, 49, 102, 99, 48, 102, 53, 98, 55, 52, 54, 99, 97, 51, 100, 102, 97, 100, 56, 49, 51, 101, 101, 51, 48, 56, 55, 53, 99, 51, 50, 98, 97, 99, 51, 54, 57, 99, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 48, 52, 101, 102, 51, 51, 53, 54, 102, 98, 53, 99, 100, 48, 48, 57, 55, 53, 100, 102, 99, 101, 57, 102, 56, 102, 52, 50, 100, 53, 98, 49, 50, 98, 55, 98, 56, 51, 102, 56, 98, 97, 49, 53, 99, 50, 101, 57, 56, 102, 100, 48, 52, 49, 53, 49, 52, 99, 55, 52, 98, 101, 98, 50, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 10, 32, 32, 125, 44, 10, 32, 32, 34, 114, 111, 108, 101, 115, 34, 58, 32, 123, 10, 32, 32, 32, 34, 114, 111, 111, 116, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 32, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 50, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 115, 110, 97, 112, 115, 104, 111, 116, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 116, 97, 114, 103, 101, 116, 115, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 10, 32, 32, 125, 44, 10, 32, 32, 34, 115, 112, 101, 99, 95, 118, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 49, 46, 48, 46, 49, 57, 34, 44, 10, 32, 32, 34, 118, 101, 114, 115, 105, 111, 110, 34, 58, 32, 49, 44, 10, 32, 32, 34, 120, 45, 116, 117, 102, 114, 101, 112, 111, 45, 101, 120, 112, 105, 114, 121, 45, 112, 101, 114, 105, 111, 100, 34, 58, 32, 56, 54, 52, 48, 48, 10, 32, 125, 10, 125} assert.Nil(t, err) assert.NotEmpty(t, data) - - now := time.Now().UTC() - safeExpiry := now.Truncate(time.Second).AddDate(0, 0, 30) - mdRoot := metadata.Root(safeExpiry) - err = mdRoot.UnmarshalJSON(data) - - assert.Nil(t, err) - assert.Equal(t, mdRoot.Signed.Type, metadata.ROOT) - assert.Equal(t, mdRoot.Signed.Version, int64(1)) - assert.LessOrEqual(t, mdRoot.Signed.SpecVersion, metadata.SPECIFICATION_VERSION) + assert.Equal(t, expectedBytes, data) } diff --git a/metadata/marshal.go b/metadata/marshal.go index e3a7214c..1ed6a2b4 100644 --- a/metadata/marshal.go +++ b/metadata/marshal.go @@ -267,7 +267,7 @@ func (key *Key) UnmarshalJSON(data []byte) error { return nil } -func (meta *Metadata[T]) MarshalJSON() ([]byte, error) { +func (meta Metadata[T]) MarshalJSON() ([]byte, error) { dict := map[string]any{} if len(meta.UnrecognizedFields) != 0 { copyMapValues(meta.UnrecognizedFields, dict) diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 9d0f2235..890a18c2 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -334,38 +334,52 @@ func TestIsExpiredTargets(t *testing.T) { assert.False(t, meta.Signed.IsExpired(time.Now().UTC())) } -func TestUnrecognizedField(t *testing.T) { +func TestUnrecognizedFieldRolesSigned(t *testing.T) { // fixed expire expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) // unrecognized field to test + // added to the Signed portion of each role type testUnrecognizedField := map[string]any{"test": "true"} root := Root(expire) root.Signed.UnrecognizedFields = testUnrecognizedField rootJSON, err := root.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1},\"signatures\":[]}"), rootJSON) + assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1}}"), rootJSON) targets := Targets(expire) targets.Signed.UnrecognizedFields = testUnrecognizedField targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1},\"signatures\":[]}"), targetsJSON) + assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1}}"), targetsJSON) snapshot := Snapshot(expire) snapshot.Signed.UnrecognizedFields = testUnrecognizedField snapshotJSON, err := snapshot.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"snapshot\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1},\"signatures\":[]}"), snapshotJSON) + assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"snapshot\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1}}"), snapshotJSON) timestamp := Timestamp(expire) timestamp.Signed.UnrecognizedFields = testUnrecognizedField timestampJSON, err := timestamp.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"timestamp\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1},\"signatures\":[]}"), timestampJSON) + assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"timestamp\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"snapshot.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1}}"), timestampJSON) } +func TestUnrecognizedFieldGenericMetadata(t *testing.T) { + // fixed expire + expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) + + // unrecognized field to test + // added to the generic metadata type + testUnrecognizedField := map[string]any{"test": "true"} + root := Root(expire) + root.UnrecognizedFields = testUnrecognizedField + rootJSON, err := root.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"test\":\"true\"}"), rootJSON) +} func TestTargetFilesCustomField(t *testing.T) { // fixed expire expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) @@ -385,5 +399,5 @@ func TestTargetFilesCustomField(t *testing.T) { targets.Signed.Targets["testTarget"] = targetFile targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) - assert.Equal(t, []byte("{\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{\"testTarget\":{\"custom\":{\"test\":true},\"hashes\":{},\"length\":0}},\"version\":1},\"signatures\":[]}"), targetsJSON) + assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{\"testTarget\":{\"custom\":{\"test\":true},\"hashes\":{},\"length\":0}},\"version\":1}}"), targetsJSON) } From 4e9ebfa2f1ca68b9138f19ef2fc20e7753c283b9 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 22 Jun 2023 16:41:44 +0300 Subject: [PATCH 156/208] fix: fix UnmarshalJSON overwrite methods Signed-off-by: Radoslav Dimitrov --- metadata/marshal.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/metadata/marshal.go b/metadata/marshal.go index 1ed6a2b4..7d262c71 100644 --- a/metadata/marshal.go +++ b/metadata/marshal.go @@ -169,7 +169,7 @@ func (signed *TargetsType) UnmarshalJSON(data []byte) error { return nil } -func (signed *MetaFiles) MarshalJSON() ([]byte, error) { +func (signed MetaFiles) MarshalJSON() ([]byte, error) { dict := map[string]any{} if len(signed.UnrecognizedFields) != 0 { copyMapValues(signed.UnrecognizedFields, dict) @@ -204,7 +204,7 @@ func (signed *MetaFiles) UnmarshalJSON(data []byte) error { return nil } -func (signed *TargetFiles) MarshalJSON() ([]byte, error) { +func (signed TargetFiles) MarshalJSON() ([]byte, error) { dict := map[string]any{} if len(signed.UnrecognizedFields) != 0 { copyMapValues(signed.UnrecognizedFields, dict) @@ -236,7 +236,7 @@ func (signed *TargetFiles) UnmarshalJSON(data []byte) error { return nil } -func (key *Key) MarshalJSON() ([]byte, error) { +func (key Key) MarshalJSON() ([]byte, error) { dict := map[string]any{} if len(key.UnrecognizedFields) != 0 { copyMapValues(key.UnrecognizedFields, dict) @@ -391,7 +391,7 @@ func (kv *KeyVal) UnmarshalJSON(data []byte) error { return nil } -func (role *Role) MarshalJSON() ([]byte, error) { +func (role Role) MarshalJSON() ([]byte, error) { dict := map[string]any{} if len(role.UnrecognizedFields) != 0 { copyMapValues(role.UnrecognizedFields, dict) @@ -419,7 +419,7 @@ func (role *Role) UnmarshalJSON(data []byte) error { return nil } -func (d *Delegations) MarshalJSON() ([]byte, error) { +func (d Delegations) MarshalJSON() ([]byte, error) { dict := map[string]any{} if len(d.UnrecognizedFields) != 0 { copyMapValues(d.UnrecognizedFields, dict) @@ -496,7 +496,7 @@ func (role *DelegatedRole) UnmarshalJSON(data []byte) error { return nil } -func (role *SuccinctRoles) MarshalJSON() ([]byte, error) { +func (role SuccinctRoles) MarshalJSON() ([]byte, error) { dict := map[string]any{} if len(role.UnrecognizedFields) != 0 { copyMapValues(role.UnrecognizedFields, dict) From 1705e7c3ba46f61c3ba6142d243a292b2a47750d Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 22 Jun 2023 16:43:06 +0300 Subject: [PATCH 157/208] test: run all examples as partial e2e verification Signed-off-by: Radoslav Dimitrov --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index af775d5e..45e0fa17 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,6 +47,9 @@ jobs: with: flags: Go-${{ matrix.go-version }} + - name: Run all examples # not exactly right to test functionality in such a way but it does act as a set of end to end test cases for the time being, nevertheless should be updated + run: make example-all + golangci: strategy: matrix: From a601b2c46b80d43dbe8a109f8e9cfd7b452a3ec6 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 22 Jun 2023 16:53:18 +0300 Subject: [PATCH 158/208] fix: remove sync lock for keyID generation Signed-off-by: Radoslav Dimitrov --- metadata/keys.go | 5 +++-- metadata/types.go | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/metadata/keys.go b/metadata/keys.go index 32d11256..5f046590 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -113,13 +113,14 @@ func KeyFromPublicKey(k crypto.PublicKey) (*Key, error) { // ID returns the keyID value for the given Key func (k *Key) ID() string { - k.idOnce.Do(func() { + // the identifier is a hexdigest of the SHA-256 hash of the canonical form of the key + if k.id == "" { data, err := cjson.EncodeCanonical(k) if err != nil { panic(fmt.Errorf("error creating key ID: %w", err)) } digest := sha256.Sum256(data) k.id = hex.EncodeToString(digest[:]) - }) + } return k.id } diff --git a/metadata/types.go b/metadata/types.go index 6da81ec3..5d651303 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -13,7 +13,6 @@ package metadata import ( "encoding/json" - "sync" "time" ) @@ -100,7 +99,6 @@ type Key struct { Scheme string `json:"scheme"` Value KeyVal `json:"keyval"` id string `json:"-"` - idOnce sync.Once `json:"-"` UnrecognizedFields map[string]any `json:"-"` } From 86db62c647995254bd0ee0eead7e9a6af1207832 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 14:27:54 +0300 Subject: [PATCH 159/208] chore(deps): bump github.com/sigstore/sigstore from 1.7.0 to 1.7.1 (#50) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.7.0 to 1.7.1. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.7.0...v1.7.1) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 74c38b1a..1275cedb 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/secure-systems-lab/go-securesystemslib v0.6.0 - github.com/sigstore/sigstore v1.7.0 + github.com/sigstore/sigstore v1.7.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index baa82484..44ee2b62 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LMdZGpHi4QYSH/9FZyNGqMYIA= github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= -github.com/sigstore/sigstore v1.7.0 h1:0jLlzxX68LtirwSTWAwRPMKhulT0aWVLmFU5ofnbtYA= -github.com/sigstore/sigstore v1.7.0/go.mod h1:0PmMzfJP2Y9+lugD0wer4e7TihR5tM7NcIs3bQNk5xg= +github.com/sigstore/sigstore v1.7.1 h1:fCATemikcBK0cG4+NcM940MfoIgmioY1vC6E66hXxks= +github.com/sigstore/sigstore v1.7.1/go.mod h1:0PmMzfJP2Y9+lugD0wer4e7TihR5tM7NcIs3bQNk5xg= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= From f164dd8f6d2adc693e90653d1dd122d63453513f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:39:34 +0300 Subject: [PATCH 160/208] chore(deps): bump golang.org/x/crypto from 0.10.0 to 0.11.0 (#51) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.10.0 to 0.11.0. - [Commits](https://github.com/golang/crypto/compare/v0.10.0...v0.11.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 1275cedb..1f0ee45f 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.10.0 + golang.org/x/crypto v0.11.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a ) @@ -25,9 +25,9 @@ require ( github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.11.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/term v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect diff --git a/go.sum b/go.sum index 44ee2b62..72a93c3f 100644 --- a/go.sum +++ b/go.sum @@ -61,19 +61,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= From 3f37cb5a6bffb5b08feec687c4b85a5cfb5f2100 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:01:41 +0300 Subject: [PATCH 161/208] chore(deps): bump github.com/secure-systems-lab/go-securesystemslib (#52) Bumps [github.com/secure-systems-lab/go-securesystemslib](https://github.com/secure-systems-lab/go-securesystemslib) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/secure-systems-lab/go-securesystemslib/releases) - [Commits](https://github.com/secure-systems-lab/go-securesystemslib/compare/v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: github.com/secure-systems-lab/go-securesystemslib dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1f0ee45f..9b7ad1e2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/rdimitrov/go-tuf-metadata go 1.19 require ( - github.com/secure-systems-lab/go-securesystemslib v0.6.0 + github.com/secure-systems-lab/go-securesystemslib v0.7.0 github.com/sigstore/sigstore v1.7.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 diff --git a/go.sum b/go.sum index 72a93c3f..c3029683 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5 github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/secure-systems-lab/go-securesystemslib v0.6.0 h1:T65atpAVCJQK14UA57LMdZGpHi4QYSH/9FZyNGqMYIA= -github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qhPG4HGZ2LGMvrPbzuxwfz/f/zLfEWkk= +github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= +github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/sigstore/sigstore v1.7.1 h1:fCATemikcBK0cG4+NcM940MfoIgmioY1vC6E66hXxks= github.com/sigstore/sigstore v1.7.1/go.mod h1:0PmMzfJP2Y9+lugD0wer4e7TihR5tM7NcIs3bQNk5xg= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= From c57dd43c6bca99a2dabe0ab04fe5490ffaf2a6a0 Mon Sep 17 00:00:00 2001 From: Ivana Atanasova Date: Tue, 25 Jul 2023 12:41:42 +0300 Subject: [PATCH 162/208] test: add metadata unit tests (#45) * Add test repository data This change adds repository data to use in unit testing, keeping it the same as in python-tuf Signed-off-by: Ivana Atanasova * Add file system simulator This change adds a mock for os functions Signed-off-by: Ivana Atanasova * Add test client simulator This change implements client simulator for working with local repositories Signed-off-by: Ivana Atanasova * Add metadata unit tests This change adds unit tests for part of the metadata methods Signed-off-by: Ivana Atanasova * Add metadata api tests This change implements api unit tests for metadata with the same logic as in python-tuf Signed-off-by: Ivana Atanasova * Fix go linter in test simulators This change fixes go linter error of not checking errors returned by methods in the file system and test client simulators Signed-off-by: Ivana Atanasova * Create clean test metadata repository As the `signature` package allows loading keys from RSA PEM files only, the keys and roles from the python-tuf implementation are not suitable for the current implementation. This is why a clean repo is created with new keys in the appropriate format Signed-off-by: Ivana Atanasova * Add metadata sign/verify test This change adds test coverage for signing and verigying metadata with a pre-set keys Signed-off-by: Ivana Atanasova * Cleanup unnecessary functionality This change removes unused keys and test utils for the metadata unit tests. The removed test utils include filesystem simulator, which is replaced by the setup functionality and some tidy-up around the changes Signed-off-by: Ivana Atanasova * Fix metadata api tests to verify error type This change updates error assertions in the metadata api tests to compare error types rather than only a message Signed-off-by: Ivana Atanasova * Improve metadata tests This change provides improvements to the metadata api tests Signed-off-by: Ivana Atanasova --------- Signed-off-by: Ivana Atanasova Co-authored-by: Ivana Atanasova --- metadata/metadata_api_test.go | 406 ++++++++++++++++++ metadata/metadata_test.go | 291 ++++++++++++- .../repository_data/keystore/delegation_key | 1 + .../keystore/delegation_key.pub | 1 + testutils/repository_data/keystore/root_key | 15 + .../repository_data/keystore/root_key.pub | 6 + .../repository_data/keystore/snapshot_key | 15 + .../repository_data/keystore/snapshot_key.pub | 2 + .../repository_data/keystore/targets_key | 15 + .../repository_data/keystore/targets_key.pub | 1 + .../repository_data/keystore/timestamp_key | 15 + .../keystore/timestamp_key.pub | 1 + .../repository/metadata/1.root.json | 72 ++++ .../repository/metadata/role1.json | 49 +++ .../repository/metadata/role2.json | 15 + .../repository/metadata/root.json | 71 +++ .../repository/metadata/snapshot.json | 19 + .../repository/metadata/targets.json | 22 + .../repository/metadata/timestamp.json | 19 + testutils/testutils/setup.go | 96 +++++ 20 files changed, 1121 insertions(+), 11 deletions(-) create mode 100644 metadata/metadata_api_test.go create mode 100644 testutils/repository_data/keystore/delegation_key create mode 100644 testutils/repository_data/keystore/delegation_key.pub create mode 100644 testutils/repository_data/keystore/root_key create mode 100644 testutils/repository_data/keystore/root_key.pub create mode 100644 testutils/repository_data/keystore/snapshot_key create mode 100644 testutils/repository_data/keystore/snapshot_key.pub create mode 100644 testutils/repository_data/keystore/targets_key create mode 100644 testutils/repository_data/keystore/targets_key.pub create mode 100644 testutils/repository_data/keystore/timestamp_key create mode 100644 testutils/repository_data/keystore/timestamp_key.pub create mode 100644 testutils/repository_data/repository/metadata/1.root.json create mode 100644 testutils/repository_data/repository/metadata/role1.json create mode 100644 testutils/repository_data/repository/metadata/role2.json create mode 100644 testutils/repository_data/repository/metadata/root.json create mode 100644 testutils/repository_data/repository/metadata/snapshot.json create mode 100644 testutils/repository_data/repository/metadata/targets.json create mode 100644 testutils/repository_data/repository/metadata/timestamp.json create mode 100644 testutils/testutils/setup.go diff --git a/metadata/metadata_api_test.go b/metadata/metadata_api_test.go new file mode 100644 index 00000000..15544926 --- /dev/null +++ b/metadata/metadata_api_test.go @@ -0,0 +1,406 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package metadata + +import ( + "bytes" + "crypto" + "fmt" + "io/fs" + "os" + "testing" + + testutils "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" + "github.com/sigstore/sigstore/pkg/cryptoutils" + "github.com/sigstore/sigstore/pkg/signature" + log "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" + "golang.org/x/sys/unix" +) + +func TestMain(m *testing.M) { + + err := testutils.SetupTestDirs() + defer testutils.Cleanup() + + if err != nil { + log.Fatalf("failed to setup test dirs: %v", err) + } + m.Run() +} + +func TestGenericRead(t *testing.T) { + // Assert that it chokes correctly on an unknown metadata type + badMetadata := "{\"signed\": {\"_type\": \"bad-metadata\"}}" + _, err := Root().FromBytes([]byte(badMetadata)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type root, got - bad-metadata"}) + _, err = Snapshot().FromBytes([]byte(badMetadata)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type snapshot, got - bad-metadata"}) + _, err = Targets().FromBytes([]byte(badMetadata)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type targets, got - bad-metadata"}) + _, err = Timestamp().FromBytes([]byte(badMetadata)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type timestamp, got - bad-metadata"}) + + badMetadataPath := fmt.Sprintf("%s/bad-metadata.json", testutils.RepoDir) + err = os.WriteFile(badMetadataPath, []byte(badMetadata), 0644) + assert.NoError(t, err) + assert.FileExists(t, badMetadataPath) + + _, err = Root().FromFile(badMetadataPath) + assert.ErrorIs(t, err, ErrValue{"expected metadata type root, got - bad-metadata"}) + _, err = Snapshot().FromFile(badMetadataPath) + assert.ErrorIs(t, err, ErrValue{"expected metadata type snapshot, got - bad-metadata"}) + _, err = Targets().FromFile(badMetadataPath) + assert.ErrorIs(t, err, ErrValue{"expected metadata type targets, got - bad-metadata"}) + _, err = Timestamp().FromFile(badMetadataPath) + assert.ErrorIs(t, err, ErrValue{"expected metadata type timestamp, got - bad-metadata"}) + + err = os.RemoveAll(badMetadataPath) + assert.NoError(t, err) + assert.NoFileExists(t, badMetadataPath) +} + +func TestGenericReadFromMismatchingRoles(t *testing.T) { + // Test failing to load other roles from root metadata + _, err := Snapshot().FromFile(fmt.Sprintf("%s/root.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type snapshot, got - root"}) + _, err = Timestamp().FromFile(fmt.Sprintf("%s/root.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type timestamp, got - root"}) + _, err = Targets().FromFile(fmt.Sprintf("%s/root.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type targets, got - root"}) + + // Test failing to load other roles from targets metadata + _, err = Snapshot().FromFile(fmt.Sprintf("%s/targets.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type snapshot, got - targets"}) + _, err = Timestamp().FromFile(fmt.Sprintf("%s/targets.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type timestamp, got - targets"}) + _, err = Root().FromFile(fmt.Sprintf("%s/targets.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type root, got - targets"}) + + // Test failing to load other roles from timestamp metadata + _, err = Snapshot().FromFile(fmt.Sprintf("%s/timestamp.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type snapshot, got - timestamp"}) + _, err = Targets().FromFile(fmt.Sprintf("%s/timestamp.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type targets, got - timestamp"}) + _, err = Root().FromFile(fmt.Sprintf("%s/timestamp.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type root, got - timestamp"}) + + // Test failing to load other roles from snapshot metadata + _, err = Targets().FromFile(fmt.Sprintf("%s/snapshot.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type targets, got - snapshot"}) + _, err = Timestamp().FromFile(fmt.Sprintf("%s/snapshot.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type timestamp, got - snapshot"}) + _, err = Root().FromFile(fmt.Sprintf("%s/snapshot.json", testutils.RepoDir)) + assert.ErrorIs(t, err, ErrValue{"expected metadata type root, got - snapshot"}) +} + +func TestMDReadWriteFileExceptions(t *testing.T) { + // Test writing to a file with bad filename + badMetadataPath := fmt.Sprintf("%s/bad-metadata.json", testutils.RepoDir) + _, err := Root().FromFile(badMetadataPath) + expectedErr := fs.PathError{ + Op: "open", + Path: badMetadataPath, + Err: unix.ENOENT, + } + assert.ErrorIs(t, err, expectedErr.Err) + + // Test serializing to a file with bad filename + root := Root(fixedExpire) + err = root.ToFile("", false) + expectedErr = fs.PathError{ + Op: "open", + Path: "", + Err: unix.ENOENT, + } + assert.ErrorIs(t, err, expectedErr.Err) +} + +func TestCompareFromBytesFromFileToBytes(t *testing.T) { + rootBytesWant, err := os.ReadFile(fmt.Sprintf("%s/root.json", testutils.RepoDir)) + assert.NoError(t, err) + root, err := Root().FromFile(fmt.Sprintf("%s/root.json", testutils.RepoDir)) + assert.NoError(t, err) + rootBytesActual, err := root.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, rootBytesWant, rootBytesActual) + + targetsBytesWant, err := os.ReadFile(fmt.Sprintf("%s/targets.json", testutils.RepoDir)) + assert.NoError(t, err) + targets, err := Targets().FromFile(fmt.Sprintf("%s/targets.json", testutils.RepoDir)) + assert.NoError(t, err) + targetsBytesActual, err := targets.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, targetsBytesWant, targetsBytesActual) + + snapshotBytesWant, err := os.ReadFile(fmt.Sprintf("%s/snapshot.json", testutils.RepoDir)) + assert.NoError(t, err) + snapshot, err := Snapshot().FromFile(fmt.Sprintf("%s/snapshot.json", testutils.RepoDir)) + assert.NoError(t, err) + snapshotBytesActual, err := snapshot.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, snapshotBytesWant, snapshotBytesActual) + + timestampBytesWant, err := os.ReadFile(fmt.Sprintf("%s/timestamp.json", testutils.RepoDir)) + assert.NoError(t, err) + timestamp, err := Timestamp().FromFile(fmt.Sprintf("%s/timestamp.json", testutils.RepoDir)) + assert.NoError(t, err) + timestampBytesActual, err := timestamp.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, timestampBytesWant, timestampBytesActual) +} + +func TestRootReadWriteReadCompare(t *testing.T) { + src := testutils.RepoDir + "/root.json" + srcRoot, err := Root().FromFile(src) + assert.NoError(t, err) + + dst := src + ".tmp" + err = srcRoot.ToFile(dst, false) + assert.NoError(t, err) + + dstRoot, err := Root().FromFile(dst) + assert.NoError(t, err) + + srcBytes, err := srcRoot.ToBytes(false) + assert.NoError(t, err) + dstBytes, err := dstRoot.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, srcBytes, dstBytes) + + err = os.RemoveAll(dst) + assert.NoError(t, err) +} + +func TestSnapshotReadWriteReadCompare(t *testing.T) { + path1 := testutils.RepoDir + "/snapshot.json" + snaphot1, err := Snapshot().FromFile(path1) + assert.NoError(t, err) + + path2 := path1 + ".tmp" + err = snaphot1.ToFile(path2, false) + assert.NoError(t, err) + + snapshot2, err := Snapshot().FromFile(path2) + assert.NoError(t, err) + + bytes1, err := snaphot1.ToBytes(false) + assert.NoError(t, err) + bytes2, err := snapshot2.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, bytes1, bytes2) + + err = os.RemoveAll(path2) + assert.NoError(t, err) +} + +func TestTargetsReadWriteReadCompare(t *testing.T) { + path1 := testutils.RepoDir + "/targets.json" + targets1, err := Targets().FromFile(path1) + assert.NoError(t, err) + + path2 := path1 + ".tmp" + err = targets1.ToFile(path2, false) + assert.NoError(t, err) + + targets2, err := Targets().FromFile(path2) + assert.NoError(t, err) + + bytes1, err := targets1.ToBytes(false) + assert.NoError(t, err) + bytes2, err := targets2.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, bytes1, bytes2) + + err = os.RemoveAll(path2) + assert.NoError(t, err) +} + +func TestTimestampReadWriteReadCompare(t *testing.T) { + path1 := testutils.RepoDir + "/timestamp.json" + timestamp1, err := Timestamp().FromFile(path1) + assert.NoError(t, err) + + path2 := path1 + ".tmp" + err = timestamp1.ToFile(path2, false) + assert.NoError(t, err) + + timestamp2, err := Timestamp().FromFile(path2) + assert.NoError(t, err) + + bytes1, err := timestamp1.ToBytes(false) + assert.NoError(t, err) + bytes2, err := timestamp2.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, bytes1, bytes2) + + err = os.RemoveAll(path2) + assert.NoError(t, err) +} + +func TestToFromBytes(t *testing.T) { + // ROOT + data, err := os.ReadFile(testutils.RepoDir + "/root.json") + assert.NoError(t, err) + root, err := Root().FromBytes(data) + assert.NoError(t, err) + + // Comparate that from_bytes/to_bytes doesn't change the content + // for two cases for the serializer: noncompact and compact. + + // Case 1: test noncompact by overriding the default serializer. + rootBytesWant, err := root.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, data, rootBytesWant) + + // Case 2: test compact by using the default serializer. + root2, err := Root().FromBytes(rootBytesWant) + assert.NoError(t, err) + rootBytesActual, err := root2.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, rootBytesWant, rootBytesActual) + + // SNAPSHOT + data, err = os.ReadFile(testutils.RepoDir + "/snapshot.json") + assert.NoError(t, err) + snapshot, err := Snapshot().FromBytes(data) + assert.NoError(t, err) + + // Case 1: test noncompact by overriding the default serializer. + snapshotBytesWant, err := snapshot.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, string(data), string(snapshotBytesWant)) + + // Case 2: test compact by using the default serializer. + snapshot2, err := Snapshot().FromBytes(snapshotBytesWant) + assert.NoError(t, err) + snapshotBytesActual, err := snapshot2.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, string(snapshotBytesWant), string(snapshotBytesActual)) + + // TARGETS + data, err = os.ReadFile(testutils.RepoDir + "/targets.json") + assert.NoError(t, err) + targets, err := Targets().FromBytes(data) + assert.NoError(t, err) + + // Case 1: test noncompact by overriding the default serializer. + targetsBytesWant, err := targets.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, string(data), string(targetsBytesWant)) + + // Case 2: test compact by using the default serializer. + targets2, err := Targets().FromBytes(targetsBytesWant) + assert.NoError(t, err) + targetsBytesActual, err := targets2.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, string(targetsBytesWant), string(targetsBytesActual)) + + // TIMESTAMP + data, err = os.ReadFile(testutils.RepoDir + "/timestamp.json") + assert.NoError(t, err) + timestamp, err := Timestamp().FromBytes(data) + assert.NoError(t, err) + + // Case 1: test noncompact by overriding the default serializer. + timestampBytesWant, err := timestamp.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, string(data), string(timestampBytesWant)) + + // Case 2: test compact by using the default serializer. + timestamp2, err := Timestamp().FromBytes(timestampBytesWant) + assert.NoError(t, err) + timestampBytesActual, err := timestamp2.ToBytes(true) + assert.NoError(t, err) + assert.Equal(t, string(timestampBytesWant), string(timestampBytesActual)) + +} + +func TestSignVerify(t *testing.T) { + root, err := Root().FromFile(testutils.RepoDir + "/root.json") + assert.NoError(t, err) + + // Locate the public keys we need from root + assert.NotEmpty(t, root.Signed.Roles[TARGETS].KeyIDs) + targetsKeyID := root.Signed.Roles[TARGETS].KeyIDs[0] + assert.NotEmpty(t, root.Signed.Roles[SNAPSHOT].KeyIDs) + snapshotKeyID := root.Signed.Roles[SNAPSHOT].KeyIDs[0] + assert.NotEmpty(t, root.Signed.Roles[TIMESTAMP].KeyIDs) + timestampKeyID := root.Signed.Roles[TIMESTAMP].KeyIDs[0] + + // Load sample metadata (targets) and assert ... + targets, err := Targets().FromFile(testutils.RepoDir + "/targets.json") + assert.NoError(t, err) + sig := getSignatureByKeyID(targets.Signatures, targetsKeyID) + data, err := targets.Signed.MarshalJSON() + assert.NoError(t, err) + + // ... it has a single existing signature, + assert.Equal(t, 1, len(targets.Signatures)) + + // ... which is valid for the correct key. + targetsKey := root.Signed.Keys[targetsKeyID] + targetsPublicKey, err := targetsKey.ToPublicKey() + assert.NoError(t, err) + targetsHash := crypto.SHA256 + targetsVerifier, err := signature.LoadVerifier(targetsPublicKey, targetsHash) + assert.NoError(t, err) + err = targetsVerifier.VerifySignature(bytes.NewReader(sig), bytes.NewReader(data)) + assert.NoError(t, err) + + // ... and invalid for an unrelated key + snapshotKey := root.Signed.Keys[snapshotKeyID] + snapshotPublicKey, err := snapshotKey.ToPublicKey() + assert.NoError(t, err) + snapshotHash := crypto.SHA256 + snapshotVerifier, err := signature.LoadVerifier(snapshotPublicKey, snapshotHash) + assert.NoError(t, err) + err = snapshotVerifier.VerifySignature(bytes.NewReader(sig), bytes.NewReader(data)) + assert.ErrorContains(t, err, "crypto/rsa: verification error") + + // Append a new signature with the unrelated key and assert that ... + signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/snapshot_key", crypto.SHA256, cryptoutils.SkipPassword) + assert.NoError(t, err) + snapshotSig, err := targets.Sign(signer) + assert.NoError(t, err) + // ... there are now two signatures, and + assert.Equal(t, 2, len(targets.Signatures)) + // ... both are valid for the corresponding keys. + err = targetsVerifier.VerifySignature(bytes.NewReader(sig), bytes.NewReader(data)) + assert.NoError(t, err) + err = snapshotVerifier.VerifySignature(bytes.NewReader(snapshotSig.Signature), bytes.NewReader(data)) + assert.NoError(t, err) + // ... the returned (appended) signature is for snapshot key + assert.Equal(t, snapshotSig.KeyID, snapshotKeyID) + + // Clear all signatures and add a new signature with the unrelated key and assert that ... + signer, err = signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/timestamp_key", crypto.SHA256, cryptoutils.SkipPassword) + assert.NoError(t, err) + targets.ClearSignatures() + assert.Equal(t, 0, len(targets.Signatures)) + timestampSig, err := targets.Sign(signer) + assert.NoError(t, err) + // ... there now is only one signature, + assert.Equal(t, 1, len(targets.Signatures)) + // ... valid for that key. + timestampKey := root.Signed.Keys[timestampKeyID] + timestampPublicKey, err := timestampKey.ToPublicKey() + assert.NoError(t, err) + timestampHash := crypto.SHA256 + timestampVerifier, err := signature.LoadVerifier(timestampPublicKey, timestampHash) + assert.NoError(t, err) + + err = timestampVerifier.VerifySignature(bytes.NewReader(timestampSig.Signature), bytes.NewReader(data)) + assert.NoError(t, err) + err = targetsVerifier.VerifySignature(bytes.NewReader(timestampSig.Signature), bytes.NewReader(data)) + assert.ErrorContains(t, err, "crypto/rsa: verification error") +} diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 890a18c2..a92ac611 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -12,13 +12,32 @@ package metadata import ( + "crypto/ed25519" + "crypto/sha256" "encoding/json" + "fmt" + "os" "testing" "time" "github.com/stretchr/testify/assert" ) +var testRootBytes = []byte("{\"signatures\":[{\"keyid\":\"roothash\",\"sig\":\"1307990e6ba5ca145eb35e99182a9bec46531bc54ddf656a602c780fa0240dee\"}],\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{\"roothash\":{\"keytype\":\"ed25519\",\"keyval\":{\"public\":\"pubrootval\"},\"scheme\":\"ed25519\"},\"snapshothash\":{\"keytype\":\"ed25519\",\"keyval\":{\"public\":\"pubsval\"},\"scheme\":\"ed25519\"},\"targetshash\":{\"keytype\":\"ed25519\",\"keyval\":{\"public\":\"pubtrval\"},\"scheme\":\"ed25519\"},\"timestamphash\":{\"keytype\":\"ed25519\",\"keyval\":{\"public\":\"pubtmval\"},\"scheme\":\"ed25519\"}},\"roles\":{\"root\":{\"keyids\":[\"roothash\"],\"threshold\":1},\"snapshot\":{\"keyids\":[\"snapshothash\"],\"threshold\":1},\"targets\":{\"keyids\":[\"targetshash\"],\"threshold\":1},\"timestamp\":{\"keyids\":[\"timestamphash\"],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"version\":1}}") + +const TEST_REPOSITORY_DATA = "../testutils/repository_data/repository/metadata" + +var fixedExpire = time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) + +func getSignatureByKeyID(signatures []Signature, keyID string) HexBytes { + for _, sig := range signatures { + if sig.KeyID == keyID { + return sig.Signature + } + } + return []byte{} +} + func TestDefaultValuesRoot(t *testing.T) { // without setting expiration meta := Root() @@ -335,32 +354,29 @@ func TestIsExpiredTargets(t *testing.T) { } func TestUnrecognizedFieldRolesSigned(t *testing.T) { - // fixed expire - expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) - // unrecognized field to test // added to the Signed portion of each role type testUnrecognizedField := map[string]any{"test": "true"} - root := Root(expire) + root := Root(fixedExpire) root.Signed.UnrecognizedFields = testUnrecognizedField rootJSON, err := root.ToBytes(false) assert.NoError(t, err) assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1}}"), rootJSON) - targets := Targets(expire) + targets := Targets(fixedExpire) targets.Signed.UnrecognizedFields = testUnrecognizedField targetsJSON, err := targets.ToBytes(false) assert.NoError(t, err) assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{},\"test\":\"true\",\"version\":1}}"), targetsJSON) - snapshot := Snapshot(expire) + snapshot := Snapshot(fixedExpire) snapshot.Signed.UnrecognizedFields = testUnrecognizedField snapshotJSON, err := snapshot.ToBytes(false) assert.NoError(t, err) assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"snapshot\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"meta\":{\"targets.json\":{\"version\":1}},\"spec_version\":\"1.0.31\",\"test\":\"true\",\"version\":1}}"), snapshotJSON) - timestamp := Timestamp(expire) + timestamp := Timestamp(fixedExpire) timestamp.Signed.UnrecognizedFields = testUnrecognizedField timestampJSON, err := timestamp.ToBytes(false) assert.NoError(t, err) @@ -381,14 +397,11 @@ func TestUnrecognizedFieldGenericMetadata(t *testing.T) { assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"root\",\"consistent_snapshot\":true,\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"keys\":{},\"roles\":{\"root\":{\"keyids\":[],\"threshold\":1},\"snapshot\":{\"keyids\":[],\"threshold\":1},\"targets\":{\"keyids\":[],\"threshold\":1},\"timestamp\":{\"keyids\":[],\"threshold\":1}},\"spec_version\":\"1.0.31\",\"version\":1},\"test\":\"true\"}"), rootJSON) } func TestTargetFilesCustomField(t *testing.T) { - // fixed expire - expire := time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) - // custom JSON to test testCustomJSON := json.RawMessage([]byte(`{"test":true}`)) // create a targets metadata - targets := Targets(expire) + targets := Targets(fixedExpire) assert.NotNil(t, targets) // create a targetfile with the custom JSON @@ -401,3 +414,259 @@ func TestTargetFilesCustomField(t *testing.T) { assert.NoError(t, err) assert.Equal(t, []byte("{\"signatures\":[],\"signed\":{\"_type\":\"targets\",\"expires\":\"2030-08-15T14:30:45.0000001Z\",\"spec_version\":\"1.0.31\",\"targets\":{\"testTarget\":{\"custom\":{\"test\":true},\"hashes\":{},\"length\":0}},\"version\":1}}"), targetsJSON) } + +func TestFromBytes(t *testing.T) { + root := Root(fixedExpire) + assert.Equal(t, fixedExpire, root.Signed.Expires) + + _, err := root.FromBytes(testRootBytes) + assert.NoError(t, err) + + assert.Equal(t, fixedExpire, root.Signed.Expires) + assert.Equal(t, fixedExpire, root.Signed.Expires) + assert.Equal(t, ROOT, root.Signed.Type) + assert.True(t, root.Signed.ConsistentSnapshot) + + assert.Equal(t, 4, len(root.Signed.Keys)) + assert.Contains(t, root.Signed.Roles, ROOT) + assert.Equal(t, 1, root.Signed.Roles[ROOT].Threshold) + assert.NotEmpty(t, root.Signed.Roles[ROOT].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[ROOT].KeyIDs[0]) + assert.Equal(t, "roothash", root.Signed.Roles[ROOT].KeyIDs[0]) + + assert.Contains(t, root.Signed.Roles, SNAPSHOT) + assert.Equal(t, 1, root.Signed.Roles[SNAPSHOT].Threshold) + assert.NotEmpty(t, root.Signed.Roles[SNAPSHOT].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[SNAPSHOT].KeyIDs[0]) + assert.Equal(t, "snapshothash", root.Signed.Roles[SNAPSHOT].KeyIDs[0]) + + assert.Contains(t, root.Signed.Roles, TARGETS) + assert.Equal(t, 1, root.Signed.Roles[TARGETS].Threshold) + assert.NotEmpty(t, root.Signed.Roles[TARGETS].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[TARGETS].KeyIDs[0]) + assert.Equal(t, "targetshash", root.Signed.Roles[TARGETS].KeyIDs[0]) + + assert.Contains(t, root.Signed.Roles, TIMESTAMP) + assert.Equal(t, 1, root.Signed.Roles[TIMESTAMP].Threshold) + assert.NotEmpty(t, root.Signed.Roles[TIMESTAMP].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[TIMESTAMP].KeyIDs[0]) + assert.Equal(t, "timestamphash", root.Signed.Roles[TIMESTAMP].KeyIDs[0]) + + assert.Equal(t, int64(1), root.Signed.Version) + assert.NotEmpty(t, root.Signatures) + assert.Equal(t, "roothash", root.Signatures[0].KeyID) + data := []byte("some data") + h32 := sha256.Sum256(data) + h := h32[:] + assert.Equal(t, HexBytes(h), root.Signatures[0].Signature) +} + +func TestToByte(t *testing.T) { + rootBytesExpireStr := "2030-08-15T14:30:45.0000001Z" + rootBytesExpire, err := time.Parse(time.RFC3339, rootBytesExpireStr) + assert.NoError(t, err) + + root := Root(rootBytesExpire) + root.Signed.Keys["roothash"] = &Key{Type: "ed25519", Value: KeyVal{PublicKey: "pubrootval"}, Scheme: "ed25519"} + root.Signed.Keys["snapshothash"] = &Key{Type: "ed25519", Value: KeyVal{PublicKey: "pubsval"}, Scheme: "ed25519"} + root.Signed.Keys["targetshash"] = &Key{Type: "ed25519", Value: KeyVal{PublicKey: "pubtrval"}, Scheme: "ed25519"} + root.Signed.Keys["timestamphash"] = &Key{Type: "ed25519", Value: KeyVal{PublicKey: "pubtmval"}, Scheme: "ed25519"} + root.Signed.Roles[ROOT] = &Role{ + Threshold: 1, + KeyIDs: []string{"roothash"}, + } + root.Signed.Roles[SNAPSHOT] = &Role{ + Threshold: 1, + KeyIDs: []string{"snapshothash"}, + } + root.Signed.Roles[TARGETS] = &Role{ + Threshold: 1, + KeyIDs: []string{"targetshash"}, + } + root.Signed.Roles[TIMESTAMP] = &Role{ + Threshold: 1, + KeyIDs: []string{"timestamphash"}, + } + + data := []byte("some data") + h32 := sha256.Sum256(data) + h := h32[:] + hash := map[string]HexBytes{"ed25519": h} + root.Signatures = append(root.Signatures, Signature{KeyID: "roothash", Signature: hash["ed25519"]}) + rootBytes, err := root.ToBytes(false) + assert.NoError(t, err) + assert.Equal(t, string(testRootBytes), string(rootBytes)) +} + +func TestFromFile(t *testing.T) { + root := Root(fixedExpire) + _, err := root.FromFile(fmt.Sprintf("%s/1.root.json", TEST_REPOSITORY_DATA)) + assert.NoError(t, err) + + assert.Equal(t, fixedExpire, root.Signed.Expires) + assert.Equal(t, fixedExpire, root.Signed.Expires) + assert.Equal(t, ROOT, root.Signed.Type) + assert.True(t, root.Signed.ConsistentSnapshot) + assert.Equal(t, 4, len(root.Signed.Keys)) + + assert.Contains(t, root.Signed.Roles, ROOT) + assert.Equal(t, 1, root.Signed.Roles[ROOT].Threshold) + assert.NotEmpty(t, root.Signed.Roles[ROOT].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[ROOT].KeyIDs[0]) + assert.Equal(t, "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7", root.Signed.Roles[ROOT].KeyIDs[0]) + + assert.Contains(t, root.Signed.Roles, SNAPSHOT) + assert.Equal(t, 1, root.Signed.Roles[SNAPSHOT].Threshold) + assert.NotEmpty(t, root.Signed.Roles[SNAPSHOT].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[SNAPSHOT].KeyIDs[0]) + assert.Equal(t, "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba", root.Signed.Roles[SNAPSHOT].KeyIDs[0]) + + assert.Contains(t, root.Signed.Roles, TARGETS) + assert.Equal(t, 1, root.Signed.Roles[TARGETS].Threshold) + assert.NotEmpty(t, root.Signed.Roles[TARGETS].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[TARGETS].KeyIDs[0]) + assert.Equal(t, "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255", root.Signed.Roles[TARGETS].KeyIDs[0]) + + assert.Contains(t, root.Signed.Roles, TIMESTAMP) + assert.Equal(t, 1, root.Signed.Roles[TIMESTAMP].Threshold) + assert.NotEmpty(t, root.Signed.Roles[TIMESTAMP].KeyIDs) + assert.Contains(t, root.Signed.Keys, root.Signed.Roles[TIMESTAMP].KeyIDs[0]) + assert.Equal(t, "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c", root.Signed.Roles[TIMESTAMP].KeyIDs[0]) + + assert.Equal(t, SPECIFICATION_VERSION, root.Signed.SpecVersion) + assert.Contains(t, root.Signed.UnrecognizedFields, "test") + assert.Equal(t, "true", root.Signed.UnrecognizedFields["test"]) + + assert.Equal(t, int64(1), root.Signed.Version) + assert.NotEmpty(t, root.Signatures) + assert.Equal(t, "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7", root.Signatures[0].KeyID) + +} + +func TestToFile(t *testing.T) { + tmp := os.TempDir() + tmpDir, err := os.MkdirTemp(tmp, "0750") + assert.NoError(t, err) + + fileName := fmt.Sprintf("%s/1.root.json", tmpDir) + assert.NoFileExists(t, fileName) + root, err := Root().FromBytes(testRootBytes) + assert.NoError(t, err) + + err = root.ToFile(fileName, false) + assert.NoError(t, err) + + assert.FileExists(t, fileName) + data, err := os.ReadFile(fileName) + assert.NoError(t, err) + assert.Equal(t, string(testRootBytes), string(data)) + + err = os.RemoveAll(tmpDir) + assert.NoError(t, err) + assert.NoFileExists(t, fileName) + +} + +func TestVerifyDelegate(t *testing.T) { + root := Root(fixedExpire) + err := root.VerifyDelegate("test", root) + assert.EqualError(t, err, "value error: no delegation found for test") + + targets := Targets(fixedExpire) + err = targets.VerifyDelegate("test", targets) + assert.EqualError(t, err, "value error: no delegations found") + + key, _, err := ed25519.GenerateKey(nil) + assert.NoError(t, err) + + delegateeKey, _ := KeyFromPublicKey(key) + delegations := &Delegations{ + Keys: map[string]*Key{ + delegateeKey.ID(): delegateeKey, + }, + Roles: []DelegatedRole{ + { + Name: "test", + KeyIDs: []string{delegateeKey.ID()}, + }, + }, + } + targets.Signed.Delegations = delegations + err = targets.VerifyDelegate("test", root) + assert.NoError(t, err) + err = targets.VerifyDelegate("test", targets) + assert.NoError(t, err) + + err = targets.VerifyDelegate("non-existing", root) + assert.EqualError(t, err, "value error: no delegation found for non-existing") + err = targets.VerifyDelegate("non-existing", targets) + assert.EqualError(t, err, "value error: no delegation found for non-existing") + + targets.Signed.Delegations.Roles[0].Threshold = 1 + err = targets.VerifyDelegate("test", targets) + assert.Errorf(t, err, "Verifying test failed, not enough signatures, got %d, want %d", 0, 1) + + delegations.Keys["incorrectkey"] = delegations.Keys[delegateeKey.ID()] + delete(delegations.Keys, delegateeKey.ID()) + err = targets.VerifyDelegate("test", root) + assert.Errorf(t, err, "key with ID %s not found in test keyids", delegateeKey.ID()) + + timestamp := Timestamp(fixedExpire) + err = timestamp.VerifyDelegate("test", timestamp) + assert.EqualError(t, err, "type error: call is valid only on delegator metadata (should be either root or targets)") + + snapshot := Snapshot(fixedExpire) + err = snapshot.VerifyDelegate("test", snapshot) + assert.EqualError(t, err, "type error: call is valid only on delegator metadata (should be either root or targets)") +} + +func TestVerifyLengthHashesTargetFiles(t *testing.T) { + targetFiles := TargetFile() + targetFiles.Hashes = map[string]HexBytes{} + + data := []byte{} + err := targetFiles.VerifyLengthHashes(data) + assert.NoError(t, err) + + data = []byte("some data") + err = targetFiles.VerifyLengthHashes(data) + assert.Error(t, err, "length/hash verification error: length verification failed - expected 0, got 9") + + h32 := sha256.Sum256(data) + h := h32[:] + targetFiles.Hashes["sha256"] = h + targetFiles.Length = int64(len(data)) + err = targetFiles.VerifyLengthHashes(data) + assert.NoError(t, err) + + targetFiles.Hashes = map[string]HexBytes{"unknownAlg": data} + err = targetFiles.VerifyLengthHashes(data) + assert.Error(t, err, "length/hash verification error: hash verification failed - unknown hashing algorithm - unknownArg") + + targetFiles.Hashes = map[string]HexBytes{"sha256": data} + err = targetFiles.VerifyLengthHashes(data) + assert.Error(t, err, "length/hash verification error: hash verification failed - mismatch for algorithm sha256") +} + +func TestVerifyLengthHashesMetaFiles(t *testing.T) { + version := int64(0) + metaFile := MetaFile(version) + data := []byte("some data") + metaFile.Hashes = map[string]HexBytes{"unknownAlg": data} + err := metaFile.VerifyLengthHashes(data) + assert.Error(t, err, "length/hash verification error: hash verification failed - unknown hashing algorithm - unknownArg") + + metaFile.Hashes = map[string]HexBytes{"sha256": data} + err = metaFile.VerifyLengthHashes(data) + assert.Error(t, err, "length/hash verification error: hash verification failed - mismatch for algorithm sha256") + + h32 := sha256.Sum256(data) + h := h32[:] + metaFile.Hashes = map[string]HexBytes{"sha256": h} + err = metaFile.VerifyLengthHashes(data) + assert.NoError(t, err) + + incorrectData := []byte("another data") + err = metaFile.VerifyLengthHashes(incorrectData) + assert.Error(t, err, "length/hash verification error: length verification failed - expected 0, got 9") +} diff --git a/testutils/repository_data/keystore/delegation_key b/testutils/repository_data/keystore/delegation_key new file mode 100644 index 00000000..461169d6 --- /dev/null +++ b/testutils/repository_data/keystore/delegation_key @@ -0,0 +1 @@ +68593a508472ad3007915379e6b1f3c0@@@@100000@@@@615986af4d1ba89aeadc2f489f89b0e8d46da133a6f75c7b162b8f99f63f86ed@@@@8319255f9856c4f40f9d71bc10e79e5d@@@@1dc7b20f1c668a1f544dc39c7a9fcb3c4a4dd34d1cc8c9d8f779bab026cf0b8e0f46e53bc5ed20bf0e5048b94a5d2ea176e79c12bcc7daa65cd55bf810deebeec5bc903ce9e5316d7dbba88f1a2b51d3f9bc782f8fa9b21dff91609ad0260e21a2039223f816d0fe97ace2e204d0025d327b38d27aa6cd87e85aa8883bfcb6d12f93155d72ffd3c7717a0570cf9811eb6d6a340baa0f27433315d83322c685fec02053ff8c173c4ebf91a258e83402f39546821e3352baa7b246e33b2a573a8ff7b289682407abbcb9184249d4304db68d3bf8e124e94377fd62dde5c4f3b7617d483776345154d047d139b1e559351577da315f54e16153c510159e1908231574bcf49c4f96cafe6530e86a09e9eee47bcff78f2fed2984754c895733938999ff085f9e3532d7174fd76dc09921506dd2137e16ec4926998f5d9df8a8ffb3e6649c71bc32571b2e24357739fa1a56be \ No newline at end of file diff --git a/testutils/repository_data/keystore/delegation_key.pub b/testutils/repository_data/keystore/delegation_key.pub new file mode 100644 index 00000000..d600bffb --- /dev/null +++ b/testutils/repository_data/keystore/delegation_key.pub @@ -0,0 +1 @@ +{"keyval": {"public": "fcf224e55fa226056adf113ef1eb3d55e308b75b321c8c8316999d8c4fd9e0d9"}, "keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"]} \ No newline at end of file diff --git a/testutils/repository_data/keystore/root_key b/testutils/repository_data/keystore/root_key new file mode 100644 index 00000000..53e754d2 --- /dev/null +++ b/testutils/repository_data/keystore/root_key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDydf/VEpxBOCDoxpM6IVhq9i67P9BiVv2zwZSUO/M0RTToAvFv +NgDKXwtnp8LyjVk++wMA1aceMa+pS7vYrKvPIJa7WIT+mwy86/fIdnllJDMw5tmL +r2mE3oBMxOhpEiD2tO+liGacklFNk6nHHorX9S91iqpdRVa3zJw5ALvLdwIDAQAB +AoGBAJlhwoUVb9nmWxNGw86LV7bapDd6qCX96CL2PDsGLdWMTmrTqc5zuE5NkBZz +z2THvISWIJE/l6gHQJv1uBDbMxfquhK40k+GfE/fApVODN8KeBLLRUzYyHNz7KwW +aNF3jY8AbO4HzWpdaFYce5r+YqlWZoaVPR9i6LCW3sZXALyRAkEA/lSVaT0azp55 +2GI4Gn+EQQFqFJWEbNwJ8i3FZ4aG+/gnw2WmxJr+2nQcUlLb2cpQCCcMyWxvCfLK ++DapvvgZXwJBAPQNd+liOrKKd1gPR3S6y+D4h1ewj8ii1MHzRtAsCKCRG/e+v+hC +xp77Rc/qtZXKvVTGrccnKqCVAvG7F15rzOkCQQDCswgKn6+0+5c1ssNWbcZWaXnH +NktBdxXaI3Ya8d7GaEwwhtIrcqilnfvMfgg2a23nP9XHIU7EI+2EJXy/aHkrAkBH +wH30u9COFW+pEDTt+M1gQzFncp2TW2w56ZB0O739lywl1osNejRzIWURD+x7MbQg +bJlC6Bz8QVMwRtVECWWhAkAflD6eIJeceDhVHClHB/QwmF8mwR1o63RN7ZFlgel1 +kwMt6bPZZ1cyrRoj6Cdi4pyqBssDBuQmbBLWyYuijIwz +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/testutils/repository_data/keystore/root_key.pub b/testutils/repository_data/keystore/root_key.pub new file mode 100644 index 00000000..095c0663 --- /dev/null +++ b/testutils/repository_data/keystore/root_key.pub @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDydf/VEpxBOCDoxpM6IVhq9i67 +P9BiVv2zwZSUO/M0RTToAvFvNgDKXwtnp8LyjVk++wMA1aceMa+pS7vYrKvPIJa7 +WIT+mwy86/fIdnllJDMw5tmLr2mE3oBMxOhpEiD2tO+liGacklFNk6nHHorX9S91 +iqpdRVa3zJw5ALvLdwIDAQAB +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/testutils/repository_data/keystore/snapshot_key b/testutils/repository_data/keystore/snapshot_key new file mode 100644 index 00000000..cac57dd6 --- /dev/null +++ b/testutils/repository_data/keystore/snapshot_key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXAIBAAKBgQCPQoHresXRRRGoinN3bNn+BI23KolXdXLGqYkTvr9AjemUQJxb +qmvZXHboQMAYw8OuBrRNt5Fz20wjsrJwOBEU5U3nHSJI4zYPGckYci0/0Eo2Kjws +5BmIj38qgIfhsH4zyZ4FZZ+GLRn+W3i3wl6SfRMC/HCg0DDwi75faC0vGQIDAQAB +AoGAbPFYt2hf8qqhqRfQgysmA4QW+QnB895+8BCRC5DtA/xnerQ/s33AEkW8rxY+ +fxawQjEbAFbup7pHBoaoJ6qbYbKDBSGgZFSEbh40nriX1V0oYb9E+BCAFHE+42Rj +WYYNxXRp7LGoUQqisTsfoR1bvmrLC+9I/tDArHuMudm1slkCQQDOVn9AKTcaBGuQ +Y+JQqoRmi9eMN6XztKIAKQ+P/57BofwlKJDFnwttsvMxRud6rvN1FCnCDM638HNb +I0JDY0JXAkEAsb10uNV+SaWsHJOxfHzwK+uZJV1SkYzpBMizUREHuIyKT4MfpYNw +kn00KpyCvhIp6buwNyYo76TssejYN86UDwJAGi3ZSU+xYQisiQ5TOX7Y+5XEjFLH +KGuDnleXVOLOxqyBrElATQKH1aw9tMPVPLiTxQgA4FD1rVrBmA+aKaifUwJALBp8 +yhh/u7qWWIj1c5R07BEL8U+U23UBpSRACo+VQN/uuggpZCKXXmIe/avUbWGIcO0X +rreTVNOxv/utGzvxVQJBAL7Kpqt9d50SL1ndLr2EdqGw8ZB/B2dKMlZf7AWwbk0k +HHdvWfSDYhtvGo3ilLibHLesE/Tq1fm/2aEOds95/Eo= +-----END RSA PRIVATE KEY----- diff --git a/testutils/repository_data/keystore/snapshot_key.pub b/testutils/repository_data/keystore/snapshot_key.pub new file mode 100644 index 00000000..a0df8cf1 --- /dev/null +++ b/testutils/repository_data/keystore/snapshot_key.pub @@ -0,0 +1,2 @@ +{"keyval": {"public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCG5DWxCcw4FW2G21RwTmuR7gdkv+ZrjZVOx0KsvJc/51QBxo/Y9xPVeoFF7YrhE8EV6A6b0qsLufIo1E63sQ6kjLOPfIMjag6dYPlmEyGcbxNDokv2elxZk7jS98iBQLxEmJLicrdERmxC2t2OOEQ6ELi5dt+C13QvNJFg4+OaTwIDAQAB"}, "keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"]} + diff --git a/testutils/repository_data/keystore/targets_key b/testutils/repository_data/keystore/targets_key new file mode 100644 index 00000000..800dae9a --- /dev/null +++ b/testutils/repository_data/keystore/targets_key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICWwIBAAKBgQCjm6HPktvTGsygQ8Gvmu+zydTNe1zqoxLxV7mVRbmsCI4kn7JT +Hc4fmWZwvo7f/Wbto6Xj5HqGJFSlYIGZuTwZqPg3w8wqv8cuPxbmsFSxMoHfzBBI +uJe0FlwXFysojbdhrSUqNL84tlwTFXEhePYrpTNMDn+9T55B0WJYT/VPxwIDAQAB +AoGANYaYRLHWS1WMNq6UMmBtJZPVlDhU6MrbSqwZojWCjj7qSh8ZF0o8AmiMdDxT +wAJGZ17PyiQY1cQTEVvmaqWIfJKvipAcTvkiXFrAxeIf/HYIVfCP9UB8RqhJufsc +XzDQyvZTmJdatHfKe2JV+q42GrsN4VN61wFEed3NuF8NGjECQQDSA5b+N1wMn5X4 +G5fxPYjhlwQmK3tlBHIPIVcVAsGOxU9Ry55xLQ8LpfKwJZIt2+LvgBIXf4DZY2u6 +GEnyR7epAkEAx267l7XX+9Dh8bHPluQSgH/tDrCp1hUNmyV4XzZCwavI/FaucANa +h8ChpUOSZTq5mR76YaUL7O3Sx8N7L/2x7wJAZDvgYf6sCT5VhnAtCa+T2A+KpGkW +YLVJdt0zwcxp8ylK3UAwo9Wcm7Oda+LSrN6IpkRa3io1pguki9Ix4NfH2QJATsXA +NxZOb1p8RFk1Y6ZGYJcm7Wx+SN8b9rIAL6thBtpxkqoyUHAirAg8UOi1xGJDuOVx +hGwKn9T4MotV9wi/5QJAB+1/2TaUMKjyL5Ca8Fh5SMigrwHp8SnX2vl7HV4hiBXi +0FaVxMPGH94tuFqHQ+q53tiTT1cp6YwcMMgpezTRRA== +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/testutils/repository_data/keystore/targets_key.pub b/testutils/repository_data/keystore/targets_key.pub new file mode 100644 index 00000000..21fae67c --- /dev/null +++ b/testutils/repository_data/keystore/targets_key.pub @@ -0,0 +1 @@ +{"keyval": {"public": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjm6HPktvTGsygQ8Gvmu+zydTNe1zqoxLxV7mVRbmsCI4kn7JTHc4fmWZwvo7f/Wbto6Xj5HqGJFSlYIGZuTwZqPg3w8wqv8cuPxbmsFSxMoHfzBBIuJe0FlwXFysojbdhrSUqNL84tlwTFXEhePYrpTNMDn+9T55B0WJYT/VPxwIDAQAB"}, "keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"]} \ No newline at end of file diff --git a/testutils/repository_data/keystore/timestamp_key b/testutils/repository_data/keystore/timestamp_key new file mode 100644 index 00000000..4d5bbddb --- /dev/null +++ b/testutils/repository_data/keystore/timestamp_key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICWgIBAAKBgHXjYnWGuCIOh5T3XGmgG/RsXWHPTbyu7OImP6O+uHg8hui8C1nY +/mcJdFdxqgl1vKEco/Nwebh2T8L6XbNfcgV9VVstWpeCalZYWi55lZSLe9KixQIA +yg15rNdhN9pcD3OuLmFvslgTx+dTbZ3ZoYMbcb4C5yqvqzcOoCTQMeWbAgMBAAEC +gYAMlDvAUKS7NZOwCIj62FPDTADW2/juhjfOlcg6n7ItWkAG+3G2n5ndwruATSeY +pNCA3H5+DmVeknlGU9LFvgx7dhJMw3WSkq7rImOGbwLN1jCVfwKP0AEEqb7GrtCU +a9lvm2ZFvKj+2VVFS2yifeluDG1Xm10ygq+RDd2lL2g6eQJBAMZrMTUwxWT/Cc0j +Yi7CFPl9V8GkYzLCKRQGR3x4QiNuXpNtQ3D+ivxHieBMEtw6M244PMDC+GpLxAfc +DtiGEl8CQQCYGXeycwkgn2YfH3w1/Mw6TWsdv4rVLPOieiQPrhZbVsBc6NT24MYW +b3c7osW5ypf7lo+xU8E6ylFUyeeVSk5FAkADTAqwSJQvHnHKP9lEz6LLloKbzCB9 +2m4WUBhmABWRQyc9Keah/QjQMlwfJwR1Nl5eaX7Q8Sxxj7q9KrHwdSHfAkAS1yTC +kAlTZytJM6c5MMVDe4+HMdDKszTCrYqF/rR6P/a4C4dFxXYEFW6ZjoIbj4LgAThv +aMaIt8L3U8NB9OBZAkA3ke4kilnVnjEyB9ibJ/SbDiUgh7e7M/XDbNQuXwSipFft +keBYEwL4Njms9uwMT4Gl59HyQls7BE2XEoiFjsY1 +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/testutils/repository_data/keystore/timestamp_key.pub b/testutils/repository_data/keystore/timestamp_key.pub new file mode 100644 index 00000000..6edc5c95 --- /dev/null +++ b/testutils/repository_data/keystore/timestamp_key.pub @@ -0,0 +1 @@ +{"keyval": {"public": "MIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgHXjYnWGuCIOh5T3XGmgG/RsXWHPTbyu7OImP6O+uHg8hui8C1nY/mcJdFdxqgl1vKEco/Nwebh2T8L6XbNfcgV9VVstWpeCalZYWi55lZSLe9KixQIAyg15rNdhN9pcD3OuLmFvslgTx+dTbZ3ZoYMbcb4C5yqvqzcOoCTQMeWbAgMBAAE="}, "keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"]} \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/1.root.json b/testutils/repository_data/repository/metadata/1.root.json new file mode 100644 index 00000000..21cb5877 --- /dev/null +++ b/testutils/repository_data/repository/metadata/1.root.json @@ -0,0 +1,72 @@ +{ + "signatures": [ + { + "keyid": "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7", + "sig": "1307990e6ba5ca145eb35e99182a9bec46531bc54ddf656a602c780fa0240dee" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2030-08-15T14:30:45.0000001Z", + "keys": { + "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c": { + "keytype": "ed25519", + "keyval": { + "public": "4e10fe156f07e6f6e1f6fb1579105b7d3e62790b6a62dbf7727b91f82d2bc9db" + }, + "scheme": "ed25519" + }, + "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255": { + "keytype": "ed25519", + "keyval": { + "public": "23e5dc4eb18d5c116e76a92b02e44a7d7279622574457050b85fb8fd9260422c" + }, + "scheme": "ed25519" + }, + "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba": { + "keytype": "ed25519", + "keyval": { + "public": "1603f99998ca46c35c238a2c1a2a015e0f32b38771e4fa5401348ce0a677d63f" + }, + "scheme": "ed25519" + }, + "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7": { + "keytype": "ed25519", + "keyval": { + "public": "17454b5e7a6594e7f00ceadda10d0267b94d0118b82f541f4f69f0d327c5a41a" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.31", + "version": 1, + "test": "true" + } +} \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/role1.json b/testutils/repository_data/repository/metadata/role1.json new file mode 100644 index 00000000..0ac4687e --- /dev/null +++ b/testutils/repository_data/repository/metadata/role1.json @@ -0,0 +1,49 @@ +{ + "signatures": [ + { + "keyid": "c8022fa1e9b9cb239a6b362bbdffa9649e61ad2cb699d2e4bc4fdf7930a0e64a", + "sig": "9408b46569e622a46f1d35d9fa3c10e17a9285631ced4f2c9c2bba2c2842413fcb796db4e81d6f988fc056c21c407fdc3c10441592cf1e837e088f2e2dfd5403" + } + ], + "signed": { + "_type": "targets", + "delegations": { + "keys": { + "c8022fa1e9b9cb239a6b362bbdffa9649e61ad2cb699d2e4bc4fdf7930a0e64a": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "fcf224e55fa226056adf113ef1eb3d55e308b75b321c8c8316999d8c4fd9e0d9" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "c8022fa1e9b9cb239a6b362bbdffa9649e61ad2cb699d2e4bc4fdf7930a0e64a" + ], + "name": "role2", + "paths": [], + "terminating": false, + "threshold": 1 + } + ] + }, + "expires": "2030-01-01T00:00:00Z", + "spec_version": "1.0.0", + "targets": { + "file3.txt": { + "hashes": { + "sha256": "141f740f53781d1ca54b8a50af22cbf74e44c21a998fa2a8a05aaac2c002886b", + "sha512": "ef5beafa16041bcdd2937140afebd485296cd54f7348ecd5a4d035c09759608de467a7ac0eb58753d0242df873c305e8bffad2454aa48f44480f15efae1cacd0" + }, + "length": 28 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/role2.json b/testutils/repository_data/repository/metadata/role2.json new file mode 100644 index 00000000..9c49e165 --- /dev/null +++ b/testutils/repository_data/repository/metadata/role2.json @@ -0,0 +1,15 @@ +{ + "signatures": [ + { + "keyid": "c8022fa1e9b9cb239a6b362bbdffa9649e61ad2cb699d2e4bc4fdf7930a0e64a", + "sig": "75b196a224fd200e46e738b1216b3316c5384f61083872f8d14b8b0a378b2344e64b1a6f1a89a711206a66a0b199d65ac0e30fe15ddbc4de89fa8ff645f99403" + } + ], + "signed": { + "_type": "targets", + "expires": "2030-01-01T00:00:00Z", + "spec_version": "1.0.0", + "targets": {}, + "version": 1 + } +} \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/root.json b/testutils/repository_data/repository/metadata/root.json new file mode 100644 index 00000000..584a3ec9 --- /dev/null +++ b/testutils/repository_data/repository/metadata/root.json @@ -0,0 +1,71 @@ +{ + "signatures": [ + { + "keyid": "74b58be26a6ff00ab2eec9b14da29038591a69c212223033f4efdf24489913f2", + "sig": "d0283ac0653e324ce132e47a518f8a1539b59430efe5cdec58ec53f824bec28628b57dd5fb2452bde83fc8f5d11ab0b7350a9bbcbefc7acc6c447785545fa1e36f1352c9e20dd1ebcc3ab16a2a7ff702e32e481ceba88e0f348dc2cddd26ca577445d00c7194e8656d901fd2382c479555af93a64eef48cf79cdff6ecdcd7cb7" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2030-08-15T14:30:45.0000001Z", + "keys": { + "142919f8e933d7045abff3be450070057814da36331d7a22ccade8b35a9e3946": { + "keytype": "rsa", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMIGeMA0GCSqGSIb3DQEBAQUAA4GMADCBiAKBgHXjYnWGuCIOh5T3XGmgG/RsXWHP\nTbyu7OImP6O+uHg8hui8C1nY/mcJdFdxqgl1vKEco/Nwebh2T8L6XbNfcgV9VVst\nWpeCalZYWi55lZSLe9KixQIAyg15rNdhN9pcD3OuLmFvslgTx+dTbZ3ZoYMbcb4C\n5yqvqzcOoCTQMeWbAgMBAAE=\n-----END PUBLIC KEY-----\n" + }, + "scheme": "rsassa-pss-sha256" + }, + "282612f348dcd7fe3f19e0f890e89fad48d45335deeb91deef92873934e6fe6d": { + "keytype": "rsa", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjm6HPktvTGsygQ8Gvmu+zydTN\ne1zqoxLxV7mVRbmsCI4kn7JTHc4fmWZwvo7f/Wbto6Xj5HqGJFSlYIGZuTwZqPg3\nw8wqv8cuPxbmsFSxMoHfzBBIuJe0FlwXFysojbdhrSUqNL84tlwTFXEhePYrpTNM\nDn+9T55B0WJYT/VPxwIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "scheme": "rsassa-pss-sha256" + }, + "74b58be26a6ff00ab2eec9b14da29038591a69c212223033f4efdf24489913f2": { + "keytype": "rsa", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDydf/VEpxBOCDoxpM6IVhq9i67\nP9BiVv2zwZSUO/M0RTToAvFvNgDKXwtnp8LyjVk++wMA1aceMa+pS7vYrKvPIJa7\nWIT+mwy86/fIdnllJDMw5tmLr2mE3oBMxOhpEiD2tO+liGacklFNk6nHHorX9S91\niqpdRVa3zJw5ALvLdwIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "scheme": "rsassa-pss-sha256" + }, + "8a14f637b21578cc292a67899df0e46cc160d7fd56e9beae898adb666f4fd9d6": { + "keytype": "rsa", + "keyval": { + "public": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCPQoHresXRRRGoinN3bNn+BI23\nKolXdXLGqYkTvr9AjemUQJxbqmvZXHboQMAYw8OuBrRNt5Fz20wjsrJwOBEU5U3n\nHSJI4zYPGckYci0/0Eo2Kjws5BmIj38qgIfhsH4zyZ4FZZ+GLRn+W3i3wl6SfRMC\n/HCg0DDwi75faC0vGQIDAQAB\n-----END PUBLIC KEY-----\n" + }, + "scheme": "rsassa-pss-sha256" + } + }, + "roles": { + "root": { + "keyids": [ + "74b58be26a6ff00ab2eec9b14da29038591a69c212223033f4efdf24489913f2" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "8a14f637b21578cc292a67899df0e46cc160d7fd56e9beae898adb666f4fd9d6" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "282612f348dcd7fe3f19e0f890e89fad48d45335deeb91deef92873934e6fe6d" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "142919f8e933d7045abff3be450070057814da36331d7a22ccade8b35a9e3946" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.31", + "version": 1 + } +} \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/snapshot.json b/testutils/repository_data/repository/metadata/snapshot.json new file mode 100644 index 00000000..28429701 --- /dev/null +++ b/testutils/repository_data/repository/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "8a14f637b21578cc292a67899df0e46cc160d7fd56e9beae898adb666f4fd9d6", + "sig": "50d814131d3aace838af726f13a6b4431f78c086b58817f3208d73fe174fe00a4729ad796888bab86ee0cd0cc5746fd8379327e65cd317c4a5f769bf29028bcae1a5bc95a21b15f86a54ba05c3443503037c2c90062825b8a193896814acb67ee000f5816c70f23867686604820efd48ee9d643d1354897c654075076b27ee27" + } + ], + "signed": { + "_type": "snapshot", + "expires": "2030-08-15T14:30:45.0000001Z", + "meta": { + "targets.json": { + "version": 1 + } + }, + "spec_version": "1.0.31", + "version": 1 + } +} \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/targets.json b/testutils/repository_data/repository/metadata/targets.json new file mode 100644 index 00000000..f1e50bee --- /dev/null +++ b/testutils/repository_data/repository/metadata/targets.json @@ -0,0 +1,22 @@ +{ + "signatures": [ + { + "keyid": "282612f348dcd7fe3f19e0f890e89fad48d45335deeb91deef92873934e6fe6d", + "sig": "6cffed26499edcb7ee99e885675c3d9c9570d93b78ecba23f71c791dc8cc171db925e2d2105fbb4167e52b947ed08f1441ce536dccd2535957200be63735a2286784d1005d55216b4b1aa6fd0af767d1f003545c1e44ac5208ff592699e8bb36f9c74c8f90cea1893c94f975f78d058f00c97f6fef7b5aed66402cd6e71853d6" + } + ], + "signed": { + "_type": "targets", + "expires": "2030-08-15T14:30:45.0000001Z", + "spec_version": "1.0.31", + "targets": { + "metadata_api_test.go": { + "hashes": { + "sha256": "232ba4f8db1c6e83472f5457a81d9ea03f2db8686dc36161a42e6c809a0a449a" + }, + "length": 19564 + } + }, + "version": 1 + } +} \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/timestamp.json b/testutils/repository_data/repository/metadata/timestamp.json new file mode 100644 index 00000000..aa11c742 --- /dev/null +++ b/testutils/repository_data/repository/metadata/timestamp.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "142919f8e933d7045abff3be450070057814da36331d7a22ccade8b35a9e3946", + "sig": "639c9ce3dbb705265b5e9ad6d67fea2b38780c48ff7917e372adace8e50a7a2f054383d5960457a113059be521b8ce7e6d8a5787c600c4850b8c0ed1ae17a931a6bfe794476e7824c6f53df5232561e0a2e146b11dde7889b397c6f8136e2105bbb21b4b59b5addc032a0e755d97e531255f3b458d474184168541e542626e81" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2030-08-15T14:30:45.0000001Z", + "meta": { + "snapshot.json": { + "version": 1 + } + }, + "spec_version": "1.0.31", + "version": 1 + } +} \ No newline at end of file diff --git a/testutils/testutils/setup.go b/testutils/testutils/setup.go new file mode 100644 index 00000000..ea51d499 --- /dev/null +++ b/testutils/testutils/setup.go @@ -0,0 +1,96 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package testutils + +import ( + "fmt" + "os" + "path/filepath" + + log "github.com/sirupsen/logrus" +) + +var ( + TempDir string + RepoDir string + KeystoreDir string +) + +func SetupTestDirs() error { + tmp := os.TempDir() + var err error + TempDir, err = os.MkdirTemp(tmp, "0750") + if err != nil { + log.Fatal("failed to create temporary directory: ", err) + return err + } + + RepoDir = fmt.Sprintf("%s/repository_data/repository", TempDir) + absPath, err := filepath.Abs("../testutils/repository_data/repository/metadata") + if err != nil { + log.Debugf("failed to get absolute path: %v", err) + } + err = Copy(absPath, RepoDir) + if err != nil { + log.Debugf("failed to copy metadata to %s: %v", RepoDir, err) + return err + } + + KeystoreDir = fmt.Sprintf("%s/keystore", TempDir) + err = os.Mkdir(KeystoreDir, 0750) + if err != nil { + log.Debugf("failed to create keystore dir %s: %v", KeystoreDir, err) + } + absPath, err = filepath.Abs("../testutils/repository_data/keystore") + if err != nil { + log.Debugf("failed to get absolute path: %v", err) + } + err = Copy(absPath, KeystoreDir) + if err != nil { + log.Debugf("failed to copy keystore to %s: %v", KeystoreDir, err) + return err + } + + return nil +} + +func Copy(fromPath string, toPath string) error { + err := os.MkdirAll(toPath, 0750) + if err != nil { + log.Debugf("failed to create directory %s: %v", toPath, err) + } + files, err := os.ReadDir(fromPath) + if err != nil { + log.Debugf("failed to read path %s: %v", fromPath, err) + return err + } + for _, file := range files { + data, err := os.ReadFile(fmt.Sprintf("%s/%s", fromPath, file.Name())) + if err != nil { + log.Debugf("failed to read file %s: %v", file.Name(), err) + } + filePath := fmt.Sprintf("%s/%s", toPath, file.Name()) + err = os.WriteFile(filePath, data, 0750) + if err != nil { + log.Debugf("failed to write file %s: %v", filePath, err) + } + } + return nil +} + +func Cleanup() { + log.Printf("cleaning temporary directory: %s\n", TempDir) + err := os.RemoveAll(TempDir) + if err != nil { + log.Fatalf("failed to cleanup test directories: %v", err) + } +} From bc83b5ebdea9cf09c07b0feeb0f0fc1b732eb432 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 25 Jul 2023 12:48:56 +0300 Subject: [PATCH 163/208] chore: add govulncheck and bump Go to 1.20 Signed-off-by: Radoslav Dimitrov --- .github/workflows/tests.yml | 10 +++++++--- go.mod | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 45e0fa17..11fbdde0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,12 +50,11 @@ jobs: - name: Run all examples # not exactly right to test functionality in such a way but it does act as a set of end to end test cases for the time being, nevertheless should be updated run: make example-all - golangci: + checks: strategy: matrix: go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} - os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest needs: get-go-versions steps: - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f @@ -67,3 +66,8 @@ jobs: with: version: v1.51 # has to be pinned and thus manually updated due to https://github.com/golangci/golangci-lint-action/blob/6a290f7d5d488e1e423b0b37fe802c822ca2c08c/README.md?plain=1#L108 args: --timeout 5m --verbose + - name: govulncheck + uses: golang/govulncheck-action@v1 + with: + go-version-input: ${{ matrix.go-version }} + go-package: ./... diff --git a/go.mod b/go.mod index 9b7ad1e2..690a9662 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rdimitrov/go-tuf-metadata -go 1.19 +go 1.20 require ( github.com/secure-systems-lab/go-securesystemslib v0.7.0 From 9e638c5c8f82c2837370c433ad5ee12fd51f3a4a Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 18 Aug 2023 15:11:56 +0300 Subject: [PATCH 164/208] test: regenerate multirepo metadata Signed-off-by: Radoslav Dimitrov --- examples/multirepo/client/root.json | 40 +++++++++---------- .../multirepo/repository/metadata/1.root.json | 40 +++++++++---------- .../repository/metadata/1.snapshot.json | 16 ++++---- .../repository/metadata/1.targets.json | 16 ++++---- .../repository/metadata/timestamp.json | 16 ++++---- 5 files changed, 64 insertions(+), 64 deletions(-) diff --git a/examples/multirepo/client/root.json b/examples/multirepo/client/root.json index 77da9e7f..f5da92b8 100644 --- a/examples/multirepo/client/root.json +++ b/examples/multirepo/client/root.json @@ -1,34 +1,40 @@ { + "signatures": [ + { + "keyid": "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff", + "sig": "e69eb6108348f0e0f5f1a12d611f6ed44929b5bce13a656396467762d2e17a9111a18ff0e3e3874e5792122f0b5bb203213a0cd9823686c87d3e7216bcfb7e04" + } + ], "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-06-06T11:12:34.649455Z", + "expires": "2024-08-17T12:10:30.266622Z", "keys": { - "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c": { + "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5": { "keytype": "ed25519", "keyval": { - "public": "4e10fe156f07e6f6e1f6fb1579105b7d3e62790b6a62dbf7727b91f82d2bc9db" + "public": "b96632c3a1d1189f0016d524ddddac75369c0ed17ab1fe604c3b5d3e42b2fba2" }, "scheme": "ed25519" }, - "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255": { + "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a": { "keytype": "ed25519", "keyval": { - "public": "23e5dc4eb18d5c116e76a92b02e44a7d7279622574457050b85fb8fd9260422c" + "public": "c857d5a73656c36d99f7c1a82d6684f83e0ca45abbf4d109621f38a87f9f4f83" }, "scheme": "ed25519" }, - "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba": { + "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9": { "keytype": "ed25519", "keyval": { - "public": "1603f99998ca46c35c238a2c1a2a015e0f32b38771e4fa5401348ce0a677d63f" + "public": "7866eef4cdf2b2bf7c0fd1c44ab79f9eb96d1c667c818951ba755c5533f80036" }, "scheme": "ed25519" }, - "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7": { + "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff": { "keytype": "ed25519", "keyval": { - "public": "17454b5e7a6594e7f00ceadda10d0267b94d0118b82f541f4f69f0d327c5a41a" + "public": "14dbeaeaf0bbc3e2b2f45e7fe3bb3a7e6d4bc26517ee96e6066e436a7b88ed51" }, "scheme": "ed25519" } @@ -36,36 +42,30 @@ "roles": { "root": { "keyids": [ - "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7" + "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff" ], "threshold": 1 }, "snapshot": { "keyids": [ - "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba" + "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5" ], "threshold": 1 }, "targets": { "keyids": [ - "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255" + "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9" ], "threshold": 1 }, "timestamp": { "keyids": [ - "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c" + "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a" ], "threshold": 1 } }, "spec_version": "1.0.31", "version": 1 - }, - "signatures": [ - { - "keyid": "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7", - "sig": "699654ed56ea398b16d1d3cdfeeed5edc9e7f03199f9e5a1eba3491d139f32f22043fdde4bd2eaa4914449ecc6ab27aef0655e487ca50fc1cf3f9e1f8f3ea906" - } - ] + } } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.root.json b/examples/multirepo/repository/metadata/1.root.json index 77da9e7f..f5da92b8 100644 --- a/examples/multirepo/repository/metadata/1.root.json +++ b/examples/multirepo/repository/metadata/1.root.json @@ -1,34 +1,40 @@ { + "signatures": [ + { + "keyid": "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff", + "sig": "e69eb6108348f0e0f5f1a12d611f6ed44929b5bce13a656396467762d2e17a9111a18ff0e3e3874e5792122f0b5bb203213a0cd9823686c87d3e7216bcfb7e04" + } + ], "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-06-06T11:12:34.649455Z", + "expires": "2024-08-17T12:10:30.266622Z", "keys": { - "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c": { + "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5": { "keytype": "ed25519", "keyval": { - "public": "4e10fe156f07e6f6e1f6fb1579105b7d3e62790b6a62dbf7727b91f82d2bc9db" + "public": "b96632c3a1d1189f0016d524ddddac75369c0ed17ab1fe604c3b5d3e42b2fba2" }, "scheme": "ed25519" }, - "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255": { + "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a": { "keytype": "ed25519", "keyval": { - "public": "23e5dc4eb18d5c116e76a92b02e44a7d7279622574457050b85fb8fd9260422c" + "public": "c857d5a73656c36d99f7c1a82d6684f83e0ca45abbf4d109621f38a87f9f4f83" }, "scheme": "ed25519" }, - "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba": { + "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9": { "keytype": "ed25519", "keyval": { - "public": "1603f99998ca46c35c238a2c1a2a015e0f32b38771e4fa5401348ce0a677d63f" + "public": "7866eef4cdf2b2bf7c0fd1c44ab79f9eb96d1c667c818951ba755c5533f80036" }, "scheme": "ed25519" }, - "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7": { + "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff": { "keytype": "ed25519", "keyval": { - "public": "17454b5e7a6594e7f00ceadda10d0267b94d0118b82f541f4f69f0d327c5a41a" + "public": "14dbeaeaf0bbc3e2b2f45e7fe3bb3a7e6d4bc26517ee96e6066e436a7b88ed51" }, "scheme": "ed25519" } @@ -36,36 +42,30 @@ "roles": { "root": { "keyids": [ - "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7" + "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff" ], "threshold": 1 }, "snapshot": { "keyids": [ - "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba" + "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5" ], "threshold": 1 }, "targets": { "keyids": [ - "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255" + "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9" ], "threshold": 1 }, "timestamp": { "keyids": [ - "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c" + "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a" ], "threshold": 1 } }, "spec_version": "1.0.31", "version": 1 - }, - "signatures": [ - { - "keyid": "d5fa855fce82db75ec64283e828cc90517df5edf5cdc57e7958a890d6556f5b7", - "sig": "699654ed56ea398b16d1d3cdfeeed5edc9e7f03199f9e5a1eba3491d139f32f22043fdde4bd2eaa4914449ecc6ab27aef0655e487ca50fc1cf3f9e1f8f3ea906" - } - ] + } } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.snapshot.json b/examples/multirepo/repository/metadata/1.snapshot.json index a8d51ddc..b7f1c270 100644 --- a/examples/multirepo/repository/metadata/1.snapshot.json +++ b/examples/multirepo/repository/metadata/1.snapshot.json @@ -1,7 +1,13 @@ { + "signatures": [ + { + "keyid": "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5", + "sig": "700a65bb8d85965a64df3bd7f6563bc9ff8bdcd1a636fe6f7e90c85536000af70e918a8d4cecbf01f67bcaab04858b2fb144068479dbdf0b01c8fbc7492abc06" + } + ], "signed": { "_type": "snapshot", - "expires": "2024-06-06T11:12:34.649453Z", + "expires": "2024-08-17T12:10:30.266619Z", "meta": { "targets.json": { "version": 1 @@ -9,11 +15,5 @@ }, "spec_version": "1.0.31", "version": 1 - }, - "signatures": [ - { - "keyid": "700464ea12f4cb5f06a7512c75b73c0b6eeb2cd42854b085eed5b3c993607cba", - "sig": "56c0125cb1897e23014cd6be60b756536ca0aacf299d155bd39849b5f43aa5c22730eeb90c6c36659678253ab43b2ce34f8d73b93f8d40176941dc57bff1420a" - } - ] + } } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/1.targets.json b/examples/multirepo/repository/metadata/1.targets.json index cd23240a..b2de6f74 100644 --- a/examples/multirepo/repository/metadata/1.targets.json +++ b/examples/multirepo/repository/metadata/1.targets.json @@ -1,7 +1,13 @@ { + "signatures": [ + { + "keyid": "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9", + "sig": "61a928faa8a9b5e20141b6af40cd54974a855b5f1054b876046bfaf1c3391f8e974396df2c1433581adbbb072be763908f4269b67f9ecbf92c6c13eb02e4520e" + } + ], "signed": { "_type": "targets", - "expires": "2023-08-06T11:12:34.64229Z", + "expires": "2023-10-17T12:10:30.26106Z", "spec_version": "1.0.31", "targets": { "map.json": { @@ -24,11 +30,5 @@ } }, "version": 1 - }, - "signatures": [ - { - "keyid": "409fb816e403e0c00646665eac21cb8adfab8e318272ca7589b2d1fc0bccb255", - "sig": "0d98c104942b74b7ec0720451ee113ffa5604a1090b0c862660f9deb25bd1d923accb8205772b392cc0d2866c1b303a2830e918fdbc8c00441e70e66445cd90b" - } - ] + } } \ No newline at end of file diff --git a/examples/multirepo/repository/metadata/timestamp.json b/examples/multirepo/repository/metadata/timestamp.json index 694a13ea..0f6fad5b 100644 --- a/examples/multirepo/repository/metadata/timestamp.json +++ b/examples/multirepo/repository/metadata/timestamp.json @@ -1,7 +1,13 @@ { + "signatures": [ + { + "keyid": "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a", + "sig": "b43a3649fa12d1c9e3c8e501c4af2c7a3ec1b87d097abd64f86f5d5dc85493e33467c80388bbd168a48cd8bec42701eab64667950d7f7211bab97b5d77956b0b" + } + ], "signed": { "_type": "timestamp", - "expires": "2024-06-06T11:12:34.649455Z", + "expires": "2024-08-17T12:10:30.266621Z", "meta": { "snapshot.json": { "version": 1 @@ -9,11 +15,5 @@ }, "spec_version": "1.0.31", "version": 1 - }, - "signatures": [ - { - "keyid": "0a5842e65e9c8c428354f40708435de6793ac379a275effe40d6358be2de835c", - "sig": "c9a551e1de0b3753e93bdd176d172239cb33997281446d205f03293ecdd092b2e223a0b5e925e7188786011ee02950c095a44c53004711adf7b8e0340e70bb05" - } - ] + } } \ No newline at end of file From a3ae2f89469ff6d6e417d52c31546f6e37c519ea Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 18 Aug 2023 15:58:20 +0300 Subject: [PATCH 165/208] ci: separate examples from test workflows Signed-off-by: Radoslav Dimitrov --- .github/workflows/ci.yml | 2 + .github/workflows/examples.yml | 103 +++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 5 +- 3 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/examples.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a771d506..6ce9aab9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,3 +19,5 @@ name: CI jobs: tests: uses: ./.github/workflows/tests.yml + examples: + uses: ./.github/workflows/examples.yml diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml new file mode 100644 index 00000000..3e367dd5 --- /dev/null +++ b/.github/workflows/examples.yml @@ -0,0 +1,103 @@ +# Copyright 2022-2023 VMware, Inc. +# +# This product is licensed to you under the BSD-2 license (the "License"). +# You may not use this product except in compliance with the BSD-2 License. +# This product may include a number of subcomponents with separate copyright +# notices and license terms. Your use of these subcomponents is subject to +# the terms and conditions of the subcomponent's license, as noted in the +# LICENSE file. +# +# SPDX-License-Identifier: BSD-2-Clause +on: + workflow_call: +name: Examples # not exactly right to test functionality in such a way but it does act as a set of end to end test cases for the time being, nevertheless should be updated +jobs: + get-go-versions: + name: Collect available Go versions + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.versions.outputs.matrix }} + steps: + - uses: actions/checkout@v3 + - uses: arnested/go-version-action@b556f8d91b644164318c709d28b9083eaf0c064d + id: versions + client: + strategy: + fail-fast: false # Keep running if one leg fails. + matrix: + os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources + go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} + runs-on: ${{ matrix.os }} + needs: get-go-versions + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Setup - Go ${{ matrix.go-version }} + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version: ${{ matrix.go-version }} + - run: make example-client + repository: + strategy: + fail-fast: false # Keep running if one leg fails. + matrix: + os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources + go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} + runs-on: ${{ matrix.os }} + needs: get-go-versions + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Setup - Go ${{ matrix.go-version }} + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version: ${{ matrix.go-version }} + - run: make example-repository + multirepo: + strategy: + fail-fast: false # Keep running if one leg fails. + matrix: + os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources + go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} + runs-on: ${{ matrix.os }} + needs: get-go-versions + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Setup - Go ${{ matrix.go-version }} + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version: ${{ matrix.go-version }} + - run: make example-multirepo + tuf-client-cli: + strategy: + fail-fast: false # Keep running if one leg fails. + matrix: + os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources + go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} + runs-on: ${{ matrix.os }} + needs: get-go-versions + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Setup - Go ${{ matrix.go-version }} + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version: ${{ matrix.go-version }} + - run: make example-tuf-client-cli + root-signing: + strategy: + fail-fast: false # Keep running if one leg fails. + matrix: + os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources + go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} + runs-on: ${{ matrix.os }} + needs: get-go-versions + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Setup - Go ${{ matrix.go-version }} + uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version: ${{ matrix.go-version }} + - run: make example-root-signing diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 11fbdde0..cfce057c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,6 +23,7 @@ jobs: id: versions run: + name: Run strategy: fail-fast: false # Keep running if one leg fails. matrix: @@ -47,10 +48,8 @@ jobs: with: flags: Go-${{ matrix.go-version }} - - name: Run all examples # not exactly right to test functionality in such a way but it does act as a set of end to end test cases for the time being, nevertheless should be updated - run: make example-all - checks: + name: Checks and linters strategy: matrix: go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} From 9a9f4858b266b8d1085fbc72f926a03351a8b2c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:01:38 +0300 Subject: [PATCH 166/208] chore(deps): bump golang.org/x/crypto from 0.11.0 to 0.12.0 (#53) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.11.0 to 0.12.0. - [Commits](https://github.com/golang/crypto/compare/v0.11.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 690a9662..da53be57 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,9 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.11.0 + golang.org/x/crypto v0.12.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a + golang.org/x/sys v0.11.0 ) require ( @@ -25,9 +26,8 @@ require ( github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.11.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect diff --git a/go.sum b/go.sum index c3029683..bb7ebc8b 100644 --- a/go.sum +++ b/go.sum @@ -61,19 +61,19 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= From 55ff0592d73d4cd7ae6c721cd12ab99bcd53a12b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:06:56 +0300 Subject: [PATCH 167/208] chore(deps): bump github.com/sigstore/sigstore from 1.7.1 to 1.7.2 (#55) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.7.1 to 1.7.2. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.7.1...v1.7.2) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index da53be57..ebf2f61b 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/secure-systems-lab/go-securesystemslib v0.7.0 - github.com/sigstore/sigstore v1.7.1 + github.com/sigstore/sigstore v1.7.2 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 @@ -25,12 +25,12 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.11.0 // indirect + golang.org/x/net v0.12.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index bb7ebc8b..496e7723 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/sigstore/sigstore v1.7.1 h1:fCATemikcBK0cG4+NcM940MfoIgmioY1vC6E66hXxks= -github.com/sigstore/sigstore v1.7.1/go.mod h1:0PmMzfJP2Y9+lugD0wer4e7TihR5tM7NcIs3bQNk5xg= +github.com/sigstore/sigstore v1.7.2 h1:MY0wSOhKWa8SIWSCO9SzFnUl+b7jbthgXHJpuUg31Qs= +github.com/sigstore/sigstore v1.7.2/go.mod h1:2IPD5YXrXoznfnIoVsDF7ARC1Nha8xIdLpsC4kEQh5w= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -65,8 +65,8 @@ golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -81,8 +81,8 @@ google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 91d84358f4d464a81d5ed975818b69315a91d500 Mon Sep 17 00:00:00 2001 From: Ivana Atanasova Date: Sat, 19 Aug 2023 01:14:36 +0300 Subject: [PATCH 168/208] Metadata tests followup (#54) * Fix AddKey for targets Previously Targets' `AddKey(key, role)` was returning error that role doesn't exist in the case when role exists and already has that key. This change fixes that and alligns the function with the python-tuf reference implementation, where the key is added to delegations, even if it's not added to Roles and SuccinctRoles Signed-off-by: Ivana Atanasova * Fix delegated path prefix check Previously the target file path hash was not base64 URL encoded which ended up to not being able to properly compare if role's PathHashPrefixes contains a prefix of that hash. This change fixes the encoding Signed-off-by: Ivana Atanasova * Add SuccinctRoles.GetSuffixLen() for the purpose of testing This allows testing if the suffix len is properly calculated in the metadata Signed-off-by: Ivana Atanasova * Add test repository data improvements This change changes the targets files used for targets metadata to be simplified and neutral for the purpose of more clear and less mistake-prone test cases. It also adds new keys for additional metadata api testing Signed-off-by: Ivana Atanasova * Add more metadata api tests This change completes the metadata api test coverage with reference to the python-tuf implementations, excluding few use- cases that are not applicable Signed-off-by: Ivana Atanasova * Fix go linter checks for metadata api tests This fixes few error checks that were not handled in the metadata api tests Signed-off-by: Ivana Atanasova * Improve metadata hepler test functions usage This change provides tiny updates of two metalada helper functions to giarantee more stable testing over time Signed-off-by: Ivana Atanasova --------- Signed-off-by: Ivana Atanasova --- metadata/metadata.go | 24 +- metadata/metadata_api_test.go | 554 +++++++++++++++++- metadata/metadata_test.go | 8 +- testutils/repository_data/keystore/root_key2 | 15 + .../repository_data/keystore/root_key2.pub | 6 + .../repository/metadata/targets.json | 36 +- .../repository/metadata/timestamp.json | 6 +- .../repository/targets/file1.txt | 1 + .../repository/targets/file2.txt | 1 + .../repository/targets/file3.txt | 1 + testutils/testutils/setup.go | 12 + 11 files changed, 647 insertions(+), 17 deletions(-) create mode 100644 testutils/repository_data/keystore/root_key2 create mode 100644 testutils/repository_data/keystore/root_key2.pub create mode 100644 testutils/repository_data/repository/targets/file1.txt create mode 100644 testutils/repository_data/repository/targets/file2.txt create mode 100644 testutils/repository_data/repository/targets/file3.txt diff --git a/metadata/metadata.go b/metadata/metadata.go index 84573142..a573151b 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -17,6 +17,7 @@ import ( "crypto/hmac" "crypto/sha256" "crypto/sha512" + "encoding/base64" "encoding/binary" "encoding/hex" "encoding/json" @@ -514,7 +515,7 @@ func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) // hash bin delegations - calculate the hash of the filepath to determine in which bin to find the target. targetFilepathHash := sha256.Sum256([]byte(targetFilepath)) for _, pathHashPrefix := range role.PathHashPrefixes { - if strings.HasPrefix(string(targetFilepathHash[:]), pathHashPrefix) { + if strings.HasPrefix(base64.URLEncoding.EncodeToString(targetFilepathHash[:]), pathHashPrefix) { return true, nil } } @@ -573,8 +574,7 @@ func (role *SuccinctRoles) GetRolesForTarget(targetFilepath string) map[string]b // GetRoles returns the names of all different delegated roles func (role *SuccinctRoles) GetRoles() []string { res := []string{} - numberOfBins := int(math.Pow(2, float64(role.BitLength))) - suffixLen := len(strconv.FormatInt(int64(numberOfBins-1), 16)) + suffixLen, numberOfBins := role.GetSuffixLen() for binNumber := 0; binNumber < numberOfBins; binNumber++ { suffix := fmt.Sprintf("%0*x", suffixLen, binNumber) @@ -583,11 +583,15 @@ func (role *SuccinctRoles) GetRoles() []string { return res } +func (role *SuccinctRoles) GetSuffixLen() (int, int) { + numberOfBins := int(math.Pow(2, float64(role.BitLength))) + return len(strconv.FormatInt(int64(numberOfBins-1), 16)), numberOfBins +} + // IsDelegatedRole returns whether the given roleName is in one of // the delegated roles that “SuccinctRoles“ represents func (role *SuccinctRoles) IsDelegatedRole(roleName string) bool { - numberOfBins := int64(math.Pow(2, float64(role.BitLength))) - suffixLen := len(strconv.FormatInt(int64(numberOfBins-1), 16)) + suffixLen, numberOfBins := role.GetSuffixLen() expectedPrefix := fmt.Sprintf("%s-", role.NamePrefix) @@ -609,7 +613,7 @@ func (role *SuccinctRoles) IsDelegatedRole(roleName string) bool { } // check if the bin we calculated is indeed within the range of what we support - return (value >= 0) && (value < numberOfBins) + return (value >= 0) && (value < int64(numberOfBins)) } // AddKey adds new signing key for delegated role "role" @@ -674,9 +678,11 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { // standard delegated roles if signed.Delegations.Roles != nil { // loop through all delegated roles + isDelegatedRole := false for i, d := range signed.Delegations.Roles { // if role is found if d.Name == role { + isDelegatedRole = true // add key if keyID is not already part of keyIDs for that role if !slices.Contains(d.KeyIDs, key.ID()) { signed.Delegations.Roles[i].KeyIDs = append(signed.Delegations.Roles[i].KeyIDs, key.ID()) @@ -686,6 +692,9 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { log.Debugf("Delegated role %s already has keyID %s", role, key.ID()) } } + if !isDelegatedRole { + return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} + } } else if signed.Delegations.SuccinctRoles != nil { // add key if keyID is not already part of keyIDs for the SuccinctRoles role if !slices.Contains(signed.Delegations.SuccinctRoles.KeyIDs, key.ID()) { @@ -696,7 +705,8 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { log.Debugf("SuccinctRoles role already has keyID %s", key.ID()) } - return ErrValue{Msg: fmt.Sprintf("delegated role %s doesn't exist", role)} + signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? + return nil } // RevokeKey revokes key from delegated role "role" and updates the delegations key store diff --git a/metadata/metadata_api_test.go b/metadata/metadata_api_test.go index 15544926..7452f876 100644 --- a/metadata/metadata_api_test.go +++ b/metadata/metadata_api_test.go @@ -14,10 +14,15 @@ package metadata import ( "bytes" "crypto" + "crypto/sha256" + "encoding/json" "fmt" "io/fs" "os" + "strconv" + "strings" "testing" + "time" testutils "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" "github.com/sigstore/sigstore/pkg/cryptoutils" @@ -340,7 +345,7 @@ func TestSignVerify(t *testing.T) { // Load sample metadata (targets) and assert ... targets, err := Targets().FromFile(testutils.RepoDir + "/targets.json") assert.NoError(t, err) - sig := getSignatureByKeyID(targets.Signatures, targetsKeyID) + sig, _ := getSignatureByKeyID(targets.Signatures, targetsKeyID) data, err := targets.Signed.MarshalJSON() assert.NoError(t, err) @@ -404,3 +409,550 @@ func TestSignVerify(t *testing.T) { err = targetsVerifier.VerifySignature(bytes.NewReader(timestampSig.Signature), bytes.NewReader(data)) assert.ErrorContains(t, err, "crypto/rsa: verification error") } + +func TestKeyVerifyFailures(t *testing.T) { + root, err := Root().FromFile(testutils.RepoDir + "/root.json") + assert.NoError(t, err) + + // Locate the timestamp public key we need from root + assert.NotEmpty(t, root.Signed.Roles[TIMESTAMP].KeyIDs) + timestampKeyID := root.Signed.Roles[TIMESTAMP].KeyIDs[0] + + // Load sample metadata (timestamp) + timestamp, err := Timestamp().FromFile(testutils.RepoDir + "/timestamp.json") + assert.NoError(t, err) + timestampSig, _ := getSignatureByKeyID(timestamp.Signatures, timestampKeyID) + data, err := timestamp.Signed.MarshalJSON() + assert.NoError(t, err) + + // Test failure on unknown type + // Originally this test should cover unknown scheme, + // but in our case scheme changes do not affect any + // further functionality + timestampKey := root.Signed.Keys[timestampKeyID] + ttype := timestampKey.Type + timestampKey.Type = "foo" + + timestampPublicKey, err := timestampKey.ToPublicKey() + assert.Error(t, err, "unsupported public key type") + timestampHash := crypto.SHA256 + timestampVerifier, err := signature.LoadVerifier(timestampPublicKey, timestampHash) + assert.Error(t, err, "unsupported public key type") + assert.Nil(t, timestampVerifier) + + timestampKey.Type = ttype + timestampPublicKey, err = timestampKey.ToPublicKey() + assert.NoError(t, err) + timestampHash = crypto.SHA256 + timestampVerifier, err = signature.LoadVerifier(timestampPublicKey, timestampHash) + assert.NoError(t, err) + err = timestampVerifier.VerifySignature(bytes.NewReader(timestampSig), bytes.NewReader(data)) + assert.NoError(t, err) + timestampKey.Type = ttype + + // Test failure on broken public key data + public := timestampKey.Value.PublicKey + timestampKey.Value.PublicKey = "ffff" + timestampBrokenPublicKey, err := timestampKey.ToPublicKey() + assert.ErrorContains(t, err, "PEM decoding failed") + timestampHash = crypto.SHA256 + timestampNilVerifier, err := signature.LoadVerifier(timestampBrokenPublicKey, timestampHash) + assert.ErrorContains(t, err, "unsupported public key type") + assert.Nil(t, timestampNilVerifier) + timestampKey.Value.PublicKey = public + + // Test failure with invalid signature + sigData := []byte("foo") + h32 := sha256.Sum256(sigData) + incorrectTimestampSig := h32[:] + err = timestampVerifier.VerifySignature(bytes.NewReader(incorrectTimestampSig), bytes.NewReader(data)) + assert.ErrorContains(t, err, "crypto/rsa: verification error") + + // Test failure with valid but incorrect signature + anotherSig := root.Signatures[0] + h32 = sha256.Sum256([]byte(anotherSig.Signature.String())) + incorrectValidTimestampSig := h32[:] + err = timestampVerifier.VerifySignature(bytes.NewReader(incorrectValidTimestampSig), bytes.NewReader(data)) + assert.ErrorContains(t, err, "crypto/rsa: verification error") +} + +func TestMetadataSignedIsExpired(t *testing.T) { + // Use of Snapshot is arbitrary, we're just testing the base class + // features with real data + snapshot, err := Snapshot().FromFile(testutils.RepoDir + "/snapshot.json") + assert.NoError(t, err) + assert.Equal(t, time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC), snapshot.Signed.Expires) + + // Test IsExpired with reference time provided + // In the Go implementation IsExpired tests >= rather than only >, + // which results in snapshot.Signed.Expires IsExpired check + // being false by default, so we skip the default assertion + isExpired := snapshot.Signed.IsExpired(snapshot.Signed.Expires.Add(time.Microsecond)) + assert.True(t, isExpired) + isExpired = snapshot.Signed.IsExpired(snapshot.Signed.Expires.Add(-time.Microsecond)) + assert.False(t, isExpired) +} + +func TestMetadataVerifyDelegate(t *testing.T) { + + root, err := Root().FromFile(fmt.Sprintf("%s/root.json", testutils.RepoDir)) + assert.NoError(t, err) + snapshot, err := Snapshot().FromFile(fmt.Sprintf("%s/snapshot.json", testutils.RepoDir)) + assert.NoError(t, err) + targets, err := Targets().FromFile(fmt.Sprintf("%s/targets.json", testutils.RepoDir)) + assert.NoError(t, err) + role1, err := Targets().FromFile(fmt.Sprintf("%s/role1.json", testutils.RepoDir)) + assert.NoError(t, err) + role2, err := Targets().FromFile(fmt.Sprintf("%s/role2.json", testutils.RepoDir)) + assert.NoError(t, err) + + // Test the expected delegation tree + err = root.VerifyDelegate(ROOT, root) + assert.NoError(t, err) + err = root.VerifyDelegate(SNAPSHOT, snapshot) + assert.NoError(t, err) + err = root.VerifyDelegate(TARGETS, targets) + assert.NoError(t, err) + err = targets.VerifyDelegate("role1", role1) + assert.NoError(t, err) + err = role1.VerifyDelegate("role2", role2) + assert.NoError(t, err) + + // Only root and targets can verify delegates + err = snapshot.VerifyDelegate(SNAPSHOT, snapshot) + assert.ErrorIs(t, err, ErrType{"call is valid only on delegator metadata (should be either root or targets)"}) + // Verify fails for roles that are not delegated by delegator + err = root.VerifyDelegate("role1", role1) + assert.ErrorIs(t, err, ErrValue{"no delegation found for role1"}) + err = targets.VerifyDelegate(TARGETS, targets) + assert.ErrorIs(t, err, ErrValue{"no delegation found for targets"}) + // Verify fails when delegator has no delegations + err = role2.VerifyDelegate("role1", role1) + assert.ErrorIs(t, err, ErrValue{"no delegations found"}) + + // Verify fails when delegate content is modified + expires := snapshot.Signed.Expires + snapshot.Signed.Expires = snapshot.Signed.Expires.Add(time.Hour * 24) + err = root.VerifyDelegate(SNAPSHOT, snapshot) + assert.ErrorIs(t, err, ErrUnsignedMetadata{"Verifying snapshot failed, not enough signatures, got 0, want 1"}) + snapshot.Signed.Expires = expires + + // Verify fails with verification error + // (in this case signature is malformed) + keyID := root.Signed.Roles[SNAPSHOT].KeyIDs[0] + goodSig, idx := getSignatureByKeyID(snapshot.Signatures, keyID) + assert.NotEmpty(t, goodSig) + snapshot.Signatures[idx].Signature = []byte("foo") + err = root.VerifyDelegate(SNAPSHOT, snapshot) + assert.ErrorIs(t, err, ErrUnsignedMetadata{"Verifying snapshot failed, not enough signatures, got 0, want 1"}) + snapshot.Signatures[idx].Signature = goodSig + + // Verify fails if roles keys do not sign the metadata + err = root.VerifyDelegate(TIMESTAMP, snapshot) + assert.ErrorIs(t, err, ErrUnsignedMetadata{"Verifying timestamp failed, not enough signatures, got 0, want 1"}) + + // Add a key to snapshot role, make sure the new sig fails to verify + tsKeyID := root.Signed.Roles[TIMESTAMP].KeyIDs[0] + err = root.Signed.AddKey(root.Signed.Keys[tsKeyID], SNAPSHOT) + assert.NoError(t, err) + newSig := Signature{ + KeyID: tsKeyID, + Signature: []byte(strings.Repeat("ff", 64)), + } + snapshot.Signatures = append(snapshot.Signatures, newSig) + + // Verify succeeds if threshold is reached even if some signatures + // fail to verify + err = root.VerifyDelegate(SNAPSHOT, snapshot) + assert.NoError(t, err) + + // Verify fails if threshold of signatures is not reached + root.Signed.Roles[SNAPSHOT].Threshold = 2 + err = root.VerifyDelegate(SNAPSHOT, snapshot) + assert.ErrorIs(t, err, ErrUnsignedMetadata{"Verifying snapshot failed, not enough signatures, got 1, want 2"}) + + // Verify succeeds when we correct the new signature and reach the + // threshold of 2 keys + signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/timestamp_key", crypto.SHA256, cryptoutils.SkipPassword) + assert.NoError(t, err) + _, err = snapshot.Sign(signer) + assert.NoError(t, err) + err = root.VerifyDelegate(SNAPSHOT, snapshot) + assert.NoError(t, err) +} + +func TestRootAddKeyAndRevokeKey(t *testing.T) { + root, err := Root().FromFile(fmt.Sprintf("%s/root.json", testutils.RepoDir)) + assert.NoError(t, err) + + // Create a new key + signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/root_key2", crypto.SHA256, cryptoutils.SkipPassword) + assert.NoError(t, err) + key, err := signer.PublicKey() + assert.NoError(t, err) + rootKey2, err := KeyFromPublicKey(key) + assert.NoError(t, err) + + // Assert that root does not contain the new key + assert.NotContains(t, root.Signed.Roles[ROOT].KeyIDs, rootKey2.id) + assert.NotContains(t, root.Signed.Keys, rootKey2.id) + + // Add new root key + err = root.Signed.AddKey(rootKey2, ROOT) + assert.NoError(t, err) + + // Assert that key is added + assert.Contains(t, root.Signed.Roles[ROOT].KeyIDs, rootKey2.id) + assert.Contains(t, root.Signed.Keys, rootKey2.id) + + // Confirm that the newly added key does not break + // the object serialization + _, err = root.Signed.MarshalJSON() + assert.NoError(t, err) + + // Try adding the same key again and assert its ignored. + preAddKeyIDs := make([]string, len(root.Signed.Roles[ROOT].KeyIDs)) + copy(preAddKeyIDs, root.Signed.Roles[ROOT].KeyIDs) + err = root.Signed.AddKey(rootKey2, ROOT) + assert.NoError(t, err) + assert.Equal(t, preAddKeyIDs, root.Signed.Roles[ROOT].KeyIDs) + + // Add the same key to targets role as well + err = root.Signed.AddKey(rootKey2, TARGETS) + assert.NoError(t, err) + + // Add the same key to a nonexistent role. + err = root.Signed.AddKey(rootKey2, "nosuchrole") + assert.ErrorIs(t, err, ErrValue{"role nosuchrole doesn't exist"}) + + // Remove the key from root role (targets role still uses it) + err = root.Signed.RevokeKey(rootKey2.id, ROOT) + assert.NoError(t, err) + assert.NotContains(t, root.Signed.Roles[ROOT].KeyIDs, rootKey2.id) + assert.Contains(t, root.Signed.Keys, rootKey2.id) + + // Remove the key from targets as well + err = root.Signed.RevokeKey(rootKey2.id, TARGETS) + assert.NoError(t, err) + assert.NotContains(t, root.Signed.Roles[ROOT].KeyIDs, rootKey2.id) + assert.NotContains(t, root.Signed.Keys, rootKey2.id) + + err = root.Signed.RevokeKey("nosuchkey", ROOT) + assert.ErrorIs(t, err, ErrValue{"key with id nosuchkey is not used by root"}) + err = root.Signed.RevokeKey(rootKey2.id, "nosuchrole") + assert.ErrorIs(t, err, ErrValue{"role nosuchrole doesn't exist"}) +} + +func TestTargetsKeyAPI(t *testing.T) { + targets, err := Targets().FromFile(fmt.Sprintf("%s/targets.json", testutils.RepoDir)) + assert.NoError(t, err) + + delegatedRole := DelegatedRole{ + Name: "role2", + Paths: []string{"fn3", "fn4"}, + KeyIDs: []string{}, + Terminating: false, + Threshold: 1, + } + targets.Signed.Delegations.Roles = append(targets.Signed.Delegations.Roles, delegatedRole) + + key := &Key{ + Type: "ed25519", + Value: KeyVal{PublicKey: "edcd0a32a07dce33f7c7873aaffbff36d20ea30787574ead335eefd337e4dacd"}, + Scheme: "ed25519", + } + + // Assert that delegated role "role1" does not contain the new key + assert.Equal(t, "role1", targets.Signed.Delegations.Roles[0].Name) + assert.NotContains(t, targets.Signed.Delegations.Roles[0].KeyIDs, key.id) + err = targets.Signed.AddKey(key, "role1") + assert.NoError(t, err) + + // Assert that the new key is added to the delegated role "role1" + assert.Contains(t, targets.Signed.Delegations.Roles[0].KeyIDs, key.id) + + // Try adding the same key again and assert its ignored. + pastKeyIDs := make([]string, len(targets.Signed.Delegations.Roles[0].KeyIDs)) + copy(pastKeyIDs, targets.Signed.Delegations.Roles[0].KeyIDs) + err = targets.Signed.AddKey(key, "role1") + assert.NoError(t, err) + assert.Equal(t, pastKeyIDs, targets.Signed.Delegations.Roles[0].KeyIDs) + + // Try adding a key to a delegated role that doesn't exists + err = targets.Signed.AddKey(key, "nosuchrole") + assert.ErrorIs(t, err, ErrValue{"delegated role nosuchrole doesn't exist"}) + + // Add the same key to "role2" as well + err = targets.Signed.AddKey(key, "role2") + assert.NoError(t, err) + + // Remove the key from "role1" role ("role2" still uses it) + err = targets.Signed.RevokeKey(key.id, "role1") + assert.NoError(t, err) + + // Assert that delegated role "role1" doesn't contain the key. + assert.Equal(t, "role1", targets.Signed.Delegations.Roles[0].Name) + assert.Equal(t, "role2", targets.Signed.Delegations.Roles[1].Name) + assert.NotContains(t, targets.Signed.Delegations.Roles[0].KeyIDs, key.id) + assert.Contains(t, targets.Signed.Delegations.Roles[1].KeyIDs, key.id) + + // Remove the key from "role2" as well + err = targets.Signed.RevokeKey(key.id, "role2") + assert.NoError(t, err) + assert.NotContains(t, targets.Signed.Delegations.Roles[1].KeyIDs, key.id) + + // Try remove key not used by "role1" + err = targets.Signed.RevokeKey(key.id, "role1") + assert.ErrorIs(t, err, ErrValue{fmt.Sprintf("key with id %s is not used by role1", key.id)}) + + // Try removing a key from delegated role that doesn't exists + err = targets.Signed.RevokeKey(key.id, "nosuchrole") + assert.ErrorIs(t, err, ErrValue{"delegated role nosuchrole doesn't exist"}) + + // Remove delegations as a whole + targets.Signed.Delegations = nil + + //Test that calling add_key and revoke_key throws an error + // and that delegations is still None after each of the api calls + err = targets.Signed.AddKey(key, "role1") + assert.ErrorIs(t, err, ErrValue{"delegated role role1 doesn't exist"}) + err = targets.Signed.RevokeKey(key.id, "role1") + assert.ErrorIs(t, err, ErrValue{"delegated role role1 doesn't exist"}) + assert.Nil(t, targets.Signed.Delegations) +} + +func TestTargetsKeyAPIWithSuccinctRoles(t *testing.T) { + targets, err := Targets().FromFile(testutils.RepoDir + "/targets.json") + assert.NoError(t, err) + + // Remove delegated roles + assert.NotNil(t, targets.Signed.Delegations) + assert.NotNil(t, targets.Signed.Delegations.Roles) + targets.Signed.Delegations.Roles = nil + targets.Signed.Delegations.Keys = map[string]*Key{} + + // Add succinct roles information + targets.Signed.Delegations.SuccinctRoles = &SuccinctRoles{ + KeyIDs: []string{}, + Threshold: 1, + BitLength: 8, + NamePrefix: "foo", + } + assert.Equal(t, 0, len(targets.Signed.Delegations.Keys)) + assert.Equal(t, 0, len(targets.Signed.Delegations.SuccinctRoles.KeyIDs)) + + // Add a key to succinct_roles and verify it's saved. + key := &Key{ + Type: "ed25519", + Value: KeyVal{PublicKey: "edcd0a32a07dce33f7c7873aaffbff36d20ea30787574ead335eefd337e4dacd"}, + Scheme: "ed25519", + } + err = targets.Signed.AddKey(key, "foo") + assert.NoError(t, err) + assert.Contains(t, targets.Signed.Delegations.Keys, key.id) + assert.Contains(t, targets.Signed.Delegations.SuccinctRoles.KeyIDs, key.id) + assert.Equal(t, 1, len(targets.Signed.Delegations.Keys)) + + // Try adding the same key again and verify that noting is added. + err = targets.Signed.AddKey(key, "foo") + assert.NoError(t, err) + assert.Equal(t, 1, len(targets.Signed.Delegations.Keys)) + + // Remove the key and verify it's not stored anymore. + err = targets.Signed.RevokeKey(key.id, "foo") + assert.NoError(t, err) + assert.NotContains(t, targets.Signed.Delegations.Keys, key.id) + assert.NotContains(t, targets.Signed.Delegations.SuccinctRoles.KeyIDs, key.id) + assert.Equal(t, 0, len(targets.Signed.Delegations.Keys)) + + // Try removing it again. + err = targets.Signed.RevokeKey(key.id, "foo") + assert.ErrorIs(t, err, ErrValue{fmt.Sprintf("key with id %s is not used by SuccinctRoles", key.id)}) +} + +func TestLengthAndHashValidation(t *testing.T) { + // Test metadata files' hash and length verification. + // Use timestamp to get a MetaFile object and snapshot + // for untrusted metadata file to verify. + + timestamp, err := Timestamp().FromFile(testutils.RepoDir + "/timestamp.json") + assert.NoError(t, err) + + snapshotMetafile := timestamp.Signed.Meta["snapshot.json"] + assert.NotNil(t, snapshotMetafile) + + data, err := os.ReadFile(testutils.RepoDir + "/snapshot.json") + assert.NoError(t, err) + err = snapshotMetafile.VerifyLengthHashes(data) + assert.NoError(t, err) + + // test exceptions + originalLength := snapshotMetafile.Length + snapshotMetafile.Length = 2345 + err = snapshotMetafile.VerifyLengthHashes(data) + assert.ErrorIs(t, err, ErrLengthOrHashMismatch{fmt.Sprintf("length verification failed - expected %d, got %d", 2345, originalLength)}) + + snapshotMetafile.Length = originalLength + originalHashSHA256 := snapshotMetafile.Hashes["sha256"] + snapshotMetafile.Hashes["sha256"] = []byte("incorrecthash") + err = snapshotMetafile.VerifyLengthHashes(data) + assert.ErrorIs(t, err, ErrLengthOrHashMismatch{"hash verification failed - mismatch for algorithm sha256"}) + + snapshotMetafile.Hashes["sha256"] = originalHashSHA256 + snapshotMetafile.Hashes["unsupported-alg"] = []byte("72c5cabeb3e8079545a5f4d2b067f8e35f18a0de3c2b00d3cb8d05919c19c72d") + err = snapshotMetafile.VerifyLengthHashes(data) + assert.ErrorIs(t, err, ErrLengthOrHashMismatch{"hash verification failed - unknown hashing algorithm - unsupported-alg"}) + + // test optional length and hashes + snapshotMetafile.Length = 0 + snapshotMetafile.Hashes = nil + err = snapshotMetafile.VerifyLengthHashes(data) + assert.NoError(t, err) + + // Test target files' hash and length verification + targets, err := Targets().FromFile(testutils.RepoDir + "/targets.json") + assert.NoError(t, err) + targetFile := targets.Signed.Targets["file1.txt"] + targetFileData, err := os.ReadFile(testutils.TargetsDir + "/" + targetFile.Path) + assert.NoError(t, err) + + // test exceptions + originalLength = targetFile.Length + targetFile.Length = 2345 + err = targetFile.VerifyLengthHashes(targetFileData) + assert.ErrorIs(t, err, ErrLengthOrHashMismatch{fmt.Sprintf("length verification failed - expected %d, got %d", 2345, originalLength)}) + + targetFile.Length = originalLength + targetFile.Hashes["sha256"] = []byte("incorrecthash") + err = targetFile.VerifyLengthHashes(targetFileData) + assert.ErrorIs(t, err, ErrLengthOrHashMismatch{"hash verification failed - mismatch for algorithm sha256"}) +} + +func TestTargetFileFromFile(t *testing.T) { + // Test with an existing file and valid hash algorithm + targetFileFromFile, err := TargetFile().FromFile(testutils.TargetsDir+"/file1.txt", "sha256") + assert.NoError(t, err) + targetFileData, err := os.ReadFile(testutils.TargetsDir + "/file1.txt") + assert.NoError(t, err) + err = targetFileFromFile.VerifyLengthHashes(targetFileData) + assert.NoError(t, err) + + // Test with mismatching target file data + mismatchingTargetFileData, err := os.ReadFile(testutils.TargetsDir + "/file2.txt") + assert.NoError(t, err) + err = targetFileFromFile.VerifyLengthHashes(mismatchingTargetFileData) + assert.ErrorIs(t, err, ErrLengthOrHashMismatch{"hash verification failed - mismatch for algorithm sha256"}) + + // Test with an unsupported algorithm + _, err = TargetFile().FromFile(testutils.TargetsDir+"/file1.txt", "123") + assert.ErrorIs(t, err, ErrValue{"failed generating TargetFile - unsupported hashing algorithm - 123"}) +} + +func TestTargetFileCustom(t *testing.T) { + // Test creating TargetFile and accessing custom. + targetFile := TargetFile() + customJSON := json.RawMessage([]byte(`{"foo":"bar"}`)) + targetFile.Custom = &customJSON + custom, err := targetFile.Custom.MarshalJSON() + assert.NoError(t, err) + assert.Equal(t, "{\"foo\":\"bar\"}", string(custom)) +} + +func TestTargetFileFromBytes(t *testing.T) { + data := []byte("Inline test content") + + // Test with a valid hash algorithm + targetFileFromData, err := TargetFile().FromBytes(testutils.TargetsDir+"/file1.txt", data, "sha256") + assert.NoError(t, err) + err = targetFileFromData.VerifyLengthHashes(data) + assert.NoError(t, err) + + // Test with no algorithms specified + targetFileFromDataWithNoAlg, err := TargetFile().FromBytes(testutils.TargetsDir+"/file1.txt", data) + assert.NoError(t, err) + err = targetFileFromDataWithNoAlg.VerifyLengthHashes(data) + assert.NoError(t, err) +} + +func TestIsDelegatedRole(t *testing.T) { + // Test path matches + role := &DelegatedRole{ + Name: "", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + Paths: []string{"a/path", "otherpath", "a/path", "*/?ath"}, + } + nonMatching, err := role.IsDelegatedPath("a/non-matching-path") + assert.NoError(t, err) + assert.False(t, nonMatching) + matching, err := role.IsDelegatedPath("a/path") + assert.NoError(t, err) + assert.True(t, matching) + + // Test path hash prefix matches: sha256 sum of "a/path" is 927b0ecf9... + role = &DelegatedRole{ + Name: "", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + PathHashPrefixes: []string{"knsOz5xYT", "other prefix", "knsOz5xYT", "knsOz", "kn"}, + } + nonMatching, err = role.IsDelegatedPath("a/non-matching-path") + assert.NoError(t, err) + assert.False(t, nonMatching) + matching, err = role.IsDelegatedPath("a/path") + assert.NoError(t, err) + assert.True(t, matching) +} + +func TestIsDelegatedRoleInSuccinctRoles(t *testing.T) { + succinctRoles := &SuccinctRoles{ + KeyIDs: []string{}, + Threshold: 1, + BitLength: 5, + NamePrefix: "bin", + } + + falseRoleNmaeExamples := []string{ + "foo", + "bin-", + "bin-s", + "bin-0t", + "bin-20", + "bin-100", + } + for _, roleName := range falseRoleNmaeExamples { + res := succinctRoles.IsDelegatedRole(roleName) + assert.False(t, res) + } + + // Delegated role name suffixes are in hex format. + trueNameExamples := []string{"bin-00", "bin-0f", "bin-1f"} + for _, roleName := range trueNameExamples { + res := succinctRoles.IsDelegatedRole(roleName) + assert.True(t, res) + } +} + +func TestGetRolesInSuccinctRoles(t *testing.T) { + succinctRoles := &SuccinctRoles{ + KeyIDs: []string{}, + Threshold: 1, + BitLength: 16, + NamePrefix: "bin", + } + // bin names are in hex format and 4 hex digits are enough to represent + // all bins between 0 and 2^16 - 1 meaning suffix_len must be 4 + expectedSuffixLength := 4 + suffixLen, _ := succinctRoles.GetSuffixLen() + assert.Equal(t, expectedSuffixLength, suffixLen) + + allRoles := succinctRoles.GetRoles() + for binNumer, roleName := range allRoles { + // This adds zero-padding if the bin_numer is represented by a hex + // number with a length less than expected_suffix_length. + expectedBinSuffix := fmt.Sprintf("%0"+strconv.Itoa(expectedSuffixLength)+"x", binNumer) + assert.Equal(t, fmt.Sprintf("bin-%s", expectedBinSuffix), roleName) + } +} diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index a92ac611..e581e479 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -29,13 +29,13 @@ const TEST_REPOSITORY_DATA = "../testutils/repository_data/repository/metadata" var fixedExpire = time.Date(2030, 8, 15, 14, 30, 45, 100, time.UTC) -func getSignatureByKeyID(signatures []Signature, keyID string) HexBytes { - for _, sig := range signatures { +func getSignatureByKeyID(signatures []Signature, keyID string) (HexBytes, int) { + for i, sig := range signatures { if sig.KeyID == keyID { - return sig.Signature + return sig.Signature, i } } - return []byte{} + return []byte{}, 0 } func TestDefaultValuesRoot(t *testing.T) { diff --git a/testutils/repository_data/keystore/root_key2 b/testutils/repository_data/keystore/root_key2 new file mode 100644 index 00000000..c2b5bdc1 --- /dev/null +++ b/testutils/repository_data/keystore/root_key2 @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXwIBAAKBgQC9sG1iNSW+JbnSuITAuWL46YphgqOXU3DhGZp2hM/1FaaRzLlR +HTyH7EvzbKqlaGBs9Caatx6KlN7e8J45vpLO1PkKnLOHdKBuy39Fzxw1dhxJWvTI +0mNDv68JbWxvgRxjEPE7wc24jYubovxiiBD8g2DbOnWEkyt7owECPRlXAwIDAQAB +AoGBAKquh54oqG9yTsRXF8y6g13p9oRLIpxVjmpduWkPlHe5JYpnphBguEitzKGa +k+oGA03GWr44K5kS33/HDvhyjHFXCqniittlVUwbaa4kbJiWi4lQ3K/m8F2DzHJP +s4YaqmzG30v9j9z3nOgLhM7iye65beala72zJnGOXivUAuhRAkEA3KnfY/SFjTbo +rsluVa03hC5KVQm/yDf4wShDnl8drYHnJ1XFkSC0UbBruRyu8JeWE93dAKu9IxdK +WEdHOtxR3wJBANwQwX/wPJ8/+yo4lToyUuN0omx94sK/JuRmvi9dzCbdfQbkgvDa +MEyWc0LNwxDBPYJ2bej/ORGmD+nOJo59h10CQQCCj/x+jvrKcFfCu6qOBRyZGC6h +HFCebgfAektwFIVh2T/lNUndsgUfZIyIjeEwt/Bzts2CDRuu/KPfkeUifaPvAkEA +m9iR8FTl2bGp4cCojcpNwR88V7DfAiP1GxNX5Jt8lJmOjW8O/BrI0bRKdCjb1+XB +9b6BH9x/QexkoKOJ0qc7UQJBAINLHep9QG2b3AEGZ692Z+iyU1Lub7rWNBKsmodh +0x9rwYs0D0EJo0BYozYhExz7ugaSzXW61H26IWbHtsg+5a0= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/testutils/repository_data/keystore/root_key2.pub b/testutils/repository_data/keystore/root_key2.pub new file mode 100644 index 00000000..4c8eb053 --- /dev/null +++ b/testutils/repository_data/keystore/root_key2.pub @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9sG1iNSW+JbnSuITAuWL46Yph +gqOXU3DhGZp2hM/1FaaRzLlRHTyH7EvzbKqlaGBs9Caatx6KlN7e8J45vpLO1PkK +nLOHdKBuy39Fzxw1dhxJWvTI0mNDv68JbWxvgRxjEPE7wc24jYubovxiiBD8g2Db +OnWEkyt7owECPRlXAwIDAQAB +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/testutils/repository_data/repository/metadata/targets.json b/testutils/repository_data/repository/metadata/targets.json index f1e50bee..41399c90 100644 --- a/testutils/repository_data/repository/metadata/targets.json +++ b/testutils/repository_data/repository/metadata/targets.json @@ -2,19 +2,47 @@ "signatures": [ { "keyid": "282612f348dcd7fe3f19e0f890e89fad48d45335deeb91deef92873934e6fe6d", - "sig": "6cffed26499edcb7ee99e885675c3d9c9570d93b78ecba23f71c791dc8cc171db925e2d2105fbb4167e52b947ed08f1441ce536dccd2535957200be63735a2286784d1005d55216b4b1aa6fd0af767d1f003545c1e44ac5208ff592699e8bb36f9c74c8f90cea1893c94f975f78d058f00c97f6fef7b5aed66402cd6e71853d6" + "sig": "80cd125a4b128c9508df8bc6f71ad2ed9896a9e7afccd53fca9e7dbc2f02db69c3ae712234d3730c929d891fa035bdf059736e7debf62cbac6f0e8d22ab0c5de3b3e47b249eb0d41dea66d9fda9588893cde824a95614129263b6fed72fafb21cd7114e603fe3a30e3871e9eb5b5029e3e9a8353190f1bcb332a81ec211a93eb" } ], "signed": { "_type": "targets", + "delegations": { + "keys": { + "c8022fa1e9b9cb239a6b362bbdffa9649e61ad2cb699d2e4bc4fdf7930a0e64a": { + "keyid_hash_algorithms": [ + "sha256", + "sha512" + ], + "keytype": "ed25519", + "keyval": { + "public": "fcf224e55fa226056adf113ef1eb3d55e308b75b321c8c8316999d8c4fd9e0d9" + }, + "scheme": "ed25519" + } + }, + "roles": [ + { + "keyids": [ + "c8022fa1e9b9cb239a6b362bbdffa9649e61ad2cb699d2e4bc4fdf7930a0e64a" + ], + "name": "role1", + "paths": [ + "file3.txt" + ], + "terminating": false, + "threshold": 1 + } + ] + }, "expires": "2030-08-15T14:30:45.0000001Z", "spec_version": "1.0.31", "targets": { - "metadata_api_test.go": { + "file1.txt": { "hashes": { - "sha256": "232ba4f8db1c6e83472f5457a81d9ea03f2db8686dc36161a42e6c809a0a449a" + "sha256": "65b8c67f51c993d898250f40aa57a317d854900b3a04895464313e48785440da" }, - "length": 19564 + "length": 31 } }, "version": 1 diff --git a/testutils/repository_data/repository/metadata/timestamp.json b/testutils/repository_data/repository/metadata/timestamp.json index aa11c742..439a6ac3 100644 --- a/testutils/repository_data/repository/metadata/timestamp.json +++ b/testutils/repository_data/repository/metadata/timestamp.json @@ -2,7 +2,7 @@ "signatures": [ { "keyid": "142919f8e933d7045abff3be450070057814da36331d7a22ccade8b35a9e3946", - "sig": "639c9ce3dbb705265b5e9ad6d67fea2b38780c48ff7917e372adace8e50a7a2f054383d5960457a113059be521b8ce7e6d8a5787c600c4850b8c0ed1ae17a931a6bfe794476e7824c6f53df5232561e0a2e146b11dde7889b397c6f8136e2105bbb21b4b59b5addc032a0e755d97e531255f3b458d474184168541e542626e81" + "sig": "33fed71cdc654c5863e8785d4ebd7b9bf60e6b13b3dfc98f98e360d425aea1cc211dc8eacba66ec50cba78d0a251295f219b17287e9566e693cbdde7084a8a0d3e731d88c97f2e8c1393be33a22d0f7b28ac8931511e5bc0a2c8c33e1a3854c4f41828c7f5b37757c8fa181273dab80c1ca29bb79c3c8d84d8233d837df4f20b" } ], "signed": { @@ -10,6 +10,10 @@ "expires": "2030-08-15T14:30:45.0000001Z", "meta": { "snapshot.json": { + "hashes": { + "sha256": "72c5cabeb3e8079545a5f4d2b067f8e35f18a0de3c2b00d3cb8d05919c19c72d" + }, + "length": 568, "version": 1 } }, diff --git a/testutils/repository_data/repository/targets/file1.txt b/testutils/repository_data/repository/targets/file1.txt new file mode 100644 index 00000000..7bf3499f --- /dev/null +++ b/testutils/repository_data/repository/targets/file1.txt @@ -0,0 +1 @@ +This is an example target file. \ No newline at end of file diff --git a/testutils/repository_data/repository/targets/file2.txt b/testutils/repository_data/repository/targets/file2.txt new file mode 100644 index 00000000..606f18ef --- /dev/null +++ b/testutils/repository_data/repository/targets/file2.txt @@ -0,0 +1 @@ +This is an another example target file. \ No newline at end of file diff --git a/testutils/repository_data/repository/targets/file3.txt b/testutils/repository_data/repository/targets/file3.txt new file mode 100644 index 00000000..60464604 --- /dev/null +++ b/testutils/repository_data/repository/targets/file3.txt @@ -0,0 +1 @@ +This is role1's target file. \ No newline at end of file diff --git a/testutils/testutils/setup.go b/testutils/testutils/setup.go index ea51d499..291059e1 100644 --- a/testutils/testutils/setup.go +++ b/testutils/testutils/setup.go @@ -22,6 +22,7 @@ import ( var ( TempDir string RepoDir string + TargetsDir string KeystoreDir string ) @@ -45,6 +46,17 @@ func SetupTestDirs() error { return err } + TargetsDir = fmt.Sprintf("%s/repository_data/repository/targets", TempDir) + targetsPath, err := filepath.Abs("../testutils/repository_data/repository/targets") + if err != nil { + log.Debugf("failed to get absolute targets path: %v", err) + } + err = Copy(targetsPath, TargetsDir) + if err != nil { + log.Debugf("failed to copy metadata to %s: %v", RepoDir, err) + return err + } + KeystoreDir = fmt.Sprintf("%s/keystore", TempDir) err = os.Mkdir(KeystoreDir, 0750) if err != nil { From eb58c30787ed7a78c41fb521ae83d210dcb9d5b0 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 23 Aug 2023 13:13:26 +0300 Subject: [PATCH 169/208] test: stop using succinct delegations in examples Signed-off-by: Radoslav Dimitrov --- Makefile | 4 ++-- examples/client/client_example.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0d6e17fc..4c2581dc 100644 --- a/Makefile +++ b/Makefile @@ -84,9 +84,9 @@ example-tuf-client-cli: build-tuf-client @echo "Initializing the following https://jku.github.io/tuf-demo/ TUF repository" @sleep 2 ./tuf-client init --url https://jku.github.io/tuf-demo/metadata - @echo "Downloading the following target file - demo/succinctly-delegated-5.txt" + @echo "Downloading the following target file - file1.txt" @sleep 2 - ./tuf-client get --url https://jku.github.io/tuf-demo/metadata --turl https://jku.github.io/tuf-demo/targets --nonprefixed demo/succinctly-delegated-5.txt + ./tuf-client get --url https://jku.github.io/tuf-demo/metadata --turl https://jku.github.io/tuf-demo/targets file1.txt # Target for demoing the tuf-client cli with root-signing repo .PHONY: example-root-signing diff --git a/examples/client/client_example.go b/examples/client/client_example.go index ccc17a0b..e9647056 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -29,7 +29,7 @@ import ( const ( metadataURL = "https://jku.github.io/tuf-demo/metadata" targetsURL = "https://jku.github.io/tuf-demo/targets" - targetName = "demo/succinctly-delegated-5.txt" + targetName = "file1.txt" verbosity = log.InfoLevel generateRandomFolder = false ) From f86ad4170721329f0f3320da9c9a76804acd8f1c Mon Sep 17 00:00:00 2001 From: Ivana Atanasova Date: Wed, 23 Aug 2023 16:56:58 +0300 Subject: [PATCH 170/208] Add trusted metadata set tests (#56) * Fix relative paths for testutils setup This change allows using the testutils setup across all packages, while previously it was using a correct path only for metadata Signed-off-by: Ivana Atanasova * Update snapshot meta files in test repo This change adds delegated roles to snapshot meta for testing trusted metadata and updates existing tests with the changes Signed-off-by: Ivana Atanasova * Add trusted metadata set tests This change adds test coverage of 92% for trusted metadata set corresponding to the python-tuf trusted metadata tests Signed-off-by: Ivana Atanasova --------- Signed-off-by: Ivana Atanasova --- metadata/metadata_api_test.go | 27 +- .../trustedmetadata/trustedmetadata_test.go | 673 ++++++++++++++++++ .../repository/metadata/snapshot.json | 8 +- .../repository/metadata/timestamp.json | 6 +- testutils/testutils/setup.go | 10 +- 5 files changed, 706 insertions(+), 18 deletions(-) create mode 100644 metadata/trustedmetadata/trustedmetadata_test.go diff --git a/metadata/metadata_api_test.go b/metadata/metadata_api_test.go index 7452f876..c836b621 100644 --- a/metadata/metadata_api_test.go +++ b/metadata/metadata_api_test.go @@ -34,7 +34,10 @@ import ( func TestMain(m *testing.M) { - err := testutils.SetupTestDirs() + repoPath := "../testutils/repository_data/repository/metadata" + targetsPath := "../testutils/repository_data/repository/targets" + keystorePath := "../testutils/repository_data/keystore" + err := testutils.SetupTestDirs(repoPath, targetsPath, keystorePath) defer testutils.Cleanup() if err != nil { @@ -283,14 +286,14 @@ func TestToFromBytes(t *testing.T) { // Case 1: test noncompact by overriding the default serializer. snapshotBytesWant, err := snapshot.ToBytes(true) assert.NoError(t, err) - assert.Equal(t, string(data), string(snapshotBytesWant)) + assert.Equal(t, data, snapshotBytesWant) // Case 2: test compact by using the default serializer. snapshot2, err := Snapshot().FromBytes(snapshotBytesWant) assert.NoError(t, err) snapshotBytesActual, err := snapshot2.ToBytes(true) assert.NoError(t, err) - assert.Equal(t, string(snapshotBytesWant), string(snapshotBytesActual)) + assert.Equal(t, snapshotBytesWant, snapshotBytesActual) // TARGETS data, err = os.ReadFile(testutils.RepoDir + "/targets.json") @@ -301,14 +304,14 @@ func TestToFromBytes(t *testing.T) { // Case 1: test noncompact by overriding the default serializer. targetsBytesWant, err := targets.ToBytes(true) assert.NoError(t, err) - assert.Equal(t, string(data), string(targetsBytesWant)) + assert.Equal(t, data, targetsBytesWant) // Case 2: test compact by using the default serializer. targets2, err := Targets().FromBytes(targetsBytesWant) assert.NoError(t, err) targetsBytesActual, err := targets2.ToBytes(true) assert.NoError(t, err) - assert.Equal(t, string(targetsBytesWant), string(targetsBytesActual)) + assert.Equal(t, targetsBytesWant, targetsBytesActual) // TIMESTAMP data, err = os.ReadFile(testutils.RepoDir + "/timestamp.json") @@ -319,14 +322,14 @@ func TestToFromBytes(t *testing.T) { // Case 1: test noncompact by overriding the default serializer. timestampBytesWant, err := timestamp.ToBytes(true) assert.NoError(t, err) - assert.Equal(t, string(data), string(timestampBytesWant)) + assert.Equal(t, data, timestampBytesWant) // Case 2: test compact by using the default serializer. timestamp2, err := Timestamp().FromBytes(timestampBytesWant) assert.NoError(t, err) timestampBytesActual, err := timestamp2.ToBytes(true) assert.NoError(t, err) - assert.Equal(t, string(timestampBytesWant), string(timestampBytesActual)) + assert.Equal(t, timestampBytesWant, timestampBytesActual) } @@ -421,6 +424,7 @@ func TestKeyVerifyFailures(t *testing.T) { // Load sample metadata (timestamp) timestamp, err := Timestamp().FromFile(testutils.RepoDir + "/timestamp.json") assert.NoError(t, err) + timestampSig, _ := getSignatureByKeyID(timestamp.Signatures, timestampKeyID) data, err := timestamp.Signed.MarshalJSON() assert.NoError(t, err) @@ -781,6 +785,15 @@ func TestLengthAndHashValidation(t *testing.T) { snapshotMetafile := timestamp.Signed.Meta["snapshot.json"] assert.NotNil(t, snapshotMetafile) + snapshotData, err := os.ReadFile(testutils.RepoDir + "/snapshot.json") + assert.NoError(t, err) + h32 := sha256.Sum256(snapshotData) + h := h32[:] + snapshotMetafile.Hashes = map[string]HexBytes{ + "sha256": h, + } + snapshotMetafile.Length = 652 + data, err := os.ReadFile(testutils.RepoDir + "/snapshot.json") assert.NoError(t, err) err = snapshotMetafile.VerifyLengthHashes(data) diff --git a/metadata/trustedmetadata/trustedmetadata_test.go b/metadata/trustedmetadata/trustedmetadata_test.go new file mode 100644 index 00000000..82a087ab --- /dev/null +++ b/metadata/trustedmetadata/trustedmetadata_test.go @@ -0,0 +1,673 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package trustedmetadata + +import ( + "crypto" + "fmt" + "os" + "testing" + "time" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" + "github.com/sigstore/sigstore/pkg/cryptoutils" + "github.com/sigstore/sigstore/pkg/signature" + log "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" + "golang.org/x/exp/maps" +) + +var allRoles map[string][]byte + +func setAllRolesBytes(path string) { + allRoles = make(map[string][]byte) + root, err := os.ReadFile(fmt.Sprintf("%s/root.json", path)) + if err != nil { + log.Fatalf("failed to root bytes: %v", err) + } + allRoles[metadata.ROOT] = root + targets, err := os.ReadFile(fmt.Sprintf("%s/targets.json", path)) + if err != nil { + log.Fatalf("failed to targets bytes: %v", err) + } + allRoles[metadata.TARGETS] = targets + snapshot, err := os.ReadFile(fmt.Sprintf("%s/snapshot.json", path)) + if err != nil { + log.Fatalf("failed to snapshot bytes: %v", err) + } + allRoles[metadata.SNAPSHOT] = snapshot + timestamp, err := os.ReadFile(fmt.Sprintf("%s/timestamp.json", path)) + if err != nil { + log.Fatalf("failed to timestamp bytes: %v", err) + } + allRoles[metadata.TIMESTAMP] = timestamp + role1, err := os.ReadFile(fmt.Sprintf("%s/role1.json", path)) + if err != nil { + log.Fatalf("failed to role1 bytes: %v", err) + } + allRoles["role1"] = role1 + role2, err := os.ReadFile(fmt.Sprintf("%s/role2.json", path)) + if err != nil { + log.Fatalf("failed to role2 bytes: %v", err) + } + allRoles["role2"] = role2 +} + +func TestMain(m *testing.M) { + + repoPath := "../../testutils/repository_data/repository/metadata" + keystorePath := "../../testutils/repository_data/keystore" + targetsPath := "../../testutils/repository_data/repository/targets" + err := testutils.SetupTestDirs(repoPath, targetsPath, keystorePath) + defer testutils.Cleanup() + + if err != nil { + log.Fatalf("failed to setup test dirs: %v", err) + } + setAllRolesBytes(testutils.RepoDir) + m.Run() +} + +type modifyRoot func(*metadata.Metadata[metadata.RootType]) + +func modifyRootMetadata(fn modifyRoot) ([]byte, error) { + root, err := metadata.Root().FromBytes(allRoles[metadata.ROOT]) + if err != nil { + log.Debugf("failed to create root metadata from bytes: %v", err) + } + fn(root) + + signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/root_key", crypto.SHA256, cryptoutils.SkipPassword) + if err != nil { + log.Debugf("failed to load signer from pem file: %v", err) + } + root.ClearSignatures() + _, err = root.Sign(signer) + if err != nil { + log.Debugf("failed to sign root: %v", err) + } + return root.ToBytes(true) +} + +type modifyTimestamp func(*metadata.Metadata[metadata.TimestampType]) + +func modifyTimestamptMetadata(fn modifyTimestamp) ([]byte, error) { + timestamp, err := metadata.Timestamp().FromBytes(allRoles[metadata.TIMESTAMP]) + if err != nil { + log.Debugf("failed to create timestamp metadata from bytes: %v", err) + } + fn(timestamp) + + signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/timestamp_key", crypto.SHA256, cryptoutils.SkipPassword) + if err != nil { + log.Debugf("failed to load signer from pem file: %v", err) + } + timestamp.ClearSignatures() + _, err = timestamp.Sign(signer) + if err != nil { + log.Debugf("failed to sign timestamp: %v", err) + } + return timestamp.ToBytes(true) +} + +type modifySnapshot func(*metadata.Metadata[metadata.SnapshotType]) + +func modifySnapshotMetadata(fn modifySnapshot) ([]byte, error) { + snapshot, err := metadata.Snapshot().FromBytes(allRoles[metadata.SNAPSHOT]) + if err != nil { + log.Debugf("failed to create snapshot metadata from bytes: %v", err) + } + fn(snapshot) + + signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/snapshot_key", crypto.SHA256, cryptoutils.SkipPassword) + if err != nil { + log.Debugf("failed to load signer from pem file: %v", err) + } + snapshot.ClearSignatures() + _, err = snapshot.Sign(signer) + if err != nil { + log.Debugf("failed to sign snapshot: %v", err) + } + return snapshot.ToBytes(true) +} + +type modifyTargets func(*metadata.Metadata[metadata.TargetsType]) + +func modifyTargetsMetadata(fn modifyTargets) ([]byte, error) { + targets, err := metadata.Targets().FromBytes(allRoles[metadata.TARGETS]) + if err != nil { + log.Debugf("failed to create targets metadata from bytes: %v", err) + } + fn(targets) + + signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/targets_key", crypto.SHA256, cryptoutils.SkipPassword) + if err != nil { + log.Debugf("failed to load signer from pem file: %v", err) + } + targets.ClearSignatures() + _, err = targets.Sign(signer) + if err != nil { + log.Debugf("failed to sign targets: %v", err) + } + return targets.ToBytes(true) +} + +func TestUpdate(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.NoError(t, err) + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.NoError(t, err) + _, err = trustedSet.UpdateDelegatedTargets(allRoles["role1"], "role1", metadata.TARGETS) + assert.NoError(t, err) + _, err = trustedSet.UpdateDelegatedTargets(allRoles["role2"], "role2", "role1") + assert.NoError(t, err) + + // The 4 top level metadata objects + 2 additional delegated targets + // self.assertTrue(len(self.trusted_set), 6) + assert.NotNil(t, trustedSet.Root) + assert.NotNil(t, trustedSet.Timestamp) + assert.NotNil(t, trustedSet.Snapshot) + assert.NotNil(t, trustedSet.Targets) +} + +func TestOutOfOrderOps(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + + // Update snapshot before timestamp + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.ErrorIs(t, err, metadata.ErrRuntime{Msg: "cannot update snapshot before timestamp"}) + + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + + // Update root after timestamp + _, err = trustedSet.UpdateRoot(allRoles[metadata.ROOT]) + assert.ErrorIs(t, err, metadata.ErrRuntime{Msg: "cannot update root after timestamp"}) + + // Update targets before snapshot + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.ErrorIs(t, err, metadata.ErrRuntime{Msg: "cannot load targets before snapshot"}) + + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.NoError(t, err) + + // Update timestamp after snapshot + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.ErrorIs(t, err, metadata.ErrRuntime{Msg: "cannot update timestamp after snapshot"}) + + // Update delegated targets before targets + _, err = trustedSet.UpdateDelegatedTargets(allRoles["role1"], "role1", metadata.TARGETS) + assert.ErrorIs(t, err, metadata.ErrRuntime{Msg: "cannot load targets before delegator"}) + + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.NoError(t, err) + + // Update snapshot after sucessful targets update + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.ErrorIs(t, err, metadata.ErrRuntime{Msg: "cannot update snapshot after targets"}) + + _, err = trustedSet.UpdateDelegatedTargets(allRoles["role1"], "role1", metadata.TARGETS) + assert.NoError(t, err) +} + +func TestRootWithInvalidJson(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + + // Test loading initial root and root update + + // root is not json + _, err = trustedSet.UpdateRoot([]byte("")) + assert.ErrorContains(t, err, "unexpected end of JSON input") + + // root is not valid + root, err := metadata.Root().FromBytes(allRoles[metadata.ROOT]) + assert.NoError(t, err) + root.Signed.Version += 1 + rootBytes, err := root.ToBytes(true) + assert.NoError(t, err) + _, err = trustedSet.UpdateRoot(rootBytes) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying root failed, not enough signatures, got 0, want 1"}) + + // metadata is of wrong type + _, err = trustedSet.UpdateRoot(allRoles[metadata.SNAPSHOT]) + assert.ErrorIs(t, err, metadata.ErrValue{Msg: "expected metadata type root, got - snapshot"}) +} + +func TestTopLevelMetadataWithInvalidJSON(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + + //TIMESTAMP + // timestamp is not json + _, err = trustedSet.UpdateTimestamp([]byte("")) + assert.ErrorContains(t, err, "unexpected end of JSON input") + + // timestamp is not valid + timestamp, err := metadata.Timestamp().FromBytes(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + properTimestampBytes, err := timestamp.ToBytes(true) + assert.NoError(t, err) + timestamp.Signed.Version += 1 + timestampBytes, err := timestamp.ToBytes(true) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(timestampBytes) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying timestamp failed, not enough signatures, got 0, want 1"}) + + // timestamp is of wrong type + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.ROOT]) + assert.ErrorIs(t, err, metadata.ErrValue{Msg: "expected metadata type timestamp, got - root"}) + + // SNAPSHOT + _, err = trustedSet.UpdateTimestamp(properTimestampBytes) + assert.NoError(t, err) + // snapshot is not json + _, err = trustedSet.UpdateSnapshot([]byte(""), false) + assert.ErrorContains(t, err, "unexpected end of JSON input") + + // snapshot is not valid + snapshot, err := metadata.Snapshot().FromBytes(allRoles[metadata.SNAPSHOT]) + assert.NoError(t, err) + properSnapshotBytes, err := snapshot.ToBytes(true) + assert.NoError(t, err) + snapshot.Signed.Version += 1 + snapshotBytes, err := snapshot.ToBytes(true) + assert.NoError(t, err) + _, err = trustedSet.UpdateSnapshot(snapshotBytes, false) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying snapshot failed, not enough signatures, got 0, want 1"}) + + // snapshot is of wrong type + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.ROOT], false) + assert.ErrorIs(t, err, metadata.ErrValue{Msg: "expected metadata type snapshot, got - root"}) + + // TARGETS + _, err = trustedSet.UpdateSnapshot(properSnapshotBytes, false) + assert.NoError(t, err) + // targets is not json + _, err = trustedSet.UpdateTargets([]byte("")) + assert.ErrorContains(t, err, "unexpected end of JSON input") + + // targets is not valid + targets, err := metadata.Targets().FromBytes(allRoles[metadata.TARGETS]) + assert.NoError(t, err) + targets.Signed.Version += 1 + targetsBytes, err := targets.ToBytes(true) + assert.NoError(t, err) + _, err = trustedSet.UpdateTargets(targetsBytes) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying targets failed, not enough signatures, got 0, want 1"}) + + // targets is of wrong type + _, err = trustedSet.UpdateTargets(allRoles[metadata.ROOT]) + assert.ErrorIs(t, err, metadata.ErrValue{Msg: "expected metadata type targets, got - root"}) +} + +func TestUpdateRootNewRoot(t *testing.T) { + // Test that root can be updated with a new valid version + modifyRootVersion := func(root *metadata.Metadata[metadata.RootType]) { + root.Signed.Version += 1 + } + + root, err := modifyRootMetadata(modifyRootVersion) + assert.NoError(t, err) + + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateRoot(root) + assert.NoError(t, err) +} + +func TestUpdateRootNewRootFailTreshholdVerification(t *testing.T) { + // Increase threshold in new root, do not add enough keys + bumpRootThreshold := func(root *metadata.Metadata[metadata.RootType]) { + root.Signed.Version += 1 + root.Signed.Roles[metadata.ROOT].Threshold += 1 + } + root, err := modifyRootMetadata(bumpRootThreshold) + assert.NoError(t, err) + + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateRoot(root) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying root failed, not enough signatures, got 1, want 2"}) +} + +func TestUpdateRootNewRootVerSameAsTrustedRootVer(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + + _, err = trustedSet.UpdateRoot(allRoles[metadata.ROOT]) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "bad version number, expected 2, got 1"}) +} + +func TestRootExpiredFinalRoot(t *testing.T) { + // test that root can be updated with a new valid version + modifyRootExpiry := func(root *metadata.Metadata[metadata.RootType]) { + root.Signed.Expires = time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC) + } + + // Intermediate root can be expired + root, err := modifyRootMetadata(modifyRootExpiry) + assert.NoError(t, err) + trustedSet, err := New(root) + assert.NoError(t, err) + + // Update timestamp to trigger final root expiry check + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "final root.json is expired"}) +} + +func TestUpdateTimestampNewTimestampVerBelowTrustedVer(t *testing.T) { + // newTimestamp.Version < trustedTimestamp.Version + modifyTimestampVersion := func(timestamp *metadata.Metadata[metadata.TimestampType]) { + timestamp.Signed.Version = 3 + } + timestamp, err := modifyTimestamptMetadata(modifyTimestampVersion) + assert.NoError(t, err) + + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(timestamp) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "new timestamp version 1 must be >= 3"}) +} + +func TestUpdateTimestampWithSameTimestamp(t *testing.T) { + // Test that timestamp is NOT updated if: + // newTimestamp.Version = trustedTimestamp.Version + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + + initialTimestamp := trustedSet.Timestamp + // Update timestamp with the same version. + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + // EqualVersionNumberError + assert.ErrorIs(t, err, metadata.ErrEqualVersionNumber{Msg: "new timestamp version 1 equals the old one 1"}) + + // Verify that the timestamp object was not updated. + assert.Equal(t, initialTimestamp, trustedSet.Timestamp) +} + +func TestUpdateTimestampSnapshotCerBellowCurrent(t *testing.T) { + bumpSnapshotVersion := func(timestamp *metadata.Metadata[metadata.TimestampType]) { + timestamp.Signed.Meta["snapshot.json"].Version = 2 + // The timestamp version must be increased to initiate a update. + timestamp.Signed.Version += 1 + } + // Set current known snapshot.json version to 2 + timestamp, err := modifyTimestamptMetadata(bumpSnapshotVersion) + assert.NoError(t, err) + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(timestamp) + assert.NoError(t, err) + + // new timestamp meta version < trusted timestamp meta version + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "new timestamp version 1 must be >= 2"}) +} + +func TestUpdateTimestampExpired(t *testing.T) { + // New timestamp has expired + modifyTimestampExpiry := func(timestamp *metadata.Metadata[metadata.TimestampType]) { + timestamp.Signed.Expires = time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC) + } + // Expired intermediate timestamp is loaded but raises ExpiredMetadataError + timestamp, err := modifyTimestamptMetadata(modifyTimestampExpiry) + assert.NoError(t, err) + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(timestamp) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "timestamp.json is expired"}) + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "timestamp.json is expired"}) +} + +func TestUpdateSnapshotLengthOrHashMismatch(t *testing.T) { + modifySnapshotLength := func(timestamp *metadata.Metadata[metadata.TimestampType]) { + timestamp.Signed.Meta["snapshot.json"].Length = 1 + } + // Set known snapshot.json length to 1 + timestamp, err := modifyTimestamptMetadata(modifySnapshotLength) + assert.NoError(t, err) + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(timestamp) + assert.NoError(t, err) + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.ErrorIs(t, err, metadata.ErrLengthOrHashMismatch{Msg: "length verification failed - expected 1, got 652"}) +} + +func TestUpdateSnapshotFailThreshholdVerification(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + + snapshot, err := metadata.Snapshot().FromBytes(allRoles[metadata.SNAPSHOT]) + assert.NoError(t, err) + snapshot.ClearSignatures() + snapshotBytes, err := snapshot.ToBytes(true) + assert.NoError(t, err) + _, err = trustedSet.UpdateSnapshot(snapshotBytes, false) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying snapshot failed, not enough signatures, got 0, want 1"}) +} + +func TestUpdateSnapshotVersionDivergeTimestampSnapshotVersion(t *testing.T) { + modifyTimestampVersion := func(timestamp *metadata.Metadata[metadata.TimestampType]) { + timestamp.Signed.Meta["snapshot.json"].Version = 2 + } + timestamp, err := modifyTimestamptMetadata(modifyTimestampVersion) + assert.NoError(t, err) + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(timestamp) + assert.NoError(t, err) + + // If intermediate snapshot version is incorrect, load it but also raise + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected 2, got 1"}) + + // Targets update starts but fails if snapshot version does not match + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected 2, got 1"}) +} + +// Update all metadata roles besides targets. +func updateAllBesidesTargets(trustedSet *TrustedMetadata, timestampBytes []byte, snapshotBytes []byte) error { + if len(timestampBytes) <= 0 { + timestampBytes = allRoles[metadata.TIMESTAMP] + } + _, err := trustedSet.UpdateTimestamp(timestampBytes) + if err != nil { + return err + } + if len(snapshotBytes) <= 0 { + snapshotBytes = allRoles[metadata.SNAPSHOT] + } + _, err = trustedSet.UpdateSnapshot(snapshotBytes, false) + if err != nil { + return err + } + return nil +} + +func TestUpdateSnapshotFileRemovedFromMeta(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + err = updateAllBesidesTargets(trustedSet, allRoles[metadata.TIMESTAMP], []byte{}) + assert.NoError(t, err) + removeFileFromMeta := func(snaphot *metadata.Metadata[metadata.SnapshotType]) { + delete(snaphot.Signed.Meta, "targets.json") + } + // Test removing a meta_file in new_snapshot compared to the old snapshot + snapshot, err := modifySnapshotMetadata(removeFileFromMeta) + assert.NoError(t, err) + _, err = trustedSet.UpdateSnapshot(snapshot, false) + assert.ErrorIs(t, err, metadata.ErrRepository{Msg: "new snapshot is missing info for targets.json"}) +} + +func TestUpdateSnapshotMetaVersionDecreases(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + + modifyMetaVersion := func(snaphot *metadata.Metadata[metadata.SnapshotType]) { + snaphot.Signed.Meta["targets.json"].Version += 1 + } + snapshot, err := modifySnapshotMetadata(modifyMetaVersion) + assert.NoError(t, err) + _, err = trustedSet.UpdateSnapshot(snapshot, false) + assert.NoError(t, err) + + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected targets.json version 1, got 2"}) +} + +func TestUpdateSnapshotExpiredNewSnapshot(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + + modifySnapshotExpired := func(snaphot *metadata.Metadata[metadata.SnapshotType]) { + snaphot.Signed.Expires = time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC) + } + // Expired intermediate snapshot is loaded but will raise + snapshot, err := modifySnapshotMetadata(modifySnapshotExpired) + assert.NoError(t, err) + + _, err = trustedSet.UpdateSnapshot(snapshot, false) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "snapshot.json is expired"}) + + // Targets update does start but fails because snapshot is expired + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "snapshot.json is expired"}) + +} + +func TestUpdateSnapshotSuccessfulRollbackChecks(t *testing.T) { + // Load a "local" timestamp, then update to newer one: + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(allRoles[metadata.TIMESTAMP]) + assert.NoError(t, err) + + bumpMetaVersion := func(timestamp *metadata.Metadata[metadata.TimestampType]) { + timestamp.Signed.Meta["snapshot.json"].Version += 1 + // The timestamp version must be increased to initiate a update. + timestamp.Signed.Version += 1 + } + newTimestamp, err := modifyTimestamptMetadata(bumpMetaVersion) + assert.NoError(t, err) + _, err = trustedSet.UpdateTimestamp(newTimestamp) + assert.NoError(t, err) + + // Load a "local" snapshot with mismatching version (loading happens but + // ErrBadVersionNumber is raised), then update to newer one: + _, err = trustedSet.UpdateSnapshot(allRoles[metadata.SNAPSHOT], false) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected 2, got 1"}) + + bumpVersion := func(snapahot *metadata.Metadata[metadata.SnapshotType]) { + snapahot.Signed.Version += 1 + } + newSnapshot, err := modifySnapshotMetadata(bumpVersion) + assert.NoError(t, err) + _, err = trustedSet.UpdateSnapshot(newSnapshot, false) + assert.NoError(t, err) + + // Update targets to trigger final snapshot meta version check + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.NoError(t, err) +} + +func TestUpdateTargetsMoMetaInSnapshot(t *testing.T) { + + clearMeta := func(snapahot *metadata.Metadata[metadata.SnapshotType]) { + maps.Clear(snapahot.Signed.Meta) + } + snapshot, err := modifySnapshotMetadata(clearMeta) + assert.NoError(t, err) + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + err = updateAllBesidesTargets(trustedSet, allRoles[metadata.TIMESTAMP], snapshot) + assert.NoError(t, err) + + // Remove meta information with information about targets from snapshot + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.ErrorIs(t, err, metadata.ErrRepository{Msg: "snapshot does not contain information for targets"}) + +} + +func TestUpdateTargetsHashDiverfeFromSnapshotMetaHash(t *testing.T) { + modifyMetaLength := func(snapshot *metadata.Metadata[metadata.SnapshotType]) { + for metafilePath := range snapshot.Signed.Meta { + snapshot.Signed.Meta[metafilePath] = &metadata.MetaFiles{ + Version: 1, + Length: 1, + } + } + } + snapshot, err := modifySnapshotMetadata(modifyMetaLength) + assert.NoError(t, err) + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + err = updateAllBesidesTargets(trustedSet, allRoles[metadata.TIMESTAMP], snapshot) + assert.NoError(t, err) + + // Observed hash != stored hash in snapshot meta for targets + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.ErrorIs(t, err, metadata.ErrLengthOrHashMismatch{Msg: "length verification failed - expected 1, got 1266"}) +} + +func TestUpdateTargetsVersionDivergeSnapshotMetaVersion(t *testing.T) { + modifyMeta := func(snapshot *metadata.Metadata[metadata.SnapshotType]) { + for metafilePath := range snapshot.Signed.Meta { + snapshot.Signed.Meta[metafilePath] = &metadata.MetaFiles{Version: 2} + } + } + snapshot, err := modifySnapshotMetadata(modifyMeta) + assert.NoError(t, err) + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + err = updateAllBesidesTargets(trustedSet, allRoles[metadata.TIMESTAMP], snapshot) + assert.NoError(t, err) + + // New delegate sigfned version != meta version stored in snapshot + _, err = trustedSet.UpdateTargets(allRoles[metadata.TARGETS]) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected targets version 2, got 1"}) +} + +func TestUpdateTargetsExpiredMewTarget(t *testing.T) { + trustedSet, err := New(allRoles[metadata.ROOT]) + assert.NoError(t, err) + err = updateAllBesidesTargets(trustedSet, allRoles[metadata.TIMESTAMP], allRoles[metadata.SNAPSHOT]) + assert.NoError(t, err) + + // New delegated target has expired + modifyTargetExpiry := func(targets *metadata.Metadata[metadata.TargetsType]) { + targets.Signed.Expires = time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC) + } + targets, err := modifyTargetsMetadata(modifyTargetExpiry) + assert.NoError(t, err) + _, err = trustedSet.UpdateTargets(targets) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "new targets is expired"}) +} diff --git a/testutils/repository_data/repository/metadata/snapshot.json b/testutils/repository_data/repository/metadata/snapshot.json index 28429701..ed379e01 100644 --- a/testutils/repository_data/repository/metadata/snapshot.json +++ b/testutils/repository_data/repository/metadata/snapshot.json @@ -2,13 +2,19 @@ "signatures": [ { "keyid": "8a14f637b21578cc292a67899df0e46cc160d7fd56e9beae898adb666f4fd9d6", - "sig": "50d814131d3aace838af726f13a6b4431f78c086b58817f3208d73fe174fe00a4729ad796888bab86ee0cd0cc5746fd8379327e65cd317c4a5f769bf29028bcae1a5bc95a21b15f86a54ba05c3443503037c2c90062825b8a193896814acb67ee000f5816c70f23867686604820efd48ee9d643d1354897c654075076b27ee27" + "sig": "3075fe9ef3008603eb0531500a93101b8f7eb52b07ce63fb71abaffd5eb20784bcab888abfca8041798b13dd35c6e18ff4a64d536161c4d5e7535f006edec3a46c71684a632269222da82d50bf380e20eb477032e45df0b44af9e1dc46f25cd72f9901b4fc41b90869649b6257a66188b61b83c7295baf16f113e9cc4d39b3a6" } ], "signed": { "_type": "snapshot", "expires": "2030-08-15T14:30:45.0000001Z", "meta": { + "role1.json": { + "version": 1 + }, + "role2.json": { + "version": 1 + }, "targets.json": { "version": 1 } diff --git a/testutils/repository_data/repository/metadata/timestamp.json b/testutils/repository_data/repository/metadata/timestamp.json index 439a6ac3..aa11c742 100644 --- a/testutils/repository_data/repository/metadata/timestamp.json +++ b/testutils/repository_data/repository/metadata/timestamp.json @@ -2,7 +2,7 @@ "signatures": [ { "keyid": "142919f8e933d7045abff3be450070057814da36331d7a22ccade8b35a9e3946", - "sig": "33fed71cdc654c5863e8785d4ebd7b9bf60e6b13b3dfc98f98e360d425aea1cc211dc8eacba66ec50cba78d0a251295f219b17287e9566e693cbdde7084a8a0d3e731d88c97f2e8c1393be33a22d0f7b28ac8931511e5bc0a2c8c33e1a3854c4f41828c7f5b37757c8fa181273dab80c1ca29bb79c3c8d84d8233d837df4f20b" + "sig": "639c9ce3dbb705265b5e9ad6d67fea2b38780c48ff7917e372adace8e50a7a2f054383d5960457a113059be521b8ce7e6d8a5787c600c4850b8c0ed1ae17a931a6bfe794476e7824c6f53df5232561e0a2e146b11dde7889b397c6f8136e2105bbb21b4b59b5addc032a0e755d97e531255f3b458d474184168541e542626e81" } ], "signed": { @@ -10,10 +10,6 @@ "expires": "2030-08-15T14:30:45.0000001Z", "meta": { "snapshot.json": { - "hashes": { - "sha256": "72c5cabeb3e8079545a5f4d2b067f8e35f18a0de3c2b00d3cb8d05919c19c72d" - }, - "length": 568, "version": 1 } }, diff --git a/testutils/testutils/setup.go b/testutils/testutils/setup.go index 291059e1..17bcc6f5 100644 --- a/testutils/testutils/setup.go +++ b/testutils/testutils/setup.go @@ -26,7 +26,7 @@ var ( KeystoreDir string ) -func SetupTestDirs() error { +func SetupTestDirs(repoPath string, targetsPath string, keystorePath string) error { tmp := os.TempDir() var err error TempDir, err = os.MkdirTemp(tmp, "0750") @@ -36,7 +36,7 @@ func SetupTestDirs() error { } RepoDir = fmt.Sprintf("%s/repository_data/repository", TempDir) - absPath, err := filepath.Abs("../testutils/repository_data/repository/metadata") + absPath, err := filepath.Abs(repoPath) if err != nil { log.Debugf("failed to get absolute path: %v", err) } @@ -47,11 +47,11 @@ func SetupTestDirs() error { } TargetsDir = fmt.Sprintf("%s/repository_data/repository/targets", TempDir) - targetsPath, err := filepath.Abs("../testutils/repository_data/repository/targets") + targetsAbsPath, err := filepath.Abs(targetsPath) if err != nil { log.Debugf("failed to get absolute targets path: %v", err) } - err = Copy(targetsPath, TargetsDir) + err = Copy(targetsAbsPath, TargetsDir) if err != nil { log.Debugf("failed to copy metadata to %s: %v", RepoDir, err) return err @@ -62,7 +62,7 @@ func SetupTestDirs() error { if err != nil { log.Debugf("failed to create keystore dir %s: %v", KeystoreDir, err) } - absPath, err = filepath.Abs("../testutils/repository_data/keystore") + absPath, err = filepath.Abs(keystorePath) if err != nil { log.Debugf("failed to get absolute path: %v", err) } From 51c8c2c58c66c108a8da5782898fa5d5a3f61a2c Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Thu, 31 Aug 2023 21:41:08 +0200 Subject: [PATCH 171/208] chore: update URL for sigstore-tuf-root (#59) Change to new CDN URL and regenerate example json files Signed-off-by: Marvin Drees --- Makefile | 8 ++--- examples/multirepo/client/root.json | 30 +++++++++---------- .../multirepo/repository/metadata/1.root.json | 30 +++++++++---------- .../repository/metadata/1.snapshot.json | 6 ++-- .../repository/metadata/1.targets.json | 10 +++---- .../repository/metadata/timestamp.json | 6 ++-- ...b4e3f4b7877ac8cb78a684c2c65fc6d8.map.json} | 2 +- .../multirepo/repository/targets/map.json | 2 +- 8 files changed, 47 insertions(+), 47 deletions(-) rename examples/multirepo/repository/targets/{2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json => 9bb72b3c684f4e489e7fdce1afabff64b4e3f4b7877ac8cb78a684c2c65fc6d8.map.json} (88%) diff --git a/Makefile b/Makefile index 4c2581dc..642e830b 100644 --- a/Makefile +++ b/Makefile @@ -94,13 +94,13 @@ example-root-signing: build-tuf-client @echo "Clearing any leftover artifacts..." ./tuf-client reset --force @echo "Downloading the initial root of trust" - @curl -L "https://sigstore-tuf-root.storage.googleapis.com/5.root.json" > root.json - @echo "Initializing the following https://sigstore-tuf-root.storage.googleapis.com TUF repository" + @curl -L "https://tuf-repo-cdn.sigstore.dev/5.root.json" > root.json + @echo "Initializing the following https://tuf-repo-cdn.sigstore.dev TUF repository" @sleep 2 - ./tuf-client init --url https://sigstore-tuf-root.storage.googleapis.com --file root.json + ./tuf-client init --url https://tuf-repo-cdn.sigstore.dev --file root.json @echo "Downloading the following target file - rekor.pub" @sleep 2 - ./tuf-client get --url https://sigstore-tuf-root.storage.googleapis.com --turl https://sigstore-tuf-root.storage.googleapis.com/targets rekor.pub + ./tuf-client get --url https://tuf-repo-cdn.sigstore.dev --turl https://tuf-repo-cdn.sigstore.dev/targets rekor.pub # Clean target .PHONY: clean diff --git a/examples/multirepo/client/root.json b/examples/multirepo/client/root.json index f5da92b8..ae34979b 100644 --- a/examples/multirepo/client/root.json +++ b/examples/multirepo/client/root.json @@ -1,40 +1,40 @@ { "signatures": [ { - "keyid": "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff", - "sig": "e69eb6108348f0e0f5f1a12d611f6ed44929b5bce13a656396467762d2e17a9111a18ff0e3e3874e5792122f0b5bb203213a0cd9823686c87d3e7216bcfb7e04" + "keyid": "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2", + "sig": "48178709d5b4296e19f7d9409c6fc2ba8a8a0568333b15cc8252b34541a3239a08b37adc721afc1394482b96e3ba3617e6ba4cd7ce048904472bdf161820c60c" } ], "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-08-17T12:10:30.266622Z", + "expires": "2024-08-30T17:08:16.58221527Z", "keys": { - "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5": { + "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173": { "keytype": "ed25519", "keyval": { - "public": "b96632c3a1d1189f0016d524ddddac75369c0ed17ab1fe604c3b5d3e42b2fba2" + "public": "6b8860bc2395b3dfaa2e938753788ebc1a6d078d8b6c7c6ea5b6ec164fdfce1a" }, "scheme": "ed25519" }, - "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a": { + "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c": { "keytype": "ed25519", "keyval": { - "public": "c857d5a73656c36d99f7c1a82d6684f83e0ca45abbf4d109621f38a87f9f4f83" + "public": "8b1e343aa4a58aedf7d45d4f100e2d478025ad7134ac728cf8e5d5c49ab1efda" }, "scheme": "ed25519" }, - "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9": { + "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2": { "keytype": "ed25519", "keyval": { - "public": "7866eef4cdf2b2bf7c0fd1c44ab79f9eb96d1c667c818951ba755c5533f80036" + "public": "93a8b2eeaae60f591211d2c8e20b04ff5897db56e59d1c4118b6aff89c2b4c5b" }, "scheme": "ed25519" }, - "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff": { + "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35": { "keytype": "ed25519", "keyval": { - "public": "14dbeaeaf0bbc3e2b2f45e7fe3bb3a7e6d4bc26517ee96e6066e436a7b88ed51" + "public": "9dd181035fa996f1d1551689e2d86cefa21dad7cf2365d92ef4e743d90be52d1" }, "scheme": "ed25519" } @@ -42,25 +42,25 @@ "roles": { "root": { "keyids": [ - "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff" + "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2" ], "threshold": 1 }, "snapshot": { "keyids": [ - "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5" + "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173" ], "threshold": 1 }, "targets": { "keyids": [ - "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9" + "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35" ], "threshold": 1 }, "timestamp": { "keyids": [ - "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a" + "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c" ], "threshold": 1 } diff --git a/examples/multirepo/repository/metadata/1.root.json b/examples/multirepo/repository/metadata/1.root.json index f5da92b8..ae34979b 100644 --- a/examples/multirepo/repository/metadata/1.root.json +++ b/examples/multirepo/repository/metadata/1.root.json @@ -1,40 +1,40 @@ { "signatures": [ { - "keyid": "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff", - "sig": "e69eb6108348f0e0f5f1a12d611f6ed44929b5bce13a656396467762d2e17a9111a18ff0e3e3874e5792122f0b5bb203213a0cd9823686c87d3e7216bcfb7e04" + "keyid": "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2", + "sig": "48178709d5b4296e19f7d9409c6fc2ba8a8a0568333b15cc8252b34541a3239a08b37adc721afc1394482b96e3ba3617e6ba4cd7ce048904472bdf161820c60c" } ], "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-08-17T12:10:30.266622Z", + "expires": "2024-08-30T17:08:16.58221527Z", "keys": { - "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5": { + "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173": { "keytype": "ed25519", "keyval": { - "public": "b96632c3a1d1189f0016d524ddddac75369c0ed17ab1fe604c3b5d3e42b2fba2" + "public": "6b8860bc2395b3dfaa2e938753788ebc1a6d078d8b6c7c6ea5b6ec164fdfce1a" }, "scheme": "ed25519" }, - "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a": { + "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c": { "keytype": "ed25519", "keyval": { - "public": "c857d5a73656c36d99f7c1a82d6684f83e0ca45abbf4d109621f38a87f9f4f83" + "public": "8b1e343aa4a58aedf7d45d4f100e2d478025ad7134ac728cf8e5d5c49ab1efda" }, "scheme": "ed25519" }, - "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9": { + "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2": { "keytype": "ed25519", "keyval": { - "public": "7866eef4cdf2b2bf7c0fd1c44ab79f9eb96d1c667c818951ba755c5533f80036" + "public": "93a8b2eeaae60f591211d2c8e20b04ff5897db56e59d1c4118b6aff89c2b4c5b" }, "scheme": "ed25519" }, - "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff": { + "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35": { "keytype": "ed25519", "keyval": { - "public": "14dbeaeaf0bbc3e2b2f45e7fe3bb3a7e6d4bc26517ee96e6066e436a7b88ed51" + "public": "9dd181035fa996f1d1551689e2d86cefa21dad7cf2365d92ef4e743d90be52d1" }, "scheme": "ed25519" } @@ -42,25 +42,25 @@ "roles": { "root": { "keyids": [ - "b528bf6859d86a60523c09e1627f06e6514792aea46ca3360606b6262ddf94ff" + "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2" ], "threshold": 1 }, "snapshot": { "keyids": [ - "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5" + "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173" ], "threshold": 1 }, "targets": { "keyids": [ - "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9" + "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35" ], "threshold": 1 }, "timestamp": { "keyids": [ - "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a" + "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c" ], "threshold": 1 } diff --git a/examples/multirepo/repository/metadata/1.snapshot.json b/examples/multirepo/repository/metadata/1.snapshot.json index b7f1c270..26d37366 100644 --- a/examples/multirepo/repository/metadata/1.snapshot.json +++ b/examples/multirepo/repository/metadata/1.snapshot.json @@ -1,13 +1,13 @@ { "signatures": [ { - "keyid": "77125d9b43085072ce2856643e74027811993bbab141b08359edca28f17d21f5", - "sig": "700a65bb8d85965a64df3bd7f6563bc9ff8bdcd1a636fe6f7e90c85536000af70e918a8d4cecbf01f67bcaab04858b2fb144068479dbdf0b01c8fbc7492abc06" + "keyid": "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173", + "sig": "c05a17a6a3e077470ade6e30d97df1f8d8e1c0831712515f62728b64ae563db8c2de9c904649a230ce74ed92a634f6b621d5f2a737f0de29bb9061ce6b303100" } ], "signed": { "_type": "snapshot", - "expires": "2024-08-17T12:10:30.266619Z", + "expires": "2024-08-30T17:08:16.582209049Z", "meta": { "targets.json": { "version": 1 diff --git a/examples/multirepo/repository/metadata/1.targets.json b/examples/multirepo/repository/metadata/1.targets.json index b2de6f74..e8459afa 100644 --- a/examples/multirepo/repository/metadata/1.targets.json +++ b/examples/multirepo/repository/metadata/1.targets.json @@ -1,20 +1,20 @@ { "signatures": [ { - "keyid": "a76db2ead26685d9f545e1bf22cc02e8aaf6db41a4cb91452187121888c8cfd9", - "sig": "61a928faa8a9b5e20141b6af40cd54974a855b5f1054b876046bfaf1c3391f8e974396df2c1433581adbbb072be763908f4269b67f9ecbf92c6c13eb02e4520e" + "keyid": "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35", + "sig": "e20685a0fc000d1bec6ae1625132f74f78992400ef9724517051c631e83cd73dc2c7f86016d11b43693b1e6ded59d7274099c700420525480ad16ee89f749e09" } ], "signed": { "_type": "targets", - "expires": "2023-10-17T12:10:30.26106Z", + "expires": "2023-10-30T18:08:16.571163566Z", "spec_version": "1.0.31", "targets": { "map.json": { "hashes": { - "sha256": "2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0" + "sha256": "9bb72b3c684f4e489e7fdce1afabff64b4e3f4b7877ac8cb78a684c2c65fc6d8" }, - "length": 660 + "length": 645 }, "sigstore-tuf-root/root.json": { "hashes": { diff --git a/examples/multirepo/repository/metadata/timestamp.json b/examples/multirepo/repository/metadata/timestamp.json index 0f6fad5b..85304804 100644 --- a/examples/multirepo/repository/metadata/timestamp.json +++ b/examples/multirepo/repository/metadata/timestamp.json @@ -1,13 +1,13 @@ { "signatures": [ { - "keyid": "a30bc3d588174d78cf2b9949e52ea450bff9332b0c1889837ce550a778efcb2a", - "sig": "b43a3649fa12d1c9e3c8e501c4af2c7a3ec1b87d097abd64f86f5d5dc85493e33467c80388bbd168a48cd8bec42701eab64667950d7f7211bab97b5d77956b0b" + "keyid": "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c", + "sig": "7dd2d9fd319e24c21d93e97e63545089400f8622257d6088d49df007b9de88a2f67109d32559d51d27add09abd8e73099c345d56397a8cfaec76847d3a25a100" } ], "signed": { "_type": "timestamp", - "expires": "2024-08-17T12:10:30.266621Z", + "expires": "2024-08-30T17:08:16.582213737Z", "meta": { "snapshot.json": { "version": 1 diff --git a/examples/multirepo/repository/targets/2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json b/examples/multirepo/repository/targets/9bb72b3c684f4e489e7fdce1afabff64b4e3f4b7877ac8cb78a684c2c65fc6d8.map.json similarity index 88% rename from examples/multirepo/repository/targets/2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json rename to examples/multirepo/repository/targets/9bb72b3c684f4e489e7fdce1afabff64b4e3f4b7877ac8cb78a684c2c65fc6d8.map.json index a494e885..1a0f4e22 100644 --- a/examples/multirepo/repository/targets/2891d477c44f4a77b9adb15a5e1392136cb75ca015daac96d1322b2dadcc82f0.map.json +++ b/examples/multirepo/repository/targets/9bb72b3c684f4e489e7fdce1afabff64b4e3f4b7877ac8cb78a684c2c65fc6d8.map.json @@ -1,7 +1,7 @@ { "repositories": { - "sigstore-tuf-root": ["https://sigstore-tuf-root.storage.googleapis.com"], + "sigstore-tuf-root": ["https://tuf-repo-cdn.sigstore.dev"], "staging": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"] }, "mapping": [ diff --git a/examples/multirepo/repository/targets/map.json b/examples/multirepo/repository/targets/map.json index a494e885..1a0f4e22 100644 --- a/examples/multirepo/repository/targets/map.json +++ b/examples/multirepo/repository/targets/map.json @@ -1,7 +1,7 @@ { "repositories": { - "sigstore-tuf-root": ["https://sigstore-tuf-root.storage.googleapis.com"], + "sigstore-tuf-root": ["https://tuf-repo-cdn.sigstore.dev"], "staging": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"] }, "mapping": [ From f9a18abcf1ccdbae43ded15b5aaa77a386b2d949 Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Thu, 31 Aug 2023 21:59:56 +0200 Subject: [PATCH 172/208] test: convert config tests to table driven tests (#60) Signed-off-by: Marvin Drees --- metadata/config/config.go | 6 +- metadata/config/config_test.go | 184 +++++++++++++++++++++------------ 2 files changed, 123 insertions(+), 67 deletions(-) diff --git a/metadata/config/config.go b/metadata/config/config.go index 6c43bb61..2c363e49 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -45,6 +45,7 @@ func New(remoteURL string, rootBytes []byte) (*UpdaterConfig, error) { if err != nil { return nil, err } + return &UpdaterConfig{ // TUF configuration MaxRootRotations: 32, @@ -67,11 +68,12 @@ func (cfg *UpdaterConfig) EnsurePathsExist() error { if cfg.DisableLocalCache { return nil } + for _, path := range []string{cfg.LocalMetadataDir, cfg.LocalTargetsDir} { - err := os.MkdirAll(path, os.ModePerm) - if err != nil { + if err := os.MkdirAll(path, os.ModePerm); err != nil { return err } } + return nil } diff --git a/metadata/config/config_test.go b/metadata/config/config_test.go index afcba021..17b559ef 100644 --- a/metadata/config/config_test.go +++ b/metadata/config/config_test.go @@ -12,79 +12,133 @@ package config import ( - "fmt" + "net/url" "os" + "path/filepath" "testing" + "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" "github.com/stretchr/testify/assert" ) func TestNewUpdaterConfig(t *testing.T) { - - remoteURL := "somepath" - rootBytes := []byte("somerootbytes") - - updaterConfig, err := New(remoteURL, rootBytes) - - assert.NoError(t, err) - assert.NotNil(t, updaterConfig) - assert.NotNil(t, updaterConfig.Fetcher) - - assert.Equal(t, 32, updaterConfig.MaxDelegations) - assert.Equal(t, int64(32), updaterConfig.MaxRootRotations) - assert.Equal(t, int64(512000), updaterConfig.RootMaxLength) - assert.Equal(t, int64(16384), updaterConfig.TimestampMaxLength) - assert.Equal(t, int64(2000000), updaterConfig.SnapshotMaxLength) - assert.Equal(t, int64(5000000), updaterConfig.TargetsMaxLength) - assert.Equal(t, false, updaterConfig.DisableLocalCache) - assert.Equal(t, true, updaterConfig.PrefixTargetsWithHash) - assert.Equal(t, updaterConfig.RemoteMetadataURL, remoteURL) - assert.Equal(t, updaterConfig.LocalTrustedRoot, rootBytes) - assert.Equal(t, updaterConfig.RemoteTargetsURL, remoteURL+"/targets") - assert.Empty(t, updaterConfig.LocalMetadataDir) - assert.Empty(t, updaterConfig.LocalTargetsDir) + // setup testing table (tt) and create subtest for each entry + for _, tt := range []struct { + name string + desc string + remoteURL string + rootBytes []byte + config *UpdaterConfig + wantErr error + }{ + { + name: "success", + desc: "No errors expected", + remoteURL: "somepath", + rootBytes: []byte("somerootbytes"), + config: &UpdaterConfig{ + MaxRootRotations: 32, + MaxDelegations: 32, + RootMaxLength: 512000, + TimestampMaxLength: 16384, + SnapshotMaxLength: 2000000, + TargetsMaxLength: 5000000, + Fetcher: &fetcher.DefaultFetcher{}, + LocalTrustedRoot: []byte("somerootbytes"), + RemoteMetadataURL: "somepath", + RemoteTargetsURL: "somepath/targets", + DisableLocalCache: false, + PrefixTargetsWithHash: true, + }, + wantErr: nil, + }, + { + name: "invalid character in URL", + desc: "Invalid ASCII control sequence in input", + remoteURL: string([]byte{0x7f}), + rootBytes: []byte("somerootbytes"), + config: nil, + wantErr: &url.Error{}, // just make sure this is non-nil, url pkg has no exported errors + }, + } { + t.Run(tt.name, func(t *testing.T) { + // this will only be printed if run in verbose mode or if test fails + t.Logf("Desc: %s", tt.desc) + // run the function under test + updaterConfig, err := New(tt.remoteURL, tt.rootBytes) + // special case if we expect no error + if tt.wantErr == nil { + assert.NoErrorf(t, err, "expected no erro but got %v", err) + assert.EqualExportedValuesf(t, *tt.config, *updaterConfig, "expected %#+v but got %#+v", tt.config, updaterConfig) + return + } + // compare the error with our expected error + assert.Nilf(t, updaterConfig, "expected nil but got %#+v", updaterConfig) + assert.Errorf(t, err, "expected %v but got %v", tt.wantErr, err) + }) + } } func TestEnsurePathsExist(t *testing.T) { - - remoteURL := "somepath" - rootBytes := []byte("somerootbytes") - - updaterConfig, err := New(remoteURL, rootBytes) - assert.NoError(t, err) - assert.NotNil(t, updaterConfig) - - err = updaterConfig.EnsurePathsExist() - assert.Error(t, err, "mkdir : no such file or directory") - - tmp := os.TempDir() - metadataPath := fmt.Sprintf("%s/metadata", tmp) - targetsPath := fmt.Sprintf("%s/targets", tmp) - - assert.NoDirExists(t, metadataPath) - assert.NoDirExists(t, targetsPath) - - updaterConfig.LocalMetadataDir = metadataPath - updaterConfig.LocalTargetsDir = targetsPath - - updaterConfig.DisableLocalCache = true - err = updaterConfig.EnsurePathsExist() - assert.NoError(t, err) - assert.NoDirExists(t, metadataPath) - assert.NoDirExists(t, targetsPath) - - updaterConfig.DisableLocalCache = false - err = updaterConfig.EnsurePathsExist() - assert.NoError(t, err) - - assert.DirExists(t, metadataPath) - assert.DirExists(t, targetsPath) - - err = os.RemoveAll(metadataPath) - assert.NoError(t, err) - assert.NoDirExists(t, metadataPath) - - err = os.RemoveAll(targetsPath) - assert.NoError(t, err) - assert.NoDirExists(t, targetsPath) + // setup testing table (tt) and create subtest for each entry + for _, tt := range []struct { + name string + desc string + config *UpdaterConfig + setup func(t *testing.T, cfg *UpdaterConfig) + wantErr error + }{ + { + name: "success", + desc: "No errors expected", + config: &UpdaterConfig{ + DisableLocalCache: false, + }, + setup: func(t *testing.T, cfg *UpdaterConfig) { + t.Helper() + tmp := t.TempDir() + cfg.LocalTargetsDir = filepath.Join(tmp, "targets") + cfg.LocalMetadataDir = filepath.Join(tmp, "metadata") + }, + wantErr: nil, + }, + { + name: "path not exist", + desc: "No local directories error", + config: &UpdaterConfig{ + DisableLocalCache: false, + }, + setup: func(t *testing.T, cfg *UpdaterConfig) { + t.Helper() + }, + wantErr: os.ErrNotExist, + }, + { + name: "no local cache", + desc: "Test if method no-op works", + config: &UpdaterConfig{ + DisableLocalCache: true, + }, + setup: func(t *testing.T, cfg *UpdaterConfig) { + t.Helper() + }, + wantErr: nil, + }, + } { + t.Run(tt.name, func(t *testing.T) { + // this will only be printed if run in verbose mode or if test fails + t.Logf("Desc: %s", tt.desc) + // run special test setup in case it is needed for any subtest + tt.setup(t, tt.config) + // run the method under test + err := tt.config.EnsurePathsExist() + // special case if we expect no error + if tt.wantErr == nil { + assert.NoErrorf(t, err, "expected no error but got %v", err) + return + } + // compare the error with our expected error + assert.ErrorIsf(t, err, tt.wantErr, "expected %v but got %v", tt.wantErr, err) + }) + } } From 8df1341a066331e9439c4714196b874c879faf0a Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Fri, 1 Sep 2023 13:06:30 +0200 Subject: [PATCH 173/208] feat: logger rework (#58) * feat(log): add global default logger Signed-off-by: Marvin Drees * feat(log): exchange logger in library code Signed-off-by: Marvin Drees * feat(log): remove logrus from testutil Signed-off-by: Marvin Drees * feat(log): replace logrus in example code Signed-off-by: Marvin Drees * chore(log): run go mod tidy for new logger Signed-off-by: Marvin Drees * test: add tests for logger set/get functions Signed-off-by: Marvin Drees --------- Signed-off-by: Marvin Drees --- examples/cli/tuf-client/cmd/get.go | 8 ++- examples/cli/tuf-client/cmd/init.go | 8 ++- examples/cli/tuf-client/cmd/reset.go | 4 +- examples/cli/tuf/cmd/init.go | 10 +++- examples/client/client_example.go | 25 +++++--- examples/multirepo/client/client_example.go | 17 ++++-- go.mod | 3 +- go.sum | 12 ++-- metadata/logger.go | 24 ++++++++ metadata/logger_test.go | 34 +++++++++++ metadata/metadata.go | 41 +++++++------ metadata/metadata_api_test.go | 4 +- metadata/multirepo/multirepo.go | 16 ++++-- metadata/trustedmetadata/trustedmetadata.go | 31 ++++++---- .../trustedmetadata/trustedmetadata_test.go | 57 ++++++++++++------- metadata/updater/updater.go | 48 +++++++++------- testutils/testutils/setup.go | 32 +++++------ 17 files changed, 240 insertions(+), 134 deletions(-) create mode 100644 metadata/logger.go create mode 100644 metadata/logger_test.go diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 16694409..57f28927 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -13,13 +13,14 @@ package cmd import ( "fmt" + stdlog "log" "os" "path/filepath" + "github.com/go-logr/stdr" "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/updater" - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -54,9 +55,10 @@ func init() { } func GetCmd(target string) error { - // handle verbosity level + // set logger and debug verbosity level + metadata.SetLogger(stdr.New(stdlog.New(os.Stdout, "get_cmd", stdlog.LstdFlags))) if Verbosity { - log.SetLevel(log.DebugLevel) + stdr.SetVerbosity(5) } // verify the client environment was initialized and fetch path names diff --git a/examples/cli/tuf-client/cmd/init.go b/examples/cli/tuf-client/cmd/init.go index e87bbda2..96e975a0 100644 --- a/examples/cli/tuf-client/cmd/init.go +++ b/examples/cli/tuf-client/cmd/init.go @@ -14,14 +14,15 @@ package cmd import ( "fmt" "io" + stdlog "log" "net/http" "net/url" "os" "path/filepath" + "github.com/go-logr/stdr" "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -48,9 +49,10 @@ func init() { func InitializeCmd() error { copyTrusted := true - // handle verbosity level + // set logger and debug verbosity level + metadata.SetLogger(stdr.New(stdlog.New(os.Stdout, "ini_cmd", stdlog.LstdFlags))) if Verbosity { - log.SetLevel(log.DebugLevel) + stdr.SetVerbosity(5) } // prepare the local environment diff --git a/examples/cli/tuf-client/cmd/reset.go b/examples/cli/tuf-client/cmd/reset.go index b2e5cfb9..7bb5e482 100644 --- a/examples/cli/tuf-client/cmd/reset.go +++ b/examples/cli/tuf-client/cmd/reset.go @@ -17,7 +17,6 @@ import ( "path/filepath" "strings" - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -74,7 +73,8 @@ func askForConfirmation() bool { var response string _, err := fmt.Scanln(&response) if err != nil { - log.Fatal(err) + fmt.Println(err) + os.Exit(1) } switch strings.ToLower(response) { case "y", "yes": diff --git a/examples/cli/tuf/cmd/init.go b/examples/cli/tuf/cmd/init.go index 9e43d90f..a32dbdfe 100644 --- a/examples/cli/tuf/cmd/init.go +++ b/examples/cli/tuf/cmd/init.go @@ -13,8 +13,11 @@ package cmd import ( "fmt" + stdlog "log" + "os" - log "github.com/sirupsen/logrus" + "github.com/go-logr/stdr" + "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/spf13/cobra" ) @@ -33,9 +36,10 @@ func init() { } func InitializeCmd() error { - // handle verbosity level + // set logger and debug verbosity level + metadata.SetLogger(stdr.New(stdlog.New(os.Stdout, "ini_cmd", stdlog.LstdFlags))) if Verbosity { - log.SetLevel(log.DebugLevel) + stdr.SetVerbosity(5) } fmt.Println("Initialization successful") diff --git a/examples/client/client_example.go b/examples/client/client_example.go index e9647056..30507b13 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -14,13 +14,15 @@ package main import ( "fmt" "io" + stdlog "log" "net/http" "net/url" "os" "path/filepath" - log "github.com/sirupsen/logrus" + "github.com/go-logr/stdr" + "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/updater" ) @@ -30,30 +32,33 @@ const ( metadataURL = "https://jku.github.io/tuf-demo/metadata" targetsURL = "https://jku.github.io/tuf-demo/targets" targetName = "file1.txt" - verbosity = log.InfoLevel + verbosity = 4 generateRandomFolder = false ) func main() { - // set debug level - log.SetLevel(verbosity) + // set logger to stdout with info level + metadata.SetLogger(stdr.New(stdlog.New(os.Stdout, "client_example", stdlog.LstdFlags))) + stdr.SetVerbosity(verbosity) + + log := metadata.GetLogger() // initialize environment - temporary folders, etc. metadataDir, err := InitEnvironment() if err != nil { - log.Fatal("Failed to initialize environment: ", err) + log.Error(err, "Failed to initialize environment") } // initialize client with Trust-On-First-Use err = InitTrustOnFirstUse(metadataDir) if err != nil { - log.Fatal("Trust-On-First-Use failed: ", err) + log.Error(err, "Trust-On-First-Use failed") } // download the desired target err = DownloadTarget(metadataDir, targetName) if err != nil { - log.Fatal("Download failed: ", err) + log.Error(err, "Download failed") } } @@ -128,6 +133,8 @@ func InitTrustOnFirstUse(metadataDir string) error { // get the target information, verifies if the target is already cached, and in case it // is not cached, downloads the target file. func DownloadTarget(localMetadataDir, target string) error { + log := metadata.GetLogger() + rootBytes, err := os.ReadFile(filepath.Join(localMetadataDir, "root.json")) if err != nil { return err @@ -166,7 +173,7 @@ func DownloadTarget(localMetadataDir, target string) error { return fmt.Errorf("failed while finding a cached target: %w", err) } if path != "" { - log.Infof("Target %s is already present at - %s", target, path) + log.V(4).Info("Target is already present", "target", target, "path", path) } // target is not present locally, so let's try to download it @@ -175,7 +182,7 @@ func DownloadTarget(localMetadataDir, target string) error { return fmt.Errorf("failed to download target file %s - %w", target, err) } - log.Infof("Successfully downloaded target %s at - %s", target, path) + log.V(4).Info("Successfully downloaded target", "target", target, "path", path) return nil } diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index 30a198e0..fa1651d3 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -13,12 +13,14 @@ package main import ( "fmt" + stdlog "log" "os" "path/filepath" "strings" - log "github.com/sirupsen/logrus" + "github.com/go-logr/stdr" + "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/multirepo" "github.com/rdimitrov/go-tuf-metadata/metadata/updater" @@ -27,12 +29,13 @@ import ( const ( metadataURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/metadata" targetsURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/targets" - verbosity = log.InfoLevel + verbosity = 4 ) func main() { - // set debug level - log.SetLevel(verbosity) + // set logger to stdout with info level + metadata.SetLogger(stdr.New(stdlog.New(os.Stdout, "multirepo_client_example", stdlog.LstdFlags))) + stdr.SetVerbosity(verbosity) // Bootstrap TUF fmt.Printf("Bootstrapping the initial TUF repo - fetching map.json file and necessary trusted root files\n\n") @@ -72,6 +75,8 @@ func main() { // BootstrapTUF returns the map file and the related trusted root metadata files func BootstrapTUF() ([]byte, map[string][]byte, error) { + log := metadata.GetLogger() + trustedRoots := map[string][]byte{} mapBytes := []byte{} // get working directory @@ -122,7 +127,7 @@ func BootstrapTUF() ([]byte, map[string][]byte, error) { return nil, nil, fmt.Errorf("failed while finding a cached target: %w", err) } if path != "" { - log.Infof("Target %s is already present at - %s", name, path) + log.V(4).Info("Target is already present", "target", name, "path", path) } // target is not present locally, so let's try to download it @@ -147,7 +152,7 @@ func BootstrapTUF() ([]byte, map[string][]byte, error) { repositoryName := strings.Split(name, string(os.PathSeparator)) trustedRoots[repositoryName[0]] = bytes } - log.Infof("Successfully downloaded target %s at - %s", name, path) + log.V(4).Info("Successfully downloaded target", "target", name, "path", path) } return mapBytes, trustedRoots, nil diff --git a/go.mod b/go.mod index ebf2f61b..5081688e 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,10 @@ module github.com/rdimitrov/go-tuf-metadata go 1.20 require ( + github.com/go-logr/logr v1.2.4 + github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 github.com/sigstore/sigstore v1.7.2 - github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.12.0 diff --git a/go.sum b/go.sum index 496e7723..eb8306ba 100644 --- a/go.sum +++ b/go.sum @@ -2,12 +2,16 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg= github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -45,14 +49,10 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAj github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/sigstore/sigstore v1.7.2 h1:MY0wSOhKWa8SIWSCO9SzFnUl+b7jbthgXHJpuUg31Qs= github.com/sigstore/sigstore v1.7.2/go.mod h1:2IPD5YXrXoznfnIoVsDF7ARC1Nha8xIdLpsC4kEQh5w= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/theupdateframework/go-tuf v0.5.2 h1:habfDzTmpbzBLIFGWa2ZpVhYvFBoK0C1onC3a4zuPRA= @@ -67,7 +67,6 @@ golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLU golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= @@ -88,6 +87,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/metadata/logger.go b/metadata/logger.go new file mode 100644 index 00000000..99bf4667 --- /dev/null +++ b/metadata/logger.go @@ -0,0 +1,24 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package metadata + +import "github.com/go-logr/logr" + +var log logr.Logger = logr.Discard() + +func SetLogger(logger logr.Logger) { + log = logger +} + +func GetLogger() logr.Logger { + return log +} diff --git a/metadata/logger_test.go b/metadata/logger_test.go new file mode 100644 index 00000000..195fb38e --- /dev/null +++ b/metadata/logger_test.go @@ -0,0 +1,34 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package metadata + +import ( + stdlog "log" + "os" + "testing" + + "github.com/go-logr/stdr" + "github.com/stretchr/testify/assert" +) + +func TestSetLogger(t *testing.T) { + // This function is just a simple setter, no need for testing table + testLogger := stdr.New(stdlog.New(os.Stdout, "test", stdlog.LstdFlags)) + SetLogger(testLogger) + assert.Equal(t, testLogger, log, "setting package global logger was unsuccessful") +} + +func TestGetLogger(t *testing.T) { + // This function is just a simple getter, no need for testing table + testLogger := GetLogger() + assert.Equal(t, log, testLogger, "function did not return current logger") +} diff --git a/metadata/metadata.go b/metadata/metadata.go index a573151b..fef70586 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -33,7 +33,6 @@ import ( "github.com/secure-systems-lab/go-securesystemslib/cjson" "github.com/sigstore/sigstore/pkg/signature" - log "github.com/sirupsen/logrus" "golang.org/x/exp/slices" ) @@ -51,7 +50,7 @@ func Root(expires ...time.Time) *Metadata[RootType] { Threshold: 1, } } - log.Debugf("Created a metadata of type %s", ROOT) + log.V(5).Info("Created metadata", "type", ROOT) return &Metadata[RootType]{ Signed: RootType{ Type: ROOT, @@ -72,7 +71,7 @@ func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s", SNAPSHOT) + log.V(5).Info("Created metadata", "type", SNAPSHOT) return &Metadata[SnapshotType]{ Signed: SnapshotType{ Type: SNAPSHOT, @@ -95,7 +94,7 @@ func Timestamp(expires ...time.Time) *Metadata[TimestampType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s", TIMESTAMP) + log.V(5).Info("Created metadata", "type", TIMESTAMP) return &Metadata[TimestampType]{ Signed: TimestampType{ Type: TIMESTAMP, @@ -118,7 +117,7 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.Debugf("Created a metadata of type %s", TARGETS) + log.V(5).Info("Created metadata", "type", TARGETS) return &Metadata[TargetsType]{ Signed: TargetsType{ Type: TARGETS, @@ -143,7 +142,7 @@ func TargetFile() *TargetFiles { func MetaFile(version int64) *MetaFiles { if version < 1 { // attempting to set incorrect version - log.Debugf("Attempting to set incorrect version of %d for MetaFile", version) + log.V(5).Info("Attempting to set incorrect version for MetaFile", "version", version) version = 1 } return &MetaFiles{ @@ -169,7 +168,7 @@ func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { return nil, err } *meta = *m - log.Debugf("Loaded metadata from file %s", name) + log.V(5).Info("Loaded metadata from file", "name", name) return meta, nil } @@ -180,13 +179,13 @@ func (meta *Metadata[T]) FromBytes(data []byte) (*Metadata[T], error) { return nil, err } *meta = *m - log.Debug("Loaded metadata from bytes") + log.V(5).Info("Loaded metadata from bytes") return meta, nil } // ToBytes serialize metadata to bytes func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { - log.Debug("Writing metadata to bytes") + log.V(5).Info("Writing metadata to bytes") if pretty { return json.MarshalIndent(*meta, "", "\t") } @@ -195,7 +194,7 @@ func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { // ToFile save metadata to file func (meta *Metadata[T]) ToFile(name string, pretty bool) error { - log.Debugf("Writing metadata to file %s", name) + log.V(5).Info("Writing metadata to file", "name", name) data, err := meta.ToBytes(pretty) if err != nil { return err @@ -233,7 +232,7 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { // update the Signatures part meta.Signatures = append(meta.Signatures, *sig) // return the new signature - log.Infof("Signed metadata with key ID: %s", key.ID()) + log.V(4).Info("Signed metadata with key", "ID", key.ID()) return sig, nil } @@ -246,7 +245,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegatedRole string, delegatedMetadata var roleKeyIDs []string var roleThreshold int - log.Debugf("Verifying %s", delegatedRole) + log.V(5).Info("Verifying", "role", delegatedRole) // collect keys, keyIDs and threshold based on delegator type switch i := i.(type) { @@ -363,19 +362,19 @@ func (meta *Metadata[T]) VerifyDelegate(delegatedRole string, delegatedMetadata // verify if the signature for that payload corresponds to the given key if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err != nil { // failed to verify the metadata with that key ID - log.Debugf("Failed to verify %s with key ID %s", delegatedRole, keyID) + log.V(5).Info("Failed to verify %s with key ID %s", delegatedRole, keyID) } else { // save the verified keyID only if verification passed signingKeys[keyID] = true - log.Debugf("Verified %s with key ID %s", delegatedRole, keyID) + log.V(5).Info("Verified with key", "role", delegatedRole, "ID", keyID) } } // check if the amount of valid signatures is enough if len(signingKeys) < roleThreshold { - log.Infof("Verifying %s failed, not enough signatures, got %d, want %d", delegatedRole, len(signingKeys), roleThreshold) + log.V(4).Info("Verifying failed, not enough signatures", "role", delegatedRole, "got", len(signingKeys), "want", roleThreshold) return ErrUnsignedMetadata{Msg: fmt.Sprintf("Verifying %s failed, not enough signatures, got %d, want %d", delegatedRole, len(signingKeys), roleThreshold)} } - log.Infof("Verified %s successfully", delegatedRole) + log.V(4).Info("Verified successfully", "role", delegatedRole) return nil } @@ -446,7 +445,7 @@ func (source *TargetFiles) Equal(expected TargetFiles) bool { // FromFile generate TargetFiles from file func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { - log.Debugf("Generating target file from file %s", localPath) + log.V(5).Info("Generating target file from file", "path", localPath) // open file in, err := os.Open(localPath) if err != nil { @@ -463,7 +462,7 @@ func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles // FromBytes generate TargetFiles from bytes func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) (*TargetFiles, error) { - log.Debugf("Generating target file from bytes %s", localPath) + log.V(5).Info("Generating target file from bytes", "path", localPath) var hasher hash.Hash targetFile := &TargetFiles{ Hashes: map[string]HexBytes{}, @@ -499,7 +498,7 @@ func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) // ClearSignatures clears Signatures func (meta *Metadata[T]) ClearSignatures() { - log.Debug("Cleared signatures") + log.V(5).Info("Cleared signatures") meta.Signatures = []Signature{} } @@ -689,7 +688,7 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? return nil } - log.Debugf("Delegated role %s already has keyID %s", role, key.ID()) + log.V(5).Info("Delegated role already has keyID", "role", role, "ID", key.ID()) } } if !isDelegatedRole { @@ -702,7 +701,7 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? return nil } - log.Debugf("SuccinctRoles role already has keyID %s", key.ID()) + log.V(5).Info("SuccinctRoles role already has keyID", "ID", key.ID()) } signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? diff --git a/metadata/metadata_api_test.go b/metadata/metadata_api_test.go index c836b621..5a45c0ce 100644 --- a/metadata/metadata_api_test.go +++ b/metadata/metadata_api_test.go @@ -27,7 +27,6 @@ import ( testutils "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" "github.com/sigstore/sigstore/pkg/cryptoutils" "github.com/sigstore/sigstore/pkg/signature" - log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "golang.org/x/sys/unix" ) @@ -41,7 +40,8 @@ func TestMain(m *testing.M) { defer testutils.Cleanup() if err != nil { - log.Fatalf("failed to setup test dirs: %v", err) + log.Error(err, "failed to setup test dirs") + os.Exit(1) } m.Run() } diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index 72ff3bc3..8573e208 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -20,7 +20,6 @@ import ( "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/updater" - log "github.com/sirupsen/logrus" "golang.org/x/exp/slices" ) @@ -102,10 +101,11 @@ func New(config *MultiRepoConfig) (*MultiRepoClient, error) { // initTUFClients loop through all repositories listed in the map file and create a TUF client for each func (client *MultiRepoClient) initTUFClients() error { + log := metadata.GetLogger() // loop through each repository listed in the map file and initialize it for repoName, repoURL := range client.Config.RepoMap.Repositories { - log.Infof("Initializing %s - %s", repoName, repoURL[0]) + log.V(4).Info("Initializing", "name", repoName, "url", repoURL[0]) // get the trusted root file from the location specified in the map file relevant to its path // NOTE: the root.json file is expected to be in a folder named after the repository it corresponds to placed in the same folder as the map file @@ -149,16 +149,18 @@ func (client *MultiRepoClient) initTUFClients() error { // save the client client.TUFClients[repoName] = repoTUFClient - log.Debugf("Successfully initialized %s - %s", repoName, repoURL) + log.V(5).Info("Successfully initialized", "name", repoName, "url", repoURL) } return nil } // Refresh refreshes all repository clients func (client *MultiRepoClient) Refresh() error { + log := metadata.GetLogger() + // loop through each initialized TUF client and refresh it for name, repoTUFClient := range client.TUFClients { - log.Infof("Refreshing %s", name) + log.V(4).Info("Refreshing", "name", name) err := repoTUFClient.Refresh() if err != nil { return err @@ -300,6 +302,8 @@ func (client *MultiRepoClient) GetTargetInfo(targetPath string) (*metadata.Targe // DownloadTarget downloads the target file specified by targetFile func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, []byte, error) { + log := metadata.GetLogger() + for _, repoName := range repos { // see if the target is already present locally targetPath, targetBytes, err := client.TUFClients[repoName].FindCachedTarget(targetFile, filePath) @@ -308,7 +312,7 @@ func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metada } if len(targetPath) != 0 && len(targetBytes) != 0 { // we already got the target for this target info cached locally, so return it - log.Info(fmt.Sprintf("Target %s already present locally from %s", targetFile.Path, repoName)) + log.V(4).Info("Target already present locally from repo", "target", targetFile.Path, "repo", repoName) return targetPath, targetBytes, nil } // not present locally, so let's try to download it @@ -319,7 +323,7 @@ func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metada continue } // we got the target for this target info, so return it - log.Info(fmt.Sprintf("Downloaded target %s from %s", targetFile.Path, repoName)) + log.V(4).Info("Downloaded target from repo", "target", targetFile.Path, "repo", repoName) return targetPath, targetBytes, nil } // error out as we haven't succeeded downloading the target file diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index f631a95d..5bdfe7d5 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -16,7 +16,6 @@ import ( "time" "github.com/rdimitrov/go-tuf-metadata/metadata" - log "github.com/sirupsen/logrus" ) // TrustedMetadata struct for storing trusted metadata @@ -50,10 +49,12 @@ func New(rootData []byte) (*TrustedMetadata, error) { // Note that an expired intermediate root is considered valid: expiry is // only checked for the final root in UpdateTimestamp() func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[metadata.RootType], error) { + log := metadata.GetLogger() + if trusted.Timestamp != nil { return nil, metadata.ErrRuntime{Msg: "cannot update root after timestamp"} } - log.Debug("Updating root") + log.V(5).Info("Updating root") // generate root metadata newRoot, err := metadata.Root().FromBytes(rootData) if err != nil { @@ -79,7 +80,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ } // save root if verified trusted.Root = newRoot - log.Infof("Updated root v%d", trusted.Root.Signed.Version) + log.V(4).Info("Updated root", "version", trusted.Root.Signed.Version) return trusted.Root, nil } @@ -90,6 +91,8 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ // timestamp will be used for rollback protection). Expired timestamp will // prevent loading snapshot metadata. func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata.Metadata[metadata.TimestampType], error) { + log := metadata.GetLogger() + if trusted.Snapshot != nil { return nil, metadata.ErrRuntime{Msg: "cannot update timestamp after snapshot"} } @@ -99,7 +102,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata // timestamp/snapshot can not yet be loaded at this point return nil, metadata.ErrExpiredMetadata{Msg: "final root.json is expired"} } - log.Debug("Updating timestamp") + log.V(5).Info("Updating timestamp") newTimestamp, err := metadata.Timestamp().FromBytes(timestampData) if err != nil { return nil, err @@ -122,7 +125,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata } // keep using old timestamp if versions are equal if newTimestamp.Signed.Version == trusted.Timestamp.Signed.Version { - log.Debugf("New timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version) + log.V(5).Info("New timestamp version equals the old one", "new", newTimestamp.Signed.Version, "old", trusted.Timestamp.Signed.Version) return nil, metadata.ErrEqualVersionNumber{Msg: fmt.Sprintf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version)} } // prevent rolling back snapshot version @@ -136,7 +139,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata // protection of new timestamp: expiry is checked in UpdateSnapshot() // save root if verified trusted.Timestamp = newTimestamp - log.Infof("Updated timestamp v%d", trusted.Timestamp.Signed.Version) + log.V(4).Info("Updated timestamp", "version", trusted.Timestamp.Signed.Version) // timestamp is loaded: error if it is not valid _final_ timestamp err = trusted.checkFinalTimestamp() @@ -164,13 +167,15 @@ func (trusted *TrustedMetadata) checkFinalTimestamp() error { // Expired snapshot or snapshot that does not match timestamp meta version will // prevent loading targets. func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bool) (*metadata.Metadata[metadata.SnapshotType], error) { + log := metadata.GetLogger() + if trusted.Timestamp == nil { return nil, metadata.ErrRuntime{Msg: "cannot update snapshot before timestamp"} } if trusted.Targets[metadata.TARGETS] != nil { return nil, metadata.ErrRuntime{Msg: "cannot update snapshot after targets"} } - log.Debug("Updating snapshot") + log.V(5).Info("Updating snapshot") // snapshot cannot be loaded if final timestamp is expired err := trusted.checkFinalTimestamp() @@ -221,7 +226,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo // expiry not checked to allow old snapshot to be used for rollback // protection of new snapshot: it is checked when targets is updated trusted.Snapshot = newSnapshot - log.Infof("Updated snapshot v%d", trusted.Snapshot.Signed.Version) + log.V(4).Info("Updated snapshot", "version", trusted.Snapshot.Signed.Version) // snapshot is loaded, but we error if it's not valid _final_ snapshot err = trusted.checkFinalSnapshot() @@ -251,6 +256,8 @@ func (trusted *TrustedMetadata) UpdateTargets(targetsData []byte) (*metadata.Met // UpdateDelegatedTargets verifies and loads “targetsData“ as new metadata for target “roleName“ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleName, delegatorName string) (*metadata.Metadata[metadata.TargetsType], error) { + log := metadata.GetLogger() + var ok bool if trusted.Snapshot == nil { return nil, metadata.ErrRuntime{Msg: "cannot load targets before snapshot"} @@ -274,7 +281,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN if !ok { return nil, metadata.ErrRuntime{Msg: "cannot load targets before delegator"} } - log.Debugf("Updating %s delegated by %s", roleName, delegatorName) + log.V(5).Info("Updating delegated role", "role", roleName, "delegator", delegatorName) // Verify against the hashes in snapshot, if any meta, ok := trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] if !ok { @@ -313,7 +320,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN return nil, metadata.ErrExpiredMetadata{Msg: fmt.Sprintf("new %s is expired", roleName)} } trusted.Targets[roleName] = newDelegate - log.Infof("Updated %s v%d", roleName, trusted.Targets[roleName].Signed.Version) + log.V(4).Info("Updated role", "role", roleName, "version", trusted.Targets[roleName].Signed.Version) return trusted.Targets[roleName], nil } @@ -321,6 +328,8 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN // Note that an expired initial root is considered valid: expiry is // only checked for the final root in “UpdateTimestamp()“. func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { + log := metadata.GetLogger() + // generate root metadata newRoot, err := metadata.Root().FromBytes(rootData) if err != nil { @@ -337,6 +346,6 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { } // save root if verified trusted.Root = newRoot - log.Infof("Loaded trusted root v%d", trusted.Root.Signed.Version) + log.V(4).Info("Loaded trusted root", "version", trusted.Root.Signed.Version) return nil } diff --git a/metadata/trustedmetadata/trustedmetadata_test.go b/metadata/trustedmetadata/trustedmetadata_test.go index 82a087ab..cf5be5ca 100644 --- a/metadata/trustedmetadata/trustedmetadata_test.go +++ b/metadata/trustedmetadata/trustedmetadata_test.go @@ -22,7 +22,6 @@ import ( "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" "github.com/sigstore/sigstore/pkg/cryptoutils" "github.com/sigstore/sigstore/pkg/signature" - log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "golang.org/x/exp/maps" ) @@ -30,40 +29,49 @@ import ( var allRoles map[string][]byte func setAllRolesBytes(path string) { + log := metadata.GetLogger() + allRoles = make(map[string][]byte) root, err := os.ReadFile(fmt.Sprintf("%s/root.json", path)) if err != nil { - log.Fatalf("failed to root bytes: %v", err) + log.Error(err, "failed to root bytes") + os.Exit(1) } allRoles[metadata.ROOT] = root targets, err := os.ReadFile(fmt.Sprintf("%s/targets.json", path)) if err != nil { - log.Fatalf("failed to targets bytes: %v", err) + log.Error(err, "failed to targets bytes") + os.Exit(1) } allRoles[metadata.TARGETS] = targets snapshot, err := os.ReadFile(fmt.Sprintf("%s/snapshot.json", path)) if err != nil { - log.Fatalf("failed to snapshot bytes: %v", err) + log.Error(err, "failed to snapshot bytes") + os.Exit(1) } allRoles[metadata.SNAPSHOT] = snapshot timestamp, err := os.ReadFile(fmt.Sprintf("%s/timestamp.json", path)) if err != nil { - log.Fatalf("failed to timestamp bytes: %v", err) + log.Error(err, "failed to timestamp bytes") + os.Exit(1) } allRoles[metadata.TIMESTAMP] = timestamp role1, err := os.ReadFile(fmt.Sprintf("%s/role1.json", path)) if err != nil { - log.Fatalf("failed to role1 bytes: %v", err) + log.Error(err, "failed to role1 bytes") + os.Exit(1) } allRoles["role1"] = role1 role2, err := os.ReadFile(fmt.Sprintf("%s/role2.json", path)) if err != nil { - log.Fatalf("failed to role2 bytes: %v", err) + log.Error(err, "failed to role2 bytes") + os.Exit(1) } allRoles["role2"] = role2 } func TestMain(m *testing.M) { + log := metadata.GetLogger() repoPath := "../../testutils/repository_data/repository/metadata" keystorePath := "../../testutils/repository_data/keystore" @@ -72,7 +80,8 @@ func TestMain(m *testing.M) { defer testutils.Cleanup() if err != nil { - log.Fatalf("failed to setup test dirs: %v", err) + log.Error(err, "failed to setup test dirs") + os.Exit(1) } setAllRolesBytes(testutils.RepoDir) m.Run() @@ -81,20 +90,22 @@ func TestMain(m *testing.M) { type modifyRoot func(*metadata.Metadata[metadata.RootType]) func modifyRootMetadata(fn modifyRoot) ([]byte, error) { + log := metadata.GetLogger() + root, err := metadata.Root().FromBytes(allRoles[metadata.ROOT]) if err != nil { - log.Debugf("failed to create root metadata from bytes: %v", err) + log.Error(err, "failed to create root metadata from bytes") } fn(root) signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/root_key", crypto.SHA256, cryptoutils.SkipPassword) if err != nil { - log.Debugf("failed to load signer from pem file: %v", err) + log.Error(err, "failed to load signer from pem file") } root.ClearSignatures() _, err = root.Sign(signer) if err != nil { - log.Debugf("failed to sign root: %v", err) + log.Error(err, "failed to sign root") } return root.ToBytes(true) } @@ -102,20 +113,22 @@ func modifyRootMetadata(fn modifyRoot) ([]byte, error) { type modifyTimestamp func(*metadata.Metadata[metadata.TimestampType]) func modifyTimestamptMetadata(fn modifyTimestamp) ([]byte, error) { + log := metadata.GetLogger() + timestamp, err := metadata.Timestamp().FromBytes(allRoles[metadata.TIMESTAMP]) if err != nil { - log.Debugf("failed to create timestamp metadata from bytes: %v", err) + log.Error(err, "failed to create timestamp metadata from bytes") } fn(timestamp) signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/timestamp_key", crypto.SHA256, cryptoutils.SkipPassword) if err != nil { - log.Debugf("failed to load signer from pem file: %v", err) + log.Error(err, "failed to load signer from pem file") } timestamp.ClearSignatures() _, err = timestamp.Sign(signer) if err != nil { - log.Debugf("failed to sign timestamp: %v", err) + log.Error(err, "failed to sign timestamp") } return timestamp.ToBytes(true) } @@ -123,20 +136,22 @@ func modifyTimestamptMetadata(fn modifyTimestamp) ([]byte, error) { type modifySnapshot func(*metadata.Metadata[metadata.SnapshotType]) func modifySnapshotMetadata(fn modifySnapshot) ([]byte, error) { + log := metadata.GetLogger() + snapshot, err := metadata.Snapshot().FromBytes(allRoles[metadata.SNAPSHOT]) if err != nil { - log.Debugf("failed to create snapshot metadata from bytes: %v", err) + log.Error(err, "failed to create snapshot metadata from bytes") } fn(snapshot) signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/snapshot_key", crypto.SHA256, cryptoutils.SkipPassword) if err != nil { - log.Debugf("failed to load signer from pem file: %v", err) + log.Error(err, "failed to load signer from pem file") } snapshot.ClearSignatures() _, err = snapshot.Sign(signer) if err != nil { - log.Debugf("failed to sign snapshot: %v", err) + log.Error(err, "failed to sign snapshot") } return snapshot.ToBytes(true) } @@ -144,20 +159,22 @@ func modifySnapshotMetadata(fn modifySnapshot) ([]byte, error) { type modifyTargets func(*metadata.Metadata[metadata.TargetsType]) func modifyTargetsMetadata(fn modifyTargets) ([]byte, error) { + log := metadata.GetLogger() + targets, err := metadata.Targets().FromBytes(allRoles[metadata.TARGETS]) if err != nil { - log.Debugf("failed to create targets metadata from bytes: %v", err) + log.Error(err, "failed to create targets metadata from bytes") } fn(targets) signer, err := signature.LoadSignerFromPEMFile(testutils.KeystoreDir+"/targets_key", crypto.SHA256, cryptoutils.SkipPassword) if err != nil { - log.Debugf("failed to load signer from pem file: %v", err) + log.Error(err, "failed to load signer from pem file") } targets.ClearSignatures() _, err = targets.Sign(signer) if err != nil { - log.Debugf("failed to sign targets: %v", err) + log.Error(err, "failed to sign targets") } return targets.ToBytes(true) } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 1a79dc8c..cbfd70b7 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -26,7 +26,6 @@ import ( "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/config" "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" - log "github.com/sirupsen/logrus" ) // Client update workflow implementation @@ -142,6 +141,8 @@ func (update *Updater) GetTargetInfo(targetPath string) (*metadata.TargetFiles, // DownloadTarget downloads the target file specified by targetFile func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath, targetBaseURL string) (string, []byte, error) { + log := metadata.GetLogger() + var err error if filePath == "" { filePath, err = update.generateTargetFilePath(targetFile) @@ -192,7 +193,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath return "", nil, err } } - log.Infof("Downloaded target %s", targetFile.Path) + log.V(4).Info("Downloaded target", "path", targetFile.Path) return filePath, data, nil } @@ -231,24 +232,25 @@ func (update *Updater) FindCachedTarget(targetFile *metadata.TargetFiles, filePa // loadTimestamp load local and remote timestamp metadata func (update *Updater) loadTimestamp() error { + log := metadata.GetLogger() // try to read local timestamp data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, metadata.TIMESTAMP)) if err != nil { // this means there's no existing local timestamp so we should proceed downloading it without the need to UpdateTimestamp - log.Debug("Local timestamp does not exist") + log.V(5).Info("Local timestamp does not exist") } else { // local timestamp exists, let's try to verify it and load it to the trusted metadata set _, err := update.trusted.UpdateTimestamp(data) if err != nil { if errors.Is(err, metadata.ErrRepository{}) { // local timestamp is not valid, proceed downloading from remote; note that this error type includes several other subset errors - log.Debug("Local timestamp is not valid") + log.V(5).Info("Local timestamp is not valid") } else { // another error return err } } - log.Debug("Local timestamp is valid") + log.V(5).Info("Local timestamp is valid") // all okay, local timestamp exists and it is valid, nevertheless proceed with downloading from remote } // load from remote (whether local load succeeded or not) @@ -278,11 +280,12 @@ func (update *Updater) loadTimestamp() error { // loadSnapshot load local (and if needed remote) snapshot metadata func (update *Updater) loadSnapshot() error { + log := metadata.GetLogger() // try to read local snapshot data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, metadata.SNAPSHOT)) if err != nil { // this means there's no existing local snapshot so we should proceed downloading it without the need to UpdateSnapshot - log.Debug("Local snapshot does not exist") + log.V(5).Info("Local snapshot does not exist") } else { // successfully read a local snapshot metadata, so let's try to verify and load it to the trusted metadata set _, err = update.trusted.UpdateSnapshot(data, true) @@ -290,19 +293,19 @@ func (update *Updater) loadSnapshot() error { // this means snapshot verification/loading failed if errors.Is(err, metadata.ErrRepository{}) { // local snapshot is not valid, proceed downloading from remote; note that this error type includes several other subset errors - log.Debug("Local snapshot is not valid") + log.V(5).Info("Local snapshot is not valid") } else { // another error return err } } else { // this means snapshot verification/loading succeeded - log.Debug("Local snapshot is valid: not downloading new one") + log.V(5).Info("Local snapshot is valid: not downloading new one") return nil } } // local snapshot does not exist or is invalid, update from remote - log.Debug("Failed to load local snapshot") + log.V(5).Info("Failed to load local snapshot") if update.trusted.Timestamp == nil { return fmt.Errorf("trusted timestamp not set") } @@ -338,6 +341,7 @@ func (update *Updater) loadSnapshot() error { // loadTargets load local (and if needed remote) metadata for roleName func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metadata[metadata.TargetsType], error) { + log := metadata.GetLogger() // avoid loading "roleName" more than once during "GetTargetInfo" role, ok := update.trusted.Targets[roleName] if ok { @@ -347,7 +351,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, roleName)) if err != nil { // this means there's no existing local target file so we should proceed downloading it without the need to UpdateDelegatedTargets - log.Debugf("Local %s does not exist", roleName) + log.V(5).Info("Local role does not exist", "role", roleName) } else { // successfully read a local targets metadata, so let's try to verify and load it to the trusted metadata set delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) @@ -355,19 +359,19 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad // this means targets verification/loading failed if errors.Is(err, metadata.ErrRepository{}) { // local target file is not valid, proceed downloading from remote; note that this error type includes several other subset errors - log.Debugf("Local %s is not valid", roleName) + log.V(5).Info("Local role is not valid", "role", roleName) } else { // another error return nil, err } } else { // this means targets verification/loading succeeded - log.Debugf("Local %s is valid: not downloading new one", roleName) + log.V(5).Info("Local role is valid: not downloading new one", "role", roleName) return delegatedTargets, nil } } // local "roleName" does not exist or is invalid, update from remote - log.Debugf("Failed to load local %s", roleName) + log.V(5).Info("Failed to load local role", "role", roleName) if update.trusted.Snapshot == nil { return nil, fmt.Errorf("trusted snapshot not set") } @@ -445,6 +449,7 @@ func (update *Updater) loadRoot() error { // in order of appearance (which implicitly order trustworthiness), // and returns the matching target found in the most trusted role. func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata.TargetFiles, error) { + log := metadata.GetLogger() // list of delegations to be interrogated. A (role, parent role) pair // is needed to load and verify the delegated targets metadata delegationsToVisit := []roleParentTuple{{ @@ -460,7 +465,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // skip any visited current role to prevent cycles _, ok := visitedRoleNames[delegation.Role] if ok { - log.Debugf("Skipping visited current role %s", delegation.Role) + log.V(5).Info("Skipping visited current role", "role", delegation.Role) continue } // the metadata for delegation.Role must be downloaded/updated before @@ -471,7 +476,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } target, ok := targets.Signed.Targets[targetFilePath] if ok { - log.Debugf("Found target in current role %s", delegation.Role) + log.V(5).Info("Found target in current role", "role", delegation.Role) return target, nil } // after pre-order check, add current role to set of visited roles @@ -482,10 +487,10 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // delegated roles roles := targets.Signed.Delegations.GetRolesForTarget(targetFilePath) for child, terminating := range roles { - log.Debugf("Adding child role %s", child) + log.V(5).Info("Adding child role", "role", child) childRolesToVisit = append(childRolesToVisit, roleParentTuple{Role: child, Parent: delegation.Role}) if terminating { - log.Debug("Not backtracking to other roles") + log.V(5).Info("Not backtracking to other roles") } delegationsToVisit = []roleParentTuple{} break @@ -498,9 +503,9 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } } if len(delegationsToVisit) > 0 { - log.Debugf("%d roles left to visit, but allowed at most %d delegations", - len(delegationsToVisit), - update.cfg.MaxDelegations) + log.V(5).Info("Too many roles left to visit for max allowed delegations", + "roles-left", len(delegationsToVisit), + "allowed-delegations", update.cfg.MaxDelegations) } // if this point is reached then target is not found, return nil return nil, fmt.Errorf("target %s not found", targetFilePath) @@ -508,6 +513,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // persistMetadata writes metadata to disk atomically to avoid data loss func (update *Updater) persistMetadata(roleName string, data []byte) error { + log := metadata.GetLogger() // do not persist the metadata if we have disabled local caching if update.cfg.DisableLocalCache { return nil @@ -529,7 +535,7 @@ func (update *Updater) persistMetadata(roleName string, data []byte) error { // delete the temporary file if there was an error while writing errRemove := os.Remove(file.Name()) if errRemove != nil { - log.Debugf("Failed to delete temporary file: %s", file.Name()) + log.V(5).Info("Failed to delete temporary file", "name", file.Name()) } return err } diff --git a/testutils/testutils/setup.go b/testutils/testutils/setup.go index 17bcc6f5..dfd71a1b 100644 --- a/testutils/testutils/setup.go +++ b/testutils/testutils/setup.go @@ -13,10 +13,9 @@ package testutils import ( "fmt" + "log" "os" "path/filepath" - - log "github.com/sirupsen/logrus" ) var ( @@ -31,45 +30,41 @@ func SetupTestDirs(repoPath string, targetsPath string, keystorePath string) err var err error TempDir, err = os.MkdirTemp(tmp, "0750") if err != nil { - log.Fatal("failed to create temporary directory: ", err) - return err + return fmt.Errorf("failed to create temporary directory: %w", err) } RepoDir = fmt.Sprintf("%s/repository_data/repository", TempDir) absPath, err := filepath.Abs(repoPath) if err != nil { - log.Debugf("failed to get absolute path: %v", err) + return fmt.Errorf("failed to get absolute path: %w", err) } err = Copy(absPath, RepoDir) if err != nil { - log.Debugf("failed to copy metadata to %s: %v", RepoDir, err) - return err + return fmt.Errorf("failed to copy metadata to %s: %w", RepoDir, err) } TargetsDir = fmt.Sprintf("%s/repository_data/repository/targets", TempDir) targetsAbsPath, err := filepath.Abs(targetsPath) if err != nil { - log.Debugf("failed to get absolute targets path: %v", err) + return fmt.Errorf("failed to get absolute targets path: %w", err) } err = Copy(targetsAbsPath, TargetsDir) if err != nil { - log.Debugf("failed to copy metadata to %s: %v", RepoDir, err) - return err + return fmt.Errorf("failed to copy metadata to %s: %w", RepoDir, err) } KeystoreDir = fmt.Sprintf("%s/keystore", TempDir) err = os.Mkdir(KeystoreDir, 0750) if err != nil { - log.Debugf("failed to create keystore dir %s: %v", KeystoreDir, err) + return fmt.Errorf("failed to create keystore dir %s: %w", KeystoreDir, err) } absPath, err = filepath.Abs(keystorePath) if err != nil { - log.Debugf("failed to get absolute path: %v", err) + return fmt.Errorf("failed to get absolute path: %w", err) } err = Copy(absPath, KeystoreDir) if err != nil { - log.Debugf("failed to copy keystore to %s: %v", KeystoreDir, err) - return err + return fmt.Errorf("failed to copy keystore to %s: %w", KeystoreDir, err) } return nil @@ -78,22 +73,21 @@ func SetupTestDirs(repoPath string, targetsPath string, keystorePath string) err func Copy(fromPath string, toPath string) error { err := os.MkdirAll(toPath, 0750) if err != nil { - log.Debugf("failed to create directory %s: %v", toPath, err) + return fmt.Errorf("failed to create directory %s: %w", toPath, err) } files, err := os.ReadDir(fromPath) if err != nil { - log.Debugf("failed to read path %s: %v", fromPath, err) - return err + return fmt.Errorf("failed to read path %s: %w", fromPath, err) } for _, file := range files { data, err := os.ReadFile(fmt.Sprintf("%s/%s", fromPath, file.Name())) if err != nil { - log.Debugf("failed to read file %s: %v", file.Name(), err) + return fmt.Errorf("failed to read file %s: %w", file.Name(), err) } filePath := fmt.Sprintf("%s/%s", toPath, file.Name()) err = os.WriteFile(filePath, data, 0750) if err != nil { - log.Debugf("failed to write file %s: %v", filePath, err) + return fmt.Errorf("failed to write file %s: %w", filePath, err) } } return nil From b38e4eb9e81d7243490d1d0bf5838ebc668a2ec6 Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Fri, 1 Sep 2023 13:20:34 +0200 Subject: [PATCH 174/208] feat: fetcher timeout and length limit (#61) * feat(fetcher): enable default client timeout Signed-off-by: Marvin Drees * feat(fetcher): re-enable Content-Length header check Signed-off-by: Marvin Drees * test(fetcher): update fetcher tests to table driven tests Signed-off-by: Marvin Drees --------- Signed-off-by: Marvin Drees --- metadata/config/config_test.go | 2 +- metadata/fetcher/fetcher.go | 59 +++++++++++------- metadata/fetcher/fetcher_test.go | 103 +++++++++++++++++++------------ metadata/updater/updater.go | 5 +- 4 files changed, 107 insertions(+), 62 deletions(-) diff --git a/metadata/config/config_test.go b/metadata/config/config_test.go index 17b559ef..79ea3070 100644 --- a/metadata/config/config_test.go +++ b/metadata/config/config_test.go @@ -68,7 +68,7 @@ func TestNewUpdaterConfig(t *testing.T) { updaterConfig, err := New(tt.remoteURL, tt.rootBytes) // special case if we expect no error if tt.wantErr == nil { - assert.NoErrorf(t, err, "expected no erro but got %v", err) + assert.NoErrorf(t, err, "expected no error but got %v", err) assert.EqualExportedValuesf(t, *tt.config, *updaterConfig, "expected %#+v but got %#+v", tt.config, updaterConfig) return } diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index 4d0c1991..635aa6c2 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -12,55 +12,72 @@ package fetcher import ( + "fmt" "io" "net/http" + "strconv" + "time" "github.com/rdimitrov/go-tuf-metadata/metadata" ) // Fetcher interface type Fetcher interface { - DownloadFile(urlPath string, maxLength int64) ([]byte, error) + DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error) } -// Default fetcher +// DefaultFetcher implements Fetcher type DefaultFetcher struct { httpUserAgent string } -// DownloadFile downloads a file from urlPath, errors out if it failed or its length is larger than maxLength -func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64) ([]byte, error) { - client := http.DefaultClient +// DownloadFile downloads a file from urlPath, errors out if it failed, +// its length is larger than maxLength or the timeout is reached. +func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error) { + client := &http.Client{Timeout: timeout} req, err := http.NewRequest("GET", urlPath, nil) if err != nil { return nil, err } - // use in case of multiple sessions + // Use in case of multiple sessions. if d.httpUserAgent != "" { req.Header.Set("User-Agent", d.httpUserAgent) } - // execute the request + // Execute the request. res, err := client.Do(req) if err != nil { return nil, err } defer res.Body.Close() - // handle HTTP status codes + // Handle HTTP status codes. if res.StatusCode == http.StatusNotFound || res.StatusCode == http.StatusForbidden || res.StatusCode != http.StatusOK { return nil, metadata.ErrDownloadHTTP{StatusCode: res.StatusCode, URL: urlPath} } - // TODO: handle content length correctly as we should not rely on the Content-Length header - // // get content length - // length, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) - // if err != nil { - // return nil, err - // } - // // error if the reported size is greater than what is expected - // if length > maxLength { - // return nil, metadata.ErrDownloadLengthMismatch{Msg: fmt.Sprintf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength)} - // } - // although the size has been checked above, use a LimitReader in case + var length int64 + // Get content length from header (might not be accurate, -1 or not set). + if header := res.Header.Get("Content-Length"); header != "" { + length, err = strconv.ParseInt(header, 10, 0) + if err != nil { + return nil, err + } + // Error if the reported size is greater than what is expected. + if length > maxLength { + return nil, metadata.ErrDownloadLengthMismatch{Msg: fmt.Sprintf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength)} + } + } + // Although the size has been checked above, use a LimitReader in case // the reported size is inaccurate, or size is -1 which indicates an - // unknown length - return io.ReadAll(io.LimitReader(res.Body, maxLength)) + // unknown length. We read maxLength + 1 in order to check if the read data + // surpased our set limit. + data, err := io.ReadAll(io.LimitReader(res.Body, maxLength+1)) + if err != nil { + return nil, err + } + // Error if the reported size is greater than what is expected. + length = int64(len(data)) + if length > maxLength { + return nil, metadata.ErrDownloadLengthMismatch{Msg: fmt.Sprintf("download failed for %s, length %d is larger than expected %d", urlPath, length, maxLength)} + } + + return data, nil } diff --git a/metadata/fetcher/fetcher_test.go b/metadata/fetcher/fetcher_test.go index c4e680ea..a7a37e7f 100644 --- a/metadata/fetcher/fetcher_test.go +++ b/metadata/fetcher/fetcher_test.go @@ -12,50 +12,77 @@ package fetcher import ( - "errors" "net/url" "testing" + "time" "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/stretchr/testify/assert" ) -const ( - badURL = "https://somebadtufrepourl.com/metadata/" - goodURLBadPath = "https://jku.github.io/tuf-demo/metadata/badPath.json" - goodURLGoodPath = "https://jku.github.io/tuf-demo/metadata/1.root.json" - rootMaxLength = 512000 // bytes - -) - -func TestDefaultFetcherDownloadFileWithBadURL(t *testing.T) { - fetcher := DefaultFetcher{httpUserAgent: ""} - data, err := fetcher.DownloadFile(badURL, rootMaxLength) - // expect error - assert.NotNil(t, err) - // of type url.Error - assert.IsType(t, &url.Error{}, err) - assert.Empty(t, data) -} - -func TestDefaultFetcherDownloadFileWithGoodURLMissingPath(t *testing.T) { - fetcher := DefaultFetcher{httpUserAgent: ""} - data, err := fetcher.DownloadFile(goodURLBadPath, rootMaxLength) - // invalid target location, so expect error - assert.NotNil(t, err) - assert.Empty(t, data) - var checkErr metadata.ErrDownloadHTTP - if errors.As(err, &checkErr) { - // of status code 404 - assert.Equal(t, 404, checkErr.StatusCode) +func TestDownLoadFile(t *testing.T) { + for _, tt := range []struct { + name string + desc string + url string + maxLength int64 + timeout time.Duration + data []byte + wantErr error + }{ + { + name: "success", + desc: "No errors expected", + url: "https://jku.github.io/tuf-demo/metadata/1.root.json", + maxLength: 512000, + timeout: 15 * time.Second, + data: []byte{123, 10, 32, 34, 115, 105, 103, 110, 97, 116, 117, 114, 101, 115, 34, 58, 32, 91, 10, 32, 32, 123, 10, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 44, 10, 32, 32, 32, 34, 115, 105, 103, 34, 58, 32, 34, 57, 54, 57, 98, 100, 101, 99, 51, 54, 100, 54, 102, 51, 100, 99, 53, 57, 99, 49, 55, 50, 48, 50, 97, 56, 53, 50, 56, 98, 98, 51, 53, 54, 97, 54, 101, 97, 53, 52, 100, 55, 99, 99, 57, 54, 98, 98, 51, 55, 49, 101, 101, 101, 52, 56, 101, 50, 52, 48, 49, 57, 50, 98, 99, 97, 99, 100, 53, 48, 53, 49, 51, 56, 56, 50, 52, 53, 49, 52, 52, 97, 97, 99, 97, 49, 48, 51, 57, 100, 51, 101, 98, 55, 48, 54, 50, 101, 48, 56, 55, 54, 55, 57, 53, 101, 56, 49, 101, 49, 100, 53, 54, 54, 102, 56, 100, 101, 100, 50, 99, 50, 56, 52, 97, 101, 101, 48, 102, 34, 10, 32, 32, 125, 44, 10, 32, 32, 123, 10, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 34, 115, 105, 103, 34, 58, 32, 34, 101, 100, 102, 97, 102, 51, 99, 53, 51, 56, 97, 48, 50, 51, 101, 55, 99, 102, 53, 98, 50, 54, 51, 97, 101, 52, 101, 54, 51, 99, 51, 51, 99, 57, 52, 97, 50, 98, 102, 99, 57, 102, 101, 56, 48, 56, 53, 57, 99, 52, 57, 51, 52, 100, 52, 97, 54, 54, 98, 48, 49, 53, 98, 54, 53, 98, 57, 48, 49, 101, 99, 53, 100, 53, 50, 57, 48, 101, 97, 53, 50, 52, 51, 51, 57, 101, 54, 97, 52, 48, 98, 53, 98, 56, 100, 98, 56, 97, 57, 53, 54, 49, 102, 51, 99, 49, 48, 51, 101, 50, 97, 101, 56, 55, 98, 57, 101, 101, 48, 51, 50, 97, 57, 101, 51, 48, 48, 49, 34, 10, 32, 32, 125, 10, 32, 93, 44, 10, 32, 34, 115, 105, 103, 110, 101, 100, 34, 58, 32, 123, 10, 32, 32, 34, 95, 116, 121, 112, 101, 34, 58, 32, 34, 114, 111, 111, 116, 34, 44, 10, 32, 32, 34, 99, 111, 110, 115, 105, 115, 116, 101, 110, 116, 95, 115, 110, 97, 112, 115, 104, 111, 116, 34, 58, 32, 116, 114, 117, 101, 44, 10, 32, 32, 34, 101, 120, 112, 105, 114, 101, 115, 34, 58, 32, 34, 50, 48, 50, 49, 45, 48, 55, 45, 49, 56, 84, 49, 51, 58, 51, 55, 58, 51, 56, 90, 34, 44, 10, 32, 32, 34, 107, 101, 121, 115, 34, 58, 32, 123, 10, 32, 32, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 53, 48, 102, 52, 56, 54, 53, 57, 54, 54, 53, 98, 51, 101, 101, 98, 50, 50, 100, 52, 57, 51, 55, 52, 101, 49, 56, 51, 49, 57, 55, 101, 101, 102, 56, 101, 52, 50, 56, 55, 54, 97, 53, 99, 98, 57, 48, 57, 99, 57, 49, 97, 98, 55, 55, 101, 52, 50, 98, 49, 101, 99, 99, 54, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 49, 56, 101, 98, 50, 52, 56, 51, 49, 57, 54, 98, 55, 97, 97, 50, 53, 102, 97, 102, 98, 56, 49, 50, 55, 54, 99, 55, 48, 52, 102, 55, 57, 48, 51, 99, 99, 57, 98, 49, 101, 51, 52, 99, 97, 100, 99, 52, 101, 97, 102, 54, 55, 55, 98, 55, 97, 54, 55, 52, 100, 54, 102, 53, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 57, 50, 49, 101, 99, 99, 56, 54, 101, 101, 57, 49, 102, 100, 100, 51, 97, 53, 53, 49, 52, 48, 50, 51, 100, 102, 49, 57, 99, 100, 56, 53, 57, 49, 53, 57, 52, 54, 55, 55, 54, 52, 102, 54, 48, 102, 99, 52, 49, 101, 49, 101, 101, 97, 99, 56, 53, 48, 51, 53, 49, 49, 54, 49, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 56, 57, 53, 55, 54, 57, 49, 55, 100, 49, 54, 48, 50, 56, 52, 51, 56, 52, 97, 52, 55, 55, 53, 57, 101, 101, 99, 49, 102, 99, 48, 102, 53, 98, 55, 52, 54, 99, 97, 51, 100, 102, 97, 100, 56, 49, 51, 101, 101, 51, 48, 56, 55, 53, 99, 51, 50, 98, 97, 99, 51, 54, 57, 99, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 48, 52, 101, 102, 51, 51, 53, 54, 102, 98, 53, 99, 100, 48, 48, 57, 55, 53, 100, 102, 99, 101, 57, 102, 56, 102, 52, 50, 100, 53, 98, 49, 50, 98, 55, 98, 56, 51, 102, 56, 98, 97, 49, 53, 99, 50, 101, 57, 56, 102, 100, 48, 52, 49, 53, 49, 52, 99, 55, 52, 98, 101, 98, 50, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 10, 32, 32, 125, 44, 10, 32, 32, 34, 114, 111, 108, 101, 115, 34, 58, 32, 123, 10, 32, 32, 32, 34, 114, 111, 111, 116, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 32, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 50, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 115, 110, 97, 112, 115, 104, 111, 116, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 116, 97, 114, 103, 101, 116, 115, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 10, 32, 32, 125, 44, 10, 32, 32, 34, 115, 112, 101, 99, 95, 118, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 49, 46, 48, 46, 49, 57, 34, 44, 10, 32, 32, 34, 118, 101, 114, 115, 105, 111, 110, 34, 58, 32, 49, 44, 10, 32, 32, 34, 120, 45, 116, 117, 102, 114, 101, 112, 111, 45, 101, 120, 112, 105, 114, 121, 45, 112, 101, 114, 105, 111, 100, 34, 58, 32, 56, 54, 52, 48, 48, 10, 32, 125, 10, 125}, + wantErr: nil, + }, + { + name: "invalid url", + desc: "URL does not exist", + url: "https://somebadtufrepourl.com/metadata/", + data: nil, + wantErr: &url.Error{}, + }, + { + name: "invalid url format", + desc: "URL is malformed", + url: string([]byte{0x7f}), + data: nil, + wantErr: &url.Error{}, + }, + { + name: "invalid path", + desc: "Path does not exist", + url: "https://jku.github.io/tuf-demo/metadata/badPath.json", + data: nil, + wantErr: metadata.ErrDownloadHTTP{}, + }, + { + name: "data too long", + desc: "Returned data is longer than maxLength", + url: "https://jku.github.io/tuf-demo/metadata/1.root.json", + maxLength: 1, + data: nil, + wantErr: metadata.ErrDownloadLengthMismatch{}, + }, + } { + t.Run(tt.name, func(t *testing.T) { + // this will only be printed if run in verbose mode or if test fails + t.Logf("Desc: %s", tt.desc) + // run the function under test + fetcher := DefaultFetcher{httpUserAgent: "Metadata_Unit_Test/1.0"} + data, err := fetcher.DownloadFile(tt.url, tt.maxLength, tt.timeout) + // special case if we expect no error + if tt.wantErr == nil { + assert.NoErrorf(t, err, "expected no error but got %v", err) + return + } + // compare the error and data with our expected error and data + assert.Equal(t, tt.data, data, "fetched data did not match") + assert.IsTypef(t, tt.wantErr, err, "expected %v but got %v", tt.wantErr, err) + }) } } - -func TestDownloadDefaultFetcherFileWithGoodURLGoodPath(t *testing.T) { - fetcher := DefaultFetcher{httpUserAgent: ""} - data, err := fetcher.DownloadFile(goodURLGoodPath, rootMaxLength) - expectedBytes := []byte{123, 10, 32, 34, 115, 105, 103, 110, 97, 116, 117, 114, 101, 115, 34, 58, 32, 91, 10, 32, 32, 123, 10, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 44, 10, 32, 32, 32, 34, 115, 105, 103, 34, 58, 32, 34, 57, 54, 57, 98, 100, 101, 99, 51, 54, 100, 54, 102, 51, 100, 99, 53, 57, 99, 49, 55, 50, 48, 50, 97, 56, 53, 50, 56, 98, 98, 51, 53, 54, 97, 54, 101, 97, 53, 52, 100, 55, 99, 99, 57, 54, 98, 98, 51, 55, 49, 101, 101, 101, 52, 56, 101, 50, 52, 48, 49, 57, 50, 98, 99, 97, 99, 100, 53, 48, 53, 49, 51, 56, 56, 50, 52, 53, 49, 52, 52, 97, 97, 99, 97, 49, 48, 51, 57, 100, 51, 101, 98, 55, 48, 54, 50, 101, 48, 56, 55, 54, 55, 57, 53, 101, 56, 49, 101, 49, 100, 53, 54, 54, 102, 56, 100, 101, 100, 50, 99, 50, 56, 52, 97, 101, 101, 48, 102, 34, 10, 32, 32, 125, 44, 10, 32, 32, 123, 10, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 34, 115, 105, 103, 34, 58, 32, 34, 101, 100, 102, 97, 102, 51, 99, 53, 51, 56, 97, 48, 50, 51, 101, 55, 99, 102, 53, 98, 50, 54, 51, 97, 101, 52, 101, 54, 51, 99, 51, 51, 99, 57, 52, 97, 50, 98, 102, 99, 57, 102, 101, 56, 48, 56, 53, 57, 99, 52, 57, 51, 52, 100, 52, 97, 54, 54, 98, 48, 49, 53, 98, 54, 53, 98, 57, 48, 49, 101, 99, 53, 100, 53, 50, 57, 48, 101, 97, 53, 50, 52, 51, 51, 57, 101, 54, 97, 52, 48, 98, 53, 98, 56, 100, 98, 56, 97, 57, 53, 54, 49, 102, 51, 99, 49, 48, 51, 101, 50, 97, 101, 56, 55, 98, 57, 101, 101, 48, 51, 50, 97, 57, 101, 51, 48, 48, 49, 34, 10, 32, 32, 125, 10, 32, 93, 44, 10, 32, 34, 115, 105, 103, 110, 101, 100, 34, 58, 32, 123, 10, 32, 32, 34, 95, 116, 121, 112, 101, 34, 58, 32, 34, 114, 111, 111, 116, 34, 44, 10, 32, 32, 34, 99, 111, 110, 115, 105, 115, 116, 101, 110, 116, 95, 115, 110, 97, 112, 115, 104, 111, 116, 34, 58, 32, 116, 114, 117, 101, 44, 10, 32, 32, 34, 101, 120, 112, 105, 114, 101, 115, 34, 58, 32, 34, 50, 48, 50, 49, 45, 48, 55, 45, 49, 56, 84, 49, 51, 58, 51, 55, 58, 51, 56, 90, 34, 44, 10, 32, 32, 34, 107, 101, 121, 115, 34, 58, 32, 123, 10, 32, 32, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 53, 48, 102, 52, 56, 54, 53, 57, 54, 54, 53, 98, 51, 101, 101, 98, 50, 50, 100, 52, 57, 51, 55, 52, 101, 49, 56, 51, 49, 57, 55, 101, 101, 102, 56, 101, 52, 50, 56, 55, 54, 97, 53, 99, 98, 57, 48, 57, 99, 57, 49, 97, 98, 55, 55, 101, 52, 50, 98, 49, 101, 99, 99, 54, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 49, 56, 101, 98, 50, 52, 56, 51, 49, 57, 54, 98, 55, 97, 97, 50, 53, 102, 97, 102, 98, 56, 49, 50, 55, 54, 99, 55, 48, 52, 102, 55, 57, 48, 51, 99, 99, 57, 98, 49, 101, 51, 52, 99, 97, 100, 99, 52, 101, 97, 102, 54, 55, 55, 98, 55, 97, 54, 55, 52, 100, 54, 102, 53, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 57, 50, 49, 101, 99, 99, 56, 54, 101, 101, 57, 49, 102, 100, 100, 51, 97, 53, 53, 49, 52, 48, 50, 51, 100, 102, 49, 57, 99, 100, 56, 53, 57, 49, 53, 57, 52, 54, 55, 55, 54, 52, 102, 54, 48, 102, 99, 52, 49, 101, 49, 101, 101, 97, 99, 56, 53, 48, 51, 53, 49, 49, 54, 49, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 56, 57, 53, 55, 54, 57, 49, 55, 100, 49, 54, 48, 50, 56, 52, 51, 56, 52, 97, 52, 55, 55, 53, 57, 101, 101, 99, 49, 102, 99, 48, 102, 53, 98, 55, 52, 54, 99, 97, 51, 100, 102, 97, 100, 56, 49, 51, 101, 101, 51, 48, 56, 55, 53, 99, 51, 50, 98, 97, 99, 51, 54, 57, 99, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 34, 58, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 116, 121, 112, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 44, 10, 32, 32, 32, 32, 34, 107, 101, 121, 118, 97, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 34, 112, 117, 98, 108, 105, 99, 34, 58, 32, 34, 48, 52, 101, 102, 51, 51, 53, 54, 102, 98, 53, 99, 100, 48, 48, 57, 55, 53, 100, 102, 99, 101, 57, 102, 56, 102, 52, 50, 100, 53, 98, 49, 50, 98, 55, 98, 56, 51, 102, 56, 98, 97, 49, 53, 99, 50, 101, 57, 56, 102, 100, 48, 52, 49, 53, 49, 52, 99, 55, 52, 98, 101, 98, 50, 34, 10, 32, 32, 32, 32, 125, 44, 10, 32, 32, 32, 32, 34, 115, 99, 104, 101, 109, 101, 34, 58, 32, 34, 101, 100, 50, 53, 53, 49, 57, 34, 10, 32, 32, 32, 125, 10, 32, 32, 125, 44, 10, 32, 32, 34, 114, 111, 108, 101, 115, 34, 58, 32, 123, 10, 32, 32, 32, 34, 114, 111, 111, 116, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 52, 53, 97, 57, 53, 55, 55, 99, 97, 52, 56, 51, 102, 51, 53, 56, 98, 100, 97, 52, 97, 50, 49, 97, 102, 57, 51, 98, 55, 54, 54, 48, 98, 56, 50, 98, 100, 57, 99, 48, 101, 49, 57, 51, 48, 97, 54, 98, 55, 100, 53, 50, 49, 98, 52, 50, 56, 57, 55, 97, 48, 102, 97, 51, 34, 44, 10, 32, 32, 32, 32, 32, 34, 52, 99, 53, 54, 100, 101, 53, 98, 54, 50, 102, 100, 48, 54, 52, 102, 99, 57, 52, 52, 53, 51, 98, 54, 56, 48, 100, 102, 100, 51, 102, 97, 102, 54, 97, 48, 49, 98, 97, 97, 97, 98, 51, 98, 101, 97, 99, 50, 57, 54, 57, 50, 48, 102, 48, 99, 99, 102, 97, 50, 50, 55, 55, 53, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 50, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 115, 110, 97, 112, 115, 104, 111, 116, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 57, 100, 55, 56, 53, 52, 51, 98, 53, 48, 56, 102, 57, 57, 97, 57, 53, 97, 51, 99, 51, 49, 102, 97, 100, 51, 99, 102, 102, 101, 102, 48, 54, 52, 52, 49, 51, 52, 102, 49, 97, 48, 50, 56, 98, 51, 48, 53, 48, 49, 97, 99, 99, 49, 50, 48, 53, 56, 99, 55, 99, 51, 101, 56, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 116, 97, 114, 103, 101, 116, 115, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 56, 102, 51, 99, 50, 55, 57, 52, 102, 50, 52, 52, 50, 54, 48, 49, 52, 102, 99, 50, 54, 97, 100, 99, 98, 98, 56, 101, 102, 100, 57, 52, 52, 49, 49, 102, 99, 101, 56, 56, 49, 102, 97, 54, 48, 102, 99, 56, 55, 50, 53, 97, 56, 57, 57, 49, 49, 53, 55, 53, 48, 101, 102, 97, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 44, 10, 32, 32, 32, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 32, 123, 10, 32, 32, 32, 32, 34, 107, 101, 121, 105, 100, 115, 34, 58, 32, 91, 10, 32, 32, 32, 32, 32, 34, 51, 56, 54, 48, 48, 56, 50, 48, 102, 49, 49, 97, 53, 102, 55, 100, 55, 102, 102, 52, 50, 101, 54, 100, 102, 99, 57, 98, 48, 51, 102, 100, 54, 48, 50, 55, 50, 97, 51, 98, 101, 54, 102, 56, 57, 53, 100, 97, 50, 100, 56, 56, 50, 99, 101, 97, 56, 98, 98, 49, 101, 50, 48, 102, 34, 10, 32, 32, 32, 32, 93, 44, 10, 32, 32, 32, 32, 34, 116, 104, 114, 101, 115, 104, 111, 108, 100, 34, 58, 32, 49, 10, 32, 32, 32, 125, 10, 32, 32, 125, 44, 10, 32, 32, 34, 115, 112, 101, 99, 95, 118, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 49, 46, 48, 46, 49, 57, 34, 44, 10, 32, 32, 34, 118, 101, 114, 115, 105, 111, 110, 34, 58, 32, 49, 44, 10, 32, 32, 34, 120, 45, 116, 117, 102, 114, 101, 112, 111, 45, 101, 120, 112, 105, 114, 121, 45, 112, 101, 114, 105, 111, 100, 34, 58, 32, 56, 54, 52, 48, 48, 10, 32, 125, 10, 125} - assert.Nil(t, err) - assert.NotEmpty(t, data) - assert.Equal(t, expectedBytes, data) -} diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index cbfd70b7..50eab617 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -22,6 +22,7 @@ import ( "path/filepath" "strconv" "strings" + "time" "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/rdimitrov/go-tuf-metadata/metadata/config" @@ -177,7 +178,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath } } fullURL := fmt.Sprintf("%s%s", targetBaseURL, targetFilePath) - data, err := update.cfg.Fetcher.DownloadFile(fullURL, targetFile.Length) + data, err := update.cfg.Fetcher.DownloadFile(fullURL, targetFile.Length, time.Second*15) if err != nil { return "", nil, err } @@ -556,7 +557,7 @@ func (update *Updater) downloadMetadata(roleName string, length int64, version s } else { urlPath = fmt.Sprintf("%s%s.%s.json", urlPath, version, url.QueryEscape(roleName)) } - return update.cfg.Fetcher.DownloadFile(urlPath, length) + return update.cfg.Fetcher.DownloadFile(urlPath, length, time.Second*15) } // generateTargetFilePath generates path from TargetFiles From 4d49dcca86a8e91d5dda333234ca5df932d94837 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:47:14 +0300 Subject: [PATCH 175/208] chore(deps): bump golang.org/x/sys from 0.11.0 to 0.12.0 (#63) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.11.0 to 0.12.0. - [Commits](https://github.com/golang/sys/compare/v0.11.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5081688e..82449c67 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.12.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a - golang.org/x/sys v0.11.0 + golang.org/x/sys v0.12.0 ) require ( diff --git a/go.sum b/go.sum index eb8306ba..cd9f703a 100644 --- a/go.sum +++ b/go.sum @@ -67,8 +67,8 @@ golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLU golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= From 3b7fce7ed04d2ef91983e9b696eedd6e685d69eb Mon Sep 17 00:00:00 2001 From: Ivana Atanasova Date: Wed, 27 Sep 2023 17:07:41 +0300 Subject: [PATCH 176/208] Add updater tests (#65) * Add repository simulator for testing updater Signed-off-by: Ivana Atanasova * Fix updater loadRoot Previously the version was iterating as leq to the upperbound which was causing errors and is incorrect. For comparison in the analogue python-tuf implementation `range()` works as only `<` to the upper bound Signed-off-by: Ivana Atanasova * Fix metadata IsDelegatedPath Previously it was not always correclty checked. This change fixes the path pattern check to be more presise Signed-off-by: Ivana Atanasova * Fix updater preOrderDepthFirstWalk There was a bug in preOrderDepthFirstWalk to always break a loop for a specific use-case, without `terminating` to be set to true Signed-off-by: Ivana Atanasova * Add updater tests This change adds updater top level update and consistent snapshot tests, using the repository simulator Signed-off-by: Ivana Atanasova * Fix failing tests This change provides a fix for the failing CI due to logging updates, as well as updater changes in main Signed-off-by: Ivana Atanasova * Fix linter issues This change fixes go linter issues in the updater tests Signed-off-by: Ivana Atanasova * Fix updater tests: elements order mismatch When testing if client fetches and stores delegated metadata files with the correct version prefix when ConsistentSnapshot is true it sometimes happens that the implementation of GetTargetInfo allows differences in the order the roles are recorded in the FetchTraker. This change fixes the test to not look into the order Signed-off-by: Ivana Atanasova --------- Signed-off-by: Ivana Atanasova --- go.mod | 1 + go.sum | 7 + metadata/metadata.go | 27 +- metadata/types.go | 2 + metadata/updater/updater.go | 6 +- .../updater_consistent_snapshot_test.go | 213 ++++ .../updater/updater_top_level_update_test.go | 966 ++++++++++++++++++ testutils/simulator/repository_simulator.go | 620 +++++++++++ .../simulator/repository_simulator_setup.go | 87 ++ 9 files changed, 1925 insertions(+), 4 deletions(-) create mode 100644 metadata/updater/updater_consistent_snapshot_test.go create mode 100644 metadata/updater/updater_top_level_update_test.go create mode 100644 testutils/simulator/repository_simulator.go create mode 100644 testutils/simulator/repository_simulator_setup.go diff --git a/go.mod b/go.mod index 82449c67..d50a51c0 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 github.com/sigstore/sigstore v1.7.2 + github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.12.0 diff --git a/go.sum b/go.sum index cd9f703a..b2e1a564 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= @@ -49,10 +50,14 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAj github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/sigstore/sigstore v1.7.2 h1:MY0wSOhKWa8SIWSCO9SzFnUl+b7jbthgXHJpuUg31Qs= github.com/sigstore/sigstore v1.7.2/go.mod h1:2IPD5YXrXoznfnIoVsDF7ARC1Nha8xIdLpsC4kEQh5w= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/theupdateframework/go-tuf v0.5.2 h1:habfDzTmpbzBLIFGWa2ZpVhYvFBoK0C1onC3a4zuPRA= @@ -67,6 +72,7 @@ golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLU golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= @@ -87,5 +93,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/metadata/metadata.go b/metadata/metadata.go index fef70586..0463e378 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -508,7 +508,11 @@ func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) if len(role.Paths) > 0 { // standard delegations for _, pathPattern := range role.Paths { - return filepath.Match(pathPattern, targetFilepath) + // A delegated role path may be an explicit path or glob + // pattern (Unix shell-style wildcards). + if isTargetInPathPattern(targetFilepath, pathPattern) { + return true, nil + } } } else if len(role.PathHashPrefixes) > 0 { // hash bin delegations - calculate the hash of the filepath to determine in which bin to find the target. @@ -522,6 +526,27 @@ func (role *DelegatedRole) IsDelegatedPath(targetFilepath string) (bool, error) return false, nil } +// Determine whether “targetpath“ matches the “pathpattern“. +func isTargetInPathPattern(targetpath string, pathpattern string) bool { + // We need to make sure that targetpath and pathpattern are pointing to + // the same directory as fnmatch doesn't threat "/" as a special symbol. + targetParts := strings.Split(targetpath, "/") + patternParts := strings.Split(pathpattern, "/") + if len(targetParts) != len(patternParts) { + return false + } + + // Every part in the pathpattern could include a glob pattern, that's why + // each of the target and pathpattern parts should match. + for i := 0; i < len(targetParts); i++ { + if ok, _ := filepath.Match(patternParts[i], targetParts[i]); !ok { + return false + } + } + + return true +} + // GetRolesForTarget return the names and terminating status of all // delegated roles who are responsible for targetFilepath func (role *Delegations) GetRolesForTarget(targetFilepath string) map[string]bool { diff --git a/metadata/types.go b/metadata/types.go index 5d651303..81f8cbc9 100644 --- a/metadata/types.go +++ b/metadata/types.go @@ -34,6 +34,8 @@ const ( TIMESTAMP = "timestamp" ) +var TOP_LEVEL_ROLE_NAMES = [...]string{ROOT, TIMESTAMP, SNAPSHOT, TARGETS} + // Metadata[T Roles] represents a TUF metadata. // Provides methods to read and write to and // from file and bytes, also to create, verify and clear metadata signatures. diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 50eab617..82c26611 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -415,7 +415,7 @@ func (update *Updater) loadRoot() error { upperBound := lowerBound + update.cfg.MaxRootRotations // loop until we find the latest available version of root (download -> verify -> load -> persist) - for nextVersion := lowerBound; nextVersion <= upperBound; nextVersion++ { + for nextVersion := lowerBound; nextVersion < upperBound; nextVersion++ { data, err := update.downloadMetadata(metadata.ROOT, update.cfg.RootMaxLength, strconv.FormatInt(nextVersion, 10)) if err != nil { // downloading the root metadata failed for some reason @@ -492,9 +492,9 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. childRolesToVisit = append(childRolesToVisit, roleParentTuple{Role: child, Parent: delegation.Role}) if terminating { log.V(5).Info("Not backtracking to other roles") + delegationsToVisit = []roleParentTuple{} + break } - delegationsToVisit = []roleParentTuple{} - break } // push childRolesToVisit in reverse order of appearance // onto delegationsToVisit. Roles are popped from the end of diff --git a/metadata/updater/updater_consistent_snapshot_test.go b/metadata/updater/updater_consistent_snapshot_test.go new file mode 100644 index 00000000..67f34d41 --- /dev/null +++ b/metadata/updater/updater_consistent_snapshot_test.go @@ -0,0 +1,213 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package updater + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + simulator "github.com/rdimitrov/go-tuf-metadata/testutils/simulator" +) + +func TestTopLevelRolesUpdateWithConsistentSnapshotDisabled(t *testing.T) { + // Test if the client fetches and stores metadata files with the + // correct version prefix when ConsistentSnapshot is false + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + simulator.Sim.MDRoot.Signed.ConsistentSnapshot = false + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater := initUpdater(updaterConfig) + + // cleanup fetch tracker metadata + simulator.Sim.FetchTracker.Metadata = []simulator.FTMetadata{} + err = updater.Refresh() + assert.NoError(t, err) + + // metadata files are fetched with the expected version (or None) + expectedsnapshotEnabled := []simulator.FTMetadata{ + {Name: "root", Value: 2}, + {Name: "root", Value: 3}, + {Name: "timestamp", Value: -1}, + {Name: "snapshot", Value: -1}, + {Name: "targets", Value: -1}, + } + assert.EqualValues(t, expectedsnapshotEnabled, simulator.Sim.FetchTracker.Metadata) + // metadata files are always persisted without a version prefix + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) +} + +func TestTopLevelRolesUpdateWithConsistentSnapshotEnabled(t *testing.T) { + // Test if the client fetches and stores metadata files with the + // correct version prefix when ConsistentSnapshot is true + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + simulator.Sim.MDRoot.Signed.ConsistentSnapshot = true + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater := initUpdater(updaterConfig) + + // cleanup fetch tracker metadata + simulator.Sim.FetchTracker.Metadata = []simulator.FTMetadata{} + err = updater.Refresh() + assert.NoError(t, err) + + // metadata files are fetched with the expected version (or None) + expectedSnapshotDisabled := []simulator.FTMetadata{ + {Name: "root", Value: 2}, + {Name: "root", Value: 3}, + {Name: "timestamp", Value: -1}, + {Name: "snapshot", Value: 1}, + {Name: "targets", Value: 1}, + } + assert.EqualValues(t, expectedSnapshotDisabled, simulator.Sim.FetchTracker.Metadata) + // metadata files are always persisted without a version prefix + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) +} + +func TestDelegatesRolesUpdateWithConsistentSnapshotDisabled(t *testing.T) { + // Test if the client fetches and stores delegated metadata files with + // the correct version prefix when ConsistentSnapshot is false + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + simulator.Sim.MDRoot.Signed.ConsistentSnapshot = false + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + target := metadata.Targets(simulator.Sim.SafeExpiry) + + delegatedRole := metadata.DelegatedRole{ + Name: "role1", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + Paths: []string{"*"}, + } + simulator.Sim.AddDelegation("targets", delegatedRole, target.Signed) + + delegatedRole = metadata.DelegatedRole{ + Name: "..", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + Paths: []string{"*"}, + } + simulator.Sim.AddDelegation("targets", delegatedRole, target.Signed) + + delegatedRole = metadata.DelegatedRole{ + Name: ".", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + Paths: []string{"*"}, + } + simulator.Sim.AddDelegation("targets", delegatedRole, target.Signed) + + simulator.Sim.UpdateSnapshot() + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater := initUpdater(updaterConfig) + + err = updater.Refresh() + assert.NoError(t, err) + + // cleanup fetch tracker metadata + simulator.Sim.FetchTracker.Metadata = []simulator.FTMetadata{} + // trigger updater to fetch the delegated metadata + _, err = updater.GetTargetInfo("anything") + assert.ErrorContains(t, err, "target anything not found") + + // metadata files are fetched with the expected version (or None) + expectedsnapshotEnabled := []simulator.FTMetadata{ + {Name: "role1", Value: -1}, + {Name: "..", Value: -1}, + {Name: ".", Value: -1}, + } + assert.EqualValues(t, expectedsnapshotEnabled, simulator.Sim.FetchTracker.Metadata) + // metadata files are always persisted without a version prefix + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) +} + +func TestDelegatesRolesUpdateWithConsistentSnapshotEnabled(t *testing.T) { + // Test if the client fetches and stores delegated metadata files with + // the correct version prefix when ConsistentSnapshot is true + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + simulator.Sim.MDRoot.Signed.ConsistentSnapshot = true + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + target := metadata.Targets(simulator.Sim.SafeExpiry) + + delegatedRole := metadata.DelegatedRole{ + Name: "role1", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + Paths: []string{"*"}, + } + simulator.Sim.AddDelegation("targets", delegatedRole, target.Signed) + + delegatedRole = metadata.DelegatedRole{ + Name: "..", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + Paths: []string{"*"}, + } + simulator.Sim.AddDelegation("targets", delegatedRole, target.Signed) + + delegatedRole = metadata.DelegatedRole{ + Name: ".", + KeyIDs: []string{}, + Threshold: 1, + Terminating: false, + Paths: []string{"*"}, + } + simulator.Sim.AddDelegation("targets", delegatedRole, target.Signed) + + simulator.Sim.UpdateSnapshot() + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater := initUpdater(updaterConfig) + + err = updater.Refresh() + assert.NoError(t, err) + + // cleanup fetch tracker metadata + simulator.Sim.FetchTracker.Metadata = []simulator.FTMetadata{} + // trigger updater to fetch the delegated metadata + _, err = updater.GetTargetInfo("anything") + assert.ErrorContains(t, err, "target anything not found") + + // metadata files are fetched with the expected version (or None) + expectedsnapshotEnabled := []simulator.FTMetadata{ + {Name: "role1", Value: 1}, + {Name: "..", Value: 1}, + {Name: ".", Value: 1}, + } + assert.ElementsMatch(t, expectedsnapshotEnabled, simulator.Sim.FetchTracker.Metadata) + // metadata files are always persisted without a version prefix + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) +} diff --git a/metadata/updater/updater_top_level_update_test.go b/metadata/updater/updater_top_level_update_test.go new file mode 100644 index 00000000..3696411c --- /dev/null +++ b/metadata/updater/updater_top_level_update_test.go @@ -0,0 +1,966 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package updater + +import ( + "fmt" + "os" + "testing" + "time" + + "github.com/sigstore/sigstore/pkg/signature" + log "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/config" + simulator "github.com/rdimitrov/go-tuf-metadata/testutils/simulator" + testutils "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" +) + +func TestMain(m *testing.M) { + err := loadOrResetTrustedRootMetadata() + simulator.PastDateTime = time.Now().UTC().Truncate(24 * time.Hour).Add(-5 * 24 * time.Hour) + + if err != nil { + simulator.RepositoryCleanup(simulator.MetadataDir) + log.Fatalf("failed to load TrustedRootMetadata: %v\n", err) + } + + defer simulator.RepositoryCleanup(simulator.MetadataDir) + m.Run() +} + +func loadOrResetTrustedRootMetadata() error { + var err error + + simulator.Sim, simulator.MetadataDir, testutils.TargetsDir, err = simulator.InitMetadataDir() + if err != nil { + log.Printf("failed to initialize metadata dir: %v", err) + return err + } + + simulator.RootBytes, err = simulator.GetRootBytes(simulator.MetadataDir) + if err != nil { + log.Printf("failed to load root bytes: %v", err) + return err + } + return nil +} + +func loadUpdaterConfig() (*config.UpdaterConfig, error) { + updaterConfig, err := config.New(simulator.MetadataDir, simulator.RootBytes) + updaterConfig.Fetcher = simulator.Sim + updaterConfig.LocalMetadataDir = simulator.MetadataDir + updaterConfig.LocalTargetsDir = testutils.TargetsDir + return updaterConfig, err +} + +// runRefresh creates new Updater instance and +// runs Refresh +func runRefresh(updaterConfig *config.UpdaterConfig, moveInTime time.Time) (Updater, error) { + if len(simulator.Sim.DumpDir) > 0 { + simulator.Sim.Write() + } + + updater, err := New(updaterConfig) + if err != nil { + log.Debugf("failed to create new updater config: %v", err) + return Updater{}, err + } + if moveInTime != time.Now() { + updater.trusted.RefTime = moveInTime + } + err = updater.Refresh() + return *updater, err +} + +func initUpdater(updaterConfig *config.UpdaterConfig) Updater { + if len(simulator.Sim.DumpDir) > 0 { + simulator.Sim.Write() + } + + updater, err := New(updaterConfig) + if err != nil { + log.Debugf("failed to create new updater config: %v", err) + } + return *updater +} + +// Asserts that local metadata files exist for 'roles' +func assertFilesExist(t *testing.T, roles []string) { + expectedFiles := []string{} + + for _, role := range roles { + expectedFiles = append(expectedFiles, fmt.Sprintf("%s.json", role)) + } + localMetadataFiles, err := os.ReadDir(simulator.MetadataDir) + assert.NoError(t, err) + + actual := []string{} + for _, file := range localMetadataFiles { + actual = append(actual, file.Name()) + } + + for _, file := range expectedFiles { + assert.Contains(t, actual, file) + } +} + +// Asserts that local file content is the expected +func assertContentEquals(t *testing.T, role string, version *int) { + expectedContent, err := simulator.Sim.FetchMetadata(role, version) + assert.NoError(t, err) + + content, err := os.ReadFile(fmt.Sprintf("%s/%s.json", simulator.MetadataDir, role)) + assert.NoError(t, err) + assert.Equal(t, string(expectedContent), string(content)) +} + +func assertVersionEquals(t *testing.T, role string, expectedVersion int64) { + path := fmt.Sprintf("%s/%s.json", simulator.MetadataDir, role) + switch role { + case metadata.ROOT: + md, err := simulator.Sim.MDRoot.FromFile(path) + assert.NoError(t, err) + assert.Equal(t, md.Signed.Version, expectedVersion) + case metadata.TARGETS: + md, err := simulator.Sim.MDTargets.FromFile(path) + assert.NoError(t, err) + assert.Equal(t, md.Signed.Version, expectedVersion) + case metadata.TIMESTAMP: + md, err := simulator.Sim.MDTimestamp.FromFile(path) + assert.NoError(t, err) + assert.Equal(t, md.Signed.Version, expectedVersion) + case metadata.SNAPSHOT: + md, err := simulator.Sim.MDSnapshot.FromFile(path) + assert.NoError(t, err) + assert.Equal(t, md.Signed.Version, expectedVersion) + } +} + +func TestLoadTrustedRootMetadata(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater, err := New(updaterConfig) + assert.NoError(t, err) + + assert.Nil(t, err) + if assert.NotNil(t, updater) { + assert.Equal(t, metadata.ROOT, updater.trusted.Root.Signed.Type) + assert.Equal(t, metadata.SPECIFICATION_VERSION, updater.trusted.Root.Signed.SpecVersion) + assert.True(t, updater.trusted.Root.Signed.ConsistentSnapshot) + assert.Equal(t, int64(1), updater.trusted.Root.Signed.Version) + assert.Nil(t, updater.trusted.Snapshot) + assert.Nil(t, updater.trusted.Timestamp) + assert.Empty(t, updater.trusted.Targets) + } +} + +func TestFirstTimeRefresh(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + assertFilesExist(t, []string{metadata.ROOT}) + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) + + for _, role := range metadata.TOP_LEVEL_ROLE_NAMES { + var version int + if role == metadata.ROOT { + version = 2 + } + assertContentEquals(t, role, &version) + } +} + +func TestTrustedRootMissing(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + localTrusedRoot := updaterConfig.LocalTrustedRoot + updaterConfig.LocalTrustedRoot = []byte{} + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorContains(t, err, "no initial trusted root metadata or remote URL provided") + updaterConfig.LocalTrustedRoot = localTrusedRoot +} + +func TestTrustedRootExpired(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + simulator.Sim.MDRoot.Signed.Expires = simulator.PastDateTime + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater := initUpdater(updaterConfig) + err = updater.Refresh() + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "final root.json is expired"}) + + assertFilesExist(t, []string{metadata.ROOT}) + version := 2 + assertContentEquals(t, metadata.ROOT, &version) + + updater = initUpdater(updaterConfig) + + simulator.Sim.MDRoot.Signed.Expires = simulator.Sim.SafeExpiry + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + err = updater.Refresh() + assert.NoError(t, err) + + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) + version = 3 + assertContentEquals(t, metadata.ROOT, &version) +} + +func TestTrustedRootUnsigned(t *testing.T) { + // Local trusted root is not signed + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + rootPath := fmt.Sprintf("%s/%s.json", simulator.MetadataDir, metadata.ROOT) + mdRoot, err := simulator.Sim.MDRoot.FromFile(rootPath) + assert.NoError(t, err) + + mdRoot.ClearSignatures() + err = mdRoot.ToFile(rootPath, true) + assert.NoError(t, err) + newRootBytes, err := os.ReadFile(rootPath) + assert.NoError(t, err) + simulator.RootBytes = newRootBytes + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying root failed, not enough signatures, got 0, want 1"}) + + assertFilesExist(t, []string{metadata.ROOT}) + mdRootAfter, err := simulator.Sim.MDRoot.FromFile(rootPath) + assert.NoError(t, err) + expected, err := mdRoot.ToBytes(false) + assert.NoError(t, err) + actual, err := mdRootAfter.ToBytes(false) + assert.NoError(t, err) + + assert.Equal(t, expected, actual) +} + +func TestMaxRootRotations(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater := initUpdater(updaterConfig) + updater.cfg.MaxRootRotations = 3 + + for simulator.Sim.MDRoot.Signed.Version < updater.cfg.MaxRootRotations+3 { + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + } + + rootPath := fmt.Sprintf("%s/%s.json", simulator.MetadataDir, metadata.ROOT) + mdRoot, err := simulator.Sim.MDRoot.FromFile(rootPath) + assert.NoError(t, err) + initialRootVersion := mdRoot.Signed.Version + + err = updater.Refresh() + assert.NoError(t, err) + + assertVersionEquals(t, metadata.ROOT, initialRootVersion+updaterConfig.MaxRootRotations) +} + +func TestIntermediateRootInclorrectlySigned(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + simulator.Sim.MDRoot.Signed.Version += 1 + rootSigners := make(map[string]*signature.Signer) + for k, v := range simulator.Sim.Signers[metadata.ROOT] { + rootSigners[k] = v + } + for k := range simulator.Sim.Signers[metadata.ROOT] { + delete(simulator.Sim.Signers[metadata.ROOT], k) + } + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying root failed, not enough signatures, got 0, want 1"}) + + assertFilesExist(t, []string{metadata.ROOT}) + version := 1 + assertContentEquals(t, metadata.ROOT, &version) +} + +func TestIntermediateRootExpired(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // The expiration of the new (intermediate) root metadata file + // does not matter yet + + // Intermediate root v2 is expired + simulator.Sim.MDRoot.Signed.Expires = simulator.PastDateTime + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + // Final root v3 is up to date + simulator.Sim.MDRoot.Signed.Expires = simulator.Sim.SafeExpiry + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + // Successfully updated to root v3 + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) + version := 3 + assertContentEquals(t, metadata.ROOT, &version) +} + +func TestNewRootSameVersion(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a rollback_attack + // Repository serves a root file with the same version as previous + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "bad version number, expected 2, got 1"}) + + // The update failed, latest root version is v1 + assertFilesExist(t, []string{metadata.ROOT}) + version := 1 + assertContentEquals(t, metadata.ROOT, &version) +} + +func TestNewRootNonconsecutiveVersion(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Repository serves non-consecutive root version + simulator.Sim.MDRoot.Signed.Version += 2 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "bad version number, expected 2, got 3"}) + + // The update failed, latest root version is v1 + assertFilesExist(t, []string{metadata.ROOT}) + version := 1 + assertContentEquals(t, metadata.ROOT, &version) +} + +func TestFinalRootExpired(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a freeze attack + // Final root is expired + simulator.Sim.MDRoot.Signed.Expires = simulator.PastDateTime + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "final root.json is expired"}) + + // The update failed but final root is persisted on the file system + assertFilesExist(t, []string{metadata.ROOT}) + version := 2 + assertContentEquals(t, metadata.ROOT, &version) +} + +func TestNewTimestampUnsigned(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for an arbitrary software attack + delete(simulator.Sim.Signers, metadata.TIMESTAMP) + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying timestamp failed, not enough signatures, got 0, want 1"}) + + assertFilesExist(t, []string{metadata.ROOT}) +} + +func TestExpiredTimestampVersionRollback(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Verifies that local timestamp is used in rollback checks even if it is expired. + // The timestamp updates and rollback checks are performed + // with the following timing: + // - Timestamp v1 expiry set to day 7 + // - First updater refresh performed on day 0 + // - Repository publishes timestamp v2 on day 0 + // - Timestamp v2 expiry set to day 21 + // - Second updater refresh performed on day 18: + // assert that rollback check uses expired timestamp v1 + + now := time.Now() + simulator.Sim.MDTimestamp.Signed.Expires = now.Add(time.Hour * 7 * 24) + simulator.Sim.MDTimestamp.Signed.Version = 2 + + // Make a successful update of valid metadata which stores it in cache + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + simulator.Sim.MDTimestamp.Signed.Expires = now.Add(time.Hour * 21 * 24) + simulator.Sim.MDTimestamp.Signed.Version = 1 + + // Check that a rollback protection is performed even if + // local timestamp has expired + moveInTime := time.Now().Add(time.Hour * 18 * 24) + _, err = runRefresh(updaterConfig, moveInTime) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "new timestamp version 1 must be >= 2"}) + assertVersionEquals(t, metadata.TIMESTAMP, 2) +} + +func TestNewTimestampVersionRollback(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a rollback attack + simulator.Sim.MDTimestamp.Signed.Version = 2 + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + simulator.Sim.MDTimestamp.Signed.Version = 1 + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "new timestamp version 1 must be >= 2"}) + assertVersionEquals(t, metadata.TIMESTAMP, 2) +} + +func TestNewTimestampSnapshotRollback(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a rollback attack. + simulator.Sim.MDSnapshot.Signed.Version = 2 + simulator.Sim.UpdateTimestamp() // timestamp v2 + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + // Snapshot meta version is smaller than previous + simulator.Sim.MDTimestamp.Signed.Meta["snapshot.json"].Version = 1 + simulator.Sim.MDTimestamp.Signed.Version += 1 // timestamp v3 + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "new snapshot version 1 must be >= 2"}) + assertVersionEquals(t, metadata.TIMESTAMP, 2) +} + +func TestNewTimestampExpired(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a freeze attack + simulator.Sim.MDTimestamp.Signed.Expires = simulator.PastDateTime + simulator.Sim.UpdateTimestamp() + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "timestamp.json is expired"}) + assertFilesExist(t, []string{metadata.ROOT}) +} + +func TestNewTimestampFastForwardRecovery(t *testing.T) { + //Test timestamp fast-forward recovery using key rotation. + + // The timestamp recovery is made by the following steps + // - Remove the timestamp key + // - Create and add a new key for timestamp + // - Bump and publish root + // - Rollback the timestamp version + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // attacker updates to a higher version + simulator.Sim.MDTimestamp.Signed.Version = 99999 + + // client refreshes the metadata and see the new timestamp version + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertVersionEquals(t, metadata.TIMESTAMP, 99999) + + // repository rotates timestamp keys, rolls back timestamp version + simulator.Sim.RotateKeys(metadata.TIMESTAMP) + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + simulator.Sim.MDTimestamp.Signed.Version = 1 + + // client refresh the metadata and see the initial timestamp version + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertVersionEquals(t, metadata.TIMESTAMP, 1) +} + +func TestNewSnapshotHashMismatch(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check against timestamp role’s snapshot hash + + // Update timestamp with snapshot's hashes + simulator.Sim.ComputeMetafileHashesAndLength = true + simulator.Sim.UpdateTimestamp() // timestamp v2 + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + // Modify snapshot contents without updating + // timestamp's snapshot hash + simulator.Sim.MDSnapshot.Signed.Expires = simulator.Sim.MDSnapshot.Signed.Expires.Add(time.Hour * 24) + simulator.Sim.MDSnapshot.Signed.Version += 1 // snapshot v2 + simulator.Sim.MDTimestamp.Signed.Meta["snapshot.json"].Version = simulator.Sim.MDSnapshot.Signed.Version + simulator.Sim.MDTimestamp.Signed.Version += 1 // timestamp v3 + + // Hash mismatch error + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrLengthOrHashMismatch{Msg: "hash verification failed - mismatch for algorithm sha256"}) + assertVersionEquals(t, metadata.TIMESTAMP, 3) + assertVersionEquals(t, metadata.SNAPSHOT, 1) +} + +func TestNewSnapshotUnsigned(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for an arbitrary software attack + delete(simulator.Sim.Signers, metadata.SNAPSHOT) + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying snapshot failed, not enough signatures, got 0, want 1"}) + + assertFilesExist(t, []string{metadata.ROOT, metadata.TIMESTAMP}) +} + +func TestNewSnapshotVersionMismatch(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check against timestamp role’s snapshot version + + // Increase snapshot version without updating timestamp + simulator.Sim.MDSnapshot.Signed.Version += 1 + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected 1, got 2"}) + + assertFilesExist(t, []string{metadata.ROOT, metadata.TIMESTAMP}) +} + +func TestNewSnapshotVersionRollback(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a rollback attack + simulator.Sim.MDSnapshot.Signed.Version = 2 + simulator.Sim.UpdateTimestamp() + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + simulator.Sim.MDSnapshot.Signed.Version = 1 + simulator.Sim.UpdateTimestamp() + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "new snapshot version 1 must be >= 2"}) + + assertVersionEquals(t, metadata.SNAPSHOT, 2) +} + +func TestNewSnapshotFastForwardRecovery(t *testing.T) { + // Test snapshot fast-forward recovery using key rotation. + + // The snapshot recovery requires the snapshot and timestamp key rotation. + // It is made by the following steps: + // - Remove the snapshot and timestamp keys + // - Create and add a new key for snapshot and timestamp + // - Rollback snapshot version + // - Bump and publish root + // - Bump the timestamp + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // attacker updates to a higher version (bumping timestamp is required) + simulator.Sim.MDSnapshot.Signed.Version = 99999 + simulator.Sim.UpdateTimestamp() + + // client refreshes the metadata and see the new snapshot version + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertVersionEquals(t, metadata.SNAPSHOT, 99999) + + // repository rotates snapshot & timestamp keys, rolls back snapshot + simulator.Sim.RotateKeys(metadata.SNAPSHOT) + simulator.Sim.RotateKeys(metadata.TIMESTAMP) + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + simulator.Sim.MDSnapshot.Signed.Version = 1 + simulator.Sim.UpdateTimestamp() + + // client refresh the metadata and see the initial snapshot version + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertVersionEquals(t, metadata.SNAPSHOT, 1) +} + +func TestNewSnapshotExpired(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a freeze attack + simulator.Sim.MDSnapshot.Signed.Expires = simulator.PastDateTime + simulator.Sim.UpdateSnapshot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "snapshot.json is expired"}) + + assertFilesExist(t, []string{metadata.ROOT}) +} + +func TestNewTargetsHashMismatch(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check against snapshot role’s targets hashes + simulator.Sim.ComputeMetafileHashesAndLength = true + simulator.Sim.UpdateSnapshot() + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + // Modify targets contents without updating + // snapshot's targets hashes + simulator.Sim.MDTargets.Signed.Version += 1 + simulator.Sim.MDSnapshot.Signed.Meta["targets.json"].Version = simulator.Sim.MDTargets.Signed.Version + simulator.Sim.MDSnapshot.Signed.Version += 1 + simulator.Sim.UpdateTimestamp() + + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrLengthOrHashMismatch{Msg: "hash verification failed - mismatch for algorithm sha256"}) + + assertVersionEquals(t, metadata.SNAPSHOT, 3) + assertVersionEquals(t, metadata.TARGETS, 1) +} + +func TestNewTargetsUnsigned(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for an arbitrary software attack + delete(simulator.Sim.Signers, metadata.TARGETS) + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrUnsignedMetadata{Msg: "Verifying targets failed, not enough signatures, got 0, want 1"}) + + assertFilesExist(t, []string{metadata.ROOT, metadata.TIMESTAMP, metadata.SNAPSHOT}) +} + +func TestNewTargetsVersionMismatch(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check against snapshot role’s targets version + + // Increase targets version without updating snapshot + simulator.Sim.MDTargets.Signed.Version += 1 + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected targets version 1, got 2"}) + + assertFilesExist(t, []string{metadata.ROOT, metadata.TIMESTAMP, metadata.SNAPSHOT}) +} + +func TestNewTargetsExpired(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Check for a freeze attack. + simulator.Sim.MDTargets.Signed.Expires = simulator.PastDateTime + simulator.Sim.UpdateSnapshot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrExpiredMetadata{Msg: "new targets is expired"}) + + assertFilesExist(t, []string{metadata.ROOT, metadata.TIMESTAMP, metadata.SNAPSHOT}) +} + +func TestComputeMetafileHashesLength(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + simulator.Sim.ComputeMetafileHashesAndLength = true + simulator.Sim.UpdateSnapshot() + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + assertVersionEquals(t, metadata.TIMESTAMP, 2) + assertVersionEquals(t, metadata.SNAPSHOT, 2) + + simulator.Sim.ComputeMetafileHashesAndLength = false + simulator.Sim.UpdateSnapshot() + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + assertVersionEquals(t, metadata.TIMESTAMP, 3) + assertVersionEquals(t, metadata.SNAPSHOT, 3) +} + +func TestNewTargetsFastForwardRecovery(t *testing.T) { + //Test targets fast-forward recovery using key rotation. + + // The targets recovery is made by issuing new Snapshot keys, by following + // steps: + // - Remove the snapshot key + // - Create and add a new key for snapshot + // - Bump and publish root + // - Rollback the target version + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // attacker updates to a higher version + simulator.Sim.MDTargets.Signed.Version = 99999 + simulator.Sim.UpdateSnapshot() + + // client refreshes the metadata and see the new targets version + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertVersionEquals(t, metadata.TARGETS, 99999) + + // repository rotates snapshot keys, rolls back targets version + simulator.Sim.RotateKeys(metadata.SNAPSHOT) + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + simulator.Sim.MDTargets.Signed.Version = 1 + simulator.Sim.UpdateSnapshot() + + // client refreshes the metadata version and see initial targets version + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertVersionEquals(t, metadata.TARGETS, 1) +} + +func TestSnapshotRollbackWithLocalSnapshotHashMismatch(t *testing.T) { + // Test triggering snapshot rollback check on a newly downloaded snapshot + // when the local snapshot is loaded even when there is a hash mismatch + // with timestamp.snapshot_meta. + + // By raising this flag on timestamp update the simulator would: + // 1) compute the hash of the new modified version of snapshot + // 2) assign the hash to timestamp.snapshot_meta + // The purpose is to create a hash mismatch between timestamp.meta and + // the local snapshot, but to have hash match between timestamp.meta and + // the next snapshot version. + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + simulator.Sim.ComputeMetafileHashesAndLength = true + + // Initialize all metadata and assign targets version higher than 1. + simulator.Sim.MDTargets.Signed.Version = 2 + simulator.Sim.UpdateSnapshot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + // The new targets must have a lower version than the local trusted one. + simulator.Sim.MDTargets.Signed.Version = 1 + simulator.Sim.UpdateSnapshot() + + // During the snapshot update, the local snapshot will be loaded even if + // there is a hash mismatch with timestamp snapshot meta, because it will + // be considered as trusted. + // Should fail as a new version of snapshot will be fetched which lowers + // the snapshot meta "targets.json" version by 1 and throws an error. + _, err = runRefresh(updaterConfig, time.Now()) + assert.ErrorIs(t, err, metadata.ErrBadVersionNumber{Msg: "expected targets.json version 1, got 2"}) +} + +func TestExpiredMetadata(t *testing.T) { + // Verifies that expired local timestamp/snapshot can be used for + // updating from remote. + + // The updates and verifications are performed with the following timing: + // - Timestamp v1 expiry set to day 7 + // - First updater refresh performed on day 0 + // - Repository bumps snapshot and targets to v2 on day 0 + // - Timestamp v2 expiry set to day 21 + // - Second updater refresh performed on day 18, + // it is successful and timestamp/snaphot final versions are v2" + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + now := time.Now() + simulator.Sim.MDTimestamp.Signed.Expires = now.Add(time.Hour * 7 * 24) + + // Make a successful update of valid metadata which stores it in cache + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + simulator.Sim.MDTargets.Signed.Version += 1 + simulator.Sim.UpdateSnapshot() + simulator.Sim.MDTimestamp.Signed.Expires = now.Add(time.Hour * 21 * 24) + + // Mocking time so that local timestam has expired + // but the new timestamp has not + moveInTime := now.Add(time.Hour * 18 * 24) + _, err = runRefresh(updaterConfig, moveInTime) + assert.NoError(t, err) + + // Assert that the final version of timestamp/snapshot is version 2 + // which means a successful refresh is performed + // with expired local metadata + + mdTimestamp, err := metadata.Timestamp().FromFile(simulator.MetadataDir + "/timestamp.json") + assert.NoError(t, err) + assert.Equal(t, int64(2), mdTimestamp.Signed.Version) + + mdSnapshot, err := metadata.Snapshot().FromFile(simulator.MetadataDir + "/snapshot.json") + assert.NoError(t, err) + assert.Equal(t, int64(2), mdSnapshot.Signed.Version) + + mdTargets, err := metadata.Targets().FromFile(simulator.MetadataDir + "/targets.json") + assert.NoError(t, err) + assert.Equal(t, int64(2), mdTargets.Signed.Version) +} + +func TestMaxMetadataLengths(t *testing.T) { + // Test that clients configured max metadata lengths are respected + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // client has root v1 already: create a new one available for download + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + // make sure going over any length limit raises DownloadLengthMismatchError + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + updater := initUpdater(updaterConfig) + updater.cfg.RootMaxLength = 100 + err = updater.Refresh() + assert.ErrorIs(t, err, metadata.ErrDownloadLengthMismatch{Msg: "Downloaded 1567 bytes exceeding the maximum allowed length of 100"}) + + updater = initUpdater(updaterConfig) + updater.cfg.TimestampMaxLength = 100 + err = updater.Refresh() + assert.ErrorIs(t, err, metadata.ErrDownloadLengthMismatch{Msg: "Downloaded 1567 bytes exceeding the maximum allowed length of 100"}) + + updater = initUpdater(updaterConfig) + updater.cfg.SnapshotMaxLength = 100 + err = updater.Refresh() + assert.ErrorIs(t, err, metadata.ErrDownloadLengthMismatch{Msg: "Downloaded 1567 bytes exceeding the maximum allowed length of 100"}) + + updater = initUpdater(updaterConfig) + updater.cfg.TargetsMaxLength = 100 + err = updater.Refresh() + assert.ErrorIs(t, err, metadata.ErrDownloadLengthMismatch{Msg: "Downloaded 1567 bytes exceeding the maximum allowed length of 100"}) + + // All good with normal length limits + updater = initUpdater(updaterConfig) + err = updater.Refresh() + assert.ErrorIs(t, err, metadata.ErrDownloadLengthMismatch{Msg: "Downloaded 1567 bytes exceeding the maximum allowed length of 100"}) +} + +func TestTimestampEqVersionsCheck(t *testing.T) { + // Test that a modified timestamp with different content, but the same + // version doesn't replace the valid locally stored one. + + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + // Make a successful update of valid metadata which stores it in cache + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + initialTimestampMetadataVer := simulator.Sim.MDTimestamp.Signed.Meta["snapshot.json"].Version + // Change timestamp without bumping its version in order to test if a new + // timestamp with the same version will be persisted. + simulator.Sim.MDTimestamp.Signed.Meta["snapshot.json"].Version = 100 + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + + // If the local timestamp md file has the same snapshot_meta.version as + // the initial one, then the new modified timestamp has not been stored. + timestamp, err := metadata.Timestamp().FromFile(simulator.MetadataDir + "/timestamp.json") + assert.NoError(t, err) + assert.Equal(t, initialTimestampMetadataVer, timestamp.Signed.Meta["snapshot.json"].Version) +} diff --git a/testutils/simulator/repository_simulator.go b/testutils/simulator/repository_simulator.go new file mode 100644 index 00000000..aa2195f2 --- /dev/null +++ b/testutils/simulator/repository_simulator.go @@ -0,0 +1,620 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package simulator + +// Test utility to simulate a repository + +// RepositorySimulator provides methods to modify repository metadata so that it's +// easy to "publish" new repository versions with modified metadata, while serving +// the versions to client test code. + +// RepositorySimulator implements FetcherInterface so Updaters in tests can use it +// as a way to "download" new metadata from remote: in practice no downloading, +// network connections or even file access happens as RepositorySimulator serves +// everything from memory. + +// Metadata and targets "hosted" by the simulator are made available in URL paths +// "/metadata/..." and "/targets/..." respectively. + +// Example:: + +// // Initialize repository with top-level metadata +// sim := simulator.NewRepository() + +// // metadata can be modified directly: it is immediately available to clients +// sim.Snapshot.Version += 1 + +// // As an exception, new root versions require explicit publishing +// sim.Root.Version += 1 +// sim.PublishRoot() + +// // there are helper functions +// sim.AddTarget("targets", b"content", "targetpath") +// sim.Targets.Version += 1 +// sim.UpdateSnapshot() +// """ + +import ( + "bytes" + "crypto" + "crypto/ed25519" + "crypto/sha256" + "fmt" + "net/url" + "os" + "path/filepath" + "strconv" + "strings" + "time" + + "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" + "github.com/sigstore/sigstore/pkg/signature" + log "github.com/sirupsen/logrus" +) + +var SPEC_VER = "." + metadata.SPECIFICATION_VERSION + +type FTMetadata struct { + Name string + Value int +} + +type FTTargets struct { + Name string + Value *string +} + +// FetchTracker contains actual target data +// and the related target metadata +type FetchTracker struct { + Metadata []FTMetadata + Targets []FTTargets +} + +// RepositoryTarget contains actual target data +// and the related target metadata +type RepositoryTarget struct { + Data []byte + TargetFile *metadata.TargetFiles +} + +// RepositorySimulator simulates a repository that can be used for testing +type RepositorySimulator struct { + fetcher.Fetcher + MDDelegates map[string]metadata.Metadata[metadata.TargetsType] + SignedRoots [][]byte + Signers map[string]map[string]*signature.Signer + TargetFiles map[string]RepositoryTarget + ComputeMetafileHashesAndLength bool + PrefixTargetsWithHash bool + DumpDir string + DumpVersion int64 + FetchTracker FetchTracker + SafeExpiry time.Time + MDTargets *metadata.Metadata[metadata.TargetsType] + MDSnapshot *metadata.Metadata[metadata.SnapshotType] + MDTimestamp *metadata.Metadata[metadata.TimestampType] + MDRoot *metadata.Metadata[metadata.RootType] + LocalDir string +} + +// New initializes a RepositorySimulator +func NewRepository() *RepositorySimulator { + now := time.Now().UTC() + + rs := RepositorySimulator{ + MDDelegates: map[string]metadata.Metadata[metadata.TargetsType]{}, + + // Other metadata is signed on-demand (when fetched) but roots must be + // explicitly published with PublishRoot() which maintains this list + SignedRoots: [][]byte{}, + + // Signers are used on-demand at fetch time to sign metadata + // keys are roles, values are map of {keyid: signer} + Signers: make(map[string]map[string]*signature.Signer), + + // Target downloads are served from this map + TargetFiles: make(map[string]RepositoryTarget), + + // Whether to compute hashes and length for meta in snapshot/timestamp + ComputeMetafileHashesAndLength: false, + + // Enable hash-prefixed target file names + PrefixTargetsWithHash: true, + + DumpDir: "", + DumpVersion: 0, + + FetchTracker: FetchTracker{ + Metadata: []FTMetadata{}, + Targets: []FTTargets{}, + }, + + SafeExpiry: now.Truncate(time.Second).AddDate(0, 0, 30), + } + rs.setupMinimalValidRepository() + + return &rs +} + +func (rs *RepositorySimulator) setupMinimalValidRepository() { + rs.MDTargets = metadata.Targets(rs.SafeExpiry) + rs.MDSnapshot = metadata.Snapshot(rs.SafeExpiry) + rs.MDTimestamp = metadata.Timestamp(rs.SafeExpiry) + rs.MDRoot = metadata.Root(rs.SafeExpiry) + + for _, role := range metadata.TOP_LEVEL_ROLE_NAMES { + publicKey, _, signer := CreateKey() + + mtdkey, err := metadata.KeyFromPublicKey(*publicKey) + if err != nil { + log.Fatalf("repository simulator: key conversion failed while setting repository: %v", err) + } + + err = rs.MDRoot.Signed.AddKey(mtdkey, role) + if err != nil { + log.Debugf("repository simulator: failed to add key: %v", err) + } + rs.AddSigner(role, mtdkey.ID(), *signer) + } + + rs.PublishRoot() +} + +func (rs *RepositorySimulator) Root() metadata.RootType { + return rs.MDRoot.Signed +} + +func (rs *RepositorySimulator) Timestamp() metadata.TimestampType { + return rs.MDTimestamp.Signed +} + +func (rs *RepositorySimulator) Snapshot() metadata.SnapshotType { + return rs.MDSnapshot.Signed +} + +func (rs *RepositorySimulator) Targets() metadata.TargetsType { + return rs.MDTargets.Signed +} + +// AllTargets allows receiving role name and signed portion of targets one by one +func (rs *RepositorySimulator) AllTargets() <-chan metadata.TargetsType { + ch := make(chan metadata.TargetsType) + go func() { + ch <- rs.MDTargets.Signed + for role, md := range rs.MDDelegates { + targets := metadata.TargetsType{ + Type: role, + Version: md.Signed.Version, + Delegations: md.Signed.Delegations, + } + ch <- targets + } + close(ch) + }() + return ch +} + +func CreateKey() (*ed25519.PublicKey, *ed25519.PrivateKey, *signature.Signer) { + public, private, err := ed25519.GenerateKey(nil) + if err != nil { + log.Printf("failed to generate key: %v", err) + } + + signer, err := signature.LoadSigner(private, crypto.Hash(0)) + if err != nil { + log.Printf("failed to load signer: %v", err) + } + return &public, &private, &signer +} + +func (rs *RepositorySimulator) AddSigner(role string, keyID string, signer signature.Signer) { + if _, ok := rs.Signers[role]; !ok { + rs.Signers[role] = make(map[string]*signature.Signer) + } + rs.Signers[role][keyID] = &signer +} + +// RotateKeys removes all keys for role, then add threshold of new keys +func (rs *RepositorySimulator) RotateKeys(role string) { + rs.MDRoot.Signed.Roles[role].KeyIDs = []string{} + for k := range rs.Signers[role] { + delete(rs.Signers[role], k) + } + for i := 0; i < rs.MDRoot.Signed.Roles[role].Threshold; i++ { + + publicKey, _, signer := CreateKey() + mtdkey, err := metadata.KeyFromPublicKey(*publicKey) + if err != nil { + log.Fatalf("repository simulator: key conversion failed while rotating keys: %v", err) + } + err = rs.MDRoot.Signed.AddKey(mtdkey, role) + if err != nil { + log.Debugf("repository simulator: failed to add key: %v", err) + } + rs.AddSigner(role, mtdkey.ID(), *signer) + } +} + +// PublishRoot signs and stores a new serialized version of root +func (rs *RepositorySimulator) PublishRoot() { + rs.MDRoot.ClearSignatures() + for _, signer := range rs.Signers[metadata.ROOT] { + _, err := rs.MDRoot.Sign(*signer) + if err != nil { + log.Debugf("repository simulator: failed to sign root: %v", err) + } + } + + mtd, err := rs.MDRoot.MarshalJSON() + if err != nil { + log.Debugf("failed to marshal metadata while publishing root: %v", err) + } + rs.SignedRoots = append(rs.SignedRoots, mtd) + log.Debugf("published root v%d", rs.MDRoot.Signed.Version) +} + +func lastIndex(str string, delimiter string) (string, string, string) { + // TODO: check if contained and lengths + spl := strings.Split(str, delimiter) + res := strings.SplitAfterN(str, delimiter, len(spl)-1) + return res[0], delimiter, res[1] +} + +func partition(s string, delimiter string) (string, string) { + splitted := strings.Split(s, delimiter) + version := "" + role := "" + switch len(splitted) { + case 1: + role = splitted[0] + case 2: + version = splitted[0] + role = splitted[1] + case 3: + version = splitted[0] + if splitted[1] == "" && splitted[2] == "" { + role = "." + } + case 4: + version = splitted[0] + if splitted[1] == "" && splitted[2] == "" && splitted[3] == "" { + role = ".." + } + } + return version, role +} + +func (rs *RepositorySimulator) DownloadFile(urlPath string, maxLength int64, timeout time.Duration) ([]byte, error) { + data, err := rs.fetch(urlPath) + if err != nil { + return data, err + } + if len(data) > int(maxLength) { + err = metadata.ErrDownloadLengthMismatch{ + Msg: fmt.Sprintf("Downloaded %d bytes exceeding the maximum allowed length of %d", len(data), maxLength), + } + } + return data, err +} + +func (rs *RepositorySimulator) fetch(urlPath string) ([]byte, error) { + parsedURL, _ := url.Parse(urlPath) + path := strings.TrimPrefix(parsedURL.Path, rs.LocalDir) + if strings.HasPrefix(path, "/metadata/") && strings.HasSuffix(path, ".json") { + fileName := path[len("/metadata/"):] + verAndName := fileName[:len(path)-len("/metadata/")-len(".json")] + versionStr, role := partition(verAndName, ".") + var version int + var err error + if role == metadata.ROOT || (rs.MDRoot.Signed.ConsistentSnapshot && verAndName != metadata.TIMESTAMP) { + version, err = strconv.Atoi(versionStr) + if err != nil { + log.Printf("repository simulator: downloading file: failed to convert version: %v", err) + } + } else { + role = verAndName + version = -1 + } + return rs.FetchMetadata(role, &version) + } else if strings.HasPrefix(path, "/targets/") { + targetPath := path[len("/targets/"):] + dirParts, sep, prefixedFilename := lastIndex(targetPath, "/") + var filename string + prefix := "" + filename = prefixedFilename + if rs.MDRoot.Signed.ConsistentSnapshot && rs.PrefixTargetsWithHash { + prefix, filename = partition(prefixedFilename, ".") + } + targetPath = fmt.Sprintf("%s%s%s", dirParts, sep, filename) + target, err := rs.FetchTarget(targetPath, prefix) + if err != nil { + log.Printf("failed to fetch target: %v", err) + } + return target, err + } + return nil, nil +} + +// FetchTarget returns data for 'targetPath', checking 'targetHash' if it is given. +// If hash is None, then consistentSnapshot is not used +func (rs *RepositorySimulator) FetchTarget(targetPath string, targetHash string) ([]byte, error) { + rs.FetchTracker.Targets = append(rs.FetchTracker.Targets, FTTargets{Name: targetPath, Value: &targetHash}) + repoTarget, ok := rs.TargetFiles[targetPath] + if !ok { + return nil, fmt.Errorf("no target %s", targetPath) + } + if targetHash != "" && !contains(repoTarget.TargetFile.Hashes, []byte(targetHash)) { + return nil, fmt.Errorf("hash mismatch for %s", targetPath) + } + log.Printf("fetched target %s", targetPath) + return repoTarget.Data, nil +} + +func contains(hashes map[string]metadata.HexBytes, targetHash []byte) bool { + for _, value := range hashes { + if bytes.Equal(value, targetHash) { + return true + } + } + return false +} + +// FetchMetadata returns signed metadata for 'role', using 'version' if it is given. +// If version is None, non-versioned metadata is being requested +func (rs *RepositorySimulator) FetchMetadata(role string, version *int) ([]byte, error) { + rs.FetchTracker.Metadata = append(rs.FetchTracker.Metadata, FTMetadata{Name: role, Value: *version}) + // Decode role for the metadata + // role, _ = strconv.Unquote(role) + if role == metadata.ROOT { + // Return a version previously serialized in PublishRoot() + if version == nil || *version > len(rs.SignedRoots) && *version > 0 { + log.Printf("unknown root version %d", *version) + return []byte{}, metadata.ErrDownloadHTTP{StatusCode: 404} + } + log.Printf("fetched root version %d", version) + return rs.SignedRoots[*version-1], nil + } + + // Sign and serialize the requested metadata + if role == metadata.TIMESTAMP { + return signMetadata(role, rs.MDTimestamp, rs) + } else if role == metadata.SNAPSHOT { + return signMetadata(role, rs.MDSnapshot, rs) + } else if role == metadata.TARGETS { + return signMetadata(role, rs.MDTargets, rs) + } else { + md, ok := rs.MDDelegates[role] + if !ok { + log.Printf("unknown role %s", role) + return []byte{}, metadata.ErrDownloadHTTP{StatusCode: 404} + } + return signMetadata(role, &md, rs) + } +} + +func signMetadata[T metadata.Roles](role string, md *metadata.Metadata[T], rs *RepositorySimulator) ([]byte, error) { + md.Signatures = []metadata.Signature{} + for _, signer := range rs.Signers[role] { + // TODO: check if a bool argument should be added to Sign as in python-tuf + // Not appending only for a local repo example !!! missing type for signers + _, err := md.Sign(*signer) + if err != nil { + log.Debugf("repository simulator: failed to sign metadata: %v", err) + } + } + // TODO: test if the version is the correct one + // log.Printf("fetched %s v%d with %d sigs", role, md.GetVersion(), len(rs.Signers[role])) + mtd, err := md.MarshalJSON() + if err != nil { + log.Printf("failed to marshal metadata while signing for role %s: %v", role, err) + } + return mtd, err +} + +func (rs *RepositorySimulator) computeHashesAndLength(role string) (map[string]metadata.HexBytes, int) { + noVersion := -1 + data, err := rs.FetchMetadata(role, &noVersion) + if err != nil { + log.Debugf("failed to fetch metadata: %v", err) + } + digest := sha256.Sum256(data) + hashes := map[string]metadata.HexBytes{"sha256": digest[:]} + return hashes, len(data) +} + +// UpdateTimestamp updates timestamp and assign snapshot version +// to snapshot meta version +func (rs *RepositorySimulator) UpdateTimestamp() { + hashes := make(map[string]metadata.HexBytes) + length := 0 + if rs.ComputeMetafileHashesAndLength { + hashes, length = rs.computeHashesAndLength(metadata.SNAPSHOT) + } + rs.MDTimestamp.Signed.Meta[fmt.Sprintf("%s.json", metadata.SNAPSHOT)] = &metadata.MetaFiles{ + Length: int64(length), + Hashes: hashes, + Version: rs.MDSnapshot.Signed.Version, + } + + rs.MDTimestamp.Signed.Version += 1 +} + +// UpdateSnapshot updates snapshot, assigns targets versions +// and updates timestamp +func (rs *RepositorySimulator) UpdateSnapshot() { + for target := range rs.AllTargets() { + hashes := make(map[string]metadata.HexBytes) + length := 0 + if rs.ComputeMetafileHashesAndLength { + hashes, length = rs.computeHashesAndLength(target.Type) + } + + rs.MDSnapshot.Signed.Meta[fmt.Sprintf("%s.json", target.Type)] = &metadata.MetaFiles{ + Length: int64(length), + Hashes: hashes, + Version: target.Version, + } + } + rs.MDSnapshot.Signed.Version += 1 + rs.UpdateTimestamp() +} + +// Given a delegator name return, its corresponding TargetsType object +func (rs *RepositorySimulator) getDelegator(delegatorName string) *metadata.TargetsType { + if delegatorName == metadata.TARGETS { + return &rs.MDTargets.Signed + } + delegation := rs.MDDelegates[delegatorName] + return &delegation.Signed +} + +// AddTarget creates a target from data and adds it to the TargetFiles. +func (rs *RepositorySimulator) AddTarget(role string, data []byte, path string) { + targets := rs.getDelegator(role) + target, err := metadata.TargetFile().FromBytes(path, data, "sha256") + if err != nil { + log.Panicf("failed to add target from %s: %v", path, err) + } + targets.Targets[path] = target + rs.TargetFiles[path] = RepositoryTarget{ + Data: data, + TargetFile: target, + } +} + +// AddDelegation adds delegated target role to the repository +func (rs *RepositorySimulator) AddDelegation(delegatorName string, role metadata.DelegatedRole, targets metadata.TargetsType) { + delegator := rs.getDelegator(delegatorName) + if delegator.Delegations != nil && delegator.Delegations.SuccinctRoles != nil { + log.Fatalln("can't add a role when SuccinctRoles is used") + } + // Create delegation + if delegator.Delegations == nil { + delegator.Delegations = &metadata.Delegations{ + Keys: map[string]*metadata.Key{}, + Roles: []metadata.DelegatedRole{}, + } + } + // Put delegation last by default + delegator.Delegations.Roles = append(delegator.Delegations.Roles, role) + + // By default add one new key for the role + publicKey, _, signer := CreateKey() + mdkey, err := metadata.KeyFromPublicKey(*publicKey) + if err != nil { + log.Fatalf("repository simulator: key conversion failed while adding delegation: %v", err) + } + err = delegator.AddKey(mdkey, role.Name) + if err != nil { + log.Debugf("repository simulator: failed to add key: %v", err) + } + rs.AddSigner(role.Name, mdkey.ID(), *signer) + if _, ok := rs.MDDelegates[role.Name]; !ok { + rs.MDDelegates[role.Name] = metadata.Metadata[metadata.TargetsType]{ + Signed: targets, + UnrecognizedFields: map[string]interface{}{}, + } + } +} + +// AddSuccinctRoles adds succinct roles info to a delegator with name "delegatorName". +// +// Note that for each delegated role represented by succinct roles an empty +// Targets instance is created +func (rs *RepositorySimulator) AddSuccinctRoles(delegatorName string, bitLength int, namePrefix string) { + delegator := rs.getDelegator(delegatorName) + if delegator.Delegations != nil && delegator.Delegations.Roles != nil { + log.Fatalln("can't add a SuccinctRoles when delegated roles are used") + } + publicKey, _, signer := CreateKey() + mdkey, err := metadata.KeyFromPublicKey(*publicKey) + if err != nil { + log.Fatalf("repository simulator: key conversion failed while adding succinct roles: %v", err) + } + succinctRoles := &metadata.SuccinctRoles{ + KeyIDs: []string{}, + Threshold: 1, + BitLength: bitLength, + NamePrefix: namePrefix, + } + delegator.Delegations = &metadata.Delegations{Roles: nil, SuccinctRoles: succinctRoles} + // Add targets metadata for all bins + for _, delegatedName := range succinctRoles.GetRoles() { + rs.MDDelegates[delegatedName] = metadata.Metadata[metadata.TargetsType]{ + Signed: metadata.TargetsType{ + Expires: rs.SafeExpiry, + }, + } + rs.AddSigner(delegatedName, mdkey.ID(), *signer) + } + err = delegator.AddKey(mdkey, metadata.TARGETS) + if err != nil { + log.Debugf("repository simulator: failed to add key: %v", err) + } +} + +// Write dumps current repository metadata to rs.DumpDir + +// This is a debugging tool: dumping repository state before running +// Updater refresh may be useful while debugging a test. +func (rs *RepositorySimulator) Write() { + if rs.DumpDir == "" { + rs.DumpDir = os.TempDir() + log.Debugf("Repository Simulator dumps in %s\n", rs.DumpDir) + } + rs.DumpVersion += 1 + destDir := filepath.Join(rs.DumpDir, strconv.Itoa(int(rs.DumpVersion))) + err := os.MkdirAll(destDir, os.ModePerm) + if err != nil { + log.Debugf("repository simulator: failed to create dir: %v", err) + } + for ver := 1; ver < len(rs.SignedRoots)+1; ver++ { + f, _ := os.Create(filepath.Join(destDir, fmt.Sprintf("%d.root.json", ver))) + defer f.Close() + meta, err := rs.FetchMetadata(metadata.ROOT, &ver) + if err != nil { + log.Debugf("failed to fetch metadata: %v", err) + } + _, err = f.Write(meta) + if err != nil { + log.Debugf("repository simulator: failed to write signed roots: %v", err) + } + } + noVersion := -1 + for _, role := range []string{metadata.TIMESTAMP, metadata.SNAPSHOT, metadata.TARGETS} { + f, _ := os.Create(filepath.Join(destDir, fmt.Sprintf("%s.json", role))) + defer f.Close() + meta, err := rs.FetchMetadata(role, &noVersion) + if err != nil { + log.Debugf("failed to fetch metadata: %v", err) + } + _, err = f.Write(meta) + if err != nil { + log.Debugf("repository simulator: failed to write signed roots: %v", err) + } + } + for role := range rs.MDDelegates { + quotedRole := url.PathEscape(role) + f, _ := os.Create(filepath.Join(destDir, fmt.Sprintf("%s.json", quotedRole))) + defer f.Close() + meta, err := rs.FetchMetadata(role, &noVersion) + if err != nil { + log.Debugf("failed to fetch metadata: %v", err) + } + _, err = f.Write(meta) + if err != nil { + log.Debugf("repository simulator: failed to write signed roots: %v", err) + } + } +} diff --git a/testutils/simulator/repository_simulator_setup.go b/testutils/simulator/repository_simulator_setup.go new file mode 100644 index 00000000..18208866 --- /dev/null +++ b/testutils/simulator/repository_simulator_setup.go @@ -0,0 +1,87 @@ +// Copyright 2023 VMware, Inc. +// +// This product is licensed to you under the BSD-2 license (the "License"). +// You may not use this product except in compliance with the BSD-2 License. +// This product may include a number of subcomponents with separate copyright +// notices and license terms. Your use of these subcomponents is subject to +// the terms and conditions of the subcomponent's license, as noted in the +// LICENSE file. +// +// SPDX-License-Identifier: BSD-2-Clause + +package simulator + +import ( + "os" + "time" + + log "github.com/sirupsen/logrus" +) + +var ( + MetadataURL = "https://jku.github.io/tuf-demo/metadata" + TargetsURL = "https://jku.github.io/tuf-demo/targets" + + MetadataDir string + RootBytes []byte + PastDateTime time.Time + Sim *RepositorySimulator + + metadataPath = "/metadata" + targetsPath = "/targets" + LocalDir string + DumpDir string +) + +func InitLocalEnv() error { + + tmp := os.TempDir() + + tmpDir, err := os.MkdirTemp(tmp, "0750") + if err != nil { + log.Fatal("failed to create temporary directory: ", err) + } + + err = os.Mkdir(tmpDir+metadataPath, 0750) + if err != nil { + log.Debugf("repository simulator: failed to create dir: %v", err) + } + err = os.Mkdir(tmpDir+targetsPath, 0750) + if err != nil { + log.Debugf("repository simulator: failed to create dir: %v", err) + } + LocalDir = tmpDir + return nil +} + +func InitMetadataDir() (*RepositorySimulator, string, string, error) { + err := InitLocalEnv() + if err != nil { + log.Fatal("failed to initialize environment: ", err) + } + metadataDir := LocalDir + metadataPath + + sim := NewRepository() + + f, err := os.Create(metadataDir + "/root.json") + if err != nil { + log.Fatalf("failed to create root: %v", err) + } + + _, err = f.Write(sim.SignedRoots[0]) + if err != nil { + log.Debugf("repository simulator setup: failed to write signed roots: %v", err) + } + targetsDir := LocalDir + targetsPath + sim.LocalDir = LocalDir + return sim, metadataDir, targetsDir, err +} + +func GetRootBytes(localMetadataDir string) ([]byte, error) { + return os.ReadFile(localMetadataDir + "/root.json") +} + +func RepositoryCleanup(tmpDir string) { + log.Printf("Cleaning temporary directory: %s\n", tmpDir) + os.RemoveAll(tmpDir) +} From 3314bd1acb52ff9f1294b447226875c1a7f08df6 Mon Sep 17 00:00:00 2001 From: Marvin Drees Date: Wed, 27 Sep 2023 16:09:14 +0200 Subject: [PATCH 177/208] ci: properly calculate coverage for metadata package (#68) There was a missing flag in the CI to generate accurate coverage reports for the metadata package. This will now cover all of the metadata subfolder and exclude testutil and examples as those are not part of the core library Signed-off-by: Marvin Drees --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cfce057c..30b07df4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Run tests - run: go test -race -covermode atomic -coverprofile=coverage.out ./... + run: go test -race -covermode=atomic -coverpkg=./metadata/... -coverprofile=coverage.out ./... - name: Send coverage uses: codecov/codecov-action@v3 From eb5dee87a7179663bad1276865c67e263cc08bc9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:15:09 +0300 Subject: [PATCH 178/208] chore(deps): bump github.com/sigstore/sigstore from 1.7.2 to 1.7.3 (#64) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.7.2 to 1.7.3. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.7.2...v1.7.3) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index d50a51c0..dcd61e13 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/go-logr/logr v1.2.4 github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 - github.com/sigstore/sigstore v1.7.2 - github.com/sirupsen/logrus v1.9.0 + github.com/sigstore/sigstore v1.7.3 + github.com/sirupsen/logrus v1.9.1 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.12.0 @@ -18,7 +18,7 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-containerregistry v0.15.2 // indirect + github.com/google/go-containerregistry v0.16.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect @@ -27,7 +27,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect diff --git a/go.sum b/go.sum index b2e1a564..918537c5 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= -github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= +github.com/google/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= +github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -48,10 +48,10 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/sigstore/sigstore v1.7.2 h1:MY0wSOhKWa8SIWSCO9SzFnUl+b7jbthgXHJpuUg31Qs= -github.com/sigstore/sigstore v1.7.2/go.mod h1:2IPD5YXrXoznfnIoVsDF7ARC1Nha8xIdLpsC4kEQh5w= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sigstore/sigstore v1.7.3 h1:HVVTfrMezJeLyl2xhJ8edzkrEGBa4KxjQZB4FlQ4JLU= +github.com/sigstore/sigstore v1.7.3/go.mod h1:cl0c7Dtg3MM3c13L8pqqrfrmBa0eM3POcdtBepjylmw= +github.com/sirupsen/logrus v1.9.1 h1:Ou41VVR3nMWWmTiEUnj0OlsgOSCUFgsPAOl6jRIcVtQ= +github.com/sirupsen/logrus v1.9.1/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -70,8 +70,8 @@ golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 05f23f3e3cb3a7da5128737d397790c640f44162 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:24:08 +0300 Subject: [PATCH 179/208] chore(deps): bump golang.org/x/crypto from 0.12.0 to 0.13.0 (#66) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.12.0 to 0.13.0. - [Commits](https://github.com/golang/crypto/compare/v0.12.0...v0.13.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index dcd61e13..87a06b9f 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/sirupsen/logrus v1.9.1 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.12.0 + golang.org/x/crypto v0.13.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a golang.org/x/sys v0.12.0 ) @@ -28,8 +28,8 @@ require ( github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.14.0 // indirect - golang.org/x/term v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/go.sum b/go.sum index 918537c5..07cd0cc5 100644 --- a/go.sum +++ b/go.sum @@ -66,8 +66,8 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= @@ -75,10 +75,10 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= From 93c7d134fbe46264b5cd62c8307670e588f65a3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:20:05 +0300 Subject: [PATCH 180/208] chore(deps): bump github.com/sirupsen/logrus from 1.9.1 to 1.9.3 (#69) Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.1 to 1.9.3. - [Release notes](https://github.com/sirupsen/logrus/releases) - [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md) - [Commits](https://github.com/sirupsen/logrus/compare/v1.9.1...v1.9.3) --- updated-dependencies: - dependency-name: github.com/sirupsen/logrus dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 87a06b9f..6d232d2d 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 github.com/sigstore/sigstore v1.7.3 - github.com/sirupsen/logrus v1.9.1 + github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.13.0 diff --git a/go.sum b/go.sum index 07cd0cc5..5608a3fd 100644 --- a/go.sum +++ b/go.sum @@ -50,8 +50,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAj github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/sigstore/sigstore v1.7.3 h1:HVVTfrMezJeLyl2xhJ8edzkrEGBa4KxjQZB4FlQ4JLU= github.com/sigstore/sigstore v1.7.3/go.mod h1:cl0c7Dtg3MM3c13L8pqqrfrmBa0eM3POcdtBepjylmw= -github.com/sirupsen/logrus v1.9.1 h1:Ou41VVR3nMWWmTiEUnj0OlsgOSCUFgsPAOl6jRIcVtQ= -github.com/sirupsen/logrus v1.9.1/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= From 3de1ec4e8ae89c267a8aa759ba9622a89cfccabc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:02:10 +0300 Subject: [PATCH 181/208] chore(deps): bump golang.org/x/crypto from 0.13.0 to 0.14.0 (#70) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.13.0 to 0.14.0. - [Commits](https://github.com/golang/crypto/compare/v0.13.0...v0.14.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 6d232d2d..d2458e80 100644 --- a/go.mod +++ b/go.mod @@ -10,9 +10,9 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.13.0 + golang.org/x/crypto v0.14.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a - golang.org/x/sys v0.12.0 + golang.org/x/sys v0.13.0 ) require ( @@ -28,7 +28,7 @@ require ( github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.14.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect diff --git a/go.sum b/go.sum index 5608a3fd..eed57601 100644 --- a/go.sum +++ b/go.sum @@ -66,17 +66,17 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 59ca549f07e3ee7502ac4d3c3328b39a4493040c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:22:54 +0300 Subject: [PATCH 182/208] chore(deps): bump golang.org/x/net from 0.14.0 to 0.17.0 (#72) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.14.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d2458e80..b4d3916c 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect diff --git a/go.sum b/go.sum index eed57601..e7069c19 100644 --- a/go.sum +++ b/go.sum @@ -70,8 +70,8 @@ golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From c5675ad5d961b73f7a1765ea6a21f03ea58e9d38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:01:21 +0300 Subject: [PATCH 183/208] chore(deps): bump github.com/sigstore/sigstore from 1.7.3 to 1.7.4 (#73) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.7.3 to 1.7.4. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.7.3...v1.7.4) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index b4d3916c..bd0556c7 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 - github.com/sigstore/sigstore v1.7.3 + github.com/sigstore/sigstore v1.7.4 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index e7069c19..e5113701 100644 --- a/go.sum +++ b/go.sum @@ -18,7 +18,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= @@ -48,8 +48,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/sigstore/sigstore v1.7.3 h1:HVVTfrMezJeLyl2xhJ8edzkrEGBa4KxjQZB4FlQ4JLU= -github.com/sigstore/sigstore v1.7.3/go.mod h1:cl0c7Dtg3MM3c13L8pqqrfrmBa0eM3POcdtBepjylmw= +github.com/sigstore/sigstore v1.7.4 h1:Fyqn6OKOVsYnV0Vs6JhG5t+q0u7Gj6R5dJ52kUVteLs= +github.com/sigstore/sigstore v1.7.4/go.mod h1:5MxR9PrWYGk5I3sXgdnrMUOLbwFPuAUNtWPm3VwOjkc= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= From 25fab3d4c94eb4b16f7ce2523155fd48d9f8aa2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 08:57:08 +0300 Subject: [PATCH 184/208] chore(deps): bump google.golang.org/grpc from 1.55.0 to 1.56.3 (#74) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.55.0 to 1.56.3. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.55.0...v1.56.3) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bd0556c7..0fae2c06 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.55.0 // indirect + google.golang.org/grpc v1.56.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index e5113701..57fccfee 100644 --- a/go.sum +++ b/go.sum @@ -82,8 +82,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= From 4067d11b9f25352d741a6d616993d28180cc9f84 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 28 Oct 2023 00:14:32 +0300 Subject: [PATCH 185/208] fix: update examples with new jku/tuf-demo metadata Signed-off-by: Radoslav Dimitrov --- Makefile | 4 ++-- examples/client/client_example.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 642e830b..19f6cfd6 100644 --- a/Makefile +++ b/Makefile @@ -84,9 +84,9 @@ example-tuf-client-cli: build-tuf-client @echo "Initializing the following https://jku.github.io/tuf-demo/ TUF repository" @sleep 2 ./tuf-client init --url https://jku.github.io/tuf-demo/metadata - @echo "Downloading the following target file - file1.txt" + @echo "Downloading the following target file - rdimitrov/artifact-example.md" @sleep 2 - ./tuf-client get --url https://jku.github.io/tuf-demo/metadata --turl https://jku.github.io/tuf-demo/targets file1.txt + ./tuf-client get --url https://jku.github.io/tuf-demo/metadata --turl https://jku.github.io/tuf-demo/targets rdimitrov/artifact-example.md # Target for demoing the tuf-client cli with root-signing repo .PHONY: example-root-signing diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 30507b13..2e8e522c 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -31,7 +31,7 @@ import ( const ( metadataURL = "https://jku.github.io/tuf-demo/metadata" targetsURL = "https://jku.github.io/tuf-demo/targets" - targetName = "file1.txt" + targetName = "rdimitrov/artifact-example.md" verbosity = 4 generateRandomFolder = false ) @@ -147,7 +147,7 @@ func DownloadTarget(localMetadataDir, target string) error { cfg.LocalMetadataDir = localMetadataDir cfg.LocalTargetsDir = filepath.Join(localMetadataDir, "download") cfg.RemoteTargetsURL = targetsURL - cfg.PrefixTargetsWithHash = false // do not use hash-prefixed target files with consistent snapshots + cfg.PrefixTargetsWithHash = true // create a new Updater instance up, err := updater.New(cfg) From 3e5d1508aadcbf4e51f6144671f3cc99bae71984 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sat, 28 Oct 2023 00:17:18 +0300 Subject: [PATCH 186/208] chore: bump go to 1.21 Signed-off-by: Radoslav Dimitrov --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0fae2c06..bd5005b9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rdimitrov/go-tuf-metadata -go 1.20 +go 1.21 require ( github.com/go-logr/logr v1.2.4 From 9574caf9208374bec1b65f4832ee7f8e35257723 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:58:21 +0200 Subject: [PATCH 187/208] chore(deps): bump github.com/sigstore/sigstore from 1.7.4 to 1.7.5 (#77) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.7.4 to 1.7.5. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.7.4...v1.7.5) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 3 +-- go.sum | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index bd5005b9..ffbeb137 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 - github.com/sigstore/sigstore v1.7.4 + github.com/sigstore/sigstore v1.7.5 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 @@ -25,7 +25,6 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/term v0.13.0 // indirect diff --git a/go.sum b/go.sum index 57fccfee..bb3a4692 100644 --- a/go.sum +++ b/go.sum @@ -1,32 +1,43 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= +github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg= +github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01/go.mod h1:ypD5nozFk9vcGw1ATYefw6jHe/jZP++Z15/+VTMcWhc= github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= +github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52/go.mod h1:yIquW87NGRw1FU5p5lEkpnt/QxoH5uPAOUlOVkAUuMg= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= +github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= +github.com/honeycombio/beeline-go v1.10.0/go.mod h1:Zz5WMeQCJzFt2Mvf8t6HC1X8RLskLVR/e8rvcmXB1G8= github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= +github.com/honeycombio/libhoney-go v1.16.0/go.mod h1:izP4fbREuZ3vqC4HlCAmPrcPT9gxyxejRjGtCYpmBn0= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= +github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVzF6no3QaDSMLGLEHtHSBSefs+MgcDWnmhmo= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= +github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -34,22 +45,27 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf h1:ndns1qx/5dL43g16EQkPV/i8+b3l5bYQwLeoSBe7tS8= github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf/go.mod h1:aGkAgvWY/IUcVFfuly53REpfv5edu25oij+qHRFaraA= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= 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/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/sigstore/sigstore v1.7.4 h1:Fyqn6OKOVsYnV0Vs6JhG5t+q0u7Gj6R5dJ52kUVteLs= -github.com/sigstore/sigstore v1.7.4/go.mod h1:5MxR9PrWYGk5I3sXgdnrMUOLbwFPuAUNtWPm3VwOjkc= +github.com/sigstore/sigstore v1.7.5 h1:ij55dBhLwjICmLTBJZm7SqoQLdsu/oowDanACcJNs48= +github.com/sigstore/sigstore v1.7.5/go.mod h1:9OCmYWhzuq/G4e1cy9m297tuMRJ1LExyrXY3ZC3Zt/s= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -60,12 +76,12 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/theupdateframework/go-tuf v0.5.2 h1:habfDzTmpbzBLIFGWa2ZpVhYvFBoK0C1onC3a4zuPRA= -github.com/theupdateframework/go-tuf v0.5.2/go.mod h1:SyMV5kg5n4uEclsyxXJZI2UxPFJNDc4Y+r7wv+MlvTA= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= @@ -89,8 +105,10 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= +gopkg.in/alexcesaro/statsd.v2 v2.0.0/go.mod h1:i0ubccKGzBVNBpdGV5MocxyA/XlLUJzA7SLonnE4drU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From b4a1983ef43fe3506e9262491e173a46331d02a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:58:40 +0200 Subject: [PATCH 188/208] chore(deps): bump github.com/go-logr/logr from 1.2.4 to 1.3.0 (#76) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.4 to 1.3.0. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.2.4...v1.3.0) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ffbeb137..175137e0 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/rdimitrov/go-tuf-metadata go 1.21 require ( - github.com/go-logr/logr v1.2.4 + github.com/go-logr/logr v1.3.0 github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 github.com/sigstore/sigstore v1.7.5 diff --git a/go.sum b/go.sum index bb3a4692..c2fba604 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01/go.mod h1:yp github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52/go.mod h1:yIquW87NGRw1FU5p5lEkpnt/QxoH5uPAOUlOVkAUuMg= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= From 426250f95dbecd2a74ec682b8e320320da025459 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 18:01:44 +0200 Subject: [PATCH 189/208] chore(deps): bump golang.org/x/sys from 0.13.0 to 0.14.0 (#78) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.13.0 to 0.14.0. - [Commits](https://github.com/golang/sys/compare/v0.13.0...v0.14.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 175137e0..03e4f796 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.14.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a - golang.org/x/sys v0.13.0 + golang.org/x/sys v0.14.0 ) require ( diff --git a/go.sum b/go.sum index c2fba604..bbaf9e3f 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,8 @@ golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZ golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= From 077b087474a0f051d4bb1d17c88b3b683cabddac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 18:02:06 +0200 Subject: [PATCH 190/208] chore(deps): bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#79) Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 03e4f796..4c909fd5 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.7.0 github.com/sigstore/sigstore v1.7.5 github.com/sirupsen/logrus v1.9.3 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.14.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a diff --git a/go.sum b/go.sum index bbaf9e3f..f1f41379 100644 --- a/go.sum +++ b/go.sum @@ -2,7 +2,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -68,8 +68,8 @@ github.com/sigstore/sigstore v1.7.5 h1:ij55dBhLwjICmLTBJZm7SqoQLdsu/oowDanACcJNs github.com/sigstore/sigstore v1.7.5/go.mod h1:9OCmYWhzuq/G4e1cy9m297tuMRJ1LExyrXY3ZC3Zt/s= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From 9b8deba5965eb75bfba48c64e286722931612109 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 6 Nov 2023 20:32:54 +0200 Subject: [PATCH 191/208] Add Trivy scan to workflow Signed-off-by: Radoslav Dimitrov --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30b07df4..5d77129e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -70,3 +70,9 @@ jobs: with: go-version-input: ${{ matrix.go-version }} go-package: ./... + - name: Trivy Scan + uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0 + with: + image-ref: ${{ github.repository }} + format: json + exit-code: 1 From 931f74a7d813b3e5ff521a27b9c211ea812c7957 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 6 Nov 2023 21:08:46 +0200 Subject: [PATCH 192/208] Update README Signed-off-by: Radoslav Dimitrov --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9ea05d69..051324c0 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ # TUF A Framework for Securing Software Update Systems ---------------------------- + [The Update Framework (TUF)](https://theupdateframework.io/) is a framework for secure content delivery and updates. It protects against various types of supply chain attacks and provides resilience to compromise. From a142637b93055039a88408f83e4c6a0a1022c1df Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 6 Nov 2023 21:23:02 +0200 Subject: [PATCH 193/208] Use pinned actions Signed-off-by: Radoslav Dimitrov --- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/examples.yml | 12 ++++++------ .github/workflows/tests.yml | 17 ++++++----------- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ef78c269..88c16c4c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,11 +38,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@74483a38d39275f33fcff5f35b679b5ca4a26a99 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,7 +53,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@74483a38d39275f33fcff5f35b679b5ca4a26a99 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -67,4 +67,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@74483a38d39275f33fcff5f35b679b5ca4a26a99 diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 3e367dd5..f717bfbb 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -18,7 +18,7 @@ jobs: outputs: matrix: ${{ steps.versions.outputs.matrix }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: arnested/go-version-action@b556f8d91b644164318c709d28b9083eaf0c064d id: versions client: @@ -31,7 +31,7 @@ jobs: needs: get-go-versions steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup - Go ${{ matrix.go-version }} uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: @@ -47,7 +47,7 @@ jobs: needs: get-go-versions steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup - Go ${{ matrix.go-version }} uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: @@ -63,7 +63,7 @@ jobs: needs: get-go-versions steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup - Go ${{ matrix.go-version }} uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: @@ -79,7 +79,7 @@ jobs: needs: get-go-versions steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup - Go ${{ matrix.go-version }} uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: @@ -95,7 +95,7 @@ jobs: needs: get-go-versions steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup - Go ${{ matrix.go-version }} uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d77129e..09b4aa95 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: outputs: matrix: ${{ steps.versions.outputs.matrix }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: arnested/go-version-action@b556f8d91b644164318c709d28b9083eaf0c064d id: versions @@ -33,7 +33,7 @@ jobs: needs: get-go-versions steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: Setup - Go ${{ matrix.go-version }} uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f @@ -44,7 +44,7 @@ jobs: run: go test -race -covermode=atomic -coverpkg=./metadata/... -coverprofile=coverage.out ./... - name: Send coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d with: flags: Go-${{ matrix.go-version }} @@ -59,20 +59,15 @@ jobs: - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f with: go-version: ${{ matrix.go-version }} - - uses: actions/checkout@v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - name: golangci-lint uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1 with: version: v1.51 # has to be pinned and thus manually updated due to https://github.com/golangci/golangci-lint-action/blob/6a290f7d5d488e1e423b0b37fe802c822ca2c08c/README.md?plain=1#L108 args: --timeout 5m --verbose - name: govulncheck - uses: golang/govulncheck-action@v1 + uses: golang/govulncheck-action@7da72f730e37eeaad891fcff0a532d27ed737cd4 with: go-version-input: ${{ matrix.go-version }} go-package: ./... - - name: Trivy Scan - uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # v0.12.0 - with: - image-ref: ${{ github.repository }} - format: json - exit-code: 1 + From 1bdd94ed41ee15709da81e0b8a69d01a4a06c388 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Mon, 6 Nov 2023 21:28:26 +0200 Subject: [PATCH 194/208] Enroll go-tuf-metadata to Minder and store profile Signed-off-by: Radoslav Dimitrov --- .minder.yaml | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .minder.yaml diff --git a/.minder.yaml b/.minder.yaml new file mode 100644 index 00000000..863387a4 --- /dev/null +++ b/.minder.yaml @@ -0,0 +1,133 @@ +# This is the Minder profile file used for securely monitoring rdimitrov/go-tuf-metadata. +# For more information, see https://github.com/stacklok/minder. +--- +version: v1 +type: profile +name: go-tuf-metadata +context: + provider: github +alert: "on" +remediate: "on" +repository: + - type: secret_scanning + def: + enabled: true + - type: secret_push_protection + def: + enabled: true + - type: github_actions_allowed + def: + allowed_actions: all + # - type: allowed_selected_actions + # def: + # github_owned_allowed: true + # verified_allowed: true + # patterns_allowed: [] + - type: default_workflow_permissions + def: + default_workflow_permissions: write + can_approve_pull_request_reviews: true + - type: codeql_enabled + def: + languages: [go] + schedule_interval: '30 4-6 * * *' + - type: actions_check_pinned_tags + def: {} + - type: dependabot_configured + def: + package_ecosystem: gomod + schedule_interval: weekly + apply_if_file: go.mod + - type: dockerfile_no_latest_tag + def: {} + # - type: trivy_action_enabled + # def: {} + - type: branch_protection_enabled + params: + branch: main + def: {} + - type: branch_protection_allow_deletions + params: + branch: main + def: + allow_deletions: false + - type: branch_protection_allow_force_pushes + params: + branch: main + def: + allow_force_pushes: true + # - type: branch_protection_enforce_admins + # params: + # branch: main + # def: + # enforce_admins: true + - type: branch_protection_lock_branch + params: + branch: main + def: + lock_branch: false + - type: branch_protection_require_conversation_resolution + params: + branch: main + def: + required_conversation_resolution: true + - type: branch_protection_require_linear_history + params: + branch: main + def: + required_linear_history: true + - type: branch_protection_require_pull_request_approving_review_count + params: + branch: main + def: + required_approving_review_count: 1 + - type: branch_protection_require_pull_request_code_owners_review + params: + branch: main + def: + require_code_owner_reviews: true + - type: branch_protection_require_pull_request_dismiss_stale_reviews + params: + branch: main + def: + dismiss_stale_reviews: true + - type: branch_protection_require_pull_request_last_push_approval + params: + branch: main + def: + require_last_push_approval: true + - type: branch_protection_require_pull_requests + params: + branch: main + def: + required_pull_request_reviews: true + - type: branch_protection_require_signatures + params: + branch: main + def: + required_signatures: false + - type: license + def: + license_filename: LICENSE + license_type: "BSD-2-Clause" +# artifact: +# - type: artifact_signature +# params: +# tags: [main] +# name: test +# def: +# is_signed: true +# is_verified: true +# is_bundle_verified: true +pull_request: + - type: pr_vulnerability_check + def: + action: review + ecosystem_config: + - name: go + vulnerability_database_type: osv + vulnerability_database_endpoint: https://vuln.go.dev + package_repository: + url: https://proxy.golang.org + sum_repository: + url: https://sum.golang.org From 19d3aa286e73deb902307e6d7c2313793a2ab20e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:54:37 +0200 Subject: [PATCH 195/208] chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.15.0 (#81) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.15.0. - [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.15.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 4c909fd5..b57aa728 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.14.0 + golang.org/x/crypto v0.15.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a golang.org/x/sys v0.14.0 ) @@ -27,8 +27,8 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/term v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.56.3 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/go.sum b/go.sum index f1f41379..84a46e5b 100644 --- a/go.sum +++ b/go.sum @@ -82,8 +82,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= @@ -91,10 +91,10 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= From dd861e9ece9c63c8acb9ed91e243087572f44ac8 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 28 Nov 2023 21:53:19 +0200 Subject: [PATCH 196/208] Update the multirepo example metadata Signed-off-by: Radoslav Dimitrov --- .gitignore | 1 + examples/multirepo/client/root.json | 30 +++++++++---------- .../multirepo/repository/generate_metadata.go | 14 ++++----- .../multirepo/repository/metadata/1.root.json | 30 +++++++++---------- .../repository/metadata/1.snapshot.json | 6 ++-- .../repository/metadata/1.targets.json | 6 ++-- .../repository/metadata/timestamp.json | 6 ++-- 7 files changed, 47 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index adfefb3c..c8e7f5d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vscode dist/ +.idea/ \ No newline at end of file diff --git a/examples/multirepo/client/root.json b/examples/multirepo/client/root.json index ae34979b..243a4b07 100644 --- a/examples/multirepo/client/root.json +++ b/examples/multirepo/client/root.json @@ -1,40 +1,40 @@ { "signatures": [ { - "keyid": "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2", - "sig": "48178709d5b4296e19f7d9409c6fc2ba8a8a0568333b15cc8252b34541a3239a08b37adc721afc1394482b96e3ba3617e6ba4cd7ce048904472bdf161820c60c" + "keyid": "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138", + "sig": "b434f25bd61a5cb7c53883b3d91c53b94e9312cd17e19f2b1e1089d73772fad542c0a91ef109404fe4cfabbd2d4cf3b0f7eaaca4fd012555014f75a23d49460a" } ], "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-08-30T17:08:16.58221527Z", + "expires": "2033-11-28T19:51:01.794266Z", "keys": { - "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173": { + "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138": { "keytype": "ed25519", "keyval": { - "public": "6b8860bc2395b3dfaa2e938753788ebc1a6d078d8b6c7c6ea5b6ec164fdfce1a" + "public": "3b70174991642fd8cfd4b1a4d834843f785db02ad98372b24eb54d06750dd732" }, "scheme": "ed25519" }, - "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c": { + "8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696": { "keytype": "ed25519", "keyval": { - "public": "8b1e343aa4a58aedf7d45d4f100e2d478025ad7134ac728cf8e5d5c49ab1efda" + "public": "2f70d3d75e50f50cf9af3adcc20754ba2d17601801f36d61cacb9f73a7f798f9" }, "scheme": "ed25519" }, - "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2": { + "a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5": { "keytype": "ed25519", "keyval": { - "public": "93a8b2eeaae60f591211d2c8e20b04ff5897db56e59d1c4118b6aff89c2b4c5b" + "public": "3c3769ac5f74c8f2f84748586344ab8bbda9f0096859d5f37450dec1f5675434" }, "scheme": "ed25519" }, - "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35": { + "e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b": { "keytype": "ed25519", "keyval": { - "public": "9dd181035fa996f1d1551689e2d86cefa21dad7cf2365d92ef4e743d90be52d1" + "public": "6b1daebaa9b926bb38c33fd7d4edc14e2e96f8795b2ffe6ed49adee6a1251b20" }, "scheme": "ed25519" } @@ -42,25 +42,25 @@ "roles": { "root": { "keyids": [ - "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2" + "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138" ], "threshold": 1 }, "snapshot": { "keyids": [ - "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173" + "8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696" ], "threshold": 1 }, "targets": { "keyids": [ - "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35" + "a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5" ], "threshold": 1 }, "timestamp": { "keyids": [ - "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c" + "e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b" ], "threshold": 1 } diff --git a/examples/multirepo/repository/generate_metadata.go b/examples/multirepo/repository/generate_metadata.go index e1349540..1a1c82cb 100644 --- a/examples/multirepo/repository/generate_metadata.go +++ b/examples/multirepo/repository/generate_metadata.go @@ -31,7 +31,7 @@ func main() { keys := map[string]ed25519.PrivateKey{} // Create Targets metadata - targets := metadata.Targets(helperExpireIn(60)) + targets := metadata.Targets(helperExpireIn(10)) roles.SetTargets("targets", targets) // Add each target to Targets metadata @@ -51,15 +51,15 @@ func main() { } // Create Snapshot metadata - snapshot := metadata.Snapshot(helperExpireIn(365)) + snapshot := metadata.Snapshot(helperExpireIn(10)) roles.SetSnapshot(snapshot) // Create Timestamp metadata - timestamp := metadata.Timestamp(helperExpireIn(365)) + timestamp := metadata.Timestamp(helperExpireIn(10)) roles.SetTimestamp(timestamp) // Create Root metadata - root := metadata.Root(helperExpireIn(365)) + root := metadata.Root(helperExpireIn(10)) roles.SetRoot(root) // For this example, we generate one private key of type 'ed25519' for each top-level role @@ -162,9 +162,9 @@ func main() { fmt.Println("Done! Metadata files location:", cwd) } -// helperExpireIn returns time offset by days -func helperExpireIn(days int) time.Time { - return time.Now().AddDate(0, 0, days).UTC() +// helperExpireIn returns time offset by years (for the sake of the example) +func helperExpireIn(years int) time.Time { + return time.Now().AddDate(years, 0, 0).UTC() } // helperGetPathForTarget returns local and target paths for target diff --git a/examples/multirepo/repository/metadata/1.root.json b/examples/multirepo/repository/metadata/1.root.json index ae34979b..243a4b07 100644 --- a/examples/multirepo/repository/metadata/1.root.json +++ b/examples/multirepo/repository/metadata/1.root.json @@ -1,40 +1,40 @@ { "signatures": [ { - "keyid": "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2", - "sig": "48178709d5b4296e19f7d9409c6fc2ba8a8a0568333b15cc8252b34541a3239a08b37adc721afc1394482b96e3ba3617e6ba4cd7ce048904472bdf161820c60c" + "keyid": "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138", + "sig": "b434f25bd61a5cb7c53883b3d91c53b94e9312cd17e19f2b1e1089d73772fad542c0a91ef109404fe4cfabbd2d4cf3b0f7eaaca4fd012555014f75a23d49460a" } ], "signed": { "_type": "root", "consistent_snapshot": true, - "expires": "2024-08-30T17:08:16.58221527Z", + "expires": "2033-11-28T19:51:01.794266Z", "keys": { - "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173": { + "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138": { "keytype": "ed25519", "keyval": { - "public": "6b8860bc2395b3dfaa2e938753788ebc1a6d078d8b6c7c6ea5b6ec164fdfce1a" + "public": "3b70174991642fd8cfd4b1a4d834843f785db02ad98372b24eb54d06750dd732" }, "scheme": "ed25519" }, - "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c": { + "8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696": { "keytype": "ed25519", "keyval": { - "public": "8b1e343aa4a58aedf7d45d4f100e2d478025ad7134ac728cf8e5d5c49ab1efda" + "public": "2f70d3d75e50f50cf9af3adcc20754ba2d17601801f36d61cacb9f73a7f798f9" }, "scheme": "ed25519" }, - "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2": { + "a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5": { "keytype": "ed25519", "keyval": { - "public": "93a8b2eeaae60f591211d2c8e20b04ff5897db56e59d1c4118b6aff89c2b4c5b" + "public": "3c3769ac5f74c8f2f84748586344ab8bbda9f0096859d5f37450dec1f5675434" }, "scheme": "ed25519" }, - "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35": { + "e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b": { "keytype": "ed25519", "keyval": { - "public": "9dd181035fa996f1d1551689e2d86cefa21dad7cf2365d92ef4e743d90be52d1" + "public": "6b1daebaa9b926bb38c33fd7d4edc14e2e96f8795b2ffe6ed49adee6a1251b20" }, "scheme": "ed25519" } @@ -42,25 +42,25 @@ "roles": { "root": { "keyids": [ - "858d7da5d484f24900fa9cf411f81e19001653a507fa6530c41fbe0a83359ec2" + "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138" ], "threshold": 1 }, "snapshot": { "keyids": [ - "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173" + "8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696" ], "threshold": 1 }, "targets": { "keyids": [ - "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35" + "a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5" ], "threshold": 1 }, "timestamp": { "keyids": [ - "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c" + "e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b" ], "threshold": 1 } diff --git a/examples/multirepo/repository/metadata/1.snapshot.json b/examples/multirepo/repository/metadata/1.snapshot.json index 26d37366..b668878b 100644 --- a/examples/multirepo/repository/metadata/1.snapshot.json +++ b/examples/multirepo/repository/metadata/1.snapshot.json @@ -1,13 +1,13 @@ { "signatures": [ { - "keyid": "27739df49cff443d8495054774a5d6e86ff2a92a5fdde619e0919caf6171e173", - "sig": "c05a17a6a3e077470ade6e30d97df1f8d8e1c0831712515f62728b64ae563db8c2de9c904649a230ce74ed92a634f6b621d5f2a737f0de29bb9061ce6b303100" + "keyid": "8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696", + "sig": "e0f197531eec1a8aeea48014f4459206d59546c1a6a3ab5ea18910b229b51fe6475822fae0005fd8ff611944ca6e8b5c3b286a572d1812e561d55fdeafad9704" } ], "signed": { "_type": "snapshot", - "expires": "2024-08-30T17:08:16.582209049Z", + "expires": "2033-11-28T19:51:01.794264Z", "meta": { "targets.json": { "version": 1 diff --git a/examples/multirepo/repository/metadata/1.targets.json b/examples/multirepo/repository/metadata/1.targets.json index e8459afa..5c3cbec2 100644 --- a/examples/multirepo/repository/metadata/1.targets.json +++ b/examples/multirepo/repository/metadata/1.targets.json @@ -1,13 +1,13 @@ { "signatures": [ { - "keyid": "8b310111e8ac39e006a8a12904f3219212bcfb0b9dbf9c2cf7c0f49d4d3edd35", - "sig": "e20685a0fc000d1bec6ae1625132f74f78992400ef9724517051c631e83cd73dc2c7f86016d11b43693b1e6ded59d7274099c700420525480ad16ee89f749e09" + "keyid": "a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5", + "sig": "4c2ad791fe1b2d23b4a7292120b493c61795cb23519b2f23b9c17a25a1078b7cdf72f052fe4ddc583e45ef6ab6ca809f35c192bdf60649ba371bc063a62cbd05" } ], "signed": { "_type": "targets", - "expires": "2023-10-30T18:08:16.571163566Z", + "expires": "2033-11-28T19:51:01.793233Z", "spec_version": "1.0.31", "targets": { "map.json": { diff --git a/examples/multirepo/repository/metadata/timestamp.json b/examples/multirepo/repository/metadata/timestamp.json index 85304804..2e68e1e3 100644 --- a/examples/multirepo/repository/metadata/timestamp.json +++ b/examples/multirepo/repository/metadata/timestamp.json @@ -1,13 +1,13 @@ { "signatures": [ { - "keyid": "4f345ceb09a215ed9167a6611afcc0fd6d9a0c4a747ef39d3998ad0730d5a48c", - "sig": "7dd2d9fd319e24c21d93e97e63545089400f8622257d6088d49df007b9de88a2f67109d32559d51d27add09abd8e73099c345d56397a8cfaec76847d3a25a100" + "keyid": "e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b", + "sig": "41670fd3ca12b41a5f3109e6537646586099108c693c913d75570a47ff72e8910b32858a80be6f2ba058c0993af84de4f26a7b5a93b3322e0cf8d10e37352609" } ], "signed": { "_type": "timestamp", - "expires": "2024-08-30T17:08:16.582213737Z", + "expires": "2033-11-28T19:51:01.794266Z", "meta": { "snapshot.json": { "version": 1 From a6d533dbcf5b44da8dd52916641129a21103ccdc Mon Sep 17 00:00:00 2001 From: Fredrik Skogman Date: Fri, 1 Dec 2023 11:26:27 +0100 Subject: [PATCH 197/208] Updated the default ecdsa p256 key type to not include any parameters. (#82) Since TUF spec 1.0.32 the key type for ecdsa does not include the parameters, they are only part of the key-scheme. This commit updates the default keytype to not include the parameters, but includes a compatibility key type to be able to accept metadata compliant with older versions of the spec. Signed-off-by: Fredrik Skogman --- metadata/keys.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/metadata/keys.go b/metadata/keys.go index 5f046590..f5150a62 100644 --- a/metadata/keys.go +++ b/metadata/keys.go @@ -26,13 +26,13 @@ import ( ) const ( - KeyTypeEd25519 = "ed25519" - KeyTypeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" - KeyTypeECDSA_SHA2_P256_SSLIB = "ecdsa" - KeyTypeRSASSA_PSS_SHA256 = "rsa" - KeySchemeEd25519 = "ed25519" - KeySchemeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" - KeySchemeRSASSA_PSS_SHA256 = "rsassa-pss-sha256" + KeyTypeEd25519 = "ed25519" + KeyTypeECDSA_SHA2_P256_COMPAT = "ecdsa-sha2-nistp256" + KeyTypeECDSA_SHA2_P256 = "ecdsa" + KeyTypeRSASSA_PSS_SHA256 = "rsa" + KeySchemeEd25519 = "ed25519" + KeySchemeECDSA_SHA2_P256 = "ecdsa-sha2-nistp256" + KeySchemeRSASSA_PSS_SHA256 = "rsassa-pss-sha256" ) // ToPublicKey generate crypto.PublicKey from metadata type Key @@ -52,7 +52,7 @@ func (k *Key) ToPublicKey() (crypto.PublicKey, error) { return nil, err } return rsaKey, nil - case KeyTypeECDSA_SHA2_P256, KeyTypeECDSA_SHA2_P256_SSLIB: // handle "ecdsa" too as python-tuf/sslib keys are using it for keytype instead of https://theupdateframework.github.io/specification/latest/index.html#keytype-ecdsa-sha2-nistp256 + case KeyTypeECDSA_SHA2_P256, KeyTypeECDSA_SHA2_P256_COMPAT: // handle "ecdsa" too as python-tuf/sslib keys are using it for keytype instead of https://theupdateframework.github.io/specification/latest/index.html#keytype-ecdsa-sha2-nistp256 publicKey, err := cryptoutils.UnmarshalPEMToPublicKey([]byte(k.Value.PublicKey)) if err != nil { return nil, err From a4e8e5fce05cbe5e55f1f8fb2f145685b319f96c Mon Sep 17 00:00:00 2001 From: Fredrik Skogman Date: Mon, 4 Dec 2023 13:08:57 +0100 Subject: [PATCH 198/208] Remove logr dep (#83) * Ignore temporary files from emacs (ends qith '~') Signed-off-by: Fredrik Skogman * Remove dep of go-logr/logr. Provided is an (almost) logr compatible interface. Signed-off-by: Fredrik Skogman * Remove V method from logger. Signed-off-by: Fredrik Skogman * remove unnecessary variable Signed-off-by: Fredrik Skogman * Removed unnecessary code change Signed-off-by: Fredrik Skogman * ran go mod tidy Signed-off-by: Fredrik Skogman --------- Signed-off-by: Fredrik Skogman --- .gitignore | 3 +- Makefile | 15 ++++---- examples/client/client_example.go | 4 +-- examples/multirepo/client/client_example.go | 4 +-- go.mod | 2 +- metadata/logger.go | 23 +++++++++--- metadata/metadata.go | 40 ++++++++++----------- metadata/multirepo/multirepo.go | 10 +++--- metadata/trustedmetadata/trustedmetadata.go | 20 +++++------ metadata/updater/updater.go | 36 +++++++++---------- 10 files changed, 88 insertions(+), 69 deletions(-) diff --git a/.gitignore b/.gitignore index c8e7f5d3..8d9f6403 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .vscode dist/ -.idea/ \ No newline at end of file +.idea/ +*~ diff --git a/Makefile b/Makefile index 19f6cfd6..8a523028 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # notices and license terms. Your use of these subcomponents is subject to # the terms and conditions of the subcomponent's license, as noted in the # LICENSE file. -# +# # SPDX-License-Identifier: BSD-2-Clause # We want to use bash @@ -39,7 +39,7 @@ build-%: # Test target .PHONY: test -test: +test: go test -race -covermode atomic ./... ##################### @@ -47,9 +47,13 @@ test: ##################### .PHONY: lint -lint: +lint: golangci-lint run +.PHONY: fmt +fmt: + go fmt ./... + ##################### # examples section ##################### @@ -60,13 +64,13 @@ example-all: example-client example-repository example-multirepo example-tuf-cli # Target for demoing the examples/client/client_example.go .PHONY: example-client -example-client: +example-client: @echo "Executing the following example - client/client_example.go" @cd examples/client/ && go run . # Target for demoing the examples/repository/basic_repository.go .PHONY: example-repository -example-repository: +example-repository: @echo "Executing the following example - repository/basic_repository.go" @cd examples/repository/ && go run . @@ -114,4 +118,3 @@ clean: @rm -rf tuf_metadata @rm -f tuf-client @rm -f root.json - diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 2e8e522c..5652293b 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -173,7 +173,7 @@ func DownloadTarget(localMetadataDir, target string) error { return fmt.Errorf("failed while finding a cached target: %w", err) } if path != "" { - log.V(4).Info("Target is already present", "target", target, "path", path) + log.Info("Target is already present", "target", target, "path", path) } // target is not present locally, so let's try to download it @@ -182,7 +182,7 @@ func DownloadTarget(localMetadataDir, target string) error { return fmt.Errorf("failed to download target file %s - %w", target, err) } - log.V(4).Info("Successfully downloaded target", "target", target, "path", path) + log.Info("Successfully downloaded target", "target", target, "path", path) return nil } diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index fa1651d3..c492c838 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -127,7 +127,7 @@ func BootstrapTUF() ([]byte, map[string][]byte, error) { return nil, nil, fmt.Errorf("failed while finding a cached target: %w", err) } if path != "" { - log.V(4).Info("Target is already present", "target", name, "path", path) + log.Info("Target is already present", "target", name, "path", path) } // target is not present locally, so let's try to download it @@ -152,7 +152,7 @@ func BootstrapTUF() ([]byte, map[string][]byte, error) { repositoryName := strings.Split(name, string(os.PathSeparator)) trustedRoots[repositoryName[0]] = bytes } - log.V(4).Info("Successfully downloaded target", "target", name, "path", path) + log.Info("Successfully downloaded target", "target", name, "path", path) } return mapBytes, trustedRoots, nil diff --git a/go.mod b/go.mod index b57aa728..02722103 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/rdimitrov/go-tuf-metadata go 1.21 require ( - github.com/go-logr/logr v1.3.0 github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 github.com/sigstore/sigstore v1.7.5 @@ -17,6 +16,7 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.3.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-containerregistry v0.16.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/metadata/logger.go b/metadata/logger.go index 99bf4667..7bca4a2f 100644 --- a/metadata/logger.go +++ b/metadata/logger.go @@ -11,14 +11,29 @@ package metadata -import "github.com/go-logr/logr" +var log Logger = DiscardLogger{} -var log logr.Logger = logr.Discard() +// Logger partially implements the go-log/logr's interface: +// https://github.com/go-logr/logr/blob/master/logr.go +type Logger interface { + // Info logs a non-error message with key/value pairs + Info(msg string, kv ...any) + // Error logs an error with a given message and key/value pairs. + Error(err error, msg string, kv ...any) +} + +type DiscardLogger struct{} + +func (d DiscardLogger) Info(msg string, kv ...any) { +} + +func (d DiscardLogger) Error(err error, msg string, kv ...any) { +} -func SetLogger(logger logr.Logger) { +func SetLogger(logger Logger) { log = logger } -func GetLogger() logr.Logger { +func GetLogger() Logger { return log } diff --git a/metadata/metadata.go b/metadata/metadata.go index 0463e378..c017773f 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -50,7 +50,7 @@ func Root(expires ...time.Time) *Metadata[RootType] { Threshold: 1, } } - log.V(5).Info("Created metadata", "type", ROOT) + log.Info("Created metadata", "type", ROOT) return &Metadata[RootType]{ Signed: RootType{ Type: ROOT, @@ -71,7 +71,7 @@ func Snapshot(expires ...time.Time) *Metadata[SnapshotType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.V(5).Info("Created metadata", "type", SNAPSHOT) + log.Info("Created metadata", "type", SNAPSHOT) return &Metadata[SnapshotType]{ Signed: SnapshotType{ Type: SNAPSHOT, @@ -94,7 +94,7 @@ func Timestamp(expires ...time.Time) *Metadata[TimestampType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.V(5).Info("Created metadata", "type", TIMESTAMP) + log.Info("Created metadata", "type", TIMESTAMP) return &Metadata[TimestampType]{ Signed: TimestampType{ Type: TIMESTAMP, @@ -117,7 +117,7 @@ func Targets(expires ...time.Time) *Metadata[TargetsType] { if len(expires) == 0 { expires = []time.Time{time.Now().UTC()} } - log.V(5).Info("Created metadata", "type", TARGETS) + log.Info("Created metadata", "type", TARGETS) return &Metadata[TargetsType]{ Signed: TargetsType{ Type: TARGETS, @@ -142,7 +142,7 @@ func TargetFile() *TargetFiles { func MetaFile(version int64) *MetaFiles { if version < 1 { // attempting to set incorrect version - log.V(5).Info("Attempting to set incorrect version for MetaFile", "version", version) + log.Info("Attempting to set incorrect version for MetaFile", "version", version) version = 1 } return &MetaFiles{ @@ -168,7 +168,7 @@ func (meta *Metadata[T]) FromFile(name string) (*Metadata[T], error) { return nil, err } *meta = *m - log.V(5).Info("Loaded metadata from file", "name", name) + log.Info("Loaded metadata from file", "name", name) return meta, nil } @@ -179,13 +179,13 @@ func (meta *Metadata[T]) FromBytes(data []byte) (*Metadata[T], error) { return nil, err } *meta = *m - log.V(5).Info("Loaded metadata from bytes") + log.Info("Loaded metadata from bytes") return meta, nil } // ToBytes serialize metadata to bytes func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { - log.V(5).Info("Writing metadata to bytes") + log.Info("Writing metadata to bytes") if pretty { return json.MarshalIndent(*meta, "", "\t") } @@ -194,7 +194,7 @@ func (meta *Metadata[T]) ToBytes(pretty bool) ([]byte, error) { // ToFile save metadata to file func (meta *Metadata[T]) ToFile(name string, pretty bool) error { - log.V(5).Info("Writing metadata to file", "name", name) + log.Info("Writing metadata to file", "name", name) data, err := meta.ToBytes(pretty) if err != nil { return err @@ -232,7 +232,7 @@ func (meta *Metadata[T]) Sign(signer signature.Signer) (*Signature, error) { // update the Signatures part meta.Signatures = append(meta.Signatures, *sig) // return the new signature - log.V(4).Info("Signed metadata with key", "ID", key.ID()) + log.Info("Signed metadata with key", "ID", key.ID()) return sig, nil } @@ -245,7 +245,7 @@ func (meta *Metadata[T]) VerifyDelegate(delegatedRole string, delegatedMetadata var roleKeyIDs []string var roleThreshold int - log.V(5).Info("Verifying", "role", delegatedRole) + log.Info("Verifying", "role", delegatedRole) // collect keys, keyIDs and threshold based on delegator type switch i := i.(type) { @@ -362,19 +362,19 @@ func (meta *Metadata[T]) VerifyDelegate(delegatedRole string, delegatedMetadata // verify if the signature for that payload corresponds to the given key if err := verifier.VerifySignature(bytes.NewReader(sign.Signature), bytes.NewReader(payload)); err != nil { // failed to verify the metadata with that key ID - log.V(5).Info("Failed to verify %s with key ID %s", delegatedRole, keyID) + log.Info("Failed to verify %s with key ID %s", delegatedRole, keyID) } else { // save the verified keyID only if verification passed signingKeys[keyID] = true - log.V(5).Info("Verified with key", "role", delegatedRole, "ID", keyID) + log.Info("Verified with key", "role", delegatedRole, "ID", keyID) } } // check if the amount of valid signatures is enough if len(signingKeys) < roleThreshold { - log.V(4).Info("Verifying failed, not enough signatures", "role", delegatedRole, "got", len(signingKeys), "want", roleThreshold) + log.Info("Verifying failed, not enough signatures", "role", delegatedRole, "got", len(signingKeys), "want", roleThreshold) return ErrUnsignedMetadata{Msg: fmt.Sprintf("Verifying %s failed, not enough signatures, got %d, want %d", delegatedRole, len(signingKeys), roleThreshold)} } - log.V(4).Info("Verified successfully", "role", delegatedRole) + log.Info("Verified successfully", "role", delegatedRole) return nil } @@ -445,7 +445,7 @@ func (source *TargetFiles) Equal(expected TargetFiles) bool { // FromFile generate TargetFiles from file func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles, error) { - log.V(5).Info("Generating target file from file", "path", localPath) + log.Info("Generating target file from file", "path", localPath) // open file in, err := os.Open(localPath) if err != nil { @@ -462,7 +462,7 @@ func (t *TargetFiles) FromFile(localPath string, hashes ...string) (*TargetFiles // FromBytes generate TargetFiles from bytes func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) (*TargetFiles, error) { - log.V(5).Info("Generating target file from bytes", "path", localPath) + log.Info("Generating target file from bytes", "path", localPath) var hasher hash.Hash targetFile := &TargetFiles{ Hashes: map[string]HexBytes{}, @@ -498,7 +498,7 @@ func (t *TargetFiles) FromBytes(localPath string, data []byte, hashes ...string) // ClearSignatures clears Signatures func (meta *Metadata[T]) ClearSignatures() { - log.V(5).Info("Cleared signatures") + log.Info("Cleared signatures") meta.Signatures = []Signature{} } @@ -713,7 +713,7 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? return nil } - log.V(5).Info("Delegated role already has keyID", "role", role, "ID", key.ID()) + log.Info("Delegated role already has keyID", "role", role, "ID", key.ID()) } } if !isDelegatedRole { @@ -726,7 +726,7 @@ func (signed *TargetsType) AddKey(key *Key, role string) error { signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? return nil } - log.V(5).Info("SuccinctRoles role already has keyID", "ID", key.ID()) + log.Info("SuccinctRoles role already has keyID", "ID", key.ID()) } signed.Delegations.Keys[key.ID()] = key // TODO: should we check if we don't accidentally override an existing keyID with another key value? diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index 8573e208..019bfadd 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -105,7 +105,7 @@ func (client *MultiRepoClient) initTUFClients() error { // loop through each repository listed in the map file and initialize it for repoName, repoURL := range client.Config.RepoMap.Repositories { - log.V(4).Info("Initializing", "name", repoName, "url", repoURL[0]) + log.Info("Initializing", "name", repoName, "url", repoURL[0]) // get the trusted root file from the location specified in the map file relevant to its path // NOTE: the root.json file is expected to be in a folder named after the repository it corresponds to placed in the same folder as the map file @@ -149,7 +149,7 @@ func (client *MultiRepoClient) initTUFClients() error { // save the client client.TUFClients[repoName] = repoTUFClient - log.V(5).Info("Successfully initialized", "name", repoName, "url", repoURL) + log.Info("Successfully initialized", "name", repoName, "url", repoURL) } return nil } @@ -160,7 +160,7 @@ func (client *MultiRepoClient) Refresh() error { // loop through each initialized TUF client and refresh it for name, repoTUFClient := range client.TUFClients { - log.V(4).Info("Refreshing", "name", name) + log.Info("Refreshing", "name", name) err := repoTUFClient.Refresh() if err != nil { return err @@ -312,7 +312,7 @@ func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metada } if len(targetPath) != 0 && len(targetBytes) != 0 { // we already got the target for this target info cached locally, so return it - log.V(4).Info("Target already present locally from repo", "target", targetFile.Path, "repo", repoName) + log.Info("Target already present locally from repo", "target", targetFile.Path, "repo", repoName) return targetPath, targetBytes, nil } // not present locally, so let's try to download it @@ -323,7 +323,7 @@ func (client *MultiRepoClient) DownloadTarget(repos []string, targetFile *metada continue } // we got the target for this target info, so return it - log.V(4).Info("Downloaded target from repo", "target", targetFile.Path, "repo", repoName) + log.Info("Downloaded target from repo", "target", targetFile.Path, "repo", repoName) return targetPath, targetBytes, nil } // error out as we haven't succeeded downloading the target file diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 5bdfe7d5..07924937 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -54,7 +54,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ if trusted.Timestamp != nil { return nil, metadata.ErrRuntime{Msg: "cannot update root after timestamp"} } - log.V(5).Info("Updating root") + log.Info("Updating root") // generate root metadata newRoot, err := metadata.Root().FromBytes(rootData) if err != nil { @@ -80,7 +80,7 @@ func (trusted *TrustedMetadata) UpdateRoot(rootData []byte) (*metadata.Metadata[ } // save root if verified trusted.Root = newRoot - log.V(4).Info("Updated root", "version", trusted.Root.Signed.Version) + log.Info("Updated root", "version", trusted.Root.Signed.Version) return trusted.Root, nil } @@ -102,7 +102,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata // timestamp/snapshot can not yet be loaded at this point return nil, metadata.ErrExpiredMetadata{Msg: "final root.json is expired"} } - log.V(5).Info("Updating timestamp") + log.Info("Updating timestamp") newTimestamp, err := metadata.Timestamp().FromBytes(timestampData) if err != nil { return nil, err @@ -125,7 +125,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata } // keep using old timestamp if versions are equal if newTimestamp.Signed.Version == trusted.Timestamp.Signed.Version { - log.V(5).Info("New timestamp version equals the old one", "new", newTimestamp.Signed.Version, "old", trusted.Timestamp.Signed.Version) + log.Info("New timestamp version equals the old one", "new", newTimestamp.Signed.Version, "old", trusted.Timestamp.Signed.Version) return nil, metadata.ErrEqualVersionNumber{Msg: fmt.Sprintf("new timestamp version %d equals the old one %d", newTimestamp.Signed.Version, trusted.Timestamp.Signed.Version)} } // prevent rolling back snapshot version @@ -139,7 +139,7 @@ func (trusted *TrustedMetadata) UpdateTimestamp(timestampData []byte) (*metadata // protection of new timestamp: expiry is checked in UpdateSnapshot() // save root if verified trusted.Timestamp = newTimestamp - log.V(4).Info("Updated timestamp", "version", trusted.Timestamp.Signed.Version) + log.Info("Updated timestamp", "version", trusted.Timestamp.Signed.Version) // timestamp is loaded: error if it is not valid _final_ timestamp err = trusted.checkFinalTimestamp() @@ -175,7 +175,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo if trusted.Targets[metadata.TARGETS] != nil { return nil, metadata.ErrRuntime{Msg: "cannot update snapshot after targets"} } - log.V(5).Info("Updating snapshot") + log.Info("Updating snapshot") // snapshot cannot be loaded if final timestamp is expired err := trusted.checkFinalTimestamp() @@ -226,7 +226,7 @@ func (trusted *TrustedMetadata) UpdateSnapshot(snapshotData []byte, isTrusted bo // expiry not checked to allow old snapshot to be used for rollback // protection of new snapshot: it is checked when targets is updated trusted.Snapshot = newSnapshot - log.V(4).Info("Updated snapshot", "version", trusted.Snapshot.Signed.Version) + log.Info("Updated snapshot", "version", trusted.Snapshot.Signed.Version) // snapshot is loaded, but we error if it's not valid _final_ snapshot err = trusted.checkFinalSnapshot() @@ -281,7 +281,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN if !ok { return nil, metadata.ErrRuntime{Msg: "cannot load targets before delegator"} } - log.V(5).Info("Updating delegated role", "role", roleName, "delegator", delegatorName) + log.Info("Updating delegated role", "role", roleName, "delegator", delegatorName) // Verify against the hashes in snapshot, if any meta, ok := trusted.Snapshot.Signed.Meta[fmt.Sprintf("%s.json", roleName)] if !ok { @@ -320,7 +320,7 @@ func (trusted *TrustedMetadata) UpdateDelegatedTargets(targetsData []byte, roleN return nil, metadata.ErrExpiredMetadata{Msg: fmt.Sprintf("new %s is expired", roleName)} } trusted.Targets[roleName] = newDelegate - log.V(4).Info("Updated role", "role", roleName, "version", trusted.Targets[roleName].Signed.Version) + log.Info("Updated role", "role", roleName, "version", trusted.Targets[roleName].Signed.Version) return trusted.Targets[roleName], nil } @@ -346,6 +346,6 @@ func (trusted *TrustedMetadata) loadTrustedRoot(rootData []byte) error { } // save root if verified trusted.Root = newRoot - log.V(4).Info("Loaded trusted root", "version", trusted.Root.Signed.Version) + log.Info("Loaded trusted root", "version", trusted.Root.Signed.Version) return nil } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index 82c26611..a056932b 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -194,7 +194,7 @@ func (update *Updater) DownloadTarget(targetFile *metadata.TargetFiles, filePath return "", nil, err } } - log.V(4).Info("Downloaded target", "path", targetFile.Path) + log.Info("Downloaded target", "path", targetFile.Path) return filePath, data, nil } @@ -238,20 +238,20 @@ func (update *Updater) loadTimestamp() error { data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, metadata.TIMESTAMP)) if err != nil { // this means there's no existing local timestamp so we should proceed downloading it without the need to UpdateTimestamp - log.V(5).Info("Local timestamp does not exist") + log.Info("Local timestamp does not exist") } else { // local timestamp exists, let's try to verify it and load it to the trusted metadata set _, err := update.trusted.UpdateTimestamp(data) if err != nil { if errors.Is(err, metadata.ErrRepository{}) { // local timestamp is not valid, proceed downloading from remote; note that this error type includes several other subset errors - log.V(5).Info("Local timestamp is not valid") + log.Info("Local timestamp is not valid") } else { // another error return err } } - log.V(5).Info("Local timestamp is valid") + log.Info("Local timestamp is valid") // all okay, local timestamp exists and it is valid, nevertheless proceed with downloading from remote } // load from remote (whether local load succeeded or not) @@ -286,7 +286,7 @@ func (update *Updater) loadSnapshot() error { data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, metadata.SNAPSHOT)) if err != nil { // this means there's no existing local snapshot so we should proceed downloading it without the need to UpdateSnapshot - log.V(5).Info("Local snapshot does not exist") + log.Info("Local snapshot does not exist") } else { // successfully read a local snapshot metadata, so let's try to verify and load it to the trusted metadata set _, err = update.trusted.UpdateSnapshot(data, true) @@ -294,19 +294,19 @@ func (update *Updater) loadSnapshot() error { // this means snapshot verification/loading failed if errors.Is(err, metadata.ErrRepository{}) { // local snapshot is not valid, proceed downloading from remote; note that this error type includes several other subset errors - log.V(5).Info("Local snapshot is not valid") + log.Info("Local snapshot is not valid") } else { // another error return err } } else { // this means snapshot verification/loading succeeded - log.V(5).Info("Local snapshot is valid: not downloading new one") + log.Info("Local snapshot is valid: not downloading new one") return nil } } // local snapshot does not exist or is invalid, update from remote - log.V(5).Info("Failed to load local snapshot") + log.Info("Failed to load local snapshot") if update.trusted.Timestamp == nil { return fmt.Errorf("trusted timestamp not set") } @@ -352,7 +352,7 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad data, err := update.loadLocalMetadata(filepath.Join(update.cfg.LocalMetadataDir, roleName)) if err != nil { // this means there's no existing local target file so we should proceed downloading it without the need to UpdateDelegatedTargets - log.V(5).Info("Local role does not exist", "role", roleName) + log.Info("Local role does not exist", "role", roleName) } else { // successfully read a local targets metadata, so let's try to verify and load it to the trusted metadata set delegatedTargets, err := update.trusted.UpdateDelegatedTargets(data, roleName, parentName) @@ -360,19 +360,19 @@ func (update *Updater) loadTargets(roleName, parentName string) (*metadata.Metad // this means targets verification/loading failed if errors.Is(err, metadata.ErrRepository{}) { // local target file is not valid, proceed downloading from remote; note that this error type includes several other subset errors - log.V(5).Info("Local role is not valid", "role", roleName) + log.Info("Local role is not valid", "role", roleName) } else { // another error return nil, err } } else { // this means targets verification/loading succeeded - log.V(5).Info("Local role is valid: not downloading new one", "role", roleName) + log.Info("Local role is valid: not downloading new one", "role", roleName) return delegatedTargets, nil } } // local "roleName" does not exist or is invalid, update from remote - log.V(5).Info("Failed to load local role", "role", roleName) + log.Info("Failed to load local role", "role", roleName) if update.trusted.Snapshot == nil { return nil, fmt.Errorf("trusted snapshot not set") } @@ -466,7 +466,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // skip any visited current role to prevent cycles _, ok := visitedRoleNames[delegation.Role] if ok { - log.V(5).Info("Skipping visited current role", "role", delegation.Role) + log.Info("Skipping visited current role", "role", delegation.Role) continue } // the metadata for delegation.Role must be downloaded/updated before @@ -477,7 +477,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } target, ok := targets.Signed.Targets[targetFilePath] if ok { - log.V(5).Info("Found target in current role", "role", delegation.Role) + log.Info("Found target in current role", "role", delegation.Role) return target, nil } // after pre-order check, add current role to set of visited roles @@ -488,10 +488,10 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. // delegated roles roles := targets.Signed.Delegations.GetRolesForTarget(targetFilePath) for child, terminating := range roles { - log.V(5).Info("Adding child role", "role", child) + log.Info("Adding child role", "role", child) childRolesToVisit = append(childRolesToVisit, roleParentTuple{Role: child, Parent: delegation.Role}) if terminating { - log.V(5).Info("Not backtracking to other roles") + log.Info("Not backtracking to other roles") delegationsToVisit = []roleParentTuple{} break } @@ -504,7 +504,7 @@ func (update *Updater) preOrderDepthFirstWalk(targetFilePath string) (*metadata. } } if len(delegationsToVisit) > 0 { - log.V(5).Info("Too many roles left to visit for max allowed delegations", + log.Info("Too many roles left to visit for max allowed delegations", "roles-left", len(delegationsToVisit), "allowed-delegations", update.cfg.MaxDelegations) } @@ -536,7 +536,7 @@ func (update *Updater) persistMetadata(roleName string, data []byte) error { // delete the temporary file if there was an error while writing errRemove := os.Remove(file.Name()) if errRemove != nil { - log.V(5).Info("Failed to delete temporary file", "name", file.Name()) + log.Info("Failed to delete temporary file", "name", file.Name()) } return err } From 8ec1718e5afeb6a65e11b1a639b8a52462d14df9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:09:22 +0200 Subject: [PATCH 199/208] chore(deps): bump golang.org/x/sys from 0.14.0 to 0.15.0 (#85) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.14.0 to 0.15.0. - [Commits](https://github.com/golang/sys/compare/v0.14.0...v0.15.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 02722103..63788e68 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.15.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a - golang.org/x/sys v0.14.0 + golang.org/x/sys v0.15.0 ) require ( diff --git a/go.sum b/go.sum index 84a46e5b..4a559c3d 100644 --- a/go.sum +++ b/go.sum @@ -89,8 +89,8 @@ golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZ golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= From 0c0a36032e874071e1d7af41366b2b82b1827602 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Fri, 8 Dec 2023 09:38:34 +0200 Subject: [PATCH 200/208] chore: split actions to tests and linting (#89) --- .github/codecov.yml | 8 ++++++ .github/workflows/ci.yml | 2 ++ .github/workflows/codeql-analysis.yml | 8 ++++-- .github/workflows/linting.yml | 40 +++++++++++++++++++++++++++ .github/workflows/tests.yml | 25 ----------------- go.mod | 2 +- 6 files changed, 56 insertions(+), 29 deletions(-) create mode 100644 .github/codecov.yml create mode 100644 .github/workflows/linting.yml diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 00000000..015a7793 --- /dev/null +++ b/.github/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: + # basic + target: auto + threshold: 5% + patch: off \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ce9aab9..4fbfc73f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,8 @@ on: - "v*" name: CI jobs: + linting: + uses: ./.github/workflows/linting.yml tests: uses: ./.github/workflows/tests.yml examples: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 88c16c4c..fbc73b48 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,9 +37,11 @@ jobs: # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout repository - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version-file: 'go.mod' + cache: false # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@74483a38d39275f33fcff5f35b679b5ca4a26a99 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 00000000..8b0891f4 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,40 @@ +# Copyright 2022-2023 VMware, Inc. +# +# This product is licensed to you under the BSD-2 license (the "License"). +# You may not use this product except in compliance with the BSD-2 License. +# This product may include a number of subcomponents with separate copyright +# notices and license terms. Your use of these subcomponents is subject to +# the terms and conditions of the subcomponent's license, as noted in the +# LICENSE file. +# +# SPDX-License-Identifier: BSD-2-Clause +on: + workflow_call: +name: Linting +jobs: + govulncheck_job: + runs-on: ubuntu-latest + name: govulncheck + steps: + - id: govulncheck + uses: golang/govulncheck-action@7da72f730e37eeaad891fcff0a532d27ed737cd4 + with: + go-version-file: 'go.mod' + go-package: ./... + golangci: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f + with: + go-version-file: 'go.mod' + cache: false + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + # Require: The version of golangci-lint to use. + # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. + # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. + version: v1.54 + args: --timeout 5m --verbose diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 09b4aa95..6b2d7172 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,6 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: arnested/go-version-action@b556f8d91b644164318c709d28b9083eaf0c064d id: versions - run: name: Run strategy: @@ -47,27 +46,3 @@ jobs: uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d with: flags: Go-${{ matrix.go-version }} - - checks: - name: Checks and linters - strategy: - matrix: - go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }} - runs-on: ubuntu-latest - needs: get-go-versions - steps: - - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f - with: - go-version: ${{ matrix.go-version }} - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - - name: golangci-lint - uses: golangci/golangci-lint-action@07db5389c99593f11ad7b44463c2d4233066a9b1 - with: - version: v1.51 # has to be pinned and thus manually updated due to https://github.com/golangci/golangci-lint-action/blob/6a290f7d5d488e1e423b0b37fe802c822ca2c08c/README.md?plain=1#L108 - args: --timeout 5m --verbose - - name: govulncheck - uses: golang/govulncheck-action@7da72f730e37eeaad891fcff0a532d27ed737cd4 - with: - go-version-input: ${{ matrix.go-version }} - go-package: ./... - diff --git a/go.mod b/go.mod index 63788e68..de6a22d1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/rdimitrov/go-tuf-metadata -go 1.21 +go 1.21.5 require ( github.com/go-logr/stdr v1.2.2 From 4f5046b6d70b8bfc39131f85abc441cb74733f9e Mon Sep 17 00:00:00 2001 From: Fredrik Skogman Date: Fri, 8 Dec 2023 09:07:56 +0100 Subject: [PATCH 201/208] Added an unsafe method for loading the tuf metadata on disk (#87) * Added an unsafe method for loading the tuf metadata on disk Signed-off-by: Fredrik Skogman * Feedback from review. Added a config parameter instead of a separate method. Signed-off-by: Fredrik Skogman * Added unit tests for unsafe local mode Signed-off-by: Fredrik Skogman * DEBUG: remove added tests Signed-off-by: Fredrik Skogman * comment out correct test Signed-off-by: Fredrik Skogman * Uncommented tests cases and disabled go caching Signed-off-by: Fredrik Skogman --------- Signed-off-by: Fredrik Skogman --- metadata/config/config.go | 4 + metadata/updater/updater.go | 59 +++++++++- .../updater/updater_top_level_update_test.go | 109 +++++++++++++++++- 3 files changed, 169 insertions(+), 3 deletions(-) diff --git a/metadata/config/config.go b/metadata/config/config.go index 2c363e49..f134cc4b 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -35,6 +35,9 @@ type UpdaterConfig struct { RemoteTargetsURL string DisableLocalCache bool PrefixTargetsWithHash bool + // UnsafeLocalMode only uses the metadata as written on disk + // if the metadata is incomplete, calling updater.Refresh will fail + UnsafeLocalMode bool } // New creates a new UpdaterConfig instance used by the Updater to @@ -61,6 +64,7 @@ func New(remoteURL string, rootBytes []byte) (*UpdaterConfig, error) { RemoteTargetsURL: targetsURL, // URL of where the target files should be downloaded from DisableLocalCache: false, // enable local caching of trusted metadata PrefixTargetsWithHash: true, // use hash-prefixed target files with consistent snapshots + UnsafeLocalMode: false, }, nil } diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index a056932b..d38a049a 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -91,7 +91,7 @@ func New(config *config.UpdaterConfig) (*Updater, error) { return updater, nil } -// Refresh refreshes top-level metadata. +// Refresh loads and possibly refreshes top-level metadata. // Downloads, verifies, and loads metadata for the top-level roles in the // specified order (root -> timestamp -> snapshot -> targets) implementing // all the checks required in the TUF client workflow. @@ -102,7 +102,20 @@ func New(config *config.UpdaterConfig) (*Updater, error) { // that happens on demand during GetTargetInfo(). However, if the // repository uses consistent snapshots (ref. https://theupdateframework.github.io/specification/latest/#consistent-snapshots), // then all metadata downloaded by the Updater will use the same consistent repository state. +// +// If UnsafeLocalMode is set, no network interaction is performed, only +// the cached files on disk are used. If the cached data is not complete, +// this call will fail. func (update *Updater) Refresh() error { + if update.cfg.UnsafeLocalMode { + return update.unsafeLocalRefresh() + } + return update.onlineRefresh() +} + +// onlineRefresh implements the TUF client workflow as described for +// the Refresh function. +func (update *Updater) onlineRefresh() error { err := update.loadRoot() if err != nil { return err @@ -122,6 +135,50 @@ func (update *Updater) Refresh() error { return nil } +// unsafeLoadRefresh tries to load the persisted metadata already cached +// on disk. Note that this is an usafe function, and does deviate from the +// TUF specification section 5.3 to 5.7 (update phases). +// The metadata on disk are verified against the provided root though, +// and expiration dates are verified. +func (update *Updater) unsafeLocalRefresh() error { + // Root is already loaded + // load timestamp + var p = filepath.Join(update.cfg.LocalMetadataDir, metadata.TIMESTAMP) + data, err := update.loadLocalMetadata(p) + if err != nil { + return err + } + _, err = update.trusted.UpdateTimestamp(data) + if err != nil { + return err + } + + // load snapshot + p = filepath.Join(update.cfg.LocalMetadataDir, metadata.SNAPSHOT) + data, err = update.loadLocalMetadata(p) + if err != nil { + return err + } + _, err = update.trusted.UpdateSnapshot(data, false) + if err != nil { + return err + } + + // targets + p = filepath.Join(update.cfg.LocalMetadataDir, metadata.TARGETS) + data, err = update.loadLocalMetadata(p) + if err != nil { + return err + } + // verify and load the new target metadata + _, err = update.trusted.UpdateDelegatedTargets(data, metadata.TARGETS, metadata.ROOT) + if err != nil { + return err + } + + return nil +} + // GetTargetInfo returns metadata.TargetFiles instance with information // for targetPath. The return value can be used as an argument to // DownloadTarget() and FindCachedTarget(). diff --git a/metadata/updater/updater_top_level_update_test.go b/metadata/updater/updater_top_level_update_test.go index 3696411c..91be6f6b 100644 --- a/metadata/updater/updater_top_level_update_test.go +++ b/metadata/updater/updater_top_level_update_test.go @@ -65,8 +65,17 @@ func loadUpdaterConfig() (*config.UpdaterConfig, error) { return updaterConfig, err } -// runRefresh creates new Updater instance and -// runs Refresh +func loadUnsafeUpdaterConfig() (*config.UpdaterConfig, error) { + updaterConfig, err := loadUpdaterConfig() + if err != nil { + return nil, err + } + updaterConfig.UnsafeLocalMode = true + + return updaterConfig, nil +} + +// runRefresh creates new Updater instance and runs Refresh func runRefresh(updaterConfig *config.UpdaterConfig, moveInTime time.Time) (Updater, error) { if len(simulator.Sim.DumpDir) > 0 { simulator.Sim.Write() @@ -116,6 +125,23 @@ func assertFilesExist(t *testing.T, roles []string) { } } +func assertFilesExact(t *testing.T, roles []string) { + expectedFiles := []string{} + + for _, role := range roles { + expectedFiles = append(expectedFiles, fmt.Sprintf("%s.json", role)) + } + localMetadataFiles, err := os.ReadDir(simulator.MetadataDir) + assert.NoError(t, err) + + actual := []string{} + for _, file := range localMetadataFiles { + actual = append(actual, file.Name()) + } + + assert.ElementsMatch(t, actual, expectedFiles) +} + // Asserts that local file content is the expected func assertContentEquals(t *testing.T, role string, version *int) { expectedContent, err := simulator.Sim.FetchMetadata(role, version) @@ -169,6 +195,27 @@ func TestLoadTrustedRootMetadata(t *testing.T) { } } +func TestUnsafeLoadTrustedRootMetadata(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + updaterConfig, err := loadUnsafeUpdaterConfig() + assert.NoError(t, err) + updater, err := New(updaterConfig) + assert.NoError(t, err) + + assert.Nil(t, err) + if assert.NotNil(t, updater) { + assert.Equal(t, metadata.ROOT, updater.trusted.Root.Signed.Type) + assert.Equal(t, metadata.SPECIFICATION_VERSION, updater.trusted.Root.Signed.SpecVersion) + assert.True(t, updater.trusted.Root.Signed.ConsistentSnapshot) + assert.Equal(t, int64(1), updater.trusted.Root.Signed.Version) + assert.Nil(t, updater.trusted.Snapshot) + assert.Nil(t, updater.trusted.Timestamp) + assert.Empty(t, updater.trusted.Targets) + } +} + func TestFirstTimeRefresh(t *testing.T) { err := loadOrResetTrustedRootMetadata() assert.NoError(t, err) @@ -192,6 +239,64 @@ func TestFirstTimeRefresh(t *testing.T) { } } +func TestFirstUnsafeTimeRefresh(t *testing.T) { + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + assertFilesExist(t, []string{metadata.ROOT}) + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUnsafeUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.Error(t, err) + // As no update was made only the root file should be present + assertFilesExact(t, []string{metadata.ROOT}) +} + +func TestUnsafeRefresh(t *testing.T) { + // First run a "real" refresh + err := loadOrResetTrustedRootMetadata() + assert.NoError(t, err) + + assertFilesExist(t, []string{metadata.ROOT}) + simulator.Sim.MDRoot.Signed.Version += 1 + simulator.Sim.PublishRoot() + + updaterConfig, err := loadUpdaterConfig() + assert.NoError(t, err) + _, err = runRefresh(updaterConfig, time.Now()) + assert.NoError(t, err) + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) + + // Create a new unsafe updater, verify content is still valid + updaterConfig, err = loadUnsafeUpdaterConfig() + assert.NoError(t, err) + updater, err := runRefresh(updaterConfig, time.Now()) + assert.NotNil(t, updater) + assert.NoError(t, err) + assertFilesExist(t, metadata.TOP_LEVEL_ROLE_NAMES[:]) + + for _, role := range metadata.TOP_LEVEL_ROLE_NAMES { + var version int + if role == metadata.ROOT { + // The root file is written when the updater is + // created, so the version is reset. + version = 1 + } + assertContentEquals(t, role, &version) + } + + assert.Equal(t, metadata.ROOT, updater.trusted.Root.Signed.Type) + assert.Equal(t, metadata.SPECIFICATION_VERSION, updater.trusted.Root.Signed.SpecVersion) + assert.True(t, updater.trusted.Root.Signed.ConsistentSnapshot) + assert.Equal(t, int64(1), updater.trusted.Root.Signed.Version) + assert.NotNil(t, updater.trusted.Snapshot) + assert.NotNil(t, updater.trusted.Timestamp) + assert.Equal(t, 1, len(updater.trusted.Targets)) +} + func TestTrustedRootMissing(t *testing.T) { err := loadOrResetTrustedRootMetadata() assert.NoError(t, err) From 64d5e15d7185a89611107000973f7d5f9bd04432 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 10:13:51 +0200 Subject: [PATCH 202/208] chore(deps): bump golang.org/x/crypto from 0.15.0 to 0.16.0 (#84) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.15.0 to 0.16.0. - [Commits](https://github.com/golang/crypto/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index de6a22d1..ef67dc2a 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.15.0 + golang.org/x/crypto v0.16.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a golang.org/x/sys v0.15.0 ) @@ -27,7 +27,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.56.3 // indirect diff --git a/go.sum b/go.sum index 4a559c3d..b070fcd2 100644 --- a/go.sum +++ b/go.sum @@ -82,8 +82,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= @@ -91,8 +91,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From c0014df034ce4cd537d0a798c7256b33bc51a6e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:08:34 +0200 Subject: [PATCH 203/208] chore(deps): bump github.com/sigstore/sigstore from 1.7.5 to 1.7.6 (#90) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.7.5 to 1.7.6. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.7.5...v1.7.6) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index ef67dc2a..ba9e2f40 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21.5 require ( github.com/go-logr/stdr v1.2.2 github.com/secure-systems-lab/go-securesystemslib v0.7.0 - github.com/sigstore/sigstore v1.7.5 + github.com/sigstore/sigstore v1.7.6 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 @@ -26,7 +26,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect diff --git a/go.sum b/go.sum index b070fcd2..10ddc47c 100644 --- a/go.sum +++ b/go.sum @@ -64,8 +64,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/sigstore/sigstore v1.7.5 h1:ij55dBhLwjICmLTBJZm7SqoQLdsu/oowDanACcJNs48= -github.com/sigstore/sigstore v1.7.5/go.mod h1:9OCmYWhzuq/G4e1cy9m297tuMRJ1LExyrXY3ZC3Zt/s= +github.com/sigstore/sigstore v1.7.6 h1:zB0woXx+3Bp7dk7AjklHF1VhXBdCs84VXkZbp0IHLv8= +github.com/sigstore/sigstore v1.7.6/go.mod h1:FJE+NpEZIs4QKqZl4B2RtaVLVDcDtocAwTiNlexeBkY= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -86,8 +86,8 @@ golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= From 67b624e61032c1a74dddf786dbe9a1e03d13ec97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:05:04 +0200 Subject: [PATCH 204/208] chore(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0 (#92) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ba9e2f40..5f5740c1 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.16.0 + golang.org/x/crypto v0.17.0 golang.org/x/exp v0.0.0-20221208152030-732eee02a75a golang.org/x/sys v0.15.0 ) diff --git a/go.sum b/go.sum index 10ddc47c..b91d9e1d 100644 --- a/go.sum +++ b/go.sum @@ -82,8 +82,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= From 5bf5351cd8930d6f3aa7ef90faf37932e6fa5e18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:09:10 +0200 Subject: [PATCH 205/208] chore(deps): bump github.com/sigstore/sigstore from 1.7.6 to 1.8.0 (#93) Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.7.6 to 1.8.0. - [Release notes](https://github.com/sigstore/sigstore/releases) - [Commits](https://github.com/sigstore/sigstore/compare/v1.7.6...v1.8.0) --- updated-dependencies: - dependency-name: github.com/sigstore/sigstore dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 17 +++++-------- go.sum | 79 +++++++++++++++++++++------------------------------------- 2 files changed, 34 insertions(+), 62 deletions(-) diff --git a/go.mod b/go.mod index 5f5740c1..8af77bb9 100644 --- a/go.mod +++ b/go.mod @@ -4,34 +4,29 @@ go 1.21.5 require ( github.com/go-logr/stdr v1.2.2 - github.com/secure-systems-lab/go-securesystemslib v0.7.0 - github.com/sigstore/sigstore v1.7.6 + github.com/secure-systems-lab/go-securesystemslib v0.8.0 + github.com/sigstore/sigstore v1.8.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.17.0 - golang.org/x/exp v0.0.0-20221208152030-732eee02a75a + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 golang.org/x/sys v0.15.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.3.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-containerregistry v0.16.1 // indirect + github.com/google/go-containerregistry v0.17.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect - github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf // indirect + github.com/letsencrypt/boulder v0.0.0-20230907030200-6d76a0f91e1e // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/net v0.18.0 // indirect golang.org/x/term v0.15.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.56.3 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/square/go-jose.v2 v2.6.0 // indirect + gopkg.in/go-jose/go-jose.v2 v2.6.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index b91d9e1d..bfa60263 100644 --- a/go.sum +++ b/go.sum @@ -7,12 +7,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= -github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= -github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01 h1:IeaD1VDVBPlx3viJT9Md8if8IxxJnO+x0JCGb054heg= -github.com/facebookgo/limitgroup v0.0.0-20150612190941-6abd8d71ec01/go.mod h1:ypD5nozFk9vcGw1ATYefw6jHe/jZP++Z15/+VTMcWhc= -github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52 h1:a4DFiKFJiDRGFD1qIcqGLX/WlUMD9dyLSLDt+9QZgt8= -github.com/facebookgo/muster v0.0.0-20150708232844-fd3d7953fd52/go.mod h1:yIquW87NGRw1FU5p5lEkpnt/QxoH5uPAOUlOVkAUuMg= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -20,52 +14,44 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.16.1 h1:rUEt426sR6nyrL3gt+18ibRcvYpKYdpsa5ZW7MA08dQ= -github.com/google/go-containerregistry v0.16.1/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= -github.com/honeycombio/beeline-go v1.10.0 h1:cUDe555oqvw8oD76BQJ8alk7FP0JZ/M/zXpNvOEDLDc= -github.com/honeycombio/beeline-go v1.10.0/go.mod h1:Zz5WMeQCJzFt2Mvf8t6HC1X8RLskLVR/e8rvcmXB1G8= -github.com/honeycombio/libhoney-go v1.16.0 h1:kPpqoz6vbOzgp7jC6SR7SkNj7rua7rgxvznI6M3KdHc= -github.com/honeycombio/libhoney-go v1.16.0/go.mod h1:izP4fbREuZ3vqC4HlCAmPrcPT9gxyxejRjGtCYpmBn0= +github.com/google/go-containerregistry v0.17.0 h1:5p+zYs/R4VGHkhyvgWurWrpJ2hW4Vv9fQI+GzdcwXLk= +github.com/google/go-containerregistry v0.17.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 h1:dYTbLf4m0a5u0KLmPfB6mgxbcV7588bOCx79hxa5Sr4= -github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVzF6no3QaDSMLGLEHtHSBSefs+MgcDWnmhmo= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/jmhodges/clock v1.2.0 h1:eq4kys+NI0PLngzaHEe7AmPT90XMGIEySD1JfV1PDIs= +github.com/jmhodges/clock v1.2.0/go.mod h1:qKjhA7x7u/lQpPB1XAqX1b1lCI/w3/fNuYpI/ZjLynI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf h1:ndns1qx/5dL43g16EQkPV/i8+b3l5bYQwLeoSBe7tS8= -github.com/letsencrypt/boulder v0.0.0-20221109233200-85aa52084eaf/go.mod h1:aGkAgvWY/IUcVFfuly53REpfv5edu25oij+qHRFaraA= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/letsencrypt/boulder v0.0.0-20230907030200-6d76a0f91e1e h1:RLTpX495BXToqxpM90Ws4hXEo4Wfh81jr9DX1n/4WOo= +github.com/letsencrypt/boulder v0.0.0-20230907030200-6d76a0f91e1e/go.mod h1:EAuqr9VFWxBi9nD5jc/EA2MT1RFty9288TF6zdtYoCU= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= 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/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= -github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= -github.com/sigstore/sigstore v1.7.6 h1:zB0woXx+3Bp7dk7AjklHF1VhXBdCs84VXkZbp0IHLv8= -github.com/sigstore/sigstore v1.7.6/go.mod h1:FJE+NpEZIs4QKqZl4B2RtaVLVDcDtocAwTiNlexeBkY= +github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA= +github.com/secure-systems-lab/go-securesystemslib v0.8.0/go.mod h1:UH2VZVuJfCYR8WgMlCU1uFsOUU+KeyrTWcSS73NBOzU= +github.com/sigstore/sigstore v1.8.0 h1:sSRWXv1JiDsK4T2wNWVYcvKCgxcSrhQ/QUJxsfCO4OM= +github.com/sigstore/sigstore v1.8.0/go.mod h1:l12B1gFlLIpBIVeqk/q1Lb+6YSOGNuN3xLExIjYH+qc= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -78,39 +64,30 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +go.opentelemetry.io/otel v1.15.0 h1:NIl24d4eiLJPM0vKn4HjLYM+UZf6gSfi9Z+NmCxkWbk= +go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfAE3zbek= +go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo= +go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20221208152030-732eee02a75a h1:4iLhBPcpqFmylhnkbY3W0ONLUYYkDAW9xMFLfxgsvCw= -golang.org/x/exp v0.0.0-20221208152030-732eee02a75a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alexcesaro/statsd.v2 v2.0.0 h1:FXkZSCZIH17vLCO5sO2UucTHsH9pc+17F6pl3JVCwMc= -gopkg.in/alexcesaro/statsd.v2 v2.0.0/go.mod h1:i0ubccKGzBVNBpdGV5MocxyA/XlLUJzA7SLonnE4drU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= -gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/go-jose/go-jose.v2 v2.6.1 h1:qEzJlIDmG9q5VO0M/o8tGS65QMHMS1w01TQJB1VPJ4U= +gopkg.in/go-jose/go-jose.v2 v2.6.1/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 68b2a57000ae1d571d6af252f503a429c9c32e19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:02:58 +0200 Subject: [PATCH 206/208] chore(deps): bump golang.org/x/sys from 0.15.0 to 0.16.0 (#95) Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.15.0 to 0.16.0. - [Commits](https://github.com/golang/sys/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8af77bb9..b85bc58a 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.17.0 golang.org/x/exp v0.0.0-20230321023759-10a507213a29 - golang.org/x/sys v0.15.0 + golang.org/x/sys v0.16.0 ) require ( diff --git a/go.sum b/go.sum index bfa60263..20c4fce1 100644 --- a/go.sum +++ b/go.sum @@ -73,8 +73,8 @@ golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= From 3b01d644fbb7b922d96be0e6be270ea391852fb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 19:54:27 +0200 Subject: [PATCH 207/208] chore(deps): bump golang.org/x/crypto from 0.17.0 to 0.18.0 (#96) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.18.0. - [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b85bc58a..f2ff01c6 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.17.0 + golang.org/x/crypto v0.18.0 golang.org/x/exp v0.0.0-20230321023759-10a507213a29 golang.org/x/sys v0.16.0 ) @@ -25,7 +25,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/term v0.16.0 // indirect google.golang.org/grpc v1.56.3 // indirect gopkg.in/go-jose/go-jose.v2 v2.6.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 20c4fce1..0694a14b 100644 --- a/go.sum +++ b/go.sum @@ -68,15 +68,15 @@ go.opentelemetry.io/otel v1.15.0 h1:NIl24d4eiLJPM0vKn4HjLYM+UZf6gSfi9Z+NmCxkWbk= go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfAE3zbek= go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo= go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= From 082c91429c86c4b176ffbf3b044d7086b00c172a Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 25 Jan 2024 13:50:56 +0200 Subject: [PATCH 208/208] Move from rdimitov/go-tuf-metadata to github.com/theupdateframework/go-tuf/v2 Signed-off-by: Radoslav Dimitrov --- examples/cli/tuf-client/cmd/get.go | 6 +++--- examples/cli/tuf-client/cmd/init.go | 4 ++-- examples/cli/tuf-client/main.go | 2 +- examples/cli/tuf/cmd/init.go | 2 +- examples/cli/tuf/main.go | 2 +- examples/client/client_example.go | 6 +++--- examples/multirepo/client/client_example.go | 8 ++++---- examples/multirepo/repository/generate_metadata.go | 4 ++-- examples/repository/basic_repository.go | 4 ++-- go.mod | 2 +- metadata/config/config.go | 2 +- metadata/config/config_test.go | 2 +- metadata/fetcher/fetcher.go | 2 +- metadata/fetcher/fetcher_test.go | 2 +- metadata/metadata_api_test.go | 2 +- metadata/multirepo/multirepo.go | 6 +++--- metadata/repository/repository.go | 2 +- metadata/repository/repository_test.go | 2 +- metadata/trustedmetadata/trustedmetadata.go | 2 +- metadata/trustedmetadata/trustedmetadata_test.go | 4 ++-- metadata/updater/updater.go | 6 +++--- metadata/updater/updater_consistent_snapshot_test.go | 4 ++-- metadata/updater/updater_top_level_update_test.go | 8 ++++---- testutils/simulator/repository_simulator.go | 4 ++-- 24 files changed, 44 insertions(+), 44 deletions(-) diff --git a/examples/cli/tuf-client/cmd/get.go b/examples/cli/tuf-client/cmd/get.go index 57f28927..84771c4d 100644 --- a/examples/cli/tuf-client/cmd/get.go +++ b/examples/cli/tuf-client/cmd/get.go @@ -18,10 +18,10 @@ import ( "path/filepath" "github.com/go-logr/stdr" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/config" - "github.com/rdimitrov/go-tuf-metadata/metadata/updater" "github.com/spf13/cobra" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/config" + "github.com/theupdateframework/go-tuf/v2/metadata/updater" ) var targetsURL string diff --git a/examples/cli/tuf-client/cmd/init.go b/examples/cli/tuf-client/cmd/init.go index 96e975a0..7dc2c101 100644 --- a/examples/cli/tuf-client/cmd/init.go +++ b/examples/cli/tuf-client/cmd/init.go @@ -21,9 +21,9 @@ import ( "path/filepath" "github.com/go-logr/stdr" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" "github.com/spf13/cobra" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/trustedmetadata" ) var rootPath string diff --git a/examples/cli/tuf-client/main.go b/examples/cli/tuf-client/main.go index c9bbe611..f38381b0 100644 --- a/examples/cli/tuf-client/main.go +++ b/examples/cli/tuf-client/main.go @@ -12,7 +12,7 @@ package main import ( - tufclient "github.com/rdimitrov/go-tuf-metadata/examples/cli/tuf-client/cmd" + tufclient "github.com/theupdateframework/go-tuf/v2/examples/cli/tuf-client/cmd" ) func main() { diff --git a/examples/cli/tuf/cmd/init.go b/examples/cli/tuf/cmd/init.go index a32dbdfe..4ab1979c 100644 --- a/examples/cli/tuf/cmd/init.go +++ b/examples/cli/tuf/cmd/init.go @@ -17,8 +17,8 @@ import ( "os" "github.com/go-logr/stdr" - "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/spf13/cobra" + "github.com/theupdateframework/go-tuf/v2/metadata" ) var initCmd = &cobra.Command{ diff --git a/examples/cli/tuf/main.go b/examples/cli/tuf/main.go index 4a61a98d..cec87d48 100644 --- a/examples/cli/tuf/main.go +++ b/examples/cli/tuf/main.go @@ -15,7 +15,7 @@ import ( "fmt" "os" - tuf "github.com/rdimitrov/go-tuf-metadata/examples/cli/tuf/cmd" + tuf "github.com/theupdateframework/go-tuf/v2/examples/cli/tuf/cmd" ) func main() { diff --git a/examples/client/client_example.go b/examples/client/client_example.go index 5652293b..01881ee3 100644 --- a/examples/client/client_example.go +++ b/examples/client/client_example.go @@ -22,9 +22,9 @@ import ( "github.com/go-logr/stdr" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/config" - "github.com/rdimitrov/go-tuf-metadata/metadata/updater" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/config" + "github.com/theupdateframework/go-tuf/v2/metadata/updater" ) // The following config is used to fetch a target from Jussi's GitHub repository example diff --git a/examples/multirepo/client/client_example.go b/examples/multirepo/client/client_example.go index c492c838..ea0f1b2c 100644 --- a/examples/multirepo/client/client_example.go +++ b/examples/multirepo/client/client_example.go @@ -20,10 +20,10 @@ import ( "github.com/go-logr/stdr" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/config" - "github.com/rdimitrov/go-tuf-metadata/metadata/multirepo" - "github.com/rdimitrov/go-tuf-metadata/metadata/updater" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/config" + "github.com/theupdateframework/go-tuf/v2/metadata/multirepo" + "github.com/theupdateframework/go-tuf/v2/metadata/updater" ) const ( diff --git a/examples/multirepo/repository/generate_metadata.go b/examples/multirepo/repository/generate_metadata.go index 1a1c82cb..45e19b53 100644 --- a/examples/multirepo/repository/generate_metadata.go +++ b/examples/multirepo/repository/generate_metadata.go @@ -19,9 +19,9 @@ import ( "strings" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/repository" "github.com/sigstore/sigstore/pkg/signature" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/repository" "golang.org/x/crypto/ed25519" ) diff --git a/examples/repository/basic_repository.go b/examples/repository/basic_repository.go index 39699e7d..bd73e247 100644 --- a/examples/repository/basic_repository.go +++ b/examples/repository/basic_repository.go @@ -22,9 +22,9 @@ import ( "path/filepath" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/repository" "github.com/sigstore/sigstore/pkg/signature" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/repository" "golang.org/x/crypto/ed25519" ) diff --git a/go.mod b/go.mod index f2ff01c6..2617d4af 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/rdimitrov/go-tuf-metadata +module github.com/theupdateframework/go-tuf/v2 go 1.21.5 diff --git a/metadata/config/config.go b/metadata/config/config.go index f134cc4b..3d04fc7c 100644 --- a/metadata/config/config.go +++ b/metadata/config/config.go @@ -15,7 +15,7 @@ import ( "net/url" "os" - "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" + "github.com/theupdateframework/go-tuf/v2/metadata/fetcher" ) type UpdaterConfig struct { diff --git a/metadata/config/config_test.go b/metadata/config/config_test.go index 79ea3070..81b85053 100644 --- a/metadata/config/config_test.go +++ b/metadata/config/config_test.go @@ -17,8 +17,8 @@ import ( "path/filepath" "testing" - "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" "github.com/stretchr/testify/assert" + "github.com/theupdateframework/go-tuf/v2/metadata/fetcher" ) func TestNewUpdaterConfig(t *testing.T) { diff --git a/metadata/fetcher/fetcher.go b/metadata/fetcher/fetcher.go index 635aa6c2..cf32f4c5 100644 --- a/metadata/fetcher/fetcher.go +++ b/metadata/fetcher/fetcher.go @@ -18,7 +18,7 @@ import ( "strconv" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata" ) // Fetcher interface diff --git a/metadata/fetcher/fetcher_test.go b/metadata/fetcher/fetcher_test.go index a7a37e7f..fddc3041 100644 --- a/metadata/fetcher/fetcher_test.go +++ b/metadata/fetcher/fetcher_test.go @@ -16,8 +16,8 @@ import ( "testing" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/stretchr/testify/assert" + "github.com/theupdateframework/go-tuf/v2/metadata" ) func TestDownLoadFile(t *testing.T) { diff --git a/metadata/metadata_api_test.go b/metadata/metadata_api_test.go index 5a45c0ce..54682f19 100644 --- a/metadata/metadata_api_test.go +++ b/metadata/metadata_api_test.go @@ -24,10 +24,10 @@ import ( "testing" "time" - testutils "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" "github.com/sigstore/sigstore/pkg/cryptoutils" "github.com/sigstore/sigstore/pkg/signature" "github.com/stretchr/testify/assert" + "github.com/theupdateframework/go-tuf/v2/testutils/testutils" "golang.org/x/sys/unix" ) diff --git a/metadata/multirepo/multirepo.go b/metadata/multirepo/multirepo.go index 019bfadd..03d8986c 100644 --- a/metadata/multirepo/multirepo.go +++ b/metadata/multirepo/multirepo.go @@ -17,9 +17,9 @@ import ( "os" "path/filepath" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/config" - "github.com/rdimitrov/go-tuf-metadata/metadata/updater" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/config" + "github.com/theupdateframework/go-tuf/v2/metadata/updater" "golang.org/x/exp/slices" ) diff --git a/metadata/repository/repository.go b/metadata/repository/repository.go index 85ef55f2..a00ff033 100644 --- a/metadata/repository/repository.go +++ b/metadata/repository/repository.go @@ -12,7 +12,7 @@ package repository import ( - "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata" ) // repositoryType struct for storing metadata diff --git a/metadata/repository/repository_test.go b/metadata/repository/repository_test.go index 06f87a37..a13f222c 100644 --- a/metadata/repository/repository_test.go +++ b/metadata/repository/repository_test.go @@ -15,8 +15,8 @@ import ( "testing" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" "github.com/stretchr/testify/assert" + "github.com/theupdateframework/go-tuf/v2/metadata" ) func TestNewRepository(t *testing.T) { diff --git a/metadata/trustedmetadata/trustedmetadata.go b/metadata/trustedmetadata/trustedmetadata.go index 07924937..4202453a 100644 --- a/metadata/trustedmetadata/trustedmetadata.go +++ b/metadata/trustedmetadata/trustedmetadata.go @@ -15,7 +15,7 @@ import ( "fmt" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata" ) // TrustedMetadata struct for storing trusted metadata diff --git a/metadata/trustedmetadata/trustedmetadata_test.go b/metadata/trustedmetadata/trustedmetadata_test.go index cf5be5ca..3d9765f6 100644 --- a/metadata/trustedmetadata/trustedmetadata_test.go +++ b/metadata/trustedmetadata/trustedmetadata_test.go @@ -18,11 +18,11 @@ import ( "testing" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" "github.com/sigstore/sigstore/pkg/cryptoutils" "github.com/sigstore/sigstore/pkg/signature" "github.com/stretchr/testify/assert" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/testutils/testutils" "golang.org/x/exp/maps" ) diff --git a/metadata/updater/updater.go b/metadata/updater/updater.go index d38a049a..4eda9a30 100644 --- a/metadata/updater/updater.go +++ b/metadata/updater/updater.go @@ -24,9 +24,9 @@ import ( "strings" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/config" - "github.com/rdimitrov/go-tuf-metadata/metadata/trustedmetadata" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/config" + "github.com/theupdateframework/go-tuf/v2/metadata/trustedmetadata" ) // Client update workflow implementation diff --git a/metadata/updater/updater_consistent_snapshot_test.go b/metadata/updater/updater_consistent_snapshot_test.go index 67f34d41..cd742476 100644 --- a/metadata/updater/updater_consistent_snapshot_test.go +++ b/metadata/updater/updater_consistent_snapshot_test.go @@ -16,8 +16,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/rdimitrov/go-tuf-metadata/metadata" - simulator "github.com/rdimitrov/go-tuf-metadata/testutils/simulator" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/testutils/simulator" ) func TestTopLevelRolesUpdateWithConsistentSnapshotDisabled(t *testing.T) { diff --git a/metadata/updater/updater_top_level_update_test.go b/metadata/updater/updater_top_level_update_test.go index 91be6f6b..a14013ab 100644 --- a/metadata/updater/updater_top_level_update_test.go +++ b/metadata/updater/updater_top_level_update_test.go @@ -21,10 +21,10 @@ import ( log "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/config" - simulator "github.com/rdimitrov/go-tuf-metadata/testutils/simulator" - testutils "github.com/rdimitrov/go-tuf-metadata/testutils/testutils" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/config" + "github.com/theupdateframework/go-tuf/v2/testutils/simulator" + "github.com/theupdateframework/go-tuf/v2/testutils/testutils" ) func TestMain(m *testing.M) { diff --git a/testutils/simulator/repository_simulator.go b/testutils/simulator/repository_simulator.go index aa2195f2..3d45b68a 100644 --- a/testutils/simulator/repository_simulator.go +++ b/testutils/simulator/repository_simulator.go @@ -56,10 +56,10 @@ import ( "strings" "time" - "github.com/rdimitrov/go-tuf-metadata/metadata" - "github.com/rdimitrov/go-tuf-metadata/metadata/fetcher" "github.com/sigstore/sigstore/pkg/signature" log "github.com/sirupsen/logrus" + "github.com/theupdateframework/go-tuf/v2/metadata" + "github.com/theupdateframework/go-tuf/v2/metadata/fetcher" ) var SPEC_VER = "." + metadata.SPECIFICATION_VERSION