pki.models.truststoreΒΆ
This module defines models for managing trustpoints, including server credentials and truststores.
ClassesΒΆ
Represents the currently active TLS server credential. |
|
Represents a truststore, which is a collection of certificates used for specific purposes. |
|
Represents the order of certificates in a truststore. |
Module ContentsΒΆ
- class pki.models.truststore.ActiveTrustpointTlsServerCredentialModel(*args, **kwargs)[source]ΒΆ
Bases:
django.db.models.ModelRepresents the currently active TLS server credential.
This model tracks the active server credential, ensuring that it is always up-to-date and linked to a specific CredentialModel instance.
- class pki.models.truststore.TruststoreModel(*args, **kwargs)[source]ΒΆ
Bases:
django.db.models.ModelRepresents a truststore, which is a collection of certificates used for specific purposes.
This model allows organizing certificates into a logical grouping for specific intended usages such as IDevID, TLS, or Generic. Each truststore is identified by a unique name and supports operations like retrieving the number of certificates or serializing its content.
- class IntendedUsage(*args, **kwds)[source]ΒΆ
Bases:
django.db.models.IntegerChoicesIntended Usage of the Truststore.
- certificates: django.db.models.ManyToManyField[pki.models.certificate.CertificateModel, TruststoreOrderModel][source]ΒΆ
- __str__()[source]ΒΆ
Returns a human-readable string representation of the TruststoreModel.
- Return type:
str
- save(**kwargs)[source]ΒΆ
Ensures the model is valid before saving.
- Parameters:
kwargs (Any)
- Return type:
None
- property number_of_certificates: int[source]ΒΆ
Returns the number of certificates in the truststore.
- Return type:
int
- get_certificate_collection_serializer()[source]ΒΆ
Returns a serializer for all certificates in the truststore.
This method gathers all the certificates associated with the truststore, serializes them using CertificateCollectionSerializer, and returns the serialized result.
- Returns:
The serialized representation of the certificates.
- Return type:
trustpoint_core.serializer.CertificateCollectionSerializer