python-tuf/tuf
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
..
api Disable an instance of too-many-arguments error 2020-10-15 14:35:14 +01:00
client Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
scripts Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
__init__.py Prepare 0.15.0 release 2020-10-21 11:42:21 +01:00
ATTACKS.md fix-up the document spelling mistake 2019-08-27 14:41:24 +08:00
developer_tool.py Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
download.py Merge pull request #1145 from jku/silence-errors-to-be-raised 2020-09-22 13:42:27 +01:00
exceptions.py Add MissingLocalRepositoryError 2020-10-12 15:23:15 +03:00
formats.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03:00
keydb.py Remove uses of keyid_hash_algorithms 2020-09-09 10:51:46 +01:00
log.py log: Close the file handler when it's removed 2020-08-10 16:11:33 +03:00
mirrors.py Make confined_target_dirs optional field 2020-10-16 15:35:24 +03: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 Remove iso8601 dependency 2020-10-13 20:06:14 +03:00
repository_tool.py Adopt sslib keygen interface encryption changes 2020-11-11 10:27:56 +01:00
roledb.py Add TOP_LEVEL_ROLES as a global variable 2020-06-29 13:55:45 +03:00
settings.py Port to new securesystemslib w abstract filesystem 2020-05-12 22:16:50 +01:00
sig.py sig: Remove iso8601 logger mentions 2020-10-13 12:11:37 +03:00
unittest_toolbox.py Rename license files in modules 2018-02-05 11:31:19 -05:00