python-tuf/tuf
Martin Vrachev 76cf36eb86 Handle consistent targets same as legacy updater
The definition of consistent targets in the spec is ambiguous:
"consistent target files should be written to non-volatile storage
as digest.filename.ext"
Additionally, the specification describes consistent targets when the
client builds the download URL as follows:
"The filename is of the form HASH.FILENAME.EXT".
The issue is about how we interpreted those quotes.
The legacy updater has decided this means a target path "a/b" will
translate to a download url path "a/{HASH}.b".
The ngclient however translates the target path "a/b" to a download url
path "{HASH}.a/b".

We decided we want to follow the same approach taken from the legacy
updater and thus change how we construct the consistent targets.
Additionally, we want to make sure we test for cases when the TARGETPATH
is an empty string or points to a directory.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2021-10-07 15:19:50 +03:00
..
api Metadata API: Stop annotating __init__() return value 2021-09-23 17:57:19 +03:00
client Add 'ecdsa' to the list of supported key types 2021-06-17 11:48:30 +03:00
ngclient Handle consistent targets same as legacy updater 2021-10-07 15:19:50 +03:00
scripts updated docs and comments 2021-07-14 10:37:08 +03:00
__init__.py Prepare v0.18.1 2021-09-06 13:55:54 +01:00
ATTACKS.md Update links to account for repository rename 2021-09-01 11:15:33 +01:00
developer_tool.py Address Pylint new unspecified-encoding warning 2021-08-23 16:48:40 +03:00
download.py Remove future module #1297 2021-04-11 11:37:45 +02:00
exceptions.py Make SlowRetrievalError parameter optional 2021-08-27 11:54:45 +03:00
formats.py updated docs and comments 2021-07-14 10:37:08 +03:00
keydb.py Remove some uses of "global" 2021-09-17 19:15:06 +03:00
log.py Fix pylint warnings 2021-09-17 18:51:51 +03:00
mirrors.py Remove future module #1297 2021-04-11 11:37:45 +02:00
README-developer-tools.md Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
README.md Link to CLI.md from getting started and readme docs 2018-02-06 17:00:24 -05:00
repository_lib.py Add 'ecdsa' to the list of supported key types 2021-06-17 11:48:30 +03:00
repository_tool.py Update links to account for repository rename 2021-09-01 11:15:33 +01:00
requests_fetcher.py Remove use of six 2021-04-09 14:07:44 +03:00
roledb.py Remove some uses of "global" 2021-09-17 19:15:06 +03:00
settings.py Remove future module #1297 2021-04-11 11:37:45 +02:00
sig.py Remove future module #1297 2021-04-11 11:37:45 +02:00
unittest_toolbox.py Address Pylint new unspecified-encoding warning 2021-08-23 16:48:40 +03:00