|
|
|
@ -29,7 +29,7 @@ type DehydratedCertificate struct {
|
|
|
|
|
|
|
|
|
|
// SerialNumber calculates the certificate serial number according to the
|
|
|
|
|
// Dehydrated TLS Certificates specification.
|
|
|
|
|
func (dehydrated DehydratedCertificate) SerialNumber(name string) ([]byte, error){
|
|
|
|
|
func (dehydrated DehydratedCertificate) SerialNumber(name string) ([]byte, error) {
|
|
|
|
|
|
|
|
|
|
nameHash := sha256.Sum256([]byte(name))
|
|
|
|
|
|
|
|
|
@ -119,7 +119,7 @@ func ParseDehydratedCert(data interface{}) (*DehydratedCertificate, error) {
|
|
|
|
|
return nil, fmt.Errorf("Dehydrated cert signature must be a string")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result := DehydratedCertificate {
|
|
|
|
|
result := DehydratedCertificate{
|
|
|
|
|
PubkeyB64: pubkeyB64,
|
|
|
|
|
NotBeforeScaled: int64(notBeforeScaled),
|
|
|
|
|
NotAfterScaled: int64(notAfterScaled),
|
|
|
|
|