From 0c0d57a545045b8a88f0a07e04050119a777b9f9 Mon Sep 17 00:00:00 2001 From: Pavel Forkert Date: Sun, 19 Feb 2017 06:30:33 +0200 Subject: [PATCH] Log authorization urls (#350) https://letsencrypt.org/docs/rate-limits/ says: > The pending authorization objects are represented by URLs of the form https://acme-v01.api.letsencrypt.org/acme/authz/XYZ, and should show up in your client logs. --- acme/client.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/acme/client.go b/acme/client.go index 9afebf11..ba56e796 100644 --- a/acme/client.go +++ b/acme/client.go @@ -561,12 +561,20 @@ func (c *Client) getChallenges(domains []string) ([]authorizationResource, map[s } } + logAuthz(challenges) + close(resc) close(errc) return challenges, failures } +func logAuthz(authz []authorizationResource) { + for _, auth := range authz { + logf("[INFO][%s] AuthURL: %s", auth.Domain, auth.AuthURL) + } +} + func (c *Client) requestCertificate(authz []authorizationResource, bundle bool, privKey crypto.PrivateKey, mustStaple bool) (CertificateResource, error) { if len(authz) == 0 { return CertificateResource{}, errors.New("Passed no authorizations to requestCertificate!")