Skip to content

Commit 2fc9fb9

Browse files
authored
chore: add some info logs (#40)
Note: this commit add some information to the user when file are successfuly downloaded (ie. CRL and cert)
1 parent ca3da54 commit 2fc9fb9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/validate/certificate.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ func (c *ekchecker) Check(cfg CheckConfig) error {
136136
return fmt.Errorf("failed to download CRL from %q: %w", url, err)
137137
}
138138

139+
c.logger.
140+
WithField("url", url.String()).
141+
Info("CRL downloaded")
142+
139143
if err := crl.Verify(issuers...); err != nil {
140144
return fmt.Errorf("failed to verify CRL: %w", err)
141145
}
@@ -239,6 +243,10 @@ func (c *ekchecker) getIssuerCertificates(cert *x509.Certificate) ([]*x509.Certi
239243
return nil, fmt.Errorf("failed to download issuer certificate: %w", err)
240244
}
241245

246+
c.logger.
247+
WithField("url", url.String()).
248+
Info("certificate downloaded")
249+
242250
hash := sha256.Sum256(cert.Raw)
243251
fingerprint := hex.EncodeToString(hash[:])
244252
if seen[fingerprint] {

0 commit comments

Comments
 (0)