diff --git a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyi b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyi index aa657e273..87dd3481e 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyi @@ -28,7 +28,7 @@ class DHParameterNumbers(object): @property def q(self) -> int: ... def __init__(self, p: int, g: int, q: Optional[int]) -> None: ... - def parameters(self, backend: DHBackend) -> DHParameters: ... + def parameters(self, backend: Optional[DHBackend] = ...) -> DHParameters: ... class DHPrivateKey(metaclass=ABCMeta): key_size: int @@ -53,7 +53,7 @@ class DHPrivateNumbers(object): @property def x(self) -> int: ... def __init__(self, x: int, public_numbers: DHPublicNumbers) -> None: ... - def private_key(self, backend: DHBackend) -> DHPrivateKey: ... + def private_key(self, backend: Optional[DHBackend] = ...) -> DHPrivateKey: ... class DHPublicKey(metaclass=ABCMeta): @property @@ -74,4 +74,6 @@ class DHPublicNumbers(object): @property def y(self) -> int: ... def __init__(self, y: int, parameter_numbers: DHParameterNumbers) -> None: ... - def public_key(self, backend: DHBackend) -> DHPublicKey: ... + def public_key(self, backend: Optional[DHBackend] = ...) -> DHPublicKey: ... + +def generate_parameters(generator: int, key_size: int, backend: Optional[DHBackend] = ...) -> DHParameters: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyi b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyi index c79c5a70f..2a2323d9e 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyi @@ -1,5 +1,5 @@ from abc import ABCMeta, abstractmethod -from typing import Union +from typing import Optional, Union from cryptography.hazmat.backends.interfaces import DSABackend from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext @@ -23,7 +23,7 @@ class DSAParameterNumbers(object): @property def g(self) -> int: ... def __init__(self, p: int, q: int, g: int) -> None: ... - def parameters(self, backend: DSABackend) -> DSAParameters: ... + def parameters(self, backend: Optional[DSABackend] = ...) -> DSAParameters: ... class DSAPrivateKey(metaclass=ABCMeta): @property @@ -75,5 +75,5 @@ class DSAPublicNumbers(object): def parameter_numbers(self) -> DSAParameterNumbers: ... def __init__(self, y: int, parameter_numbers: DSAParameterNumbers) -> None: ... -def generate_parameters(key_size: int, backend: DSABackend) -> DSAParameters: ... -def generate_private_key(key_size: int, backend: DSABackend) -> DSAPrivateKey: ... +def generate_parameters(key_size: int, backend: Optional[DSABackend] = ...) -> DSAParameters: ... +def generate_private_key(key_size: int, backend: Optional[DSABackend] = ...) -> DSAPrivateKey: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyi b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyi index c17c38c1c..cfdd031fa 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyi @@ -1,5 +1,5 @@ from abc import ABCMeta, abstractmethod -from typing import ClassVar, Union +from typing import ClassVar, Optional, Union from cryptography.hazmat.backends.interfaces import EllipticCurveBackend from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext @@ -141,7 +141,7 @@ class EllipticCurvePrivateNumbers(object): @property def public_numbers(self) -> EllipticCurvePublicNumbers: ... def __init__(self, private_value: int, public_numbers: EllipticCurvePublicNumbers) -> None: ... - def private_key(self, backend: EllipticCurveBackend) -> EllipticCurvePrivateKey: ... + def private_key(self, backend: Optional[EllipticCurveBackend] = ...) -> EllipticCurvePrivateKey: ... class EllipticCurvePublicKey(metaclass=ABCMeta): @property @@ -175,7 +175,7 @@ class EllipticCurvePublicNumbers(object): def __init__(self, x: int, y: int, curve: EllipticCurve) -> None: ... @classmethod def from_encoded_point(cls, curve: EllipticCurve, data: bytes) -> EllipticCurvePublicNumbers: ... - def public_key(self, backend: EllipticCurveBackend) -> EllipticCurvePublicKey: ... + def public_key(self, backend: Optional[EllipticCurveBackend] = ...) -> EllipticCurvePublicKey: ... class EllipticCurveSignatureAlgorithm(metaclass=ABCMeta): @property @@ -189,6 +189,8 @@ class ECDSA(EllipticCurveSignatureAlgorithm): @property def algorithm(self) -> Union[HashAlgorithm, Prehashed]: ... -def derive_private_key(private_value: int, curve: EllipticCurve, backend: EllipticCurveBackend) -> EllipticCurvePrivateKey: ... -def generate_private_key(curve: EllipticCurve, backend: EllipticCurveBackend) -> EllipticCurvePrivateKey: ... +def derive_private_key( + private_value: int, curve: EllipticCurve, backend: Optional[EllipticCurveBackend] = ... +) -> EllipticCurvePrivateKey: ... +def generate_private_key(curve: EllipticCurve, backend: Optional[EllipticCurveBackend] = ...) -> EllipticCurvePrivateKey: ... def get_curve_for_oid(oid: ObjectIdentifier) -> EllipticCurve: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyi b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyi index 6c6dba06e..35acc5b13 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyi @@ -1,5 +1,5 @@ from abc import ABCMeta, abstractmethod -from typing import Tuple, Union +from typing import Optional, Tuple, Union from cryptography.hazmat.backends.interfaces import RSABackend from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext @@ -48,7 +48,9 @@ class RSAPublicKey(metaclass=ABCMeta): RSAPublicKeyWithSerialization = RSAPublicKey -def generate_private_key(public_exponent: int, key_size: int, backend: RSABackend) -> RSAPrivateKeyWithSerialization: ... +def generate_private_key( + public_exponent: int, key_size: int, backend: Optional[RSABackend] = ... +) -> RSAPrivateKeyWithSerialization: ... def rsa_crt_iqmp(p: int, q: int) -> int: ... def rsa_crt_dmp1(private_exponent: int, p: int) -> int: ... def rsa_crt_dmq1(private_exponent: int, q: int) -> int: ... @@ -70,7 +72,7 @@ class RSAPrivateNumbers(object): def iqmp(self) -> int: ... @property def public_numbers(self) -> RSAPublicNumbers: ... - def private_key(self, backend) -> RSAPrivateKey: ... + def private_key(self, backend: Optional[RSABackend] = ...) -> RSAPrivateKey: ... class RSAPublicNumbers(object): def __init__(self, e: int, n: int) -> None: ... @@ -78,4 +80,4 @@ class RSAPublicNumbers(object): def e(self) -> int: ... @property def n(self) -> int: ... - def public_key(self, backend) -> RSAPublicKey: ... + def public_key(self, backend: Optional[RSABackend] = ...) -> RSAPublicKey: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi b/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi index 321ecbc1b..9eadced95 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi @@ -23,7 +23,7 @@ class BlockCipherAlgorithm(metaclass=ABCMeta): def block_size(self) -> int: ... class Cipher(object): - def __init__(self, algorithm: CipherAlgorithm, mode: Optional[Mode], backend: CipherBackend) -> None: ... + def __init__(self, algorithm: CipherAlgorithm, mode: Optional[Mode], backend: Optional[CipherBackend] = ...) -> None: ... def decryptor(self) -> CipherContext: ... def encryptor(self) -> CipherContext: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi b/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi index 8a2b46353..60c301343 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi @@ -1,8 +1,10 @@ +from typing import Optional + from cryptography.hazmat.backends.interfaces import CMACBackend from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm class CMAC(object): - def __init__(self, algorithm: BlockCipherAlgorithm, backend: CMACBackend) -> None: ... + def __init__(self, algorithm: BlockCipherAlgorithm, backend: Optional[CMACBackend] = ...) -> None: ... def copy(self) -> CMAC: ... def finalize(self) -> bytes: ... def update(self, data: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi b/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi index 2b62df920..d6e31dc01 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi @@ -1,4 +1,5 @@ from abc import ABCMeta, abstractmethod +from typing import Optional from cryptography.hazmat.backends.interfaces import HashBackend @@ -37,7 +38,7 @@ class SHAKE256(HashAlgorithm): def __init__(self, digest_size: int) -> None: ... class Hash(HashContext): - def __init__(self, algorithm: HashAlgorithm, backend: HashBackend): ... + def __init__(self, algorithm: HashAlgorithm, backend: Optional[HashBackend] = ...): ... def copy(self) -> Hash: ... def finalize(self) -> bytes: ... def update(self, data: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi b/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi index 200f719ab..15420ca2c 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi @@ -1,8 +1,10 @@ +from typing import Optional + from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm class HMAC(object): - def __init__(self, key: bytes, algorithm: HashAlgorithm, backend: HMACBackend) -> None: ... + def __init__(self, key: bytes, algorithm: HashAlgorithm, backend: Optional[HMACBackend] = ...) -> None: ... def copy(self) -> HMAC: ... def finalize(self) -> bytes: ... def update(self, msg: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyi b/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyi index a995a5fad..7e0b36ff7 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyi @@ -5,13 +5,20 @@ from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class ConcatKDFHash(KeyDerivationFunction): - def __init__(self, algorithm: HashAlgorithm, length: int, otherinfo: Optional[bytes], backend: HashBackend): ... + def __init__( + self, algorithm: HashAlgorithm, length: int, otherinfo: Optional[bytes], backend: Optional[HashBackend] = ... + ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... class ConcatKDFHMAC(KeyDerivationFunction): def __init__( - self, algorithm: HashAlgorithm, length: int, salt: Optional[bytes], otherinfo: Optional[bytes], backend: HMACBackend + self, + algorithm: HashAlgorithm, + length: int, + salt: Optional[bytes], + otherinfo: Optional[bytes], + backend: Optional[HMACBackend] = ..., ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi b/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi index 112a7307c..16997ab51 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi @@ -6,12 +6,17 @@ from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class HKDF(KeyDerivationFunction): def __init__( - self, algorithm: HashAlgorithm, length: int, salt: Optional[bytes], info: Optional[bytes], backend: HMACBackend + self, + algorithm: HashAlgorithm, + length: int, + salt: Optional[bytes], + info: Optional[bytes], + backend: Optional[HMACBackend] = ..., ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... class HKDFExpand(KeyDerivationFunction): - def __init__(self, algorithm: HashAlgorithm, length: int, info: Optional[bytes], backend: HMACBackend): ... + def __init__(self, algorithm: HashAlgorithm, length: int, info: Optional[bytes], backend: Optional[HMACBackend] = ...): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi b/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi index a96c34c9f..1e8b69eb7 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi @@ -24,7 +24,7 @@ class KBKDFHMAC(KeyDerivationFunction): label: Optional[bytes], context: Optional[bytes], fixed: Optional[bytes], - backend: HMACBackend, + backend: Optional[HMACBackend] = ..., ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyi b/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyi index 5e217bf83..8953cf973 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyi @@ -1,8 +1,12 @@ +from typing import Optional + from cryptography.hazmat.backends.interfaces import PBKDF2HMACBackend from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class PBKDF2HMAC(KeyDerivationFunction): - def __init__(self, algorithm: HashAlgorithm, length: int, salt: bytes, iterations: int, backend: PBKDF2HMACBackend): ... + def __init__( + self, algorithm: HashAlgorithm, length: int, salt: bytes, iterations: int, backend: Optional[PBKDF2HMACBackend] = ... + ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyi b/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyi index a08802926..7f24125f2 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyi @@ -1,7 +1,9 @@ +from typing import Optional + from cryptography.hazmat.backends.interfaces import ScryptBackend from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class Scrypt(KeyDerivationFunction): - def __init__(self, salt: bytes, length: int, n: int, r: int, p: int, backend: ScryptBackend): ... + def __init__(self, salt: bytes, length: int, n: int, r: int, p: int, backend: Optional[ScryptBackend] = ...): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyi b/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyi index 324bc1799..80aa289c3 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyi @@ -5,6 +5,8 @@ from cryptography.hazmat.primitives.hashes import HashAlgorithm from cryptography.hazmat.primitives.kdf import KeyDerivationFunction class X963KDF(KeyDerivationFunction): - def __init__(self, algorithm: HashAlgorithm, length: int, sharedinfo: Optional[bytes], backend: HashBackend): ... + def __init__( + self, algorithm: HashAlgorithm, length: int, sharedinfo: Optional[bytes], backend: Optional[HashBackend] = ... + ): ... def derive(self, key_material: bytes) -> bytes: ... def verify(self, key_material: bytes, expected_key: bytes) -> None: ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi b/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi index b26f1fb8d..6aa3e64bd 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi @@ -1,8 +1,10 @@ +from typing import Optional + from cryptography.hazmat.backends.interfaces import CipherBackend -def aes_key_wrap(wrapping_key: bytes, key_to_wrap: bytes, backend: CipherBackend) -> bytes: ... -def aes_key_wrap_with_padding(wrapping_key: bytes, key_to_wrap: bytes, backend: CipherBackend) -> bytes: ... -def aes_key_unwrap(wrapping_key: bytes, wrapped_key: bytes, backend: CipherBackend) -> bytes: ... -def aes_key_unwrap_with_padding(wrapping_key: bytes, wrapped_key: bytes, backend: CipherBackend) -> bytes: ... +def aes_key_wrap(wrapping_key: bytes, key_to_wrap: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ... +def aes_key_wrap_with_padding(wrapping_key: bytes, key_to_wrap: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ... +def aes_key_unwrap(wrapping_key: bytes, wrapped_key: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ... +def aes_key_unwrap_with_padding(wrapping_key: bytes, wrapped_key: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ... class InvalidUnwrap(Exception): ... diff --git a/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyi b/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyi index d903ae47e..107d06210 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyi @@ -1,3 +1,3 @@ -from typing import Optional +from typing import Any, Optional -def load_key_and_certificates(data: bytes, password: Optional[bytes], backend): ... +def load_key_and_certificates(data: bytes, password: Optional[bytes], backend: Optional[Any] = ...): ... diff --git a/third_party/2and3/cryptography/x509.pyi b/third_party/2and3/cryptography/x509.pyi index 362a4bdc6..55333f8f6 100644 --- a/third_party/2and3/cryptography/x509.pyi +++ b/third_party/2and3/cryptography/x509.pyi @@ -114,7 +114,7 @@ class Name(object): def __iter__(self) -> Generator[NameAttribute, None, None]: ... def __len__(self) -> int: ... def get_attributes_for_oid(self, oid: ObjectIdentifier) -> List[NameAttribute]: ... - def public_bytes(self, backend: X509Backend) -> bytes: ... + def public_bytes(self, backend: Optional[X509Backend] = ...) -> bytes: ... def rfc4514_string(self) -> str: ... class Version(Enum): @@ -163,7 +163,7 @@ class CertificateBuilder(object): self, private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: Optional[HashAlgorithm], - backend: X509Backend, + backend: Optional[X509Backend] = ..., ) -> Certificate: ... def subject_name(self, name: Name) -> CertificateBuilder: ... @@ -197,7 +197,7 @@ class CertificateRevocationListBuilder(object): self, private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: Optional[HashAlgorithm], - backend: X509Backend, + backend: Optional[X509Backend] = ..., ) -> CertificateRevocationList: ... class CertificateSigningRequest(metaclass=ABCMeta): @@ -220,7 +220,7 @@ class CertificateSigningRequestBuilder(object): self, private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey], algorithm: Optional[HashAlgorithm], - backend: X509Backend, + backend: Optional[X509Backend] = ..., ) -> CertificateSigningRequest: ... class RevokedCertificate(metaclass=ABCMeta): @@ -230,7 +230,7 @@ class RevokedCertificate(metaclass=ABCMeta): class RevokedCertificateBuilder(object): def add_extension(self, extension: ExtensionType, critical: bool) -> RevokedCertificateBuilder: ... - def build(self, backend: X509Backend) -> RevokedCertificate: ... + def build(self, backend: Optional[X509Backend] = ...) -> RevokedCertificate: ... def revocation_date(self, time: datetime.datetime) -> RevokedCertificateBuilder: ... def serial_number(self, serial_number: int) -> RevokedCertificateBuilder: ... @@ -296,10 +296,10 @@ class SubjectAlternativeName(ExtensionType): def __iter__(self) -> Generator[GeneralName, None, None]: ... def get_values_for_type(self, type: Type[GeneralName]) -> List[Any]: ... -def load_der_x509_certificate(data: bytes, backend: X509Backend) -> Certificate: ... -def load_pem_x509_certificate(data: bytes, backend: X509Backend) -> Certificate: ... -def load_der_x509_crl(data: bytes, backend: X509Backend) -> CertificateRevocationList: ... -def load_pem_x509_crl(data: bytes, backend: X509Backend) -> CertificateRevocationList: ... -def load_der_x509_csr(data: bytes, backend: X509Backend) -> CertificateSigningRequest: ... -def load_pem_x509_csr(data: bytes, backend: X509Backend) -> CertificateSigningRequest: ... +def load_der_x509_certificate(data: bytes, backend: Optional[X509Backend] = ...) -> Certificate: ... +def load_pem_x509_certificate(data: bytes, backend: Optional[X509Backend] = ...) -> Certificate: ... +def load_der_x509_crl(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateRevocationList: ... +def load_pem_x509_crl(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateRevocationList: ... +def load_der_x509_csr(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateSigningRequest: ... +def load_pem_x509_csr(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateSigningRequest: ... def __getattr__(name: str) -> Any: ... # incomplete