python-tuf/tests
Jussi Kukkonen 414dfc829f Metadata API: Move signature verification to Key
This is likely not needed by users of the API (as they are interested
in the higher level functionality "verify delegate metadata with
threshold of signatures").

Moving verify to Key makes the API cleaner because including both
"verify myself" and "verify a delegate with threshold" can look awkward
in Metadata, and because the ugly Securesystemslib integration is now
Key class implementation detail (see Key.to_securesystemslib_key()).

Also raise on verify failure instead of returning false: this was found
to confuse API users (and was arguably not a pythonic way to handle it).

* Name the function verify_signature() to make it clear what is being
  verified.
* Assume only one signature per keyid exists: see #1422
* Raise only UnsignedMetadataError (when no signatures or verify failure),
  the remaining lower level errors will be handled in #1351
* Stop using a "keystore" in tests for the public keys: everything we
  need is in metadata already

This changes API, but also should not be something API users want to
call in the future when "verify a delegate with threshold" exists.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-06-07 13:20:26 +03:00
..
repository_data Tests: Queue replace tmp files, OS port creation 2020-11-13 14:01:57 +02:00
ssl_certs Test: add https test with expired server certificate 2018-09-26 14:15:36 -04:00
.coveragerc Move omit to run section in .coveragerc 2019-07-11 14:32:49 +02:00
__init__.py Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
aggregate_tests.py Remove future module #1297 2021-04-11 11:37:45 +02:00
fast_server_exit.py Add tests for tests/utils.py 2020-11-13 14:01:57 +02:00
simple_https_server.py Remove future module #1297 2021-04-11 11:37:45 +02:00
simple_server.py Remove future module #1297 2021-04-11 11:37:45 +02:00
slow_retrieval_server.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_api.py Metadata API: Move signature verification to Key 2021-06-07 13:20:26 +03:00
test_arbitrary_package_attack.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_developer_tool.py Make "utils" import more definite 2020-11-23 22:17:31 +02:00
test_download.py tests: Kill processes before deleting temp files 2021-04-12 11:55:37 +03:00
test_endless_data_attack.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_extraneous_dependencies_attack.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_fetcher.py tests: Kill processes before deleting temp files 2021-04-12 11:55:37 +03:00
test_formats.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_indefinite_freeze_attack.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_key_revocation_integration.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_keydb.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_log.py Remove use of six 2021-04-09 14:07:44 +03:00
test_mirrors.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_mix_and_match_attack.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_multiple_repositories_integration.py tests: Fix the order of rmdir and process kill 2021-04-12 11:55:31 +03:00
test_replay_attack.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_repository_lib.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_repository_tool.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_roledb.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_root_versioning_integration.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_sig.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_slow_retrieval_attack.py tests: Fix the order of rmdir and process kill 2021-04-12 11:55:31 +03:00
test_tutorial.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_unittest_toolbox.py Remove future module #1297 2021-04-11 11:37:45 +02:00
test_updater.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_updater_root_rotation_integration.py tests: Remove temp directories after other cleanup 2021-04-12 11:55:37 +03:00
test_utils.py tests: remove some Python 2 specific tests 2021-03-03 09:38:36 +00:00
utils.py tests: Use current python interpreter for sub tests 2021-04-12 23:34:31 +02:00