1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-21 19:01:07 +03:00

Merge remote-tracking branch 'github/letsencrypt/master' into cli-config-fixes

Conflicts:
	letsencrypt/cli.py
	letsencrypt/constants.py
	letsencrypt/interfaces.py
This commit is contained in:
Jakub Warmuz
2015-05-29 07:42:24 +00:00
4 changed files with 20 additions and 2 deletions

View File

@@ -340,6 +340,9 @@ def _paths_parser(parser):
add("--cert-dir", default=flag_default("certs_dir"),
help=config_help("cert_dir"))
add("--renewer-config-file", default=flag_default("renewer_config_file"),
help=config_help("renewer_config_file"))
return parser

View File

@@ -185,8 +185,19 @@ class Client(object):
authenticator).name
if installer is not None:
self.config.namespace.installer = plugins.find_init(installer).name
return storage.RenewableCert.new_lineage(
domains[0], cert, privkey, chain, vars(self.config.namespace))
# XXX: We clearly need a more general and correct way of getting
# options into the configobj for the RenewableCert instance.
# This is a quick-and-dirty way to do it to allow integration
# testing to start. (Note that the config parameter to new_lineage
# ideally should be a ConfigObj, but in this case a dict will be
# accepted in practice.)
params = vars(self.config.namespace)
config = {"renewer_config_file":
params["renewer_config_file"]} if "renewer_config_file" in params else None
return storage.RenewableCert.new_lineage(domains[0], cert, privkey,
chain, params, config)
def save_certificate(self, certr, cert_path, chain_path):
# pylint: disable=no-self-use

View File

@@ -25,6 +25,7 @@ CLI_DEFAULTS = dict(
certs_dir=_CLI_DEFAULT_CERT_DIR,
cert_path=os.path.join(_CLI_DEFAULT_CERT_DIR, "cert-letsencrypt.pem"),
chain_path=os.path.join(_CLI_DEFAULT_CERT_DIR, "chain-letsencrypt.pem"),
renewer_config_file=os.path.join(_CLI_DEFAULT_CONFIG_DIR, "renewer.conf"),
test_mode=False,
)
"""Defaults for CLI flags and `.IConfig` attributes."""

View File

@@ -174,6 +174,9 @@ class IConfig(zope.interface.Interface):
key_dir = zope.interface.Attribute("Keys storage.")
cert_dir = zope.interface.Attribute("Certificates and CSRs storage.")
renewer_config_file = zope.interface.Attribute(
"Location of renewal configuration file.")
test_mode = zope.interface.Attribute(
"Test mode. Disables certificate verification.")