openfl.cryptography.ca.sign_certificate

openfl.cryptography.ca.sign_certificate#

openfl.cryptography.ca.sign_certificate(csr, issuer_private_key, issuer_name, days_to_expiration=365, ca=False)[source]#

Sign a incoming Certificate Signing Request (CSR) with the issuer’s private key.

Parameters:
  • csr (CertificateSigningRequest) – The CSR to be signed.

  • issuer_private_key (RSAPrivateKey) – Root CA private key if the request is for the signing CA; Signing CA private key otherwise.

  • issuer_name (Name) – The name of the issuer.

  • days_to_expiration (int, optional) – The number of days until the certificate expires. Defaults to 365.

  • ca (bool, optional) – Whether the certificate is for a certificate authority (CA). Defaults to False.

Returns:

The signed certificate.

Return type:

Certificate