Merge pull request #268 from xenolf/authz-recycle

Skip challenges when authz is already valid
This commit is contained in:
xenolf 2016-08-17 20:15:46 +02:00 committed by GitHub
commit 63e8e33beb

View file

@ -509,6 +509,11 @@ func (c *Client) solveChallenges(challenges []authorizationResource) map[string]
// loop through the resources, basically through the domains. // loop through the resources, basically through the domains.
failures := make(map[string]error) failures := make(map[string]error)
for _, authz := range challenges { for _, authz := range challenges {
if authz.Body.Status == "valid" {
// Boulder might recycle recent validated authz (see issue #267)
logf("[INFO][%s] acme: Authorization already valid; skipping challenge", authz.Domain)
continue
}
// no solvers - no solving // no solvers - no solving
if solvers := c.chooseSolvers(authz.Body, authz.Domain); solvers != nil { if solvers := c.chooseSolvers(authz.Body, authz.Domain); solvers != nil {
for i, solver := range solvers { for i, solver := range solvers {