diff --git a/client/python_interop/python_interop_test.go b/client/python_interop/python_interop_test.go index b906e230..d29e0ac8 100644 --- a/client/python_interop/python_interop_test.go +++ b/client/python_interop/python_interop_test.go @@ -43,7 +43,7 @@ func (InteropSuite) TestGoClientPythonGenerated(c *C) { // start file server cwd, err := os.Getwd() c.Assert(err, IsNil) - testDataDir := filepath.Join(cwd, "testdata", "python-tuf-v2.0.0") + testDataDir := filepath.Join(cwd, "testdata", "python-tuf-v3.0.0") addr, cleanup := startFileServer(c, testDataDir) defer cleanup() @@ -145,7 +145,7 @@ func (InteropSuite) TestPythonClientGoGenerated(c *C) { c.Assert(os.WriteFile(filepath.Join(currDir, "root.json"), rootJSON, 0644), IsNil) args := []string{ - filepath.Join(cwd, "testdata", "python-tuf-v2.0.0", "client.py"), + filepath.Join(cwd, "testdata", "python-tuf-v3.0.0", "client.py"), "--repo=http://" + addr + "/" + name, } for path := range files { @@ -204,7 +204,7 @@ func (InteropSuite) TestPythonClientGoGeneratedNullDelegations(c *C) { c.Assert(os.WriteFile(filepath.Join(currDir, "root.json"), rootJSON, 0644), IsNil) args := []string{ - filepath.Join(cwd, "testdata", "python-tuf-v2.0.0", "client.py"), + filepath.Join(cwd, "testdata", "python-tuf-v3.0.0", "client.py"), "--repo=http://" + addr + "/" + name, } for path := range files { diff --git a/client/python_interop/testdata/Makefile b/client/python_interop/testdata/Makefile index 3b84759a..6ba9a642 100644 --- a/client/python_interop/testdata/Makefile +++ b/client/python_interop/testdata/Makefile @@ -1,4 +1,4 @@ -PYTHON_TUF=python-tuf-v2.0.0 +PYTHON_TUF=python-tuf-v3.0.0 all: docker build -t tuf-gen ./$(PYTHON_TUF) diff --git a/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/1.root.json deleted file mode 100755 index 1d7d8394..00000000 --- a/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/1.root.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "signatures": [ - { - "keyid": "7e576308aa26b10a124e13fd6bc4d63977d1904db6823c2862636d2b330fd669", - "sig": "c50fb9e20819b06d8dbebc748a269f1b9e089a2d8a81f64f7e889c054e619ec22c98e4ae24cb868b7c7757f62853cb0cd5dd658dad5ba94286a34255f5f7a100" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "7e576308aa26b10a124e13fd6bc4d63977d1904db6823c2862636d2b330fd669": { - "keytype": "ed25519", - "keyval": { - "public": "018908d2190610e54be1f6af0c77a7f59efc5b42971575a06e66018ae36bf15c" - }, - "scheme": "ed25519" - }, - "e76b314161b74584dbda0b3e46eaf1b9feea6f85abc0d9c8432e7fe3752d4f0f": { - "keytype": "ed25519", - "keyval": { - "public": "ecfe22e7fb9c2d867bad321ce90f297d5747efce8d96af171b5d5801b13a1c72" - }, - "scheme": "ed25519" - }, - "fa5b604a0ee5980e5f8a2398729e03c539fa68123cd3eb2e99f70d3504a71704": { - "keytype": "ed25519", - "keyval": { - "public": "128d5aba7c967e6e87c4e06b852282c91dd90c9ac9dec3adc9e6a237d4530752" - }, - "scheme": "ed25519" - }, - "faf425a6c41e594be56b35ab08c0dfe486ab6e14a25308bbfa990e050cdf0aef": { - "keytype": "ed25519", - "keyval": { - "public": "2a70c65b98f325026225b568af3587e993a0a5ab96671469e4ecfbb386412063" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "7e576308aa26b10a124e13fd6bc4d63977d1904db6823c2862636d2b330fd669" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "fa5b604a0ee5980e5f8a2398729e03c539fa68123cd3eb2e99f70d3504a71704" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "faf425a6c41e594be56b35ab08c0dfe486ab6e14a25308bbfa990e050cdf0aef" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "e76b314161b74584dbda0b3e46eaf1b9feea6f85abc0d9c8432e7fe3752d4f0f" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json b/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json deleted file mode 100755 index fbf2d1cb..00000000 --- a/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "fa5b604a0ee5980e5f8a2398729e03c539fa68123cd3eb2e99f70d3504a71704", - "sig": "1c09c1ca4c38e68f4ba9ac48c6ed6fcee13e5a071dcfeb51e7b5cf1a823bcc16b26528f67efaa59383a4a765cdd5fd81d67f74a5c09789673cab164a7251b20d" - } - ], - "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-v2.0.0/with-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/timestamp.json deleted file mode 100755 index 23ab4e54..00000000 --- a/client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/timestamp.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e76b314161b74584dbda0b3e46eaf1b9feea6f85abc0d9c8432e7fe3752d4f0f", - "sig": "9c734040db3786f9b8f44db282f53f054fca99654ea393601430adb0d1204c44ab534568b4412b52a8578f35306720903117758abb4534dc8c15ad5a9ebe7e09" - } - ], - "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-v2.0.0/without-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/1.root.json deleted file mode 100755 index cf2d4494..00000000 --- a/client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/1.root.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "signatures": [ - { - "keyid": "3838ee205d1906276ddb1df0803192f95753104e4dd828b70f17e3b3aa90de75", - "sig": "fb2b85aea59950fb7ca3012fd93d252ba7c1cec30c2afae0f1b4fb0146158e0800ad0e99221123b396e0a1a487b5cafdfe50d94a893e7dd5ede2891341a31f00" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "3838ee205d1906276ddb1df0803192f95753104e4dd828b70f17e3b3aa90de75": { - "keytype": "ed25519", - "keyval": { - "public": "4203975790ecf4aba558cb7ab3f9430c51b4c3553117d09949f3123fb49d4961" - }, - "scheme": "ed25519" - }, - "4908b7ba44138d79f05f3d211cb5f4bf9e73a71a7bc4ecd1b263accff7632445": { - "keytype": "ed25519", - "keyval": { - "public": "9dc9bf2210f5b743e3b094eae198c1bb2633966d6c10ac2a6d54b782623b8b89" - }, - "scheme": "ed25519" - }, - "8c0291ae0d3c260405e6683cd2260ee6fbb5676deb57541acbe5b94ca4089a50": { - "keytype": "ed25519", - "keyval": { - "public": "ca9a2dfe087762bea03a556ddc01c9ed113f5651ca1546804dae39441099fca3" - }, - "scheme": "ed25519" - }, - "c0ef91ecbb8a59bffc5642ba01129d64059b076b946d120733ea949e2c7786a2": { - "keytype": "ed25519", - "keyval": { - "public": "fcd7c34b20c3b8093b6b21b6a505f715e3d0645c1d9e05ee14d29f045e0b41d8" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "3838ee205d1906276ddb1df0803192f95753104e4dd828b70f17e3b3aa90de75" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "c0ef91ecbb8a59bffc5642ba01129d64059b076b946d120733ea949e2c7786a2" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "4908b7ba44138d79f05f3d211cb5f4bf9e73a71a7bc4ecd1b263accff7632445" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "8c0291ae0d3c260405e6683cd2260ee6fbb5676deb57541acbe5b94ca4089a50" - ], - "threshold": 1 - } - }, - "spec_version": "1.0.19", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/snapshot.json b/client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/snapshot.json deleted file mode 100755 index 333bc5dd..00000000 --- a/client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/snapshot.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "c0ef91ecbb8a59bffc5642ba01129d64059b076b946d120733ea949e2c7786a2", - "sig": "44b9651d75522ac5bdb13e23706f37ade578c59355525ac473d14de4f3cb5c5ace9c2d32b552754305f665e4e91c6773c6876e704939200bb71ab0e03a59ce03" - } - ], - "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-v2.0.0/without-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/timestamp.json deleted file mode 100755 index 915f07af..00000000 --- a/client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/timestamp.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "signatures": [ - { - "keyid": "8c0291ae0d3c260405e6683cd2260ee6fbb5676deb57541acbe5b94ca4089a50", - "sig": "933aba2b1f567c8fc6c8b08850330449be6c83a30a75f4d978600b5470f69416bbd0f6cb6cf2c088a0bc2d948290123a2e6419908c58b1b32772aa8f2f94490e" - } - ], - "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-v2.0.0/Dockerfile b/client/python_interop/testdata/python-tuf-v3.0.0/Dockerfile similarity index 86% rename from client/python_interop/testdata/python-tuf-v2.0.0/Dockerfile rename to client/python_interop/testdata/python-tuf-v3.0.0/Dockerfile index 10b4f445..896820c2 100644 --- a/client/python_interop/testdata/python-tuf-v2.0.0/Dockerfile +++ b/client/python_interop/testdata/python-tuf-v3.0.0/Dockerfile @@ -1,7 +1,7 @@ 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.25.0' 'tuf==v2.0.0' +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-v2.0.0/client.py b/client/python_interop/testdata/python-tuf-v3.0.0/client.py similarity index 94% rename from client/python_interop/testdata/python-tuf-v2.0.0/client.py rename to client/python_interop/testdata/python-tuf-v3.0.0/client.py index 93e23a07..64fe5397 100644 --- a/client/python_interop/testdata/python-tuf-v2.0.0/client.py +++ b/client/python_interop/testdata/python-tuf-v3.0.0/client.py @@ -11,8 +11,6 @@ from typing import List from pathlib import Path -import tuf.api - from tuf.ngclient import Updater @@ -35,7 +33,8 @@ def update_client(repo: str, targets: List[str]): def parse_arguments(): - parser = argparse.ArgumentParser(description="Retrieve file from TUF repository.") + parser = argparse.ArgumentParser( + description="Retrieve file from TUF repository.") parser.add_argument( "-r", diff --git a/client/python_interop/testdata/python-tuf-v2.0.0/generate.py b/client/python_interop/testdata/python-tuf-v3.0.0/generate.py similarity index 87% rename from client/python_interop/testdata/python-tuf-v2.0.0/generate.py rename to client/python_interop/testdata/python-tuf-v3.0.0/generate.py index 61fd3276..e494d18f 100755 --- a/client/python_interop/testdata/python-tuf-v2.0.0/generate.py +++ b/client/python_interop/testdata/python-tuf-v3.0.0/generate.py @@ -14,12 +14,9 @@ from pathlib import Path from typing import Dict -import securesystemslib.util - from securesystemslib.keys import generate_ed25519_key -from securesystemslib.signer import SSlibSigner +from securesystemslib.signer import SSlibSigner, SSlibKey from tuf.api.metadata import ( - Key, Metadata, MetaFile, Role, @@ -43,11 +40,14 @@ def make_targets(target_dir: Path, consistent_snapshot: bool) -> Dict[str, Targe for target in (Path("file1.txt"), Path("dir/file2.txt")): target_fspath = target_dir / target target_fspath.parent.mkdir(parents=True, exist_ok=True) - target_fspath.write_text(target.name) # file contents are the file name - target_file_info = TargetFile.from_file(str(target), str(target_fspath)) + # 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}") + shutil.move(target_fspath, target_fspath.parent / + f"{digest}.{target.name}") targets[str(target)] = target_file_info return targets @@ -93,9 +93,10 @@ def make_test_repo(repo_dir: Path, consistent_snapshot: bool): spec_version=SPEC_VERSION, expires=EXPIRY, keys={ - key["keyid"]: Key.from_securesystemslib_key(key) for key in keys.values() + 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()}, + roles={role: Role([key["keyid"]], threshold=1) + for role, key in keys.items()}, consistent_snapshot=consistent_snapshot, ) roles["root"] = Metadata[Root](root_metadata, {}) diff --git a/client/python_interop/testdata/python-tuf-v2.0.0/generate.sh b/client/python_interop/testdata/python-tuf-v3.0.0/generate.sh similarity index 100% rename from client/python_interop/testdata/python-tuf-v2.0.0/generate.sh rename to client/python_interop/testdata/python-tuf-v3.0.0/generate.sh 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 new file mode 100755 index 00000000..e0284c59 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.root.json @@ -0,0 +1,71 @@ +{ + "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 new file mode 100755 index 00000000..1ed1b9c1 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "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-v2.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 similarity index 67% rename from client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/metadata/1.targets.json rename to client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/1.targets.json index 5acb7c64..84d2e056 100755 --- a/client/python_interop/testdata/python-tuf-v2.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 @@ -1,8 +1,8 @@ { "signatures": [ { - "keyid": "faf425a6c41e594be56b35ab08c0dfe486ab6e14a25308bbfa990e050cdf0aef", - "sig": "42e49b11e043fa847b0f82786d5fb44988ab0281bda02553e54eb95d7fdbeea25b95c81b824c900cf6132d4714d3ad4d88786155d915603859d27c7934d5650f" + "keyid": "f7662dc3e9eebfb74d0e53f56941c6cf5668967110d2af28b41f9371544ccd0b", + "sig": "708400f70b965991928ea89f925227c97886f673a4e6a32e57062fc533580812fd1b65989fd751a4c3959ff716d8f0e7a09da0d971fa726553f5cc3ea7ff600e" } ], "signed": { 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 new file mode 100755 index 00000000..02f509b5 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/metadata/timestamp.json @@ -0,0 +1,19 @@ +{ + "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-v2.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 similarity index 100% rename from client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt rename to client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt diff --git a/client/python_interop/testdata/python-tuf-v2.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 similarity index 100% rename from client/python_interop/testdata/python-tuf-v2.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt rename to client/python_interop/testdata/python-tuf-v3.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt 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 new file mode 100755 index 00000000..f17ee717 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/1.root.json @@ -0,0 +1,71 @@ +{ + "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 new file mode 100755 index 00000000..d1639b42 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "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-v2.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 similarity index 67% rename from client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/metadata/targets.json rename to client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/targets.json index e224e70b..e97913ea 100755 --- a/client/python_interop/testdata/python-tuf-v2.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 @@ -1,8 +1,8 @@ { "signatures": [ { - "keyid": "4908b7ba44138d79f05f3d211cb5f4bf9e73a71a7bc4ecd1b263accff7632445", - "sig": "faf60abd2a725d5962c8a708d9d298d25accbe379b01dc9a5516161b702287b57d425d927942c1a5ddf462be1f8c12718575de5c29994bbff7d83c6218fbc00b" + "keyid": "b2100105c1dcea16a93bc583fa0a3a6936b5375b1f944eaf6bc8e806c0f43046", + "sig": "c4ad17cbc0bc54410c135dc74b638c51e1cafbb64f991b0a3e90a526eb63a162c33a73d6fde01ba84775522eb5c724f43c9f3efd7afd5bc469a5814399e31a0f" } ], "signed": { 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 new file mode 100755 index 00000000..08e84795 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/metadata/timestamp.json @@ -0,0 +1,19 @@ +{ + "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-v2.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 similarity index 100% rename from client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt rename to client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt diff --git a/client/python_interop/testdata/python-tuf-v2.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 similarity index 100% rename from client/python_interop/testdata/python-tuf-v2.0.0/without-consistent-snapshot/repository/targets/file1.txt rename to client/python_interop/testdata/python-tuf-v3.0.0/without-consistent-snapshot/repository/targets/file1.txt diff --git a/requirements-test.txt b/requirements-test.txt index 53511ff1..23822eec 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -2,4 +2,4 @@ iso8601==2.0.0 requests==2.31.0 securesystemslib==0.28.0 six==1.16.0 -tuf==2.0.0 +tuf==3.0.0