diff options
author | zeripath <art27@cantab.net> | 2021-08-23 23:07:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 18:07:44 -0400 |
commit | 37e4cdbbe60db486193f1cac65e45c2f1dacf0c9 (patch) | |
tree | ddc6428c1567380379a37311e9238e2a410b4b2d /vendor | |
parent | f7e7477c45b064c220c1dc87afec89b40c396312 (diff) | |
download | gitea-37e4cdbbe60db486193f1cac65e45c2f1dacf0c9.tar.gz gitea-37e4cdbbe60db486193f1cac65e45c2f1dacf0c9.zip |
Update only certmagic (#16790)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/caddyserver/certmagic/config.go | 26 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
2 files changed, 17 insertions, 11 deletions
diff --git a/vendor/github.com/caddyserver/certmagic/config.go b/vendor/github.com/caddyserver/certmagic/config.go index cce969b8bd..d408418f65 100644 --- a/vendor/github.com/caddyserver/certmagic/config.go +++ b/vendor/github.com/caddyserver/certmagic/config.go @@ -508,8 +508,10 @@ func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool var issuedCert *IssuedCertificate var issuerUsed Issuer for i, issuer := range issuers { - log.Debug(fmt.Sprintf("trying issuer %d/%d", i+1, len(cfg.Issuers)), - zap.String("issuer", issuer.IssuerKey())) + if log != nil { + log.Debug(fmt.Sprintf("trying issuer %d/%d", i+1, len(cfg.Issuers)), + zap.String("issuer", issuer.IssuerKey())) + } if prechecker, ok := issuer.(PreChecker); ok { err = prechecker.PreCheck(ctx, []string{name}, interactive) @@ -531,10 +533,12 @@ func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool if errors.As(err, &problem) { errToLog = problem } - log.Error("could not get certificate from issuer", - zap.String("identifier", name), - zap.String("issuer", issuer.IssuerKey()), - zap.Error(errToLog)) + if log != nil { + log.Error("could not get certificate from issuer", + zap.String("identifier", name), + zap.String("issuer", issuer.IssuerKey()), + zap.Error(errToLog)) + } } if err != nil { // only the error from the last issuer will be returned, but we logged the others @@ -745,10 +749,12 @@ func (cfg *Config) renewCert(ctx context.Context, name string, force, interactiv if errors.As(err, &problem) { errToLog = problem } - log.Error("could not get certificate from issuer", - zap.String("identifier", name), - zap.String("issuer", issuer.IssuerKey()), - zap.Error(errToLog)) + if log != nil { + log.Error("could not get certificate from issuer", + zap.String("identifier", name), + zap.String("issuer", issuer.IssuerKey()), + zap.Error(errToLog)) + } } if err != nil { // only the error from the last issuer will be returned, but we logged the others diff --git a/vendor/modules.txt b/vendor/modules.txt index 9b2a96ad53..96fec6a8b9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -194,7 +194,7 @@ github.com/boombuler/barcode/utils # github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b ## explicit github.com/bradfitz/gomemcache/memcache -# github.com/caddyserver/certmagic v0.14.0 +# github.com/caddyserver/certmagic v0.14.1 ## explicit github.com/caddyserver/certmagic # github.com/cespare/xxhash/v2 v2.1.1 |