From 43189ef6f2b55b4a09c042ce3fd4d1703c2091e3 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 21 Mar 2022 11:25:11 +0000 Subject: Fix for compatibility with old versions of cryptography --- tests/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3