mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 08:08:00 +02:00
Merge branch 'wip-1546' of ssh://github.com/letsencrypt/letsencrypt into 1546
This commit is contained in:
+14
-5
@@ -252,7 +252,13 @@ def _handle_identical_cert_request(config, cert):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
if config.renew_by_default or cert.should_autorenew(interactive=True):
|
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
|
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)
|
display = zope.component.getUtility(interfaces.IDisplay)
|
||||||
question = (
|
question = (
|
||||||
"You have an existing certificate that contains exactly the same "
|
"You have an existing certificate that contains exactly the same "
|
||||||
@@ -267,8 +273,8 @@ def _handle_identical_cert_request(config, cert):
|
|||||||
# TODO: Add notification related to command-line options for
|
# TODO: Add notification related to command-line options for
|
||||||
# skipping the menu for this case.
|
# skipping the menu for this case.
|
||||||
raise errors.Error(
|
raise errors.Error(
|
||||||
"User did not use proper CLI and would like "
|
"User chose to cancel the operation and may "
|
||||||
"to reinvoke the client.")
|
"reinvoke the client.")
|
||||||
elif response[1] == 0:
|
elif response[1] == 0:
|
||||||
return "reinstall", cert
|
return "reinstall", cert
|
||||||
elif response[1] == 1:
|
elif response[1] == 1:
|
||||||
@@ -311,8 +317,8 @@ def _handle_subset_cert_request(config, domains, cert):
|
|||||||
),
|
),
|
||||||
reporter_util.HIGH_PRIORITY)
|
reporter_util.HIGH_PRIORITY)
|
||||||
raise errors.Error(
|
raise errors.Error(
|
||||||
"User did not use proper CLI and would like "
|
"User chose to cancel the operation and may "
|
||||||
"to reinvoke the client.")
|
"reinvoke the client.")
|
||||||
|
|
||||||
|
|
||||||
def _report_new_cert(cert_path, fullchain_path):
|
def _report_new_cert(cert_path, fullchain_path):
|
||||||
@@ -409,7 +415,7 @@ def _avoid_invalidating_lineage(config, lineage, original_server):
|
|||||||
if not config.break_my_certs:
|
if not config.break_my_certs:
|
||||||
names = ", ".join(lineage.names())
|
names = ", ".join(lineage.names())
|
||||||
raise errors.Error(
|
raise errors.Error(
|
||||||
"You've asked to renew/replace a seemingly valid certificiate with "
|
"You've asked to renew/replace a seemingly valid certificate with "
|
||||||
"a test certificate (domains: {0}). We will not do that "
|
"a test certificate (domains: {0}). We will not do that "
|
||||||
"unless you use the --break-my-certs flag!".format(names))
|
"unless you use the --break-my-certs flag!".format(names))
|
||||||
|
|
||||||
@@ -952,6 +958,9 @@ def prepare_and_parse_args(plugins, args):
|
|||||||
helpful.add(
|
helpful.add(
|
||||||
None, "--duplicate", dest="duplicate", action="store_true",
|
None, "--duplicate", dest="duplicate", action="store_true",
|
||||||
help="Allow getting a certificate that duplicates an existing one")
|
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(
|
helpful.add_group(
|
||||||
"automation",
|
"automation",
|
||||||
|
|||||||
Reference in New Issue
Block a user