Add link to account to certificate meta data.

This commit is contained in:
xenolf 2016-03-14 03:29:29 +01:00
parent 06fc07007f
commit 98c95e83c9
2 changed files with 2 additions and 0 deletions

View file

@ -504,6 +504,7 @@ func (c *Client) requestCertificate(authz []authorizationResource, bundle bool,
if len(cert) > 0 { if len(cert) > 0 {
cerRes.CertStableURL = resp.Header.Get("Content-Location") cerRes.CertStableURL = resp.Header.Get("Content-Location")
cerRes.AccountRef = c.user.GetRegistration().URI
issuedCert := pemEncode(derCertificateBytes(cert)) issuedCert := pemEncode(derCertificateBytes(cert))
// If bundle is true, we want to return a certificate bundle. // If bundle is true, we want to return a certificate bundle.

View file

@ -109,6 +109,7 @@ type CertificateResource struct {
Domain string `json:"domain"` Domain string `json:"domain"`
CertURL string `json:"certUrl"` CertURL string `json:"certUrl"`
CertStableURL string `json:"certStableUrl"` CertStableURL string `json:"certStableUrl"`
AccountRef string `json:"accountRef,omitempty"`
PrivateKey []byte `json:"-"` PrivateKey []byte `json:"-"`
Certificate []byte `json:"-"` Certificate []byte `json:"-"`
} }