diff options
author | 6543 <6543@obermui.de> | 2021-04-22 22:42:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 22:42:33 +0200 |
commit | 8ea1d32bea88b6968774b14e5bbe90f2280fe997 (patch) | |
tree | ce28cbc996df6c428b6ac03773714b46650a809e /vendor/github.com/caddyserver/certmagic/maintain.go | |
parent | e7fc078891d41798703b66bed8bdbf55e8b7c5e1 (diff) | |
download | gitea-8ea1d32bea88b6968774b14e5bbe90f2280fe997.tar.gz gitea-8ea1d32bea88b6968774b14e5bbe90f2280fe997.zip |
[Vendor] update certmagic (#15590)
* update github.com/caddyserver/certmagic v0.12.0 -> v0.13.0
* migrate
Diffstat (limited to 'vendor/github.com/caddyserver/certmagic/maintain.go')
-rw-r--r-- | vendor/github.com/caddyserver/certmagic/maintain.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/caddyserver/certmagic/maintain.go b/vendor/github.com/caddyserver/certmagic/maintain.go index 0e7acc3a09..3e5a8736a7 100644 --- a/vendor/github.com/caddyserver/certmagic/maintain.go +++ b/vendor/github.com/caddyserver/certmagic/maintain.go @@ -141,6 +141,9 @@ func (certCache *Cache) RenewManagedCertificates(ctx context.Context) error { } continue } + if cfg.OnDemand != nil { + continue + } // if time is up or expires soon, we need to try to renew it if cert.NeedsRenewal(cfg) { @@ -337,8 +340,8 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { continue } - ocspResp, err := stapleOCSP(cfg.Storage, &cert, nil) - if err != nil { + ocspResp, err := stapleOCSP(cfg.OCSP, cfg.Storage, &cert, nil) + if err != nil || ocspResp == nil { if cert.ocsp != nil { // if there was no staple before, that's fine; otherwise we should log the error if log != nil { |