NOISSUE - Retrieve client key on cert issuing (#1607)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
This commit is contained in:
parent
d30e6bad3c
commit
9c2298daa9
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue