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.
This commit is contained in:
Pavel Forkert 2017-02-19 06:30:33 +02:00 committed by xenolf
parent 661e5e690c
commit 0c0d57a545

View file

@ -561,12 +561,20 @@ func (c *Client) getChallenges(domains []string) ([]authorizationResource, map[s
} }
} }
logAuthz(challenges)
close(resc) close(resc)
close(errc) close(errc)
return challenges, failures 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) { func (c *Client) requestCertificate(authz []authorizationResource, bundle bool, privKey crypto.PrivateKey, mustStaple bool) (CertificateResource, error) {
if len(authz) == 0 { if len(authz) == 0 {
return CertificateResource{}, errors.New("Passed no authorizations to requestCertificate!") return CertificateResource{}, errors.New("Passed no authorizations to requestCertificate!")