txacme.interfaces module

Interface definitions for txacme.

interface txacme.interfaces.IResponder

Configuration for a ACME challenge responder.

The actual responder may exist somewhere else, this interface is merely for an object that knows how to configure it.

challenge_type

The type of challenge this responder is able to respond for.

Must correspond to one of the types from acme.challenges; for example, u'tls-sni-01'.

stop_responding(server_name, challenge, response)

Stop responding for a particular challenge.

May be a noop if a particular responder does not need or implement explicit cleanup; implementations should not rely on this method always being called.

Parameters:
  • server_name (str) – The server name for which the challenge is being completed.
  • challenge – The acme.challenges challenge object; the exact type of this object depends on the challenge type.
  • response – The acme.challenges response object; the exact type of this object depends on the challenge type.
start_responding(server_name, challenge, response)

Start responding for a particular challenge.

Parameters:
  • server_name (str) – The server name for which the challenge is being completed.
  • challenge – The acme.challenges challenge object; the exact type of this object depends on the challenge type.
  • response – The acme.challenges response object; the exact type of this object depends on the challenge type.
Return type:

Deferred

Returns:

A deferred firing when the challenge is ready to be verified.

interface txacme.interfaces.ICertificateStore

A store of certificate/keys/chains.

as_dict(self)

Get all certificates in the store.

Return type:Deferred[Dict[str, List[:ref:`pem-objects`]]]
Returns:A deferred firing with a dict mapping server names to PEM Objects.
store(self, server_name, pem_objects)

Store PEM objects for the given server name.

Implementations do not have to permit invoking this with a server name that was not already present in the store.

Parameters:
  • server_name (str) – The server name to update.
  • pem_objects – A list of PEM Objects; must contain exactly one private key, a certificate corresponding to that private key, and zero or more chain certificates.
Return type:

Deferred

get(self, server_name)[source]

Retrieve the current PEM objects for the given server name.

Parameters:server_name (str) – The server name.
Raises:KeyError – if the given name does not exist in the store.
Returns:Deferred[List[:ref:`pem-objects`]]