mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 00:22:28 +02:00
Add --dry-run support when renewing a lineage
This commit is contained in:
+2
-1
@@ -404,6 +404,7 @@ def _auth_from_domains(le_client, config, domains):
|
||||
# https://github.com/letsencrypt/letsencrypt/pull/777/files#r40498574
|
||||
new_certr, new_chain, new_key, _ = le_client.obtain_certificate(domains)
|
||||
# TODO: Check whether it worked! <- or make sure errors are thrown (jdk)
|
||||
if not config.dry_run:
|
||||
lineage.save_successor(
|
||||
lineage.latest_common_version(), OpenSSL.crypto.dump_certificate(
|
||||
OpenSSL.crypto.FILETYPE_PEM, new_certr.body.wrapped),
|
||||
@@ -419,7 +420,7 @@ def _auth_from_domains(le_client, config, domains):
|
||||
if lineage is False:
|
||||
raise errors.Error("Certificate could not be obtained")
|
||||
|
||||
if lineage is not None:
|
||||
if not config.dry_run:
|
||||
_report_new_cert(lineage.cert, lineage.fullchain)
|
||||
|
||||
return lineage, action
|
||||
|
||||
Reference in New Issue
Block a user