From d7ff71b6b12ef371ab654c45c15bae8fe2d79d84 Mon Sep 17 00:00:00 2001 From: Zack Newman Date: Fri, 26 Aug 2022 13:35:46 -0400 Subject: [PATCH] test: Update Python interop tests to python-tuf v1.0.0 (#228) * Add python-tuf-v1.0.0 client/generator Signed-off-by: Zachary Newman Signed-off-by: Asra Ali * Update python_interop Makefile to generate v1.0.0 Signed-off-by: Zachary Newman Signed-off-by: Asra Ali * Make Python interop tests run against v1.0.0. A few changes, besides pointing at the new directory: - the python-tuf repo says "High-level support for implementing repository operations is planned but not yet provided;" this includes consistent snapshot, so we'll add a consistent snapshot test at that point. - make a new tmp dir for each Python client test (it gets confused otherwise) - the new python-tuf client downloads `foo/bar.txt` to `targets/foo%2Fbar.txt` so check for it there Signed-off-by: Zachary Newman Signed-off-by: Asra Ali * Remove old python_interop for python-tuf v0.11.1 Signed-off-by: Zachary Newman Signed-off-by: Asra Ali * Add consistent snapshot (generator + test) Signed-off-by: Asra Ali * Regenerate python_interop testdata Signed-off-by: Asra Ali * update testadata and requirements Signed-off-by: Asra Ali * remove addition of snapshot meta in timestamp Signed-off-by: Asra Ali Signed-off-by: Zachary Newman Signed-off-by: Asra Ali Co-authored-by: Asra Ali --- client/python_interop/python_interop_test.go | 23 +- client/python_interop/testdata/Makefile | 8 +- .../testdata/python-tuf-v0.11.1/.gitignore | 2 - .../testdata/python-tuf-v0.11.1/Dockerfile | 12 - .../testdata/python-tuf-v0.11.1/client.py | 244 ------------------ .../testdata/python-tuf-v0.11.1/generate.py | 83 ------ .../keystore/root_key | 1 - .../keystore/root_key.pub | 1 - .../keystore/snapshot_key | 1 - .../keystore/snapshot_key.pub | 1 - .../keystore/targets_key | 1 - .../keystore/targets_key.pub | 1 - .../keystore/timestamp_key | 1 - .../keystore/timestamp_key.pub | 1 - .../repository/metadata/1.root.json | 87 ------- .../repository/metadata/1.snapshot.json | 22 -- .../repository/metadata/1.targets.json | 37 --- .../repository/metadata/1.timestamp.json | 23 -- .../repository/metadata/root.json | 87 ------- .../repository/metadata/snapshot.json | 22 -- .../repository/metadata/targets.json | 37 --- .../repository/metadata/timestamp.json | 23 -- ...7eeb70445f2e76587af84ed6ce1e0302.file1.txt | 1 - ...015d42100c9b46432a32db4b13a11c58.file2.txt | 1 - .../keystore/root_key | 1 - .../keystore/root_key.pub | 1 - .../keystore/snapshot_key | 1 - .../keystore/snapshot_key.pub | 1 - .../keystore/targets_key | 1 - .../keystore/targets_key.pub | 1 - .../keystore/timestamp_key | 1 - .../keystore/timestamp_key.pub | 1 - .../repository/metadata/1.root.json | 87 ------- .../repository/metadata/root.json | 87 ------- .../repository/metadata/snapshot.json | 22 -- .../repository/metadata/targets.json | 37 --- .../repository/metadata/timestamp.json | 23 -- .../repository/targets/dir/file2.txt | 1 - .../repository/targets/file1.txt | 1 - .../testdata/python-tuf-v1.0.0/Dockerfile | 7 + .../testdata/python-tuf-v1.0.0/client.py | 69 +++++ .../testdata/python-tuf-v1.0.0/generate.py | 137 ++++++++++ .../generate.sh | 4 +- .../repository/metadata/1.root.json | 71 +++++ .../repository/metadata/1.snapshot.json | 19 ++ .../repository/metadata/1.targets.json | 28 ++ .../repository/metadata/timestamp.json | 23 ++ ...ce9c420da5db6203afab700b27e10cf9.file1.txt | 0 ...7d7615dc3e9515c782c49d2075658701.file2.txt | 0 .../repository/metadata/1.root.json | 71 +++++ .../repository/metadata/snapshot.json | 19 ++ .../repository/metadata/targets.json | 28 ++ .../repository/metadata/timestamp.json | 23 ++ .../repository/targets/dir/file2.txt | 0 .../repository/targets/file1.txt | 0 requirements-test.txt | 4 +- 56 files changed, 515 insertions(+), 974 deletions(-) delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/.gitignore delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/Dockerfile delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/client.py delete mode 100755 client/python_interop/testdata/python-tuf-v0.11.1/generate.py delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.root.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.snapshot.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.targets.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.timestamp.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/root.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/snapshot.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/targets.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/timestamp.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/055dc805570eecebad4270774054ee4375ef9a7248d981cfa8155dc884817df31e8497684dd26addd018a30565c3ccf87eeb70445f2e76587af84ed6ce1e0302.file1.txt delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/2b85daf030ebc94d302822da4fd50216dc56f90c9bb60a95b272aa5b11fe81cd9b192b1a860896d6a8241d1a42cc97b6015d42100c9b46432a32db4b13a11c58.file2.txt delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key.pub delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/1.root.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/root.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/snapshot.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/targets.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/timestamp.json delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/targets/dir/file2.txt delete mode 100644 client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/targets/file1.txt create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/Dockerfile create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/client.py create mode 100755 client/python_interop/testdata/python-tuf-v1.0.0/generate.py rename client/python_interop/testdata/{python-tuf-v0.11.1 => python-tuf-v1.0.0}/generate.sh (91%) create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.root.json create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.targets.json create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/timestamp.json rename client/python_interop/testdata/{python-tuf-v0.11.1 => python-tuf-v1.0.0}/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt (100%) rename client/python_interop/testdata/{python-tuf-v0.11.1 => python-tuf-v1.0.0}/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt (100%) create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/1.root.json create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/snapshot.json create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/targets.json create mode 100644 client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/timestamp.json rename client/python_interop/testdata/{python-tuf-v0.11.1/with-consistent-snapshot => python-tuf-v1.0.0/without-consistent-snapshot}/repository/targets/dir/file2.txt (100%) rename client/python_interop/testdata/{python-tuf-v0.11.1/with-consistent-snapshot => python-tuf-v1.0.0/without-consistent-snapshot}/repository/targets/file1.txt (100%) diff --git a/client/python_interop/python_interop_test.go b/client/python_interop/python_interop_test.go index e2e2a915..9e7024f1 100644 --- a/client/python_interop/python_interop_test.go +++ b/client/python_interop/python_interop_test.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net" "net/http" + "net/url" "os" "os/exec" "path/filepath" @@ -43,11 +44,11 @@ func (InteropSuite) TestGoClientPythonGenerated(c *C) { // start file server cwd, err := os.Getwd() c.Assert(err, IsNil) - testDataDir := filepath.Join(cwd, "testdata", "python-tuf-v0.11.1") + testDataDir := filepath.Join(cwd, "testdata", "python-tuf-v1.0.0") addr, cleanup := startFileServer(c, testDataDir) defer cleanup() - for _, dir := range []string{"with-consistent-snapshot", "without-consistent-snapshot"} { + 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"}, @@ -57,7 +58,7 @@ func (InteropSuite) TestGoClientPythonGenerated(c *C) { // initiate a client with the root metadata client := client.NewClient(client.MemoryLocalStore(), remote) - rootJSON, err := ioutil.ReadFile(filepath.Join(testDataDir, dir, "repository", "metadata", "root.json")) + rootJSON, err := ioutil.ReadFile(filepath.Join(testDataDir, dir, "repository", "metadata", "1.root.json")) c.Assert(err, IsNil) c.Assert(client.Init(rootJSON), IsNil) @@ -112,18 +113,17 @@ func (InteropSuite) TestPythonClientGoGenerated(c *C) { cwd, err := os.Getwd() c.Assert(err, IsNil) - tmp := c.MkDir() files := map[string][]byte{ "foo.txt": []byte("foo"), "bar/baz.txt": []byte("baz"), } - // start file server - addr, cleanup := startFileServer(c, tmp) - defer cleanup() - 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) @@ -134,14 +134,13 @@ func (InteropSuite) TestPythonClientGoGenerated(c *C) { prevDir := filepath.Join(clientDir, "tufrepo", "metadata", "previous") c.Assert(os.MkdirAll(currDir, 0755), IsNil) c.Assert(os.MkdirAll(prevDir, 0755), IsNil) - rootJSON, err := ioutil.ReadFile(filepath.Join(dir, "repository", "root.json")) + rootJSON, err := ioutil.ReadFile(filepath.Join(dir, "repository", "1.root.json")) c.Assert(err, IsNil) c.Assert(ioutil.WriteFile(filepath.Join(currDir, "root.json"), rootJSON, 0644), IsNil) args := []string{ - filepath.Join(cwd, "testdata", "python-tuf-v0.11.1", "client.py"), + filepath.Join(cwd, "testdata", "python-tuf-v1.0.0", "client.py"), "--repo=http://" + addr + "/" + name, - "--verbose=5", } for path := range files { args = append(args, path) @@ -156,7 +155,7 @@ func (InteropSuite) TestPythonClientGoGenerated(c *C) { // check the target files got downloaded for path, expected := range files { - actual, err := ioutil.ReadFile(filepath.Join(clientDir, "tuftargets", path)) + actual, err := ioutil.ReadFile(filepath.Join(clientDir, "tuftargets", url.QueryEscape(path))) c.Assert(err, IsNil) c.Assert(actual, DeepEquals, expected) } diff --git a/client/python_interop/testdata/Makefile b/client/python_interop/testdata/Makefile index d6af7b29..f5ef1630 100644 --- a/client/python_interop/testdata/Makefile +++ b/client/python_interop/testdata/Makefile @@ -1,8 +1,10 @@ +PYTHON_TUF=python-tuf-v1.0.0 + all: - docker build -t tuf-gen ./generate - docker run tuf-gen | tar x + docker build -t tuf-gen ./$(PYTHON_TUF) + docker run tuf-gen | tar x -C $(PYTHON_TUF) clean: - rm -rf python-tuf-0.9/with{,out}-consistent-snapshot + rm -rf $(PYTHON_TUF)/with{,out}-consistent-snapshot .PHONY: all clean diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/.gitignore b/client/python_interop/testdata/python-tuf-v0.11.1/.gitignore deleted file mode 100644 index 67443ee7..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -tuf.log -tuf diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/Dockerfile b/client/python_interop/testdata/python-tuf-v0.11.1/Dockerfile deleted file mode 100644 index c6b249d0..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM ubuntu:trusty - -RUN apt-get update -RUN apt-get install -y python python-dev python-pip libffi-dev tree - -# Use the develop branch of tuf for the following fix: -# https://github.com/theupdateframework/tuf/commit/38005fe -RUN apt-get install -y git -RUN pip install --no-use-wheel git+https://github.com/theupdateframework/tuf.git@develop && pip install tuf[tools] - -ADD generate.py generate.sh / -CMD /generate.sh diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/client.py b/client/python_interop/testdata/python-tuf-v0.11.1/client.py deleted file mode 100644 index 8dc6eca4..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/client.py +++ /dev/null @@ -1,244 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2012 - 2018, New York University and the TUF contributors -# SPDX-License-Identifier: MIT OR Apache-2.0 -# -# A modification of client.py from the Python implementation: -# https://github.com/theupdateframework/tuf/blob/v0.11.1/tuf/scripts/client.py - -""" - - client.py - - - Vladimir Diaz - - - September 2012. - - - See LICENSE-MIT OR LICENSE for licensing information. - - - Provide a basic TUF client that can update all of the metatada and target - files provided by the user-specified repository mirror. Updated files are - saved to the 'targets' directory in the current working directory. The - repository mirror is specified by the user through the '--repo' command- - line option. - - Normally, a software updater integrating TUF will develop their own costum - client module by importing 'tuf.client.updater', instantiating the required - object, and calling the desired methods to perform an update. This basic - client is provided to users who wish to give TUF a quick test run without the - hassle of writing client code. This module can also used by updaters that do - not need the customization and only require their clients to perform an - update of all the files provided by their repository mirror(s). - - For software updaters that DO require customization, see the - 'example_client.py' script. The 'example_client.py' script provides an - outline of the client code that software updaters may develop and then tailor - to their specific software updater or package manager. - - Additional tools for clients running legacy applications will also be made - available. These tools will allow secure software updates using The Update - Framework without the need to modify the original application. - - - $ client.py --repo http://localhost:8001 - $ client.py --repo http://localhost:8001 --verbose 3 - - - --verbose: - Set the verbosity level of logging messages. Accepts values 1-5. - - --repo: - Set the repository mirror that will be responding to client requests. - E.g., 'http://locahost:8001'. -""" - -# Help with Python 3 compatibility, where the print statement is a function, an -# implicit relative import is invalid, and the '/' operator performs true -# division. Example: print 'hello world' raises a 'SyntaxError' exception. -from __future__ import print_function -from __future__ import absolute_import -from __future__ import division -from __future__ import unicode_literals - -import sys -import traceback -import argparse -import logging - -import tuf -import tuf.client.updater -import tuf.settings -import tuf.log - -# See 'log.py' to learn how logging is handled in TUF. -logger = logging.getLogger('tuf.scripts.client') - - -def update_client(parsed_arguments): - """ - - Perform an update of the metadata and target files located at - 'repository_mirror'. Target files are saved to the 'targets' directory - in the current working directory. The current directory must already - include a 'metadata' directory, which in turn must contain the 'current' - and 'previous' directories. At a minimum, these two directories require - the 'root.json' metadata file. - - - parsed_arguments: - An argparse Namespace object, containing the parsed arguments. - - - tuf.exceptions.Error, if 'parsed_arguments' is not a Namespace object. - - - Connects to a repository mirror and updates the local metadata files and - any target files. Obsolete, local targets are also removed. - - - None. - """ - - if not isinstance(parsed_arguments, argparse.Namespace): - raise tuf.exceptions.Error('Invalid namespace object.') - - else: - logger.debug('We have a valid argparse Namespace object.') - - # Set the local repositories directory containing all of the metadata files. - tuf.settings.repositories_directory = '.' - - # Set the repository mirrors. This dictionary is needed by the Updater - # class of updater.py. - repository_mirrors = {'mirror': {'url_prefix': parsed_arguments.repo, - 'metadata_path': 'repository', 'targets_path': 'repository/targets', - 'confined_target_dirs': ['']}} - - # Create the repository object using the repository name 'repository' - # and the repository mirrors defined above. - updater = tuf.client.updater.Updater('tufrepo', repository_mirrors) - - # The local destination directory to save the target files. - destination_directory = './tuftargets' - - # Refresh the repository's top-level roles... - updater.refresh(unsafely_update_root_if_necessary=False) - - # ... and store the target information for the target file specified on the - # command line, and determine which of these targets have been updated. - target_fileinfo = [] - for target in parsed_arguments.targets: - target_fileinfo.append(updater.get_one_valid_targetinfo(target)) - - updated_targets = updater.updated_targets(target_fileinfo, destination_directory) - - # Retrieve each of these updated targets and save them to the destination - # directory. - for target in updated_targets: - try: - updater.download_target(target, destination_directory) - - except tuf.exceptions.DownloadError: - pass - - # Remove any files from the destination directory that are no longer being - # tracked. - updater.remove_obsolete_targets(destination_directory) - - - - - -def parse_arguments(): - """ - - Parse the command-line options and set the logging level - as specified by the user through the --verbose option. - 'client' expects the '--repo' to be set by the user. - - Exampl: - $ client.py --repo http://localhost:8001 - - If the required option is unset, a parser error is printed - and the scripts exits. - - - None. - - - None. - - - Sets the logging level for TUF logging. - - - The parsed_arguments (i.e., a argparse Namespace object). - """ - - parser = argparse.ArgumentParser( - description='Retrieve file from TUF repository.') - - # Add the options supported by 'basic_client' to the option parser. - parser.add_argument('-v', '--verbose', type=int, default=2, - choices=range(0, 6), help='Set the verbosity level of logging messages.' - ' The lower the setting, the greater the verbosity. Supported logging' - ' levels: 0=UNSET, 1=DEBUG, 2=INFO, 3=WARNING, 4=ERROR,' - ' 5=CRITICAL') - - 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() - - - # Set the logging level. - if parsed_arguments.verbose == 5: - tuf.log.set_log_level(logging.CRITICAL) - - elif parsed_arguments.verbose == 4: - tuf.log.set_log_level(logging.ERROR) - - elif parsed_arguments.verbose == 3: - tuf.log.set_log_level(logging.WARNING) - - elif parsed_arguments.verbose == 2: - tuf.log.set_log_level(logging.INFO) - - elif parsed_arguments.verbose == 1: - tuf.log.set_log_level(logging.DEBUG) - - else: - tuf.log.set_log_level(logging.NOTSET) - - # Return the repository mirror containing the metadata and target files. - return parsed_arguments - - - -if __name__ == '__main__': - - # Parse the command-line arguments and set the logging level. - arguments = parse_arguments() - - # Perform an update of all the files in the 'targets' directory located in - # the current directory. - try: - update_client(arguments) - - except (tuf.exceptions.NoWorkingMirrorError, tuf.exceptions.RepositoryError, - tuf.exceptions.FormatError) as e: - traceback.print_exc() - sys.stderr.write('Error: ' + str(e) + '\n') - sys.exit(1) - - # Successfully updated the client's target files. - sys.exit(0) diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/generate.py b/client/python_interop/testdata/python-tuf-v0.11.1/generate.py deleted file mode 100755 index 86065ed5..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/generate.py +++ /dev/null @@ -1,83 +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 - -import shutil -import datetime -import optparse -import stat - -from tuf.repository_tool import * -import securesystemslib.util - -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() - -repository = create_new_repository('repository') - -root_key_file = 'keystore/root_key' -targets_key_file = 'keystore/targets_key' -snapshot_key_file = 'keystore/snapshot_key' -timestamp_key_file = 'keystore/timestamp_key' - -generate_and_write_ed25519_keypair(root_key_file, password='password') -generate_and_write_ed25519_keypair(targets_key_file, password='password') -generate_and_write_ed25519_keypair(snapshot_key_file, password='password') -generate_and_write_ed25519_keypair(timestamp_key_file, password='password') - -root_public = import_ed25519_publickey_from_file(root_key_file+'.pub') -targets_public = import_ed25519_publickey_from_file(targets_key_file+'.pub') -snapshot_public = import_ed25519_publickey_from_file(snapshot_key_file+'.pub') -timestamp_public = import_ed25519_publickey_from_file(timestamp_key_file+'.pub') - -root_private = import_ed25519_privatekey_from_file(root_key_file, 'password') -targets_private = import_ed25519_privatekey_from_file(targets_key_file, 'password') -snapshot_private = import_ed25519_privatekey_from_file(snapshot_key_file, 'password') -timestamp_private = import_ed25519_privatekey_from_file(timestamp_key_file, 'password') - -repository.root.add_verification_key(root_public) -repository.targets.add_verification_key(targets_public) -repository.snapshot.add_verification_key(snapshot_public) -repository.timestamp.add_verification_key(timestamp_public) - -repository.root.load_signing_key(root_private) -repository.targets.load_signing_key(targets_private) -repository.snapshot.load_signing_key(snapshot_private) -repository.timestamp.load_signing_key(timestamp_private) - -parent_dir = 'repository/targets/' -target1_filepath = parent_dir + 'file1.txt' -securesystemslib.util.ensure_parent_dir(target1_filepath) -target2_filepath = parent_dir + 'dir/file2.txt' -securesystemslib.util.ensure_parent_dir(target2_filepath) - -with open(target1_filepath, 'wt') as file_object: - file_object.write('file1.txt') - -with open(target2_filepath, 'wt') as file_object: - file_object.write('file2.txt') - -octal_file_permissions = oct(os.stat(target1_filepath).st_mode)[4:] -file_permissions = {'file_permissions': octal_file_permissions} -repository.targets.add_target(target1_filepath[len(parent_dir):], file_permissions) -repository.targets.add_target(target2_filepath[len(parent_dir):]) - -repository.root.expiration = datetime.datetime(2030, 1, 1, 0, 0) -repository.targets.expiration = datetime.datetime(2030, 1, 1, 0, 0) -repository.snapshot.expiration = datetime.datetime(2030, 1, 1, 0, 0) -repository.timestamp.expiration = datetime.datetime(2030, 1, 1, 0, 0) - -repository.targets.compressions = ['gz'] - -if options.consistent_snapshot: - repository.writeall(consistent_snapshot=True) - -else: - repository.writeall() - -shutil.move('repository/metadata.staged', 'repository/metadata') diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key deleted file mode 100644 index 694fe0d4..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key +++ /dev/null @@ -1 +0,0 @@ -5b65397f71072bbdf81d1d038907a6de@@@@100000@@@@bc164748493ef1661f9620e7cc20bf850aa1ef62502416a12190ed78e2a02fce@@@@57464a7376984a9763367bc63be5124a@@@@e1cfcd092b6b1cd553579c6e49e0208fc6f69283e60388e3318585cc816fd6a0bf7a71a46e8302a204588c9123ae68da85a9ee129b59ae2461dbb6a73b8035df6e23f8d8856cfbbfc49a2ed9bc720d8dd931c10c3032e3f5bb60637c41524e639dc7c222f3a485285815b854b5cd6558e3d286fc8e541f2d419a99afa2bdcd541b8af832d903b27f5edda3c3911671a1f2a4066ed267730214821ed8585b06645fe26b4fa5aef3a9230cadca14b9bbcef9b67bcb0898f8f920a80e0f9c8dbd85281d02e577b2ef0f51119670448ae33efdbe0e4d7b6592f63a07d7c4f09ec8667d062ab7d64017167b3c66486a907374be5803cbd840ec7325d0087804c0f1b4709cd15484c9f2d714f7227933d4cc6e91853ee3e197be5f9ac0d95a049a93dad0f07a09eedbb09638422e04e0e7265a7bd5f00eb046a1de6a9cd0eb694d04c0dd900a0169b2827b363e2de6625b9ce6 \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key.pub deleted file mode 100644 index 90a8a225..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/root_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "bc09de1bbf3ccd68ddc537cf3c49444b4230d51b58a338674731f75e826a0f68"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key deleted file mode 100644 index abd88fd5..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key +++ /dev/null @@ -1 +0,0 @@ -24c58f681f26370fb87c05a732d40f25@@@@100000@@@@e29304b6da7e460439acdedbad7c669c8e0bbb5520148eeb7feb53bce6897e72@@@@859c005176a6296a45de90a2017d3689@@@@40da1c287e8194bc15db4c35ead77e2283e253f291ced292e744c5a7fbceef06d148c42c94a0d21743299f38f3deb09fb6b8678e9c4d81cbd78d0a9ff60fb7e7d6be44924af2b6aa601cffead93365fe461ea9e67201f7e6e40074a62c567db4d6de3dbfb6f5c5c839d77bc24ea5358c60bbd644815c8405458192b58153bedeeae4f460be6afa6a7877c0284504fa535c476dcd9bed5ba629900df182fd808590e57d1c65c082a193482fc632bf1e14305739fdc3c3685786098398cea13c495e31c5ac54ded758cb0dfc640a8548c39fdd4dbe919113e81f077ea80216b74bd9a430cb177334fce4e16f4a4194d47ac299fac442b64a1f7b8d6411bbc337e84dfc32bf532d595745347826af9e98afed24cf7d0b163556649c5f827a610ea93467ad34c00be25b3c6a94f6e5d54edefd4d8f5c64a12bd3743c421428b0672d98786a7dd05feeceaa3cdd137a565f38 \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key.pub deleted file mode 100644 index 8b9f7bd0..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/snapshot_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "ff5a905eb2c970e4b82b1bf415367d30c06cebbed571589a9a2ece720ea6ba3b"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key deleted file mode 100644 index 8ee79841..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key +++ /dev/null @@ -1 +0,0 @@ -af239e4e269796154b8b5189d4ee1455@@@@100000@@@@82e80c98f1260028568d88c460659ae5700861820bdcae81aa521a1a23b249ee@@@@71207edd33b2e77137478bd59bf421cb@@@@5dfa76a6183912c63af863cc07db0ec18505cf4c3cf57def5d9191dcc0fc8e3c5a5136f545f8e3b8be5be83f0a6f551a0d878b3761cfbb88e8116bf73ce20bd1750be428f3facf7184e691bb16c50dc956786a33bb1e65caea4e5fe30d234500481ea3454fb841f7f02b33e7c2ab61181821a5efcaa9290b3256001a61f47b6a185694e7a34b4d80b8d043324f6949edd0b592cb3fb4c12d46712ad3e525e00b8060b722174ab0060f84bbfba3517ad8652fd11623c4abd1a500455156ad27fc09131540aa7ccc2cb623d7986f0f63400b654943a800f4fbcf7dca33f1ef5b5b068675bf5903f596d433cb650efd86ace9772f6aa1ff08850416e334510e3f6960fd77f522b9dc5475c579854c2946bfa47fb59a99ab77c94246dda35645fca385ff30b2279a9898c1c75e2302057a063d2edc65ad8ec68461001193f3101ac8290a0f7d3021b85b7d1fa98bd951fc11 \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key.pub deleted file mode 100644 index e460e00e..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/targets_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "ba9491721b6b709a0a0cb02760e7cc84745e46cd905675e1686b5f362ec8df0f"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key deleted file mode 100644 index d9ba157a..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key +++ /dev/null @@ -1 +0,0 @@ -d26a1a1aa34eeb043c8072ae671be506@@@@100000@@@@9e2049debd5c570ad3a49103720559cc774230da998e543ef3cef79abbbd201b@@@@63af4595c1651e601de7748d5795d2e4@@@@29febadb87220ff7d3b5c29dc24d4d5b2b766f2e19f0393dd07ad5ad1a893fb6292c2f8669f05b14be90b601a883dcad54f2cbd56d49b4be25d9fe7a872f9f036ac6619e0c7b40e3857c9074d4b9c23108a9e68c6b798afa94bd7e91026be2c5c8281404555b299a552f54b473f3db9803443082bfad17ca4bcb7c911b4b0c5118eb53e15576e7c79e9318e1342ece768832056dc4ea57516afb6966d60c078ea3d62b68eba6532322a1e4575a6fc83bd5cdc67da17dbc40c33c2298a7b4dd7c5cd8102a8b569b233e118a1fe0fd577de6153865a60184cb5f8bb1e1a9770570a9d94154c3409529bcdc0d600e5da1eab0376254a3a2df6356dd3913cb2a107d6a89028fe4b7a0c62739273eb055ca49699a6ce5ea9373064d5854caa94140cc17d8572c09fb4229aaf998d880c5821faf2b8174f0ac79edb604b90a47578c1be82b9353638e0e29aa28e6c4d665df0d \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key.pub deleted file mode 100644 index 68b90b6c..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/keystore/timestamp_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "3b0400dff0154d79d24986a19c5cc78f3424cea1cfc9535aa40dce490ef81029"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.root.json deleted file mode 100644 index bfb700ad..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "9bbc757b5a573fe3b480b15c0dc4cf69e3cb46507e34df2ac908b68dd607903a", - "sig": "9a3fdc1b0c521a33858716a0b60617eb7a08f619546ed05146dacc17385c637a64bd6702f87fcd3c69848b402b53534a1bf9d572ae931537f9aeb0a2628fa50c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "79cc8a40a8e6658daae229b1524402956637ccced210981e5ea719a0de0f8752": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "ba9491721b6b709a0a0cb02760e7cc84745e46cd905675e1686b5f362ec8df0f" - }, - "scheme": "ed25519" - }, - "97d326bb432a75c0976ada0f880dd9ae8a98c8b3440396e7d28631f1af36f70a": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "3b0400dff0154d79d24986a19c5cc78f3424cea1cfc9535aa40dce490ef81029" - }, - "scheme": "ed25519" - }, - "9bbc757b5a573fe3b480b15c0dc4cf69e3cb46507e34df2ac908b68dd607903a": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "bc09de1bbf3ccd68ddc537cf3c49444b4230d51b58a338674731f75e826a0f68" - }, - "scheme": "ed25519" - }, - "ab53c13dd420a0cd66e804256a59e21091c9c6c00d96a76aa4080e05bb6753ec": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "ff5a905eb2c970e4b82b1bf415367d30c06cebbed571589a9a2ece720ea6ba3b" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "9bbc757b5a573fe3b480b15c0dc4cf69e3cb46507e34df2ac908b68dd607903a" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "ab53c13dd420a0cd66e804256a59e21091c9c6c00d96a76aa4080e05bb6753ec" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "79cc8a40a8e6658daae229b1524402956637ccced210981e5ea719a0de0f8752" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "97d326bb432a75c0976ada0f880dd9ae8a98c8b3440396e7d28631f1af36f70a" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.snapshot.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.snapshot.json deleted file mode 100644 index 8cd94c25..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.snapshot.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signatures": [ - { - "keyid": "ab53c13dd420a0cd66e804256a59e21091c9c6c00d96a76aa4080e05bb6753ec", - "sig": "de751c1b6840bfff77e25fa1481e2eb755b96c6af46fad30e16d973f15b4b1fe0b28039452e8c5ffba7cf31ac72e928fa29babd3c671504a30a027c86d4b770c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "root.json": { - "version": 1 - }, - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.targets.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.targets.json deleted file mode 100644 index b92c6fe3..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.targets.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "signatures": [ - { - "keyid": "79cc8a40a8e6658daae229b1524402956637ccced210981e5ea719a0de0f8752", - "sig": "533e05a59155bed6ba8f69644b206b5ac461d720a5ef088a840f3ff5569f646eb165b035edfdb2b8a4d9a0c16409a74f3c66a2f2ddbff62b014be1ddc8736603" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2030-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "dir/file2.txt": { - "hashes": { - "sha256": "04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701", - "sha512": "2b85daf030ebc94d302822da4fd50216dc56f90c9bb60a95b272aa5b11fe81cd9b192b1a860896d6a8241d1a42cc97b6015d42100c9b46432a32db4b13a11c58" - }, - "length": 9 - }, - "file1.txt": { - "custom": { - "file_permissions": "0644" - }, - "hashes": { - "sha256": "55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9", - "sha512": "055dc805570eecebad4270774054ee4375ef9a7248d981cfa8155dc884817df31e8497684dd26addd018a30565c3ccf87eeb70445f2e76587af84ed6ce1e0302" - }, - "length": 9 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.timestamp.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.timestamp.json deleted file mode 100644 index 2f5f2645..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/1.timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "97d326bb432a75c0976ada0f880dd9ae8a98c8b3440396e7d28631f1af36f70a", - "sig": "5d935a03f0b656bbff279e6b5eb22abc40dbc18505b7eb39899f56fc77c2af1b5f33d50e07e1320162a90b546f8d31706ff2f79b1bb17dc2c6e04f347d320a09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "b4407e0e0cb570aa4f0a40d71f531bfabb0bfa221694369ce8e5a3f5ff053f16" - }, - "length": 470, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/root.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/root.json deleted file mode 100644 index bfb700ad..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "9bbc757b5a573fe3b480b15c0dc4cf69e3cb46507e34df2ac908b68dd607903a", - "sig": "9a3fdc1b0c521a33858716a0b60617eb7a08f619546ed05146dacc17385c637a64bd6702f87fcd3c69848b402b53534a1bf9d572ae931537f9aeb0a2628fa50c" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": true, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "79cc8a40a8e6658daae229b1524402956637ccced210981e5ea719a0de0f8752": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "ba9491721b6b709a0a0cb02760e7cc84745e46cd905675e1686b5f362ec8df0f" - }, - "scheme": "ed25519" - }, - "97d326bb432a75c0976ada0f880dd9ae8a98c8b3440396e7d28631f1af36f70a": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "3b0400dff0154d79d24986a19c5cc78f3424cea1cfc9535aa40dce490ef81029" - }, - "scheme": "ed25519" - }, - "9bbc757b5a573fe3b480b15c0dc4cf69e3cb46507e34df2ac908b68dd607903a": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "bc09de1bbf3ccd68ddc537cf3c49444b4230d51b58a338674731f75e826a0f68" - }, - "scheme": "ed25519" - }, - "ab53c13dd420a0cd66e804256a59e21091c9c6c00d96a76aa4080e05bb6753ec": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "ff5a905eb2c970e4b82b1bf415367d30c06cebbed571589a9a2ece720ea6ba3b" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "9bbc757b5a573fe3b480b15c0dc4cf69e3cb46507e34df2ac908b68dd607903a" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "ab53c13dd420a0cd66e804256a59e21091c9c6c00d96a76aa4080e05bb6753ec" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "79cc8a40a8e6658daae229b1524402956637ccced210981e5ea719a0de0f8752" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "97d326bb432a75c0976ada0f880dd9ae8a98c8b3440396e7d28631f1af36f70a" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/snapshot.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/snapshot.json deleted file mode 100644 index 8cd94c25..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/snapshot.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signatures": [ - { - "keyid": "ab53c13dd420a0cd66e804256a59e21091c9c6c00d96a76aa4080e05bb6753ec", - "sig": "de751c1b6840bfff77e25fa1481e2eb755b96c6af46fad30e16d973f15b4b1fe0b28039452e8c5ffba7cf31ac72e928fa29babd3c671504a30a027c86d4b770c" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "root.json": { - "version": 1 - }, - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/targets.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/targets.json deleted file mode 100644 index b92c6fe3..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/targets.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "signatures": [ - { - "keyid": "79cc8a40a8e6658daae229b1524402956637ccced210981e5ea719a0de0f8752", - "sig": "533e05a59155bed6ba8f69644b206b5ac461d720a5ef088a840f3ff5569f646eb165b035edfdb2b8a4d9a0c16409a74f3c66a2f2ddbff62b014be1ddc8736603" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2030-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "dir/file2.txt": { - "hashes": { - "sha256": "04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701", - "sha512": "2b85daf030ebc94d302822da4fd50216dc56f90c9bb60a95b272aa5b11fe81cd9b192b1a860896d6a8241d1a42cc97b6015d42100c9b46432a32db4b13a11c58" - }, - "length": 9 - }, - "file1.txt": { - "custom": { - "file_permissions": "0644" - }, - "hashes": { - "sha256": "55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9", - "sha512": "055dc805570eecebad4270774054ee4375ef9a7248d981cfa8155dc884817df31e8497684dd26addd018a30565c3ccf87eeb70445f2e76587af84ed6ce1e0302" - }, - "length": 9 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/timestamp.json deleted file mode 100644 index 2f5f2645..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/metadata/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "97d326bb432a75c0976ada0f880dd9ae8a98c8b3440396e7d28631f1af36f70a", - "sig": "5d935a03f0b656bbff279e6b5eb22abc40dbc18505b7eb39899f56fc77c2af1b5f33d50e07e1320162a90b546f8d31706ff2f79b1bb17dc2c6e04f347d320a09" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "b4407e0e0cb570aa4f0a40d71f531bfabb0bfa221694369ce8e5a3f5ff053f16" - }, - "length": 470, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/055dc805570eecebad4270774054ee4375ef9a7248d981cfa8155dc884817df31e8497684dd26addd018a30565c3ccf87eeb70445f2e76587af84ed6ce1e0302.file1.txt b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/055dc805570eecebad4270774054ee4375ef9a7248d981cfa8155dc884817df31e8497684dd26addd018a30565c3ccf87eeb70445f2e76587af84ed6ce1e0302.file1.txt deleted file mode 100644 index 39cd5762..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/055dc805570eecebad4270774054ee4375ef9a7248d981cfa8155dc884817df31e8497684dd26addd018a30565c3ccf87eeb70445f2e76587af84ed6ce1e0302.file1.txt +++ /dev/null @@ -1 +0,0 @@ -file1.txt \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/2b85daf030ebc94d302822da4fd50216dc56f90c9bb60a95b272aa5b11fe81cd9b192b1a860896d6a8241d1a42cc97b6015d42100c9b46432a32db4b13a11c58.file2.txt b/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/2b85daf030ebc94d302822da4fd50216dc56f90c9bb60a95b272aa5b11fe81cd9b192b1a860896d6a8241d1a42cc97b6015d42100c9b46432a32db4b13a11c58.file2.txt deleted file mode 100644 index c3ee11c8..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/2b85daf030ebc94d302822da4fd50216dc56f90c9bb60a95b272aa5b11fe81cd9b192b1a860896d6a8241d1a42cc97b6015d42100c9b46432a32db4b13a11c58.file2.txt +++ /dev/null @@ -1 +0,0 @@ -file2.txt \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key deleted file mode 100644 index b3fe7966..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key +++ /dev/null @@ -1 +0,0 @@ -ffa15e6e9f1c98e0d94a2ac92c2576f4@@@@100000@@@@ef0609f7f8b0f0a1d8c51bfa8436682721700f54fdd337e279b46b2987316a71@@@@85e5c6c26245ca06cef7972801fb8adb@@@@44f1362b3e016a8bc9566104507c3f4cf8562ec51f605c30fbd188a2db6801cc5d4896c274ffdc1cddce7e01a7b4eca71989076cc15d1552e9c3df572b7b91596d5abd96f0d0ebc7d138a4fbc24750fe1e8b9912bbcee427e49046e81a20845e8214e04934109ee03b2db03040ab866f3e9309fc782e4fd9c8b1d5c89b78476d49eb1f1db3e1502075db4420ff782ea8888dbb567f4d64a5166e2a903825e9d3cec898c7b4c9742a77255a5798ec133591a6d95967d65fa25cb92568c0a36ee5747a90293cb0bda636899edb82406b372a7d0a5093f8784cd260f816a3b637d6d91a85b185668cef2a6fc6c0a13aedd346ad396e4e9cfd8afd59a21f5fba2ee828251a7fe9a78af43f1663ec9b1586880f4f94f5de6b820694a8cbeae47e29ae3050a0a71a7195f736d7eeb4232d1ea4ff3b72290218a8e5cb582b121729fac99fd82603fc48d116200fc784920e988a \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key.pub deleted file mode 100644 index f32eedb9..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/root_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "a5fb621036892e7ebab6ca95ae86ea237eb4a49457653cc1f69e106df6322b2d"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key deleted file mode 100644 index 3531005a..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key +++ /dev/null @@ -1 +0,0 @@ -aea946f6b9923ce3cc74acc4a459bfab@@@@100000@@@@43622b031a3da7ec2ae13eda39fca1b19fb11fed1ca1e7489df07e0af4854134@@@@b6684a4fc40f4030fa68ae3ec7f6452a@@@@b3aa3fa1daf59b12840a07294e93406cba1bcdddc51948cc8c355467b4e36a91ab0b5a23bac0176fca52f7ff999003f65dc9353c6a8667e82297d86b8d8be1af9b6aeddae428b43801e6e26bc27b26dd12f7c78cdfd9775fec3f197d4d1a8d4303add562140cde4967cc87098d2f82bfe3fa2c13fe886eeeea2b48de60d6e1a81df21f5e0f267d0c645ef2c274cc954f00fc2b0e4f6043ffca1c404b213de931009fb6af83e7f3c58bf98c001515c4b70e7bdcde56face1d948c8d8d1c36a99704929d8669ea4c2e5cb278aac13b73eec02f18d952dfec9f6b573a58681cbb290ec9a258c15188f492ce651c30c120684b0fefc0d078db750548a426b7695029dcc8ac66c9620130b874c52e42eebb8750c08b52005e0ec76d317f8433ebb855180f72965247629b9f53a9e664bd9e5f783ae9c0ef8cce7afdd1b63cc29e8665a44ff69b513ee2484cba1e2f1a82da17 \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key.pub deleted file mode 100644 index 33d20478..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/snapshot_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "c97dc30830403ad105976891d419d3944705052e77bd45b37d55b60daf50d79d"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key deleted file mode 100644 index 97149553..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key +++ /dev/null @@ -1 +0,0 @@ -867f8c0dd46c181722bae87677ef07c8@@@@100000@@@@5d1c15fa44534c01e028aa03e6ad5019c659af9849b19c0c0096aeec775dd9c2@@@@d02b931ab3f346d9ba41aff95ae30381@@@@62a3048c48366247684d838fca39b851ecc8e2dc4d0128bb69545ed4917da42f977cc8217b4646041a20ce1e4def8e81ed269e9af45c2a847049fe90c6dfd787cf1dd81b328448e8fd94ccb782beb8b11cc05f0a5463284f4a0bea93cffd1dad30e783e134c8ec4bdeb8e016849653005262d2cb290bd5e2d78ebd9939319e76aac9f7a128db5ea66a9b2ed20d0b97421e63aa46a82ed6ca986414f3820b80d90fefec1e9253ee4f20cf90c1250fe1a37ceb68c70d89c73a7bbe18fde579a8b1111996be205a457c798411335c2b128762e38793c4b9864abc83d94292cace4f65a31674ad3758012fa4eb68dcd83ec1a64f8a5590e1380fd7d0baa8546f47f0b6803427535082081d717c9e4b596165a78c8e25b228646b9af8b7f91ac92a17cc1717be12c83ee238a5018173c02e1c08874fa7eb61bc772c75a0caac5fb34bbfbbd4a863e998438d06d264fb47c543 \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key.pub deleted file mode 100644 index e8e1267b..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/targets_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "10dd1fa3fa926903849f1b33da40cd77b78e36bb9eca2d62e76e2fd7b1ca58a8"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key deleted file mode 100644 index 729d39b9..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key +++ /dev/null @@ -1 +0,0 @@ -7ee0efea98bcbdd7c3da618031f3eb16@@@@100000@@@@58eda781daeedf10e13479fd8922928a14ddecc87b73a160501d24867f48c7bd@@@@b70bbcc5049dc2986f7b5dc41450ecdc@@@@96588148d78ce20a922602c007826dfeb6cb2ab17c29da154f324914d655e515c55652f600aa531de36878386ef6864cbdb9ab6903714a7b4ee31fd18db6097d3438dbed21b3cbf4b3d9115755df56a6f6d9a3ba0394bf729d1bf5e23568a48e7838d9b3d3395c8ef83c09f3b1697ba7fdcdc32dd26b93512ca24965a21e792daf292d58c79d43c7b7fb876f9c2cec54268694dbaae8e17767759bd219fc851a2a758844a00e2dac821520c3ad7ece5138219956d9ef515f3c0a9606d1d343e031a2f9e85cd683d36d294031db2cc7c7bd1664c5514fdc1308afa9462c8e145fe7665025c19da7db424370c84a661352d1ab847832804424231871841254b244cbb509a6738873de279ccc6af82cff5ee3c6d5c71922301e1bd6aa2b5b8df0fd75eae5e5ed860a0e89a703c60994d47cbb0401e4540b3af739ad3198a19f6438210871cae25e7fd54e3ac6a1ea58fc92 \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key.pub b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key.pub deleted file mode 100644 index ad79a5fe..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/keystore/timestamp_key.pub +++ /dev/null @@ -1 +0,0 @@ -{"keytype": "ed25519", "scheme": "ed25519", "keyid_hash_algorithms": ["sha256", "sha512"], "keyval": {"public": "e198a49bf936b8af590bc4c4792560de5b97e23e8e2290a9809518958afa5b9f"}} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/1.root.json deleted file mode 100644 index def95d0d..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/1.root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "34e5dfdc0631dc6fa725cb1fabf43e9cdf8f8ce96db14153c65aeb97148e8cd7", - "sig": "66995bccbc7ef710cf1329486fa164b43a0166d8bb40b824ed5889bacf65b90d87425dcb36cd8b20d3fd033ddf8977f5936b02406f2b44e5a87ab832ada8dc00" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "34e5dfdc0631dc6fa725cb1fabf43e9cdf8f8ce96db14153c65aeb97148e8cd7": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "a5fb621036892e7ebab6ca95ae86ea237eb4a49457653cc1f69e106df6322b2d" - }, - "scheme": "ed25519" - }, - "97748b79e859264df641ed3ae44fae2109d03987fe2dc2c61199d9b2ab17124d": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "c97dc30830403ad105976891d419d3944705052e77bd45b37d55b60daf50d79d" - }, - "scheme": "ed25519" - }, - "cdaae1610a337baa06f461dac33eefd0ca2fb452b70131f3108f29567ac88f71": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e198a49bf936b8af590bc4c4792560de5b97e23e8e2290a9809518958afa5b9f" - }, - "scheme": "ed25519" - }, - "e415bf32d5572f264cc9d181264e4619def2f9e1067310c905e6afbedcd40b59": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "10dd1fa3fa926903849f1b33da40cd77b78e36bb9eca2d62e76e2fd7b1ca58a8" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "34e5dfdc0631dc6fa725cb1fabf43e9cdf8f8ce96db14153c65aeb97148e8cd7" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "97748b79e859264df641ed3ae44fae2109d03987fe2dc2c61199d9b2ab17124d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e415bf32d5572f264cc9d181264e4619def2f9e1067310c905e6afbedcd40b59" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "cdaae1610a337baa06f461dac33eefd0ca2fb452b70131f3108f29567ac88f71" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/root.json b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/root.json deleted file mode 100644 index def95d0d..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/root.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "signatures": [ - { - "keyid": "34e5dfdc0631dc6fa725cb1fabf43e9cdf8f8ce96db14153c65aeb97148e8cd7", - "sig": "66995bccbc7ef710cf1329486fa164b43a0166d8bb40b824ed5889bacf65b90d87425dcb36cd8b20d3fd033ddf8977f5936b02406f2b44e5a87ab832ada8dc00" - } - ], - "signed": { - "_type": "root", - "consistent_snapshot": false, - "expires": "2030-01-01T00:00:00Z", - "keys": { - "34e5dfdc0631dc6fa725cb1fabf43e9cdf8f8ce96db14153c65aeb97148e8cd7": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "a5fb621036892e7ebab6ca95ae86ea237eb4a49457653cc1f69e106df6322b2d" - }, - "scheme": "ed25519" - }, - "97748b79e859264df641ed3ae44fae2109d03987fe2dc2c61199d9b2ab17124d": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "c97dc30830403ad105976891d419d3944705052e77bd45b37d55b60daf50d79d" - }, - "scheme": "ed25519" - }, - "cdaae1610a337baa06f461dac33eefd0ca2fb452b70131f3108f29567ac88f71": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "e198a49bf936b8af590bc4c4792560de5b97e23e8e2290a9809518958afa5b9f" - }, - "scheme": "ed25519" - }, - "e415bf32d5572f264cc9d181264e4619def2f9e1067310c905e6afbedcd40b59": { - "keyid_hash_algorithms": [ - "sha256", - "sha512" - ], - "keytype": "ed25519", - "keyval": { - "public": "10dd1fa3fa926903849f1b33da40cd77b78e36bb9eca2d62e76e2fd7b1ca58a8" - }, - "scheme": "ed25519" - } - }, - "roles": { - "root": { - "keyids": [ - "34e5dfdc0631dc6fa725cb1fabf43e9cdf8f8ce96db14153c65aeb97148e8cd7" - ], - "threshold": 1 - }, - "snapshot": { - "keyids": [ - "97748b79e859264df641ed3ae44fae2109d03987fe2dc2c61199d9b2ab17124d" - ], - "threshold": 1 - }, - "targets": { - "keyids": [ - "e415bf32d5572f264cc9d181264e4619def2f9e1067310c905e6afbedcd40b59" - ], - "threshold": 1 - }, - "timestamp": { - "keyids": [ - "cdaae1610a337baa06f461dac33eefd0ca2fb452b70131f3108f29567ac88f71" - ], - "threshold": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/snapshot.json b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/snapshot.json deleted file mode 100644 index 54eab0c9..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/snapshot.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "signatures": [ - { - "keyid": "97748b79e859264df641ed3ae44fae2109d03987fe2dc2c61199d9b2ab17124d", - "sig": "8d8079c2e4de03e97af375cc2d8647cf57031bc55d4f7d73e0e7c459a53fe488fba28d7d81f873bfe6b70aa196f27b8c9fe7b3ab42616aaa1cc0d06a4be1860b" - } - ], - "signed": { - "_type": "snapshot", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "root.json": { - "version": 1 - }, - "targets.json": { - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/targets.json b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/targets.json deleted file mode 100644 index b0aeb0f9..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/targets.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "signatures": [ - { - "keyid": "e415bf32d5572f264cc9d181264e4619def2f9e1067310c905e6afbedcd40b59", - "sig": "56ea8457f6268b4c9652a9bd2263f7205db6854d58adc55e0632e5bde5ed3ef47e5165a87368c2effce4d5d4005d1d82a44dc47a0b96721385537c7c9922cf0e" - } - ], - "signed": { - "_type": "targets", - "delegations": { - "keys": {}, - "roles": [] - }, - "expires": "2030-01-01T00:00:00Z", - "spec_version": "1.0", - "targets": { - "dir/file2.txt": { - "hashes": { - "sha256": "04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701", - "sha512": "2b85daf030ebc94d302822da4fd50216dc56f90c9bb60a95b272aa5b11fe81cd9b192b1a860896d6a8241d1a42cc97b6015d42100c9b46432a32db4b13a11c58" - }, - "length": 9 - }, - "file1.txt": { - "custom": { - "file_permissions": "0644" - }, - "hashes": { - "sha256": "55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9", - "sha512": "055dc805570eecebad4270774054ee4375ef9a7248d981cfa8155dc884817df31e8497684dd26addd018a30565c3ccf87eeb70445f2e76587af84ed6ce1e0302" - }, - "length": 9 - } - }, - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/timestamp.json deleted file mode 100644 index 83588082..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/metadata/timestamp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "signatures": [ - { - "keyid": "cdaae1610a337baa06f461dac33eefd0ca2fb452b70131f3108f29567ac88f71", - "sig": "0c375d2afc0b015c2b4fcda9aa36855679dd17f58c2426d133689776aec812f1c586bdfa068ccfe56a43d338f2c80a1e8e767ec5f1c7fe179bd978313c379009" - } - ], - "signed": { - "_type": "timestamp", - "expires": "2030-01-01T00:00:00Z", - "meta": { - "snapshot.json": { - "hashes": { - "sha256": "3f2c336104fc481db5106945e01dda8840242201a25977747a9625d06611d2cb" - }, - "length": 470, - "version": 1 - } - }, - "spec_version": "1.0", - "version": 1 - } -} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/targets/dir/file2.txt b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/targets/dir/file2.txt deleted file mode 100644 index c3ee11c8..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/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-v0.11.1/without-consistent-snapshot/repository/targets/file1.txt b/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/targets/file1.txt deleted file mode 100644 index 39cd5762..00000000 --- a/client/python_interop/testdata/python-tuf-v0.11.1/without-consistent-snapshot/repository/targets/file1.txt +++ /dev/null @@ -1 +0,0 @@ -file1.txt \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v1.0.0/Dockerfile b/client/python_interop/testdata/python-tuf-v1.0.0/Dockerfile new file mode 100644 index 00000000..3987fe06 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.10 + +RUN apt-get update && apt-get install -y libsodium-dev tree +RUN pip install 'securesystemslib[crypto,pynacl]==0.22.0' 'tuf==v1.0.0' + +ADD generate.py generate.sh / +CMD /generate.sh diff --git a/client/python_interop/testdata/python-tuf-v1.0.0/client.py b/client/python_interop/testdata/python-tuf-v1.0.0/client.py new file mode 100644 index 00000000..93e23a07 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/client.py @@ -0,0 +1,69 @@ +#!/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 + +import tuf.api + +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-v1.0.0/generate.py b/client/python_interop/testdata/python-tuf-v1.0.0/generate.py new file mode 100755 index 00000000..61fd3276 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/generate.py @@ -0,0 +1,137 @@ +#!/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 + +import securesystemslib.util + +from securesystemslib.keys import generate_ed25519_key +from securesystemslib.signer import SSlibSigner +from tuf.api.metadata import ( + Key, + 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) + target_fspath.write_text(target.name) # file contents are the file 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"]: Key.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-v0.11.1/generate.sh b/client/python_interop/testdata/python-tuf-v1.0.0/generate.sh similarity index 91% rename from client/python_interop/testdata/python-tuf-v0.11.1/generate.sh rename to client/python_interop/testdata/python-tuf-v1.0.0/generate.sh index 3c0aabd0..094fa411 100755 --- a/client/python_interop/testdata/python-tuf-v0.11.1/generate.sh +++ b/client/python_interop/testdata/python-tuf-v1.0.0/generate.sh @@ -21,14 +21,14 @@ main() { generate_consistent() { mkdir "with-consistent-snapshot" pushd "with-consistent-snapshot" >/dev/null - python3 generate.py --consistent-snapshot + python3 /generate.py --consistent-snapshot popd >/dev/null } generate_non_consistent() { mkdir "without-consistent-snapshot" pushd "without-consistent-snapshot" >/dev/null - python3 generate.py + python3 /generate.py popd >/dev/null } diff --git a/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.root.json new file mode 100644 index 00000000..13ccb178 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.root.json @@ -0,0 +1,71 @@ +{ + "signatures": [ + { + "keyid": "e26489b1801b03e9e770b18f34c337cc29c1b02c4a4385ac698dfe879753e6b3", + "sig": "6385f433122fbe8760030371c0e6768cecff0df2fb22fdf04618da9f09b230070e3ef23f4d13978993466f2f1f983e4d712443c23bde08a5be77df6e6832be0e" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": true, + "expires": "2030-01-01T00:00:00Z", + "keys": { + "7b1aa7dbc1b24fb44d0146b0fe726d92f9640e26dc197d50345f9b00e0c98c4a": { + "keytype": "ed25519", + "keyval": { + "public": "98b7918168c7adfe0cdc26bd332baf67335ac4e8be350ddc3d27e54b93ae8b41" + }, + "scheme": "ed25519" + }, + "7fe79f52b6ab730028c299b82e4c45c828b3a47fea06f9e4582597a62c4e2f9a": { + "keytype": "ed25519", + "keyval": { + "public": "baa12f5d0f6d053c27625240b021286c9d8939ae62ec6143ee9ef1ada31fc0d9" + }, + "scheme": "ed25519" + }, + "d72e12473433414326514f50289712cb2a4fd8b518b70fcea077018d50a702f2": { + "keytype": "ed25519", + "keyval": { + "public": "ab5ae139b430f0210e4b3ae024882e9bf8c7d31e6ae958061da8ab51ce162c3c" + }, + "scheme": "ed25519" + }, + "e26489b1801b03e9e770b18f34c337cc29c1b02c4a4385ac698dfe879753e6b3": { + "keytype": "ed25519", + "keyval": { + "public": "aef72f53b1aeed769cc5678dbdc8a104d562c87e8201278156f84bab2c0c0a30" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "e26489b1801b03e9e770b18f34c337cc29c1b02c4a4385ac698dfe879753e6b3" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "d72e12473433414326514f50289712cb2a4fd8b518b70fcea077018d50a702f2" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "7b1aa7dbc1b24fb44d0146b0fe726d92f9640e26dc197d50345f9b00e0c98c4a" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "7fe79f52b6ab730028c299b82e4c45c828b3a47fea06f9e4582597a62c4e2f9a" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.19", + "version": 1 + } +} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json new file mode 100644 index 00000000..4a792fe1 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "d72e12473433414326514f50289712cb2a4fd8b518b70fcea077018d50a702f2", + "sig": "da8a6d4ec27acf62c23d16b51430456d12a20b3373ae52ecf3461ae52f7643dafcc51ca76f5080e9441c055e6a888323fb41e40427df4fc16fea5f35b358db04" + } + ], + "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-v1.0.0/with-consistent-snapshot/repository/metadata/1.targets.json b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.targets.json new file mode 100644 index 00000000..402978bb --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/1.targets.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "7b1aa7dbc1b24fb44d0146b0fe726d92f9640e26dc197d50345f9b00e0c98c4a", + "sig": "012a5a56af043b44fb913d859b61f85800c72fd93b5b3a04ac20f988c29114c643e933f427ff4d38b29b5b2340fe76cfa05704e075d799431fbafe80f9733500" + } + ], + "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-v1.0.0/with-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/timestamp.json new file mode 100644 index 00000000..c86ca151 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/metadata/timestamp.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "7fe79f52b6ab730028c299b82e4c45c828b3a47fea06f9e4582597a62c4e2f9a", + "sig": "a10f63e6ce554a259ed8e49afbfc6dc358fad05a377ed9f237ba0d81a058fb995be6ab2a4d67166532203fc68239bd8eaf1ebbbe9730c88773b27479d7395a0a" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2030-01-01T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "e92738a47826131048e88e6850dab1667c2e4934514c294a478670e5ec230514" + }, + "length": 432, + "version": 1 + } + }, + "spec_version": "1.0.19", + "version": 1 + } +} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt similarity index 100% rename from client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt rename to client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/targets/55ae75d991c770d8f3ef07cbfde124ffce9c420da5db6203afab700b27e10cf9.file1.txt diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt b/client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt similarity index 100% rename from client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt rename to client/python_interop/testdata/python-tuf-v1.0.0/with-consistent-snapshot/repository/targets/dir/04e2f59431a9d219321baf7d21b8cc797d7615dc3e9515c782c49d2075658701.file2.txt diff --git a/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/1.root.json b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/1.root.json new file mode 100644 index 00000000..a278bf24 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/1.root.json @@ -0,0 +1,71 @@ +{ + "signatures": [ + { + "keyid": "cbc434dd8f82c00935912ae123555c8f1d8e202ee74ed3511474a511fbd2bc3b", + "sig": "fb9652e344f028d864391f3bd897cc9e2e8c7a2bd7498cdf11816e517f7eedcf5b79a39757d4891e20d8c4917f6b1ef2d6fe729feb54bda771432f8664a48500" + } + ], + "signed": { + "_type": "root", + "consistent_snapshot": false, + "expires": "2030-01-01T00:00:00Z", + "keys": { + "6694e8c2a2d3cf98ebe41d2442235c46c7caaa4bd8908036d45ac5b046b08dde": { + "keytype": "ed25519", + "keyval": { + "public": "ce1de9af6e9f0599ade37d947e4fd19bc4d89da7ab3f335055196b42f6fa1704" + }, + "scheme": "ed25519" + }, + "ae6fcd48721c779d066643ed9d895feb48a86039732e93b58895d99bbbd0c0ae": { + "keytype": "ed25519", + "keyval": { + "public": "bb7e06355dee36ba33aa70780f82477724a78d69b9d7de3ebd647ff0d648516f" + }, + "scheme": "ed25519" + }, + "cbc434dd8f82c00935912ae123555c8f1d8e202ee74ed3511474a511fbd2bc3b": { + "keytype": "ed25519", + "keyval": { + "public": "e88e416ada03c8ef6b825aa43ff2c608683c51efa752234a454f9b1f9c5a2a39" + }, + "scheme": "ed25519" + }, + "e03d20021373f9de91fccedeb6572438b6803f2d3ab37adf51b72dc4aa527655": { + "keytype": "ed25519", + "keyval": { + "public": "95c4cabf0783bf904943179f5db97b8210d745b0dd4bfa4659f0c172b80d6e08" + }, + "scheme": "ed25519" + } + }, + "roles": { + "root": { + "keyids": [ + "cbc434dd8f82c00935912ae123555c8f1d8e202ee74ed3511474a511fbd2bc3b" + ], + "threshold": 1 + }, + "snapshot": { + "keyids": [ + "6694e8c2a2d3cf98ebe41d2442235c46c7caaa4bd8908036d45ac5b046b08dde" + ], + "threshold": 1 + }, + "targets": { + "keyids": [ + "ae6fcd48721c779d066643ed9d895feb48a86039732e93b58895d99bbbd0c0ae" + ], + "threshold": 1 + }, + "timestamp": { + "keyids": [ + "e03d20021373f9de91fccedeb6572438b6803f2d3ab37adf51b72dc4aa527655" + ], + "threshold": 1 + } + }, + "spec_version": "1.0.19", + "version": 1 + } +} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/snapshot.json b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/snapshot.json new file mode 100644 index 00000000..30668fb5 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/snapshot.json @@ -0,0 +1,19 @@ +{ + "signatures": [ + { + "keyid": "6694e8c2a2d3cf98ebe41d2442235c46c7caaa4bd8908036d45ac5b046b08dde", + "sig": "6c06bd2dc1f9b9991ff68fa3edb9b3b6becee25f638b4187e161ac65cadcbb59d320196bb0fb72cf08734b75531f3ceddefdc56424ec8a8c8fee068b2584450d" + } + ], + "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-v1.0.0/without-consistent-snapshot/repository/metadata/targets.json b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/targets.json new file mode 100644 index 00000000..ed805ca8 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/targets.json @@ -0,0 +1,28 @@ +{ + "signatures": [ + { + "keyid": "ae6fcd48721c779d066643ed9d895feb48a86039732e93b58895d99bbbd0c0ae", + "sig": "50eec0672e2861e3b73a8a4a15cc60113dc5b478d1431a55d90f8ab65a1954acbbc860f586f3a331144e41a56c54e54c49d9d9eba6ace2c553ec542aafcf4c04" + } + ], + "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-v1.0.0/without-consistent-snapshot/repository/metadata/timestamp.json b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/timestamp.json new file mode 100644 index 00000000..5a9d3c31 --- /dev/null +++ b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/metadata/timestamp.json @@ -0,0 +1,23 @@ +{ + "signatures": [ + { + "keyid": "e03d20021373f9de91fccedeb6572438b6803f2d3ab37adf51b72dc4aa527655", + "sig": "50315d16c729d2068586776285f6282c87cd722e052acf293166ca1cf7313bdc1a673d02309f9be2d710d82c239ce349f3bffbcb76fbebb655bea2199db92503" + } + ], + "signed": { + "_type": "timestamp", + "expires": "2030-01-01T00:00:00Z", + "meta": { + "snapshot.json": { + "hashes": { + "sha256": "4471c47119f7b16307f9955e7fa0fdcaf53c82f7a857ea2b2f46fd6fe9bc53e9" + }, + "length": 432, + "version": 1 + } + }, + "spec_version": "1.0.19", + "version": 1 + } +} \ No newline at end of file diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/file2.txt b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt similarity index 100% rename from client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/dir/file2.txt rename to client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/targets/dir/file2.txt diff --git a/client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/file1.txt b/client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/targets/file1.txt similarity index 100% rename from client/python_interop/testdata/python-tuf-v0.11.1/with-consistent-snapshot/repository/targets/file1.txt rename to client/python_interop/testdata/python-tuf-v1.0.0/without-consistent-snapshot/repository/targets/file1.txt diff --git a/requirements-test.txt b/requirements-test.txt index 77404c20..a364c2d7 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,5 @@ iso8601==1.0.2 requests==2.28.1 -securesystemslib==0.21.0 +securesystemslib==0.22.0 six==1.16.0 -tuf==0.20.0 \ No newline at end of file +tuf==1.0.0 \ No newline at end of file