python-tuf/tests
Lukas Puehringer ff8819577b Adopt sslib keygen interface encryption changes
secure-systems-lab/securesystemslib#288 changes the key generation
interface functions in such a way that it is clear if a call opens
a blocking prompt, or writes the key unencrypted. To do this two
functions are added per key type:
 - `generate_and_write_*_keypair_with_prompt`
 - `generate_and_write_unencrypted_*_keypair`

The default `generate_and_write_*_keypair` function now only allows
encrypted keys and only using a passed password. This respects the
principle of secure defaults and least surprise.

sslib#288 furthermore adds a protected
`_generate_and_write_*_keypair`, which is not exposed publicly
because it does not encrypt by default, but is more flexible and
thus convenient e.g. to consume all arguments from a key generation
command line tool such as 'repo.py'.

This commit adds the new public functions to the tuf namespace and
adopts their usage accordingly.

NOTE regarding repo.py:
This commit does not fix any problematic password behavior of
'repo.py' like default passwords, etc. (see #881). It only adopts
the sslib#288 changes to maintain the current behvior, plus
removing one glaringly obsolete password prompt.

NOTE regarding key import:
The securesystemslib private key import functions were also changed
to no longer auto-prompt for decryption passwords , TUF, however,
only exposes custom wrappers (see repository_lib) that do
auto-prompt. sslib#288 changes to the prompt texts are nevertheless
propagated to tuf and reflected in this commit.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-11-11 10:27:56 +01:00
..
repository_data Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01: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 Install TUF in editable mode in tox builds 2019-07-11 14:32:49 +02:00
proxy_server.py tests: Use localhost consistently 2020-08-10 16:11:33 +03:00
simple_https_server.py Remove unneceserry checks in server files 2020-10-01 12:22:19 +03:00
simple_server.py Remove unneceserry checks in server files 2020-10-01 12:22:19 +03:00
slow_retrieval_server.py Remove a not used function 2020-10-01 12:22:19 +03:00
test_api.py Make unit test files executable 2020-10-05 10:36:31 +01:00
test_arbitrary_package_attack.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_developer_tool.py Remove redundant comments from test classes 2020-10-01 12:22:19 +03:00
test_download.py tests: Filter useless warnings 2020-10-09 12:10:49 +03:00
test_endless_data_attack.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_extraneous_dependencies_attack.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_formats.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_indefinite_freeze_attack.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_key_revocation_integration.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_keydb.py tests: Configure logging for all test files 2020-09-15 21:36:50 +03:00
test_log.py tests: Configure logging for all test files 2020-09-15 21:36:50 +03:00
test_mirrors.py Add test if confined_target_dirs is [''] 2020-10-16 16:10:05 +03:00
test_mix_and_match_attack.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_multiple_repositories_integration.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_proxy_use.py Merge pull request #1163 from joshuagl/joshuagl/nits 2020-10-15 10:38:26 +01:00
test_replay_attack.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_repository_lib.py Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
test_repository_tool.py Remove redundant comments from test classes 2020-10-01 12:22:19 +03:00
test_roledb.py tests: Configure logging for all test files 2020-09-15 21:36:50 +03:00
test_root_versioning_integration.py tests: Configure logging for all test files 2020-09-15 21:36:50 +03:00
test_sig.py tests: Configure logging for all test files 2020-09-15 21:36:50 +03:00
test_slow_retrieval_attack.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_tutorial.py Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
test_unittest_toolbox.py tests: Configure logging for all test files 2020-09-15 21:36:50 +03:00
test_updater.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
test_updater_root_rotation_integration.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
utils.py tests: Filter useless warnings 2020-10-09 12:10:49 +03:00