Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #19 -- correct handle certificate distrust date #20

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion certs/convert_mozilla_certdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ func OutputTrustedCerts(objects []*Object) (parsedCerts CertList) {
log.Fatalf("Unable to parse distrust after value '%s' for certificate on line %d, error %s", distrustAfter.value, cert.startingLine, err)
}

if time.Now().After(t) {
// The distrust date is for certificates issued after this date.
// The current maximum age of a WebPKI cert is 397 days, so if
// we're 398 days past the distrust date, it's impossible for
// there to be a valid cert.
if time.Now().After(t.Add(time.Hour * 24 * 398)) {
// This certificate is now distrusted.
continue
}
Expand Down