Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
tls: Make cert and OCSP check intervals configurable
This enables use of ACME CAs that issue shorter-lived certs
Matthew Holt committed
Sep 24, 2019 at 17:04 UTC
7b33c8db3161d3558147d02f8d7818352e6983b7
1 file changed
+6
-2
modules/caddytls/tls.go
+6
-2
@@ -66,6 +66,8 @@ func (t *TLS) Provision(ctx caddy.Context) error {
66
GetConfigForCert: func(cert certmagic.Certificate) (certmagic.Config, error) {
67
return t.getConfigForName(cert.Names[0])
68
},
69
+ OCSPCheckInterval: time.Duration(t.Automation.OCSPCheckInterval),
70
+ RenewCheckInterval: time.Duration(t.Automation.RenewCheckInterval),
71
})
72
73
// automation/management policies
@@ -286,8 +288,10 @@ type Certificate struct {
288
// AutomationConfig designates configuration for the
289
// construction and use of ACME clients.
290
type AutomationConfig struct {
289
- Policies []AutomationPolicy `json:"policies,omitempty"`
290
- OnDemand *OnDemandConfig `json:"on_demand,omitempty"`
291
+ Policies []AutomationPolicy `json:"policies,omitempty"`
292
+ OnDemand *OnDemandConfig `json:"on_demand,omitempty"`
293
+ OCSPCheckInterval caddy.Duration `json:"ocsp_interval,omitempty"`
294
+ RenewCheckInterval caddy.Duration `json:"renew_interval,omitempty"`
295
}
296
297
// AutomationPolicy designates the policy for automating the