From 98c95e83c9c0ee8958ed34880eac17b407e30e83 Mon Sep 17 00:00:00 2001 From: xenolf Date: Mon, 14 Mar 2016 03:29:29 +0100 Subject: [PATCH] Add link to account to certificate meta data. --- acme/client.go | 1 + acme/messages.go | 1 + 2 files changed, 2 insertions(+) diff --git a/acme/client.go b/acme/client.go index bc641144..5bda6bc2 100644 --- a/acme/client.go +++ b/acme/client.go @@ -504,6 +504,7 @@ func (c *Client) requestCertificate(authz []authorizationResource, bundle bool, if len(cert) > 0 { cerRes.CertStableURL = resp.Header.Get("Content-Location") + cerRes.AccountRef = c.user.GetRegistration().URI issuedCert := pemEncode(derCertificateBytes(cert)) // If bundle is true, we want to return a certificate bundle. diff --git a/acme/messages.go b/acme/messages.go index d238df81..fe3f5748 100644 --- a/acme/messages.go +++ b/acme/messages.go @@ -109,6 +109,7 @@ type CertificateResource struct { Domain string `json:"domain"` CertURL string `json:"certUrl"` CertStableURL string `json:"certStableUrl"` + AccountRef string `json:"accountRef,omitempty"` PrivateKey []byte `json:"-"` Certificate []byte `json:"-"` }