signer
- class satcfdi.models.signer.Signer(certificate: X509, key: RSAPrivateKey, check=True)[source]
Bases:
Certificate- classmethod load(certificate: bytes, key: bytes, password: str | bytes = None, check=True) Signer[source]
- key_bytes(password: str | bytes = None, encoding: ~cryptography.hazmat.primitives._serialization.Encoding = <Encoding.DER: 'DER'>) bytes[source]
Returns the private key in bytes
- Parameters:
password (str | bytes, optional) – The password to decrypt the private key. Defaults to None.
encoding (cryptography.hazmat.primitives.serialization.Encoding, optional) – The encoding format of the private key. Defaults to “DER”.
- Raises:
ValueError – If the encoding is not “DER” or “PEM”
- Returns:
The private key in bytes
- Return type:
bytes