chore(deps): bump github.com/caddyserver/certmagic from 0.13.1 to 0.14.0 (#2291)

* chore(deps): bump github.com/caddyserver/certmagic from 0.13.1 to 0.14.0

Bumps [github.com/caddyserver/certmagic](https://github.com/caddyserver/certmagic) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/caddyserver/certmagic/releases)
- [Commits](https://github.com/caddyserver/certmagic/compare/v0.13.1...v0.14.0)

---
updated-dependencies:
- dependency-name: github.com/caddyserver/certmagic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update Obtain and Renew cert to new signatures

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Denis Mishin <dmishin@pomerium.com>
This commit is contained in:
dependabot[bot] 2021-06-14 11:48:05 -04:00 committed by GitHub
parent 1672052cb8
commit 5dd68f5ff0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 16 deletions

View file

@ -220,7 +220,7 @@ func (mgr *Manager) obtainCert(ctx context.Context, domain string, cm *certmagic
cert, err := cm.CacheManagedCertificate(domain)
if err != nil {
log.Info(ctx).Str("domain", domain).Msg("obtaining certificate")
err = cm.ObtainCert(ctx, domain, false)
err = cm.ObtainCertSync(ctx, domain)
if err != nil {
log.Error(ctx).Err(err).Msg("autocert failed to obtain client certificate")
return certmagic.Certificate{}, errObtainCertFailed
@ -236,7 +236,7 @@ func (mgr *Manager) renewCert(ctx context.Context, domain string, cert certmagic
expired := time.Now().After(cert.Leaf.NotAfter)
log.Info(ctx).Str("domain", domain).Msg("renewing certificate")
renewCertLock.Lock()
err := cm.RenewCert(ctx, domain, false)
err := cm.RenewCertSync(ctx, domain, false)
renewCertLock.Unlock()
if err != nil {
if expired {