pki.models.issuing_caΒΆ
Module that contains the IssuingCaModel.
ClassesΒΆ
Issuing CA Model. |
Module ContentsΒΆ
- class pki.models.issuing_ca.IssuingCaModel(*args, **kwargs)[source]ΒΆ
Bases:
trustpoint.logger.LoggerMixin,util.db.CustomDeleteActionModelIssuing CA Model.
This model contains the configurations of all Issuing CAs available within the Trustpoint.
- class IssuingCaTypeChoice(*args, **kwds)[source]ΒΆ
Bases:
django.db.models.IntegerChoicesThe IssuingCaTypeChoice defines the type of Issuing CA.
Depending on the type other fields may be set, e.g. a credential will only be available for local Issuing CAs.
- credential: pki.models.credential.CredentialModel[source]ΒΆ
- __str__()[source]ΒΆ
Returns a human-readable string that represents this IssuingCaModel entry.
- Returns:
Human-readable string that represents this IssuingCaModel entry.
- Return type:
str
- __repr__()[source]ΒΆ
Returns a string representation of the IssuingCaModel instance.
- Return type:
str
- classmethod create_new_issuing_ca(unique_name, credential_serializer, issuing_ca_type)[source]ΒΆ
Creates a new Issuing CA model and returns it.
- Parameters:
unique_name (str) β The unique name that will be used to identify the Issuing CA.
credential_serializer (trustpoint_core.serializer.CredentialSerializer) β The credential as CredentialSerializer instance. It will be normalized and validated, if it is a valid credential to be used as an Issuing CA.
issuing_ca_type (IssuingCaModel) β The Issuing CA type.
- Returns:
The newly created Issuing CA model.
- Return type:
- property signature_suite: trustpoint_core.oid.SignatureSuite[source]ΒΆ
The signature suite for the CA public key certificate.
- Return type:
trustpoint_core.oid.SignatureSuite
- property public_key_info: trustpoint_core.oid.PublicKeyInfo[source]ΒΆ
The public key info for the CA certificateβs public key.
- Return type:
trustpoint_core.oid.PublicKeyInfo
- get_issued_certificates()[source]ΒΆ
Returns certificates issued by this CA, except its own in case of a self-signed CA.
This goes through all active certificates and checks issuance by this CA based on cert.issuer_public_bytes == ca.subject_public_bytes WARNING: This means that it may inadvertently return certificates that were issued by a different CA with the same subject name
- Return type:
django.db.models.query.QuerySet[pki.models.certificate.CertificateModel, pki.models.certificate.CertificateModel]
- revoke_all_issued_certificates(reason=RevokedCertificateModel.ReasonCode.UNSPECIFIED)[source]ΒΆ
Revokes all certificates issued by this CA.
- Parameters:
reason (str)
- Return type:
None