Generator
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
provide.foundation.crypto.certificates.generator
¶
Classes¶
Functions¶
generate_certificate
¶
generate_certificate(
common_name: str,
organization_name: str,
validity_days: int,
key_type: str = DEFAULT_CERTIFICATE_KEY_TYPE,
key_size: int = DEFAULT_RSA_KEY_SIZE,
ecdsa_curve: str = DEFAULT_CERTIFICATE_CURVE,
alt_names: list[str] | None = None,
is_ca: bool = False,
is_client_cert: bool = False,
) -> tuple[
CertificateBase, x509.Certificate, KeyPair, str, str
]
Generate a new certificate with a keypair.
Returns:
| Type | Description |
|---|---|
tuple[CertificateBase, Certificate, KeyPair, str, str]
|
Tuple of (CertificateBase, X509Certificate, private_key, cert_pem, key_pem) |