This commit is contained in:
vladdd 2014-01-18 17:09:32 -05:00
parent a9d90e7ce0
commit b2e220f598
2 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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)