3 from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKeyWithSerialization
4 from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKeyWithSerialization
5 from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKeyWithSerialization
6 from cryptography.hazmat.primitives.serialization import KeySerializationEncryption
7 from cryptography.x509 import Certificate
9 def load_key_and_certificates(
10 data: bytes, password: bytes | None, backend: Any | None = ...
11 ) -> tuple[Any | None, Certificate | None, list[Certificate]]: ...
12 def serialize_key_and_certificates(
14 key: RSAPrivateKeyWithSerialization | EllipticCurvePrivateKeyWithSerialization | DSAPrivateKeyWithSerialization,
15 cert: Certificate | None,
16 cas: list[Certificate] | None,
17 enc: KeySerializationEncryption,