commands.create_and_validate_test_certs¶
Management command to create some certificates for testing and verifying them using OpenSSL.
Classes¶
Creates a certificate chain and validates it uing OpenSSL. |
Module Contents¶
- class commands.create_and_validate_test_certs.Command(stdout=None, stderr=None, no_color=False, force_color=False)[source]¶
Bases:
commands.base_commands.CertificateCreationCommandMixin,django.core.management.base.BaseCommandCreates a certificate chain and validates it uing OpenSSL.
- _create_cert_chain(algorithm, path)[source]¶
- Parameters:
algorithm (trustpoint_core.oid.PublicKeyInfo)
path (pathlib.Path)
- Return type:
None
- classmethod _create_certificate(common_name, algorithm, path, issuer=None, issuer_priv_key=None, validity_days=365)[source]¶
- Parameters:
common_name (str)
algorithm (trustpoint_core.oid.PublicKeyInfo)
path (pathlib.Path)
issuer (None | cryptography.x509.Certificate)
issuer_priv_key (None | cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey | cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey)
validity_days (int)
- Return type:
tuple[str, cryptography.x509.Certificate, cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey | cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey]