# `letsencrypt.plugins.common`

Plugin common functions.

`letsencrypt.plugins.common.``option_namespace`(name)

  ArgumentParser options namespace (prefix of all options).

`letsencrypt.plugins.common.``dest_namespace`(name)

  ArgumentParser dest namespace (prefix of all destinations).

class `letsencrypt.plugins.common.``Plugin`(config, name)

  Bases: `object`

  Generic plugin.

  classmethod `add_parser_arguments`(add)

    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.

    NOTE: if you add argpase arguments such that users setting them can create a config entry that python’s bool() would consider false (ie, the use might set the variable to “”, [], 0, etc), please ensure that cli._set_by_cli() works for your variable.

  classmethod `inject_parser_options`(parser, name)

    Inject parser options.

    See `inject_parser_options` for docs.

  `option_namespace`

    ArgumentParser options namespace (prefix of all options).

  `option_name`(name)

    Option name (include plugin namespace).

  `dest_namespace`

    ArgumentParser dest namespace (prefix of all destinations).

  `dest`(var)

    Find a destination for given variable `var`.

  `conf`(var)

    Find a configuration value for variable `var`.

class `letsencrypt.plugins.common.``Addr`(tup)

  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)

    Initialize Addr from string.

  `get_addr`()

    Return addr part of Addr object.

  `get_port`()

    Return port.

  `get_addr_obj`(port)

    Return new address object with same addr and new port.

class `letsencrypt.plugins.common.``TLSSNI01`(configurator)

  Bases: `object`

  Abstract base for TLS-SNI-01 challenge performers

  `add_chall`(achall, idx=None)

    Add challenge to TLSSNI01 object to perform at once.

    Parameters:

    - achall (KeyAuthorizationAnnotatedChallenge) – Annotated TLSSNI01 challenge.
    - idx (int) – index to challenge in a larger array

  `get_cert_path`(achall)

    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)

    Get standardized path to challenge key.

  `_setup_challenge_cert`(achall, cert_key=None)

    Generate and write out challenge certificate.

`letsencrypt.plugins.common.``setup_ssl_options`(config_dir, src, dest)

  Move the ssl_options into position and return the path.

`letsencrypt.plugins.common.``dir_setup`(test_dir, pkg)

  Setup the directories necessary for the configurator.