mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 16:14:44 +02:00
Autoconfigure OCSP Stapling with --must-staple
This commit is contained in:
+3
-2
@@ -398,6 +398,7 @@ class Client(object):
|
|||||||
hsts = config.hsts if "ensure-http-header" in supported else False
|
hsts = config.hsts if "ensure-http-header" in supported else False
|
||||||
uir = config.uir if "ensure-http-header" in supported else False
|
uir = config.uir if "ensure-http-header" in supported else False
|
||||||
staple = config.staple if "staple-ocsp" in supported else False
|
staple = config.staple if "staple-ocsp" in supported else False
|
||||||
|
must_staple = config.must_staple
|
||||||
|
|
||||||
if redirect is None:
|
if redirect is None:
|
||||||
redirect = enhancements.ask("redirect")
|
redirect = enhancements.ask("redirect")
|
||||||
@@ -411,11 +412,11 @@ class Client(object):
|
|||||||
if uir:
|
if uir:
|
||||||
self.apply_enhancement(domains, "ensure-http-header",
|
self.apply_enhancement(domains, "ensure-http-header",
|
||||||
"Upgrade-Insecure-Requests")
|
"Upgrade-Insecure-Requests")
|
||||||
if staple:
|
if staple or must_staple:
|
||||||
self.apply_enhancement(domains, "staple-ocsp")
|
self.apply_enhancement(domains, "staple-ocsp")
|
||||||
|
|
||||||
msg = ("We were unable to restart web server")
|
msg = ("We were unable to restart web server")
|
||||||
if redirect or hsts or uir or staple:
|
if redirect or hsts or uir or staple or must_staple:
|
||||||
with error_handler.ErrorHandler(self._rollback_and_restart, msg):
|
with error_handler.ErrorHandler(self._rollback_and_restart, msg):
|
||||||
self.installer.restart()
|
self.installer.restart()
|
||||||
|
|
||||||
|
|||||||
@@ -201,9 +201,9 @@ class IConfig(zope.interface.Interface):
|
|||||||
"Email used for registration and recovery contact.")
|
"Email used for registration and recovery contact.")
|
||||||
rsa_key_size = zope.interface.Attribute("Size of the RSA key.")
|
rsa_key_size = zope.interface.Attribute("Size of the RSA key.")
|
||||||
must_staple = zope.interface.Attribute(
|
must_staple = zope.interface.Attribute(
|
||||||
"Whether to request the OCSP Must Staple certificate extension. "
|
"Adds the OCSP Must Staple extension to the certificate."
|
||||||
"Additional setup may be required after issuance. This does not "
|
"Autoconfigures OCSP Stapling for supported setups "
|
||||||
"currently autoconfigure web servers for OCSP stapling. ")
|
"(Apache version >= 2.3.3 ).")
|
||||||
|
|
||||||
config_dir = zope.interface.Attribute("Configuration directory.")
|
config_dir = zope.interface.Attribute("Configuration directory.")
|
||||||
work_dir = zope.interface.Attribute("Working directory.")
|
work_dir = zope.interface.Attribute("Working directory.")
|
||||||
|
|||||||
Reference in New Issue
Block a user