diff options
author | Brad Warren <bmw@users.noreply.github.com> | 2017-01-14 02:36:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-14 02:36:51 +0300 |
commit | 7dcb8688b043d15645596466de460ccaaf5e6665 (patch) | |
tree | e00d0ec24500085792bfb89515cb259250155560 | |
parent | 68170e9c2fb2f3b9673a62509bbb9de7b8d8c0c7 (diff) |
Fix expand certs regression (#4053) (#4055)
* Fix expand certs regression
* also pass new domains to renew_hook
(cherry picked from commit e0d112f5fb879e14dbd08829d83a838b6c9989c4)
-rw-r--r-- | certbot/main.py | 2 | ||||
-rw-r--r-- | certbot/renewal.py | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/certbot/main.py b/certbot/main.py index 91b860dbb..c51596258 100644 --- a/certbot/main.py +++ b/certbot/main.py @@ -100,7 +100,7 @@ def _auth_from_available(le_client, config, domains=None, certname=None, lineage try: if action == "renew": logger.info("Renewing an existing certificate") - renewal.renew_cert(config, le_client, lineage) + renewal.renew_cert(config, domains, le_client, lineage) elif action == "newcert": # TREAT AS NEW REQUEST logger.info("Obtaining a new certificate") diff --git a/certbot/renewal.py b/certbot/renewal.py index d65cd4904..bd07cfd07 100644 --- a/certbot/renewal.py +++ b/certbot/renewal.py @@ -263,12 +263,14 @@ def _avoid_invalidating_lineage(config, lineage, original_server): "unless you use the --break-my-certs flag!".format(names)) -def renew_cert(config, le_client, lineage): +def renew_cert(config, domains, le_client, lineage): "Renew a certificate lineage." renewal_params = lineage.configuration["renewalparams"] original_server = renewal_params.get("server", cli.flag_default("server")) _avoid_invalidating_lineage(config, lineage, original_server) - new_certr, new_chain, new_key, _ = le_client.obtain_certificate(lineage.names()) + if not domains: + domains = lineage.names() + new_certr, new_chain, new_key, _ = le_client.obtain_certificate(domains) if config.dry_run: logger.debug("Dry run: skipping updating lineage at %s", os.path.dirname(lineage.cert)) @@ -281,7 +283,7 @@ def renew_cert(config, le_client, lineage): lineage.save_successor(prior_version, new_cert, new_key.pem, new_chain, config) lineage.update_all_links_to(lineage.latest_common_version()) - hooks.renew_hook(config, lineage.names(), lineage.live_dir) + hooks.renew_hook(config, domains, lineage.live_dir) def report(msgs, category): |