From b2d7a1821e431a46cad2c93b11c858ef129bd564 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 16 Aug 2016 13:50:56 -0600 Subject: [PATCH 1/2] Skip solving challenges when authz is already valid (fixes #267) --- acme/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acme/client.go b/acme/client.go index ef53d82d..622403f4 100644 --- a/acme/client.go +++ b/acme/client.go @@ -509,6 +509,10 @@ func (c *Client) solveChallenges(challenges []authorizationResource) map[string] // loop through the resources, basically through the domains. failures := make(map[string]error) for _, authz := range challenges { + if authz.Body.Status == "valid" { + // Boulder might recycle already-valid authz, see issue #267 + continue + } // no solvers - no solving if solvers := c.chooseSolvers(authz.Body, authz.Domain); solvers != nil { for i, solver := range solvers { From 6bd7f505e1ff0a44a3a57732651473235a2a4161 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 16 Aug 2016 14:00:17 -0600 Subject: [PATCH 2/2] Log when skipping challenges due to valid authz --- acme/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acme/client.go b/acme/client.go index 622403f4..5eae8d26 100644 --- a/acme/client.go +++ b/acme/client.go @@ -510,7 +510,8 @@ func (c *Client) solveChallenges(challenges []authorizationResource) map[string] failures := make(map[string]error) for _, authz := range challenges { if authz.Body.Status == "valid" { - // Boulder might recycle already-valid authz, see issue #267 + // 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