diff options
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/primitives/test_ec.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py index e6cb6ce9..77ee38b4 100644 --- a/tests/hazmat/primitives/test_ec.py +++ b/tests/hazmat/primitives/test_ec.py @@ -406,8 +406,8 @@ class TestECSerialization(object): ("fmt", "password"), itertools.product( [ - serialization.Format.TraditionalOpenSSL, - serialization.Format.PKCS8 + serialization.PrivateFormat.TraditionalOpenSSL, + serialization.PrivateFormat.PKCS8 ], [ b"s", @@ -440,7 +440,10 @@ class TestECSerialization(object): @pytest.mark.parametrize( "fmt", - [serialization.Format.TraditionalOpenSSL, serialization.Format.PKCS8], + [ + serialization.PrivateFormat.TraditionalOpenSSL, + serialization.PrivateFormat.PKCS8 + ], ) def test_private_bytes_unencrypted_pem(self, backend, fmt): _skip_curve_unsupported(backend, ec.SECP256R1()) @@ -473,7 +476,7 @@ class TestECSerialization(object): key = serialization.load_pem_private_key(key_bytes, None, backend) serialized = key.private_bytes( serialization.Encoding.PEM, - serialization.Format.TraditionalOpenSSL, + serialization.PrivateFormat.TraditionalOpenSSL, serialization.NoEncryption() ) assert serialized == key_bytes @@ -491,7 +494,7 @@ class TestECSerialization(object): with pytest.raises(TypeError): key.private_bytes( "notencoding", - serialization.Format.PKCS8, + serialization.PrivateFormat.PKCS8, serialization.NoEncryption() ) @@ -525,7 +528,7 @@ class TestECSerialization(object): with pytest.raises(TypeError): key.private_bytes( serialization.Encoding.PEM, - serialization.Format.TraditionalOpenSSL, + serialization.PrivateFormat.TraditionalOpenSSL, "notanencalg" ) @@ -542,6 +545,6 @@ class TestECSerialization(object): with pytest.raises(ValueError): key.private_bytes( serialization.Encoding.PEM, - serialization.Format.TraditionalOpenSSL, + serialization.PrivateFormat.TraditionalOpenSSL, DummyKeyEncryption() ) |