commands.base_commands

Contains common functionality for PKI management commands.

Classes

CertificateCreationCommandMixin

Mixin for management commands that create certificates.

Module Contents

class commands.base_commands.CertificateCreationCommandMixin[source]

Bases: pki.util.x509.CertificateGenerator

Mixin for management commands that create certificates.

classmethod store_issuing_ca(issuing_ca_cert, chain, private_key, filename)[source]

Store the Issuing CA certificate and private key in a PKCS12 file.

Parameters:
  • issuing_ca_cert (cryptography.x509.Certificate)

  • chain (list[cryptography.x509.Certificate])

  • private_key (trustpoint_core.crypto_types.PrivateKey)

  • filename (str)

Return type:

None

static store_ee_certs(certs)[source]

Store the end entity certificates as .pem files.

Parameters:

certs (dict[str, cryptography.x509.Certificate])

Return type:

None

static store_ee_keys(keys)[source]

Store the end entity keys as .pem files.

Parameters:

keys (dict[str, trustpoint_core.crypto_types.PrivateKey])

Return type:

None

static save_ee_certs(certs)[source]

Save the end entity certificates in the database.

Parameters:

certs (dict[str, cryptography.x509.Certificate])

Return type:

None

static create_csr(number)[source]

Create a number of test Certificate Signing Requests.

Parameters:

number (int)

Return type:

None