summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Howarth <paul@city-fan.org>2022-03-21 11:25:11 +0000
committerPaul Howarth <paul@city-fan.org>2022-03-21 12:04:12 +0000
commit43189ef6f2b55b4a09c042ce3fd4d1703c2091e3 (patch)
tree77f711bb36302ebcc7018351168d90e7a2c9210d /tests
parent5dcdb2c1f258f66331f648503b0d482c4e326a43 (diff)
downloadparamiko-43189ef6f2b55b4a09c042ce3fd4d1703c2091e3.tar.gz
Fix for compatibility with old versions of cryptography
Diffstat (limited to 'tests')
-rw-r--r--tests/util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/util.py b/tests/util.py
index e6551ac7..4bf73949 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -10,6 +10,7 @@ from paramiko.py3compat import builtins, PY2
from paramiko.ssh_gss import GSS_AUTH_AVAILABLE
from cryptography.exceptions import UnsupportedAlgorithm, _Reasons
+from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import padding, rsa
@@ -155,7 +156,7 @@ def sha1_signing_unsupported():
not supported by the backend.
"""
private_key = rsa.generate_private_key(
- public_exponent=65537, key_size=2048
+ public_exponent=65537, key_size=2048, backend=default_backend()
)
message = b"Some dummy text"
try: