mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Fix Issue #167.
This commit is contained in:
parent
a9d90e7ce0
commit
b2e220f598
2 changed files with 7 additions and 6 deletions
|
|
@ -83,8 +83,9 @@
|
|||
# routines and side-channel protections available in the libsodium library.
|
||||
try:
|
||||
import nacl
|
||||
import nacl.signing
|
||||
_available_crypto_libraries.append('pynacl')
|
||||
except ImportError:
|
||||
except (ImportError, IOError):
|
||||
pass
|
||||
|
||||
# The optimized version of the ed25519 library provided by default is imported
|
||||
|
|
|
|||
|
|
@ -2886,7 +2886,7 @@ def generate_and_write_rsa_keypair(filepath, bits=DEFAULT_RSA_KEY_BITS,
|
|||
|
||||
# If the caller does not provide a password argument, prompt for one.
|
||||
if password is None:
|
||||
message = 'Enter a password for the RSA key file: '
|
||||
message = 'Enter a password for the RSA key: '
|
||||
password = _get_password(message, confirm=True)
|
||||
|
||||
# Does 'password' have the correct format?
|
||||
|
|
@ -2962,8 +2962,8 @@ def import_rsa_privatekey_from_file(filepath, password=None):
|
|||
|
||||
# If the caller does not provide a password argument, prompt for one.
|
||||
if password is None:
|
||||
message = 'Enter a password for the encrypted RSA key file: '
|
||||
password = _get_password(message, confirm=True)
|
||||
message = 'Enter a password for the encrypted RSA key: '
|
||||
password = _get_password(message, confirm=False)
|
||||
|
||||
# Does 'password' have the correct format?
|
||||
tuf.formats.PASSWORD_SCHEMA.check_match(password)
|
||||
|
|
@ -3211,8 +3211,8 @@ def import_ed25519_privatekey_from_file(filepath, password=None):
|
|||
|
||||
# If the caller does not provide a password argument, prompt for one.
|
||||
if password is None:
|
||||
message = 'Enter a password for the encrypted ED25519 key file: '
|
||||
password = _get_password(message, confirm=True)
|
||||
message = 'Enter a password for the encrypted ED25519 key: '
|
||||
password = _get_password(message, confirm=False)
|
||||
|
||||
# Does 'password' have the correct format?
|
||||
tuf.formats.PASSWORD_SCHEMA.check_match(password)
|
||||
|
|
|
|||
Loading…
Reference in a new issue