Apply gofmt
This commit is contained in:
parent
c68cf401a3
commit
7a8a770d99
|
@ -23,17 +23,17 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type discoveredCert struct {
|
type discoveredCert struct {
|
||||||
WatchItem WatchItem
|
WatchItem WatchItem
|
||||||
LogEntry *logEntry
|
LogEntry *logEntry
|
||||||
Info *certspotter.CertInfo
|
Info *certspotter.CertInfo
|
||||||
Chain []ct.ASN1Cert // first entry is the leaf certificate or precertificate
|
Chain []ct.ASN1Cert // first entry is the leaf certificate or precertificate
|
||||||
TBSSHA256 [32]byte // computed over Info.TBS.Raw
|
TBSSHA256 [32]byte // computed over Info.TBS.Raw
|
||||||
LeafSHA256 [32]byte // computed over Chain[0]
|
LeafSHA256 [32]byte // computed over Chain[0]
|
||||||
PubkeySHA256 [32]byte // computed over Info.TBS.PublicKey.FullBytes
|
PubkeySHA256 [32]byte // computed over Info.TBS.PublicKey.FullBytes
|
||||||
Identifiers *certspotter.Identifiers
|
Identifiers *certspotter.Identifiers
|
||||||
CertPath string // empty if not saved on the filesystem
|
CertPath string // empty if not saved on the filesystem
|
||||||
JSONPath string // empty if not saved on the filesystem
|
JSONPath string // empty if not saved on the filesystem
|
||||||
TextPath string // empty if not saved on the filesystem
|
TextPath string // empty if not saved on the filesystem
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cert *discoveredCert) pemChain() []byte {
|
func (cert *discoveredCert) pemChain() []byte {
|
||||||
|
@ -51,7 +51,7 @@ func (cert *discoveredCert) pemChain() []byte {
|
||||||
|
|
||||||
func (cert *discoveredCert) json() []byte {
|
func (cert *discoveredCert) json() []byte {
|
||||||
object := map[string]any{
|
object := map[string]any{
|
||||||
"tbs_sha256": hex.EncodeToString(cert.TBSSHA256[:]),
|
"tbs_sha256": hex.EncodeToString(cert.TBSSHA256[:]),
|
||||||
"cert_sha256": hex.EncodeToString(cert.LeafSHA256[:]),
|
"cert_sha256": hex.EncodeToString(cert.LeafSHA256[:]),
|
||||||
"pubkey_sha256": hex.EncodeToString(cert.PubkeySHA256[:]),
|
"pubkey_sha256": hex.EncodeToString(cert.PubkeySHA256[:]),
|
||||||
"issuer_der": cert.Info.TBS.Issuer.FullBytes,
|
"issuer_der": cert.Info.TBS.Issuer.FullBytes,
|
||||||
|
|
|
@ -28,7 +28,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
maxGetEntriesSize = 1000
|
maxGetEntriesSize = 1000
|
||||||
monitorLogInterval = 5 * time.Minute
|
monitorLogInterval = 5 * time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -98,14 +98,14 @@ func processCertificate(ctx context.Context, config *Config, entry *logEntry, ce
|
||||||
}
|
}
|
||||||
|
|
||||||
cert := &discoveredCert{
|
cert := &discoveredCert{
|
||||||
WatchItem: watchItem,
|
WatchItem: watchItem,
|
||||||
LogEntry: entry,
|
LogEntry: entry,
|
||||||
Info: certInfo,
|
Info: certInfo,
|
||||||
Chain: chain,
|
Chain: chain,
|
||||||
TBSSHA256: sha256.Sum256(certInfo.TBS.Raw),
|
TBSSHA256: sha256.Sum256(certInfo.TBS.Raw),
|
||||||
LeafSHA256: sha256.Sum256(chain[0]),
|
LeafSHA256: sha256.Sum256(chain[0]),
|
||||||
PubkeySHA256: sha256.Sum256(certInfo.TBS.PublicKey.FullBytes),
|
PubkeySHA256: sha256.Sum256(certInfo.TBS.PublicKey.FullBytes),
|
||||||
Identifiers: identifiers,
|
Identifiers: identifiers,
|
||||||
}
|
}
|
||||||
|
|
||||||
var notifiedPath string
|
var notifiedPath string
|
||||||
|
|
Loading…
Reference in New Issue