mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 00:22:04 +02:00
Fix expand certs regression (#4053)
* Fix expand certs regression * also pass new domains to renew_hook
This commit is contained in:
committed by
Brad Warren
parent
aaa732d8f3
commit
e0d112f5fb
+1
-1
@@ -100,7 +100,7 @@ def _auth_from_available(le_client, config, domains=None, certname=None, lineage
|
|||||||
try:
|
try:
|
||||||
if action == "renew":
|
if action == "renew":
|
||||||
logger.info("Renewing an existing certificate")
|
logger.info("Renewing an existing certificate")
|
||||||
renewal.renew_cert(config, le_client, lineage)
|
renewal.renew_cert(config, domains, le_client, lineage)
|
||||||
elif action == "newcert":
|
elif action == "newcert":
|
||||||
# TREAT AS NEW REQUEST
|
# TREAT AS NEW REQUEST
|
||||||
logger.info("Obtaining a new certificate")
|
logger.info("Obtaining a new certificate")
|
||||||
|
|||||||
+5
-3
@@ -263,12 +263,14 @@ def _avoid_invalidating_lineage(config, lineage, original_server):
|
|||||||
"unless you use the --break-my-certs flag!".format(names))
|
"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."
|
"Renew a certificate lineage."
|
||||||
renewal_params = lineage.configuration["renewalparams"]
|
renewal_params = lineage.configuration["renewalparams"]
|
||||||
original_server = renewal_params.get("server", cli.flag_default("server"))
|
original_server = renewal_params.get("server", cli.flag_default("server"))
|
||||||
_avoid_invalidating_lineage(config, lineage, original_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:
|
if config.dry_run:
|
||||||
logger.debug("Dry run: skipping updating lineage at %s",
|
logger.debug("Dry run: skipping updating lineage at %s",
|
||||||
os.path.dirname(lineage.cert))
|
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.save_successor(prior_version, new_cert, new_key.pem, new_chain, config)
|
||||||
lineage.update_all_links_to(lineage.latest_common_version())
|
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):
|
def report(msgs, category):
|
||||||
|
|||||||
Reference in New Issue
Block a user