forked from TrueCloudLab/lego
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:
parent
661e5e690c
commit
0c0d57a545
1 changed files with 8 additions and 0 deletions
|
@ -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!")
|
||||||
|
|
Loading…
Reference in a new issue