aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r--tests/hazmat/backends/test_openssl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 8cf14b98..4f44f686 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -502,7 +502,7 @@ class TestRSAPEMSerialization(object):
password = b"x" * 1024
key = RSA_KEY_2048.private_key(backend)
with pytest.raises(ValueError):
- key.as_bytes(
+ key.private_bytes(
serialization.Encoding.PEM,
serialization.Format.PKCS8,
serialization.BestAvailableEncryption(password)
@@ -511,7 +511,7 @@ class TestRSAPEMSerialization(object):
def test_unsupported_key_encoding(self):
key = RSA_KEY_2048.private_key(backend)
with pytest.raises(ValueError):
- key.as_bytes(
+ key.private_bytes(
serialization.Encoding.DER,
serialization.Format.PKCS8,
serialization.NoEncryption()