mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Requested fixes
This commit is contained in:
parent
49b2d4ac07
commit
95a83515be
5 changed files with 12 additions and 8 deletions
|
|
@ -1384,10 +1384,10 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
|
|||
msg_tmpl = ("Certbot was not able to find SSL VirtualHost for a "
|
||||
"domain {0} for enabling enhancement \"{1}\". The requested "
|
||||
"enhancement was not configured.")
|
||||
msg_enhancement = enhancement
|
||||
if options:
|
||||
msg = msg_tmpl.format(domain, options)
|
||||
else:
|
||||
msg = msg_tmpl.format(domain, enhancement)
|
||||
msg_enhancement += ": " + options
|
||||
msg = msg_tmpl.format(domain, msg_enhancement)
|
||||
logger.warning(msg)
|
||||
else:
|
||||
func(vhost, options)
|
||||
|
|
|
|||
|
|
@ -1118,7 +1118,7 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False): # pylint: dis
|
|||
"security", "--no-uir", action="store_false", dest="uir", default=flag_default("uir"),
|
||||
help=argparse.SUPPRESS)
|
||||
helpful.add(
|
||||
["security", "enhance"], "--staple-ocsp", action="store_true", dest="staple",
|
||||
"security", "--staple-ocsp", action="store_true", dest="staple",
|
||||
default=flag_default("staple"),
|
||||
help="Enables OCSP Stapling. A valid OCSP response is stapled to"
|
||||
" the certificate that the server offers during TLS.")
|
||||
|
|
|
|||
|
|
@ -875,7 +875,7 @@ def enhance(config, plugins):
|
|||
:rtype: None
|
||||
|
||||
"""
|
||||
supported_enhancements = ["hsts", "redirect", "staple", "uir"]
|
||||
supported_enhancements = ["hsts", "redirect", "uir"]
|
||||
# Check that at least one enhancement was requested on command line
|
||||
if not any([getattr(config, enh) for enh in supported_enhancements]):
|
||||
msg = ("Please specify one or more enhancement types to configure. To list "
|
||||
|
|
|
|||
|
|
@ -161,8 +161,12 @@ def choose_configurator_plugins(config, plugins, verb):
|
|||
|
||||
req_auth, req_inst = cli_plugin_requests(config)
|
||||
|
||||
installer_question = ("How would you like to authenticate and install "
|
||||
"certificates?")
|
||||
if verb == "enhance":
|
||||
installer_question = ("Which plugin would you like to use for adding "
|
||||
"security enhancements to your configuration?")
|
||||
else:
|
||||
installer_question = ("How would you like to authenticate and install "
|
||||
"certificates?")
|
||||
|
||||
# Which plugins do we need?
|
||||
if verb == "run":
|
||||
|
|
|
|||
|
|
@ -1588,7 +1588,7 @@ class EnhanceTest(unittest.TestCase):
|
|||
'-d', 'another.tld', '--redirect',
|
||||
'--hsts'])
|
||||
req_enh = ["redirect", "hsts"]
|
||||
not_req_enh = ["staple", "uir"]
|
||||
not_req_enh = ["uir"]
|
||||
self.assertTrue(mock_client.enhance_config.called)
|
||||
self.assertTrue(
|
||||
all([getattr(mock_client.config, e) for e in req_enh]))
|
||||
|
|
|
|||
Loading…
Reference in a new issue