Example #1
0
func JSONCertResponseFromParcel(caId int64, p *liftca.Parcel) *JSONCertResponse {
	return &JSONCertResponse{
		Host:           p.Host(),
		Self:           CertUrl(caId, p.SerialNumber()),
		SerialNumber:   strconv.FormatInt(p.SerialNumber(), 10),
		SubjectKeyID:   p.SubjectKeyID(),
		AuthorityKeyID: p.AuthorityKeyID(),
	}
}
Example #2
0
func JSONCAResponseFromParcel(p *liftca.Parcel) *JSONCAResponse {
	return &JSONCAResponse{
		Name:         p.Certificate.Subject.CommonName,
		Self:         CAUrl(p.SerialNumber()),
		SerialNumber: strconv.FormatInt(p.SerialNumber(), 10),
		SubjectKeyID: p.SubjectKeyID(),
		Visible:      p.Visible,
	}
}