forked from TrueCloudLab/lego
Add Authorizations to CSR request message
This commit is contained in:
parent
b04e5a4aac
commit
1ceebb72a2
2 changed files with 3 additions and 2 deletions
|
@ -253,7 +253,7 @@ func (c *Client) requestCertificates(challenges []*authorizationResource) ([]Cer
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
csrString := base64.URLEncoding.EncodeToString(csr)
|
csrString := base64.URLEncoding.EncodeToString(csr)
|
||||||
jsonBytes, err := json.Marshal(csrMessage{Csr: csrString})
|
jsonBytes, err := json.Marshal(csrMessage{Csr: csrString, Authorizations: []string{authz.AuthURL}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ type challenge struct {
|
||||||
|
|
||||||
type csrMessage struct {
|
type csrMessage struct {
|
||||||
Csr string `json:"csr"`
|
Csr string `json:"csr"`
|
||||||
|
Authorizations []string `json:"authorizations"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CertificateResource represents a CA issued certificate.
|
// CertificateResource represents a CA issued certificate.
|
||||||
|
|
Loading…
Reference in a new issue