diff options
author | Matt Holt <mholt@users.noreply.github.com> | 2023-07-11 13:10:58 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 19:10:58 +0000 |
commit | 0e2c7e1d35b287fc0e56d6db2951f791e09b5a37 (patch) | |
tree | 3669f5d01fa351bda933d3796c50a72da9942a01 /modules/caddypki | |
parent | 7ceef91295343237f5b81ed00e3ba7e8e594d603 (diff) |
caddytls: Reuse certificate cache through reloads (#5623)
* caddytls: Don't purge cert cache on config reload
* Update CertMagic
This actually avoids reloading managed certs from storage
when already in the cache, d'oh.
* Fix bug; re-implement HasCertificateForSubject
* Update go.mod: CertMagic tag
Diffstat (limited to 'modules/caddypki')
-rw-r--r-- | modules/caddypki/adminapi.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/caddypki/adminapi.go b/modules/caddypki/adminapi.go index cab7c70..24371e7 100644 --- a/modules/caddypki/adminapi.go +++ b/modules/caddypki/adminapi.go @@ -50,11 +50,7 @@ func (a *adminAPI) Provision(ctx caddy.Context) error { a.log = ctx.Logger(a) // TODO: passing in 'a' is a hack until the admin API is officially extensible (see #5032) // Avoid initializing PKI if it wasn't configured - pkiApp, err := a.ctx.AppIfConfigured("pki") - if err != nil { - return err - } - if pkiApp != nil { + if pkiApp := a.ctx.AppIfConfigured("pki"); pkiApp != nil { a.pkiApp = pkiApp.(*PKI) } |