Skip to content

Commit dc53a95

Browse files
fix: HEX number len = 40
1 parent 597b85b commit dc53a95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/output_x509certs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ func emitOpenSsl(thisX509CertsWithRevocations []tX509CertificateProvisionerRevoc
177177
revokedAt = ""
178178
}
179179

180-
fmt.Printf("%s\t%s\t%s\t%039X\t%s\t%s\n",
180+
fmt.Printf("%s\t%s\t%s\t%040X\t%s\t%s\n",
181181
x509CertWithRevocation.Validity[0:1],
182182
regexp.MustCompile(`[-T:]+`).
183183
ReplaceAllString(x509CertWithRevocation.X509Certificate.NotAfter.UTC().
184184
Format(time.RFC3339), "")[2:], // Construct NotAfter string in compliance with specification.
185185
revokedAt,
186-
x509CertWithRevocation.X509Certificate.SerialNumber, // len(HEX)=39
186+
x509CertWithRevocation.X509Certificate.SerialNumber, // len(HEX(20bytes))=40chars [FF/byte]
187187
"unknown", // As per specification.
188188
x509CertWithRevocation.X509Certificate.Subject)
189189
}

0 commit comments

Comments
 (0)