Skip to content

Commit

Permalink
Fix dfeprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sffjunkie committed Mar 13, 2024
1 parent ba14da1 commit c95b31d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pkiviewer/model/p12.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from cryptography.hazmat.primitives.asymmetric.types import PRIVATE_KEY_TYPES
from cryptography.hazmat.primitives.asymmetric.types import PrivateKeyTypes
from cryptography.hazmat.primitives.serialization.pkcs12 import PKCS12KeyAndCertificates

from pkiviewer.model.certificate import CertificateInfo, certiticate_parse
Expand All @@ -8,7 +8,7 @@
class PKCS12KeyAndCertificateInfo(X509Info):
name: str
certificate: CertificateInfo | None
private_key: PRIVATE_KEY_TYPES | None
private_key: PrivateKeyTypes | None
additional_certs: list[CertificateInfo]


Expand Down
4 changes: 2 additions & 2 deletions src/pkiviewer/model/public_key/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from cryptography.hazmat.primitives.asymmetric.ed448 import Ed448PublicKey
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
from cryptography.hazmat.primitives.asymmetric.types import CERTIFICATE_PUBLIC_KEY_TYPES
from cryptography.hazmat.primitives.asymmetric.types import CertificatePublicKeyTypes

from pkiviewer.model.public_key.dh import dh_public_key_info
from pkiviewer.model.public_key.dsa import dsa_public_key_info
Expand All @@ -15,7 +15,7 @@
from pkiviewer.types import PublicKeyInfo


def public_key_info(pk: CERTIFICATE_PUBLIC_KEY_TYPES) -> PublicKeyInfo | None:
def public_key_info(pk: CertificatePublicKeyTypes) -> PublicKeyInfo | None:
if isinstance(pk, RSAPublicKey):
return rsa_public_key_info(pk)
elif isinstance(pk, EllipticCurvePublicKey):
Expand Down

0 comments on commit c95b31d

Please sign in to comment.