forked from TrueCloudLab/certificates
Merge pull request #641 from hillu/quote-serial
Log certificate's serial number as stringified decimal number
This commit is contained in:
commit
4aa529605d
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) {
|
func LogCertificate(w http.ResponseWriter, cert *x509.Certificate) {
|
||||||
if rl, ok := w.(logging.ResponseLogger); ok {
|
if rl, ok := w.(logging.ResponseLogger); ok {
|
||||||
m := map[string]interface{}{
|
m := map[string]interface{}{
|
||||||
"serial": cert.SerialNumber,
|
"serial": cert.SerialNumber.String(),
|
||||||
"subject": cert.Subject.CommonName,
|
"subject": cert.Subject.CommonName,
|
||||||
"issuer": cert.Issuer.CommonName,
|
"issuer": cert.Issuer.CommonName,
|
||||||
"valid-from": cert.NotBefore.Format(time.RFC3339),
|
"valid-from": cert.NotBefore.Format(time.RFC3339),
|
||||||
|
|
Loading…
Add table
Reference in a new issue