From 1ceebb72a21eee28c349fb7ac6b38fcfca4a485e Mon Sep 17 00:00:00 2001 From: xenolf Date: Sat, 13 Jun 2015 04:10:32 +0200 Subject: [PATCH] Add Authorizations to CSR request message --- acme/client.go | 2 +- acme/messages.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/acme/client.go b/acme/client.go index adb17a5e..b7e33152 100644 --- a/acme/client.go +++ b/acme/client.go @@ -253,7 +253,7 @@ func (c *Client) requestCertificates(challenges []*authorizationResource) ([]Cer return nil, err } 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 { return nil, err } diff --git a/acme/messages.go b/acme/messages.go index 609e8b70..1ee1377a 100644 --- a/acme/messages.go +++ b/acme/messages.go @@ -58,7 +58,8 @@ type challenge struct { } type csrMessage struct { - Csr string `json:"csr"` + Csr string `json:"csr"` + Authorizations []string `json:"authorizations"` } // CertificateResource represents a CA issued certificate.