From d290cd36d59f0b922b0ab9f6effbd4acde2289ca Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sat, 12 Dec 2015 12:18:01 -0800 Subject: [PATCH 1/3] Correct typo --- letsencrypt/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index ca92595d7..4cf27aa81 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -400,7 +400,7 @@ def _avoid_invalidating_lineage(config, lineage, original_server): if not config.break_my_certs: names = ", ".join(lineage.names()) raise errors.Error( - "You've asked to renew/replace a valid certificiate with " + "You've asked to renew/replace a valid certificate with " "a test certificate (domains: {0}). We will not do that " "unless you use the --break-my-certs flag!".format(names)) From 411b5093e972edf532a3845e16093f42c0aebfc0 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sat, 12 Dec 2015 12:23:16 -0800 Subject: [PATCH 2/3] Add parallel --reinstall command-line flag --- letsencrypt/cli.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 4cf27aa81..c4e0dd2de 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -252,7 +252,13 @@ def _handle_identical_cert_request(config, cert): """ if config.renew_by_default or cert.should_autorenew(interactive=True): + # Set with --renew-by-default, force an identical certificate to + # be renewed without further prompting. return "renew", cert + if config.reinstall: + # Set with --reinstall, force an identical certificate to be + # reinstalled without further prompting. + return "reinstall", cert display = zope.component.getUtility(interfaces.IDisplay) question = ( "You have an existing certificate that contains exactly the same " @@ -943,6 +949,9 @@ def prepare_and_parse_args(plugins, args): helpful.add( None, "--duplicate", dest="duplicate", action="store_true", help="Allow getting a certificate that duplicates an existing one") + helpful.add( + None, "--reinstall", dest="reinstall", action="store_true", + help="Try to reinstall an existing certificate without prompting") helpful.add_group( "automation", From 0e19f43757eb90189cdfc72dc996ec2f1c06863d Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Sat, 12 Dec 2015 12:35:28 -0800 Subject: [PATCH 3/3] Let's not blame the user in the cancel message --- letsencrypt/cli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index c4e0dd2de..3cf01d3c1 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -273,8 +273,8 @@ def _handle_identical_cert_request(config, cert): # TODO: Add notification related to command-line options for # skipping the menu for this case. raise errors.Error( - "User did not use proper CLI and would like " - "to reinvoke the client.") + "User chose to cancel the operation and may " + "reinvoke the client.") elif response[1] == 0: return "reinstall", cert elif response[1] == 1: @@ -317,8 +317,8 @@ def _handle_subset_cert_request(config, domains, cert): ), reporter_util.HIGH_PRIORITY) raise errors.Error( - "User did not use proper CLI and would like " - "to reinvoke the client.") + "User chose to cancel the operation and may " + "reinvoke the client.") def _report_new_cert(cert_path, fullchain_path):