]> source.dussan.org Git - gitea.git/commitdiff
Update only certmagic (#16790)
authorzeripath <art27@cantab.net>
Mon, 23 Aug 2021 22:07:44 +0000 (23:07 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Aug 2021 22:07:44 +0000 (18:07 -0400)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: jolheiser <john.olheiser@gmail.com>
go.mod
go.sum
vendor/github.com/caddyserver/certmagic/config.go
vendor/modules.txt

diff --git a/go.mod b/go.mod
index 40f6ade2bd334aef407ddf882d10ab8d8af68ac4..8048393d960f436ba4759a82e64bbd2c949b7b70 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -22,7 +22,7 @@ require (
        github.com/blevesearch/bleve/v2 v2.0.6
        github.com/boombuler/barcode v1.0.1 // indirect
        github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect
-       github.com/caddyserver/certmagic v0.14.0
+       github.com/caddyserver/certmagic v0.14.1
        github.com/chi-middleware/proxy v1.1.1
        github.com/couchbase/go-couchbase v0.0.0-20210224140812-5740cd35f448 // indirect
        github.com/couchbase/gomemcached v0.1.2 // indirect
diff --git a/go.sum b/go.sum
index 64d44eb34aef941a6c0e028b58370007177f356c..6a86f033fea1c628d3efd3b1dd1ea376340324ea 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -184,8 +184,8 @@ github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl
 github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
 github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0=
 github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
-github.com/caddyserver/certmagic v0.14.0 h1:XW1o32s7smIYEJSc6g+N8YXljpjRo5ZE2zi3CIYTs74=
-github.com/caddyserver/certmagic v0.14.0/go.mod h1:oRQOZmUVKwlpgNidslysHt05osM9uMrJ4YMk+Ot4P4Q=
+github.com/caddyserver/certmagic v0.14.1 h1:8RIFS/LbGne/I7Op56Kkm2annnei7io9VW/IWDttE9U=
+github.com/caddyserver/certmagic v0.14.1/go.mod h1:oRQOZmUVKwlpgNidslysHt05osM9uMrJ4YMk+Ot4P4Q=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
 github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
index cce969b8bd4577e147ab2633f643c4057ec80438..d408418f6571ffee45cbd30308cfdf8980bd361a 100644 (file)
@@ -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
index 9b2a96ad538620779f37af16b36d860285212994..96fec6a8b90ea32b67cfbf8a4a9ac5bfafd90b79 100644 (file)
@@ -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