Merge pull request #641 from hillu/quote-serial

Log certificate's serial number as stringified decimal number
This commit is contained in:
Mariano Cano 2021-07-16 18:53:51 +02:00 committed by GitHub
commit 4aa529605d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -400,7 +400,7 @@ func logOtt(w http.ResponseWriter, token string) {
func LogCertificate(w http.ResponseWriter, cert *x509.Certificate) {
if rl, ok := w.(logging.ResponseLogger); ok {
m := map[string]interface{}{
"serial": cert.SerialNumber,
"serial": cert.SerialNumber.String(),
"subject": cert.Subject.CommonName,
"issuer": cert.Issuer.CommonName,
"valid-from": cert.NotBefore.Format(time.RFC3339),