diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-03-01 21:56:32 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-03-02 08:17:16 -0600 |
commit | f1c7b740324be18e0f67f095a81d6d8802498a2c (patch) | |
tree | 72f5524a1cdd2134d26c835f68a898fdedea05db /tests | |
parent | 61ecd279ac3247a925d614c55c1e73d2dd87ea94 (diff) | |
download | cryptography-f1c7b740324be18e0f67f095a81d6d8802498a2c.tar.gz cryptography-f1c7b740324be18e0f67f095a81d6d8802498a2c.tar.bz2 cryptography-f1c7b740324be18e0f67f095a81d6d8802498a2c.zip |
format to privateformat
Diffstat (limited to 'tests')
-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() ) |