From 41ea7d21675d067b05f584b3b28bbd7fe40ee9ef Mon Sep 17 00:00:00 2001 From: Will Greenberg Date: Mon, 25 Mar 2024 15:46:52 -0700 Subject: [PATCH] acme: remove kluge for older cryptography support --- acme/acme/crypto_util.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/acme/acme/crypto_util.py b/acme/acme/crypto_util.py index b2439a79f..8e8f73c54 100644 --- a/acme/acme/crypto_util.py +++ b/acme/acme/crypto_util.py @@ -22,9 +22,7 @@ import warnings from cryptography import x509 from cryptography.hazmat.primitives.hashes import SHA256 from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey -from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey -from cryptography.hazmat.primitives.asymmetric.ed448 import Ed448PrivateKey -from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKey +from cryptography.hazmat.primitives.asymmetric.types import CertificateIssuerPrivateKeyTypes from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey from cryptography.hazmat.primitives.serialization import Encoding from cryptography.hazmat.primitives.serialization import load_pem_private_key @@ -234,15 +232,6 @@ def probe_sni(name: bytes, host: bytes, port: int = 443, timeout: int = 300, # return cert -CertificateIssuerPrivateKeyTypes = Union[ - Ed25519PrivateKey, - Ed448PrivateKey, - RSAPrivateKey, - DSAPrivateKey, - EllipticCurvePrivateKey, -] - - def make_csr(private_key_pem: bytes, domains: Optional[Union[Set[str], List[str]]] = None, must_staple: bool = False, ipaddrs: Optional[List[Union[ipaddress.IPv4Address, ipaddress.IPv6Address]]] = None