signer.models

Contains Models For Signers App.

Classes

SignerModel

Contains fields for signer model.

SignedMessageModel

Model to store signed messages, its signature and certificate(with public key).

Module Contents

class signer.models.SignerModel(*args, **kwargs)[source]

Bases: util.db.CustomDeleteActionModel

Contains fields for signer model.

unique_name[source]
credential[source]
is_active[source]
created_at[source]
updated_at[source]
__str__()[source]

To represent the signer object with its unique name.

Returns: Give out signer objects unique name.

Return type:

str

property common_name: str[source]

Returns common name.

Return type:

str

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

property hash_algorithm: str[source]

Returns the hash algorithm name used by this signer’s certificate.

Return type:

str

classmethod create_new_signer(unique_name, credential_serializer)[source]

Create a new SignerModel instance.

Parameters:
  • unique_name (str)

  • credential_serializer (trustpoint_core.serializer.CredentialSerializer)

Return type:

SignerModel

class signer.models.SignedMessageModel(*args, **kwargs)[source]

Bases: django.db.models.Model

Model to store signed messages, its signature and certificate(with public key).

signer[source]
hash_value[source]
signature[source]
created_at[source]
__str__()[source]

String representation of SignedMessage object.

Returns: String formated name of signer and when it was signed.

Return type:

str