Skip to content

Commit

Permalink
fix: deps, cryptography breaking changes (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux authored Jan 23, 2024
1 parent e006f92 commit 20f8f92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pyeudiw/sd_jwt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from typing import Any
from cryptojwt.jwk.rsa import RSAKey
from cryptojwt.jwk.ec import ECKey
from cryptography.hazmat.backends.openssl.rsa import _RSAPrivateKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey


class TrustChainSDJWTIssuer(SDJWTIssuer):
Expand Down Expand Up @@ -152,7 +152,7 @@ def pk_encode_int(i: str, bit_size: int = None) -> str:
return base64url_encode(unhexlify(extend * '0' + hexi))


def import_pyca_pri_rsa(key: _RSAPrivateKey, **params) -> jwcrypto.jwk.JWK:
def import_pyca_pri_rsa(key: RSAPrivateKey, **params) -> jwcrypto.jwk.JWK:
"""
Import a private RSA key from a PyCA object.
Expand All @@ -165,7 +165,7 @@ def import_pyca_pri_rsa(key: _RSAPrivateKey, **params) -> jwcrypto.jwk.JWK:
:rtype: RSAKey
"""

if not isinstance(key, _RSAPrivateKey):
if not isinstance(key, RSAPrivateKey):
raise ValueError("key must be a ssl RSAPrivateKey object")

pn = key.private_numbers()
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def readme():
"satosa>=8.4,<8.6",
"jinja2>=3.0,<4",
"pymongo>=4.4.1,<4.5",
"requests>=2.2,<2.3",
"sd-jwt @ git+https://github.com/openwallet-foundation-labs/sd-jwt-python.git",
"requests>=2.2,<2.4",
"sd-jwt",
],
"federation": [
"asyncio>=4,<4.1",
Expand Down

0 comments on commit 20f8f92

Please sign in to comment.