Skip to content

Commit

Permalink
fix: Make HEX number of cert serial 39 chars long.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-lobocki authored Aug 2, 2024
1 parent d2b2182 commit 597b85b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/output_x509certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ func emitOpenSsl(thisX509CertsWithRevocations []tX509CertificateProvisionerRevoc
revokedAt = ""
}

fmt.Printf("%s\t%s\t%s\t%X\t%s\t%s\n",
fmt.Printf("%s\t%s\t%s\t%039X\t%s\t%s\n",
x509CertWithRevocation.Validity[0:1],
regexp.MustCompile(`[-T:]+`).
ReplaceAllString(x509CertWithRevocation.X509Certificate.NotAfter.UTC().
Format(time.RFC3339), "")[2:], // Construct NotAfter string in compliance with specification.
revokedAt,
x509CertWithRevocation.X509Certificate.SerialNumber,
x509CertWithRevocation.X509Certificate.SerialNumber, // len(HEX)=39
"unknown", // As per specification.
x509CertWithRevocation.X509Certificate.Subject)
}
Expand Down

0 comments on commit 597b85b

Please sign in to comment.