diff --git a/prober/tls.go b/prober/tls.go index 34112bea..5bb6a1ec 100644 --- a/prober/tls.go +++ b/prober/tls.go @@ -76,9 +76,7 @@ func getSerialNumber(state *tls.ConnectionState) string { // serialNumber := cert.SerialNumber.Text(16) // drops leading zeros outputs = BFFBC11F1907D02AF719AFCD64FB253 in lower case, telgraf follows this https://github.com/influxdata/telegraf/blob/a9c91f162ddbe453364f68a89799535c43328a3c/plugins/inputs/x509_cert/x509_cert.go#L218 // https://github.com/atc0005/check-cert retains the leading zero with some aditional formatting - serialNumber := strings.ToLower(fmt.Sprintf("%X", cert.SerialNumber.Bytes())) - - return serialNumber + return fmt.Sprintf("%x", cert.SerialNumber.Bytes()) } func getTLSVersion(state *tls.ConnectionState) string {