mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 22:08:07 -04:00
Fix expand certs regression (#4053)
* Fix expand certs regression * also pass new domains to renew_hook
This commit is contained in:
parent
aaa732d8f3
commit
e0d112f5fb
2 changed files with 6 additions and 4 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue