certbot_nginx.tls_sni_01

A class that performs TLS-SNI-01 challenges for Nginx

class certbot_nginx.tls_sni_01.NginxTlsSni01(configurator)[source]

Bases: certbot.plugins.common.TLSSNI01

TLS-SNI-01 authenticator for Nginx

Variables:
  • configurator – NginxConfigurator object
  • achalls (list) – Annotated class:KeyAuthorizationAnnotatedChallenge challenges
Parameters:
  • indices (list) – Meant to hold indices of challenges in a larger array. NginxTlsSni01 is capable of solving many challenges at once which causes an indexing issue within NginxConfigurator who must return all responses in order. Imagine NginxConfigurator maintaining state about where all of the http-01 Challenges, TLS-SNI-01 Challenges belong in the response array. This is an optional utility.
  • challenge_conf (str) – location of the challenge config file
perform()[source]

Perform a challenge on Nginx.

Returns:list of certbot.acme.challenges.TLSSNI01Response
Return type:list
_mod_config(ll_addrs)[source]

Modifies Nginx config to include challenge server blocks.

Parameters:ll_addrs (list) – list of lists of certbot_nginx.obj.Addr to apply
Raises:MisconfigurationError – Unable to find a suitable HTTP block in which to include authenticator hosts.
_make_server_block(achall, addrs)[source]

Creates a server block for a challenge.

Parameters:
  • achall (certbot.achallenges.KeyAuthorizationAnnotatedChallenge) – Annotated TLS-SNI-01 challenge
  • addrs (list) – addresses of challenged domain list of type Addr
Returns:

server block for the challenge host

Return type:

list