diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2022-02-13 13:44:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-13 08:44:34 -1000 |
commit | 7dbafff8e91819e87e4d480bcdaa9a6f8cf6b9bb (patch) | |
tree | 23bd431b208e766895a88072bf1c514a79d71c5d /tests/test_ssl.py | |
parent | bcb20110134379bcea9a0cb5c7a3d986afaa8ea5 (diff) | |
download | pyopenssl-git-7dbafff8e91819e87e4d480bcdaa9a6f8cf6b9bb.tar.gz |
Stop passing backend to cryptography (#1094)
Diffstat (limited to 'tests/test_ssl.py')
-rw-r--r-- | tests/test_ssl.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/test_ssl.py b/tests/test_ssl.py index bda2870..8685ebc 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -40,7 +40,6 @@ import pytest from pretend import raiser from cryptography import x509 -from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa @@ -447,9 +446,7 @@ def ca_file(tmpdir): """ Create a valid PEM file with CA certificates and return the path. """ - key = rsa.generate_private_key( - public_exponent=65537, key_size=2048, backend=default_backend() - ) + key = rsa.generate_private_key(public_exponent=65537, key_size=2048) public_key = key.public_key() builder = x509.CertificateBuilder() @@ -469,9 +466,7 @@ def ca_file(tmpdir): critical=True, ) - certificate = builder.sign( - private_key=key, algorithm=hashes.SHA256(), backend=default_backend() - ) + certificate = builder.sign(private_key=key, algorithm=hashes.SHA256()) ca_file = tmpdir.join("test.pem") ca_file.write_binary( |