forked from TrueCloudLab/lego
Add link to account to certificate meta data.
This commit is contained in:
parent
06fc07007f
commit
98c95e83c9
2 changed files with 2 additions and 0 deletions
|
@ -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.
|
||||||
|
|
|
@ -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:"-"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue