commands.create_multiple_test_issuing_cas ========================================= .. py:module:: commands.create_multiple_test_issuing_cas .. autoapi-nested-parse:: Django management command for adding issuing CA test data. Module Contents --------------- .. py:class:: Command(stdout=None, stderr=None, no_color=False, force_color=False) Bases: :py:obj:`commands.base_commands.CertificateCreationCommandMixin`, :py:obj:`django.core.management.base.BaseCommand`, :py:obj:`trustpoint.logger.LoggerMixin` Adds a Root CA, Intermediate CAs, and Issuing CAs to the database. .. py:attribute:: help :value: 'Adds a Root CA, Intermediate CAs, and Issuing CAs to the database.' .. py:method:: log_and_stdout(message, level = 'info') Log a message and write it to stdout. :param message: The message to log and print. :type message: str :param level: The logging level ('info', 'warning', 'error', etc.). :type level: str .. py:method:: get_ca_type_from_storage_config() Determine the CA type based on the crypto storage configuration. :returns: The appropriate CA type. :rtype: CaModel.CaTypeChoice .. py:method:: generate_empty_crl(ca_cert, private_key, hash_algorithm = hashes.SHA256(), crl_validity_hours = 2400) Generate an empty CRL for a CA. :param ca_cert: The CA certificate. :param private_key: The private key of the CA. :param hash_algorithm: The hash algorithm to use. :param crl_validity_hours: Validity period in hours. :returns: The CRL in PEM format. :rtype: str .. py:method:: verify_ca_certificate(ca_cert, issuer_cert = None, ca_name = 'CA') Verify a CA certificate against its issuer. :param ca_cert: The CA certificate to verify. :param issuer_cert: The issuer CA certificate (for chain verification). :param ca_name: Name of the CA for logging purposes. :returns: True if verification succeeds, False otherwise. :rtype: bool .. py:method:: handle(*_args, **_kwargs) Adds a Root CA and three issuing CAs to the database.