NOISSUE - Retrieve client key on cert issuing (#1607)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
This commit is contained in:
Manuel Imperiale 2022-05-10 18:37:55 +02:00 committed by GitHub
parent d30e6bad3c
commit 9c2298daa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -24,7 +24,8 @@ func issueCert(svc certs.Service) endpoint.Endpoint {
return certsRes{
CertSerial: res.Serial,
ThingID: res.ThingID,
Cert: res.ClientCert,
ClientCert: res.ClientCert,
ClientKey: res.ClientKey,
Expiration: res.Expire,
created: true,
}, nil
@ -55,7 +56,7 @@ func listCerts(svc certs.Service) endpoint.Endpoint {
view := certsRes{
CertSerial: cert.Serial,
ThingID: cert.ThingID,
Cert: cert.ClientCert,
ClientCert: cert.ClientCert,
Expiration: cert.Expire,
}
res.Certs = append(res.Certs, view)
@ -109,7 +110,7 @@ func viewCert(svc certs.Service) endpoint.Endpoint {
certRes := certsRes{
CertSerial: cert.Serial,
ThingID: cert.ThingID,
Cert: cert.ClientCert,
ClientCert: cert.ClientCert,
Expiration: cert.Expire,
}

View File

@ -21,7 +21,8 @@ type certsPageRes struct {
type certsRes struct {
ThingID string `json:"thing_id"`
Cert string `json:"cert"`
ClientCert string `json:"client_cert"`
ClientKey string `json:"client_key"`
CertSerial string `json:"cert_serial"`
Expiration time.Time `json:"expiration"`
created bool