help_pages.baseΒΆ

This module contains classes and functions used by all help pages.

ClassesΒΆ

HelpPageStrategy

Abstract base class for help page strategies.

HelpContext

Holds shared context data.

FunctionsΒΆ

build_keygen_section(help_context, file_name)

Builds the key-generation section.

build_profile_select_section(app_cert_profiles)

Builds the profile select section.

build_tls_trust_store_section()

Builds the TLS trust-store section.

build_cmp_signer_trust_store_section(domain)

Builds the CMP-signer trust-store section.

build_issuing_ca_cert_section(domain)

Builds the Issuing CA Certificate section.

build_extract_files_from_p12_section()

Builds the extract files form P12 section.

Module ContentsΒΆ

class help_pages.base.HelpPageStrategy[source]ΒΆ

Bases: abc.ABC

Abstract base class for help page strategies.

abstractmethod build_sections(help_context)[source]ΒΆ

Builds the required sections.

Parameters:

help_context (HelpContext)

Return type:

tuple[list[help_pages.help_section.HelpSection], str]

class help_pages.base.HelpContext[source]ΒΆ

Holds shared context data.

domain: pki.models.domain.DomainModel[source]ΒΆ
domain_unique_name: str[source]ΒΆ
allowed_app_profiles: list[pki.models.domain.DomainAllowedCertificateProfileModel][source]ΒΆ
public_key_info: trustpoint_core.oid.PublicKeyInfo[source]ΒΆ
host_base: str[source]ΒΆ
host_cmp_path: str[source]ΒΆ
host_est_path: str[source]ΒΆ
cred_count: int[source]ΒΆ
device: None | devices.models.DeviceModel = None[source]ΒΆ
devid_registration: None | pki.models.DevIdRegistration = None[source]ΒΆ
get_device_or_http_404()[source]ΒΆ

Gets the device or throws an HTTP404 error.

Raises:

Http404 – If the device does not exist.

Returns:

The DeviceModel.

Return type:

devices.models.DeviceModel

get_devid_registration_or_http_404()[source]ΒΆ

Gets the DevidRegistration or throws an HTTP404 error.

Raises:

Http404 – If the DevidRegistration does not exist.

Returns:

The DevidRegistration.

Return type:

pki.models.DevIdRegistration

help_pages.base.build_keygen_section(help_context, file_name)[source]ΒΆ

Builds the key-generation section.

Parameters:
  • help_context (HelpContext) – The help context which will

  • file_name (str) – The file_name to use if the default shall not be used. Defaults to None.

Returns:

The key-generation section.

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_profile_select_section(app_cert_profiles)[source]ΒΆ

Builds the profile select section.

Returns:

The profile select section.

Parameters:

app_cert_profiles (list[pki.models.domain.DomainAllowedCertificateProfileModel])

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_tls_trust_store_section()[source]ΒΆ

Builds the TLS trust-store section.

Raises:

Http404 – If no active Trustpoint TLS-server credential is found or the root CA cert is missing.

Returns:

The TLS trust-store section.

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_cmp_signer_trust_store_section(domain)[source]ΒΆ

Builds the CMP-signer trust-store section.

Returns:

The CMP-signer trust-store section.

Parameters:

domain (pki.models.domain.DomainModel)

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_issuing_ca_cert_section(domain)[source]ΒΆ

Builds the Issuing CA Certificate section.

Returns:

The Issuing CA Certificate section.

Parameters:

domain (pki.models.domain.DomainModel)

Return type:

help_pages.help_section.HelpSection

help_pages.base.build_extract_files_from_p12_section()[source]ΒΆ

Builds the extract files form P12 section.

Returns:

The extract files form P12 section.

Return type:

help_pages.help_section.HelpSection