Skip to content

Commit

Permalink
Compatibility with python-cryptography 42
Browse files Browse the repository at this point in the history
based on initial changes proposed in #534 which did not work for the old
cryptography, but this should work for both.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
  • Loading branch information
Jakuje authored and whooo committed May 29, 2024
1 parent 9c29305 commit d1e9aec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from base64 import b64decode
from hashlib import sha256, sha384
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.exceptions import UnsupportedAlgorithm

rsa_private_key = b"""
-----BEGIN RSA PRIVATE KEY-----
Expand Down Expand Up @@ -206,7 +207,7 @@ def setUp(self):
self._has_sect163r2 = True
try:
load_pem_public_key(ecc_bad_curve)
except ValueError:
except (ValueError, UnsupportedAlgorithm):
self._has_sect163r2 = False

def test_public_from_pem_rsa(self):
Expand Down

0 comments on commit d1e9aec

Please sign in to comment.