forked from forgejo/forgejo
Upgrade certmagic from v0.14.1 to v0.15.2 (#18138)
This commit is contained in:
parent
385dc6a992
commit
e9c9a35a61
20 changed files with 294 additions and 142 deletions
21
vendor/github.com/mholt/acmez/client.go
generated
vendored
21
vendor/github.com/mholt/acmez/client.go
generated
vendored
|
@ -134,16 +134,23 @@ func (c *Client) ObtainCertificateUsingCSR(ctx context.Context, account acme.Acc
|
|||
// for some errors, we can retry with different challenge types
|
||||
var problem acme.Problem
|
||||
if errors.As(err, &problem) {
|
||||
authz := problem.Resource.(acme.Authorization)
|
||||
authz, haveAuthz := problem.Resource.(acme.Authorization)
|
||||
if c.Logger != nil {
|
||||
c.Logger.Error("validating authorization",
|
||||
zap.String("identifier", authz.IdentifierValue()),
|
||||
zap.Error(err),
|
||||
l := c.Logger
|
||||
if haveAuthz {
|
||||
l = l.With(zap.String("identifier", authz.IdentifierValue()))
|
||||
}
|
||||
l.Error("validating authorization",
|
||||
zap.Object("problem", problem),
|
||||
zap.String("order", order.Location),
|
||||
zap.Int("attempt", attempt),
|
||||
zap.Int("max_attempts", maxAttempts))
|
||||
}
|
||||
err = fmt.Errorf("solving challenge: %s: %w", authz.IdentifierValue(), err)
|
||||
errStr := "solving challenge"
|
||||
if haveAuthz {
|
||||
errStr += ": " + authz.IdentifierValue()
|
||||
}
|
||||
err = fmt.Errorf("%s: %w", errStr, err)
|
||||
if errors.As(err, &retryableErr{}) {
|
||||
continue
|
||||
}
|
||||
|
@ -505,9 +512,7 @@ func (c *Client) pollAuthorization(ctx context.Context, account acme.Account, au
|
|||
c.Logger.Error("challenge failed",
|
||||
zap.String("identifier", authz.IdentifierValue()),
|
||||
zap.String("challenge_type", authz.currentChallenge.Type),
|
||||
zap.Int("status_code", problem.Status),
|
||||
zap.String("problem_type", problem.Type),
|
||||
zap.String("error", problem.Detail))
|
||||
zap.Object("problem", problem))
|
||||
}
|
||||
|
||||
failedChallengeTypes.rememberFailedChallenge(authz)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue