TestKeyManagerLoad

class tests.test_crypto.TestKeyManagerLoad(methodName='runTest')[source]

Test KeyManager asymmetric key loading

__init__(methodName='runTest')

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

Methods

Methods

test_ecdsa_load()

Generate and attempt to load an ECDSA keypair

test_ed25519_load()

Generate and attempt to load an Ed25519 keypair

test_load_invalid()

Initialise KeyManager with an invalid key to confirm it raises InvalidFormat

test_load_keyfile_corrupt_private()

Test KeyManager.load_keyfile() raises InvalidFormat with corrupted PEM private key

test_load_keyfile_corrupt_public()

Test KeyManager.load_keyfile() raises InvalidFormat with corrupted public key

test_load_keyfile_corrupt_public_2()

Test KeyManager.load_keyfile() raises InvalidFormat with corrupted public key (but with valid b64)

test_load_keyfile_noexist()

Test KeyManager.load_keyfile() raises FileNotFoundError with non-existent path

test_load_keyfile_sign_verify_rsa()

Generate a key pair + save to disk, then load the keypair from disk.

test_rsa_load()

Generate and attempt to load an RSA keypair

Attributes

Attributes