pdftools_sdk.crypto.providers.swisscom_sig_srv.session

Classes

Session(url, http_client_handler)

The Swisscom Signing Service

class pdftools_sdk.crypto.providers.swisscom_sig_srv.session.Session(url: str, http_client_handler: HttpClientHandler)[source]

Bases: Provider

The Swisscom Signing Service

When signing with this provider, these errors can occur:

When signing with step-up authorization, these errors can also occur.

__init__(url: str, http_client_handler: HttpClientHandler)[source]
Parameters:
Raises:
create_signature_for_static_identity(identity: str, name: str) SignatureConfiguration[source]

Create a signature configuration for a static certificate.

Parameters:
  • identity (str) –

    The Claimed Identity string as provided by Swisscom: ‹customer name›:‹key identity›

    Example: “ais-90days-trial:static-saphir4-ch”

  • name (str) –

    Name of the signer. This parameter is not used for certificate selection, but for the signature appearance and signature description in the PDF only.

    Example: “Signing Service TEST account”

Return type:

pdftools_sdk.crypto.providers.swisscom_sig_srv.signature_configuration.SignatureConfiguration

create_signature_for_on_demand_identity(identity: str, distinguished_name: str, step_up: StepUp | None) SignatureConfiguration[source]

Create a signature configuration for an on-demand certificate

Parameters:
  • identity (str) –

    The Claimed Identity string as provided by Swisscom: ‹customer name›:‹key identity›

    Example: “ais-90days-trial:OnDemand-Advanced4”

  • distinguishedName (str) –

    The requested distinguished name of the on-demand certificate.

    Example: “cn=Hans Muster,o=ACME,c=CH”

  • stepUp (Optional[pdftools_sdk.crypto.providers.swisscom_sig_srv.step_up.StepUp]) – Options for step-up authorization using Mobile ID.

Return type:

pdftools_sdk.crypto.providers.swisscom_sig_srv.signature_configuration.SignatureConfiguration

create_timestamp(identity: str) TimestampConfiguration[source]

Create a time-stamp configuration

Parameters:

identity (str) –

The Claimed Identity string as provided by Swisscom: ‹customer name›

Example: “ais-90days-trial”

Return type:

pdftools_sdk.crypto.providers.swisscom_sig_srv.timestamp_configuration.TimestampConfiguration