letsencrypt.plugins.common

Plugin common functions.

letsencrypt.plugins.common.option_namespace(name)[source]

ArgumentParser options namespace (prefix of all options).

letsencrypt.plugins.common.dest_namespace(name)[source]

ArgumentParser dest namespace (prefix of all destinations).

class letsencrypt.plugins.common.Plugin(config, name)[source]

Bases: object

Generic plugin.

option_namespace

ArgumentParser options namespace (prefix of all options).

option_name(name)[source]

Option name (include plugin namespace).

dest_namespace

ArgumentParser dest namespace (prefix of all destinations).

dest(var)[source]

Find a destination for given variable var.

conf(var)[source]

Find a configuration value for variable var.

classmethod inject_parser_options(parser, name)[source]

Inject parser options.

See inject_parser_options for docs.

classmethod add_parser_arguments(add)[source]

Add plugin arguments to the CLI argument parser.

Parameters:add (callable) – Function that proxies calls to argparse.ArgumentParser.add_argument prepending options with unique plugin name prefix.
class letsencrypt.plugins.common.Addr(tup)[source]

Bases: object

Represents an virtual host address.

Parameters:
  • addr (str) – addr part of vhost address
  • port (str) – port number or *, or “”
classmethod fromstring(str_addr)[source]

Initialize Addr from string.

get_addr()[source]

Return addr part of Addr object.

get_port()[source]

Return port.

get_addr_obj(port)[source]

Return new address object with same addr and new port.

class letsencrypt.plugins.common.TLSSNI01(configurator)[source]

Bases: object

Abstract base for TLS-SNI-01 challenge performers

add_chall(achall, idx=None)[source]

Add challenge to TLSSNI01 object to perform at once.

Parameters:
get_cert_path(achall)[source]

Returns standardized name for challenge certificate.

Parameters:achall (KeyAuthorizationAnnotatedChallenge) – Annotated tls-sni-01 challenge.
Returns:certificate file name
Return type:str
get_key_path(achall)[source]

Get standardized path to challenge key.

_setup_challenge_cert(achall, cert_key=None)[source]

Generate and write out challenge certificate.

letsencrypt.plugins.common.setup_ssl_options(config_dir, src, dest)[source]

Move the ssl_options into position and return the path.

letsencrypt.plugins.common.dir_setup(test_dir, pkg)[source]

Setup the directories necessary for the configurator.