forked from TrueCloudLab/certificates
Log certificate's serial number as stringified decimal number
Using a JSON string fixes a common issue with JSON parsers that deserialize all numbers to a 64-bit IEEE-754 floats. (Certificate serial numbers are usually 128 bit values.) This change is consistent with existing log entries for revocation requests. See also: #630, #631
This commit is contained in:
parent
b9743b36e1
commit
edb01bc9f2
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue