autocert: update cache method invocation

The method CacheUnmanagedTLSCertificate() now returns a certificate hash
in addition to an error value.
This commit is contained in:
Kenneth Jenkins 2023-08-01 09:26:35 -07:00
parent 6712042e4f
commit f3b924e5a8

View file

@ -150,7 +150,7 @@ func (mgr *Manager) getCertMagicConfig(ctx context.Context, cfg *config.Config)
}
// add existing certs to the cache, and staple OCSP
for _, cert := range certs {
if err := mgr.certmagic.CacheUnmanagedTLSCertificate(ctx, cert, nil); err != nil {
if _, err := mgr.certmagic.CacheUnmanagedTLSCertificate(ctx, cert, nil); err != nil {
return nil, fmt.Errorf("config: failed caching cert: %w", err)
}
}