Skip to content

Commit 65367a4

Browse files
authored
Update zlint to just past v3.7.1 (#8800)
Update zlint to get the latest and greatest lint checks. The v3.7.0 release contains a bug where zlint believes that RSA pubkeys are not actually RSA (because it parses the cert's key into a stdlib rsa.PublicKey, but then expects to find a forked zcrypto/rsa.PublicKey), and the v3.7.1 release contains a fix for that but also contains a second bug (a lint intended only for Subscriber certs also incorrectly fires on Subordinate CA certs), so this update is to one commit past v3.7.1. Update one unit test to set a semi-realistic date, to avoid triggering a new CRL lint that expects all revocation dates to be reasonably recent. As a consequence, that test also ignores several additional lints, whose effective dates are now in that test's past. Update another unit test to include a CRLDP in the fake certs, to avoid triggering a different new lint.
1 parent 703c483 commit 65367a4

135 files changed

Lines changed: 6433 additions & 413 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ca/ca_test.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func newCAArgs(t *testing.T) *caArgs {
125125
features.Reset()
126126

127127
fc := clock.NewFake()
128-
fc.Add(1 * time.Hour)
128+
fc.Set(time.Date(2020, 01, 01, 12, 00, 00, 0, time.UTC))
129129

130130
pa, err := policy.New(map[identifier.IdentifierType]bool{"dns": true}, nil, blog.NewMock())
131131
test.AssertNotError(t, err, "Couldn't create PA")
@@ -135,7 +135,11 @@ func newCAArgs(t *testing.T) *caArgs {
135135
legacy, err := issuance.NewProfile(issuance.ProfileConfig{
136136
MaxValidityPeriod: config.Duration{Duration: time.Hour * 24 * 90},
137137
MaxValidityBackdate: config.Duration{Duration: time.Hour},
138-
IgnoredLints: []string{"w_subject_common_name_included"},
138+
IgnoredLints: []string{
139+
"e_sub_cert_aia_does_not_contain_ocsp_url",
140+
"w_ct_sct_policy_count_unsatisfied",
141+
"n_subject_common_name_included",
142+
},
139143
})
140144
test.AssertNotError(t, err, "Loading test profile")
141145
modern, err := issuance.NewProfile(issuance.ProfileConfig{
@@ -145,7 +149,11 @@ func newCAArgs(t *testing.T) *caArgs {
145149
OmitSKID: true,
146150
MaxValidityPeriod: config.Duration{Duration: time.Hour * 24 * 6},
147151
MaxValidityBackdate: config.Duration{Duration: time.Hour},
148-
IgnoredLints: []string{"w_ext_subject_key_identifier_missing_sub_cert"},
152+
IgnoredLints: []string{
153+
"e_sub_cert_aia_does_not_contain_ocsp_url",
154+
"w_ct_sct_policy_count_unsatisfied",
155+
"w_ext_subject_key_identifier_missing_sub_cert",
156+
},
149157
})
150158
test.AssertNotError(t, err, "Loading test profile")
151159
profiles := map[string]*issuance.Profile{

cmd/cert-checker/main_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ func TestIgnoredLint(t *testing.T) {
595595
template.DNSNames = []string{"zombo.com"}
596596
template.KeyUsage = x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment
597597
template.ExtKeyUsage = []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth}
598+
template.CRLDistributionPoints = []string{"http://crl.example.org"}
598599
template.IsCA = false
599600

600601
subjectCertDer, err := x509.CreateCertificate(rand.Reader, template, issuerCert, testKey.Public(), testKey)

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ require (
2727
github.com/redis/go-redis/extra/redisotel/v9 v9.5.3
2828
github.com/redis/go-redis/v9 v9.10.0
2929
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399
30-
github.com/weppos/publicsuffix-go v0.50.3
31-
github.com/zmap/zcrypto v0.0.0-20250129210703-03c45d0bae98
32-
github.com/zmap/zlint/v3 v3.6.6
30+
github.com/weppos/publicsuffix-go v0.50.4-0.20260507075217-1bd47f85b3da
31+
github.com/zmap/zcrypto v0.0.0-20260514033604-a1159eb3cad9
32+
github.com/zmap/zlint/v3 v3.7.2-0.20260531191521-b88ecfaefc52
3333
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0
3434
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0
3535
go.opentelemetry.io/otel v1.43.0

go.sum

Lines changed: 6 additions & 105 deletions
Large diffs are not rendered by default.

vendor/github.com/weppos/publicsuffix-go/publicsuffix/rules.go

Lines changed: 62 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/zmap/zcrypto/json/ecdhe.go

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/zmap/zcrypto/json/names.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/zmap/zcrypto/json/rsa.go

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/zmap/zcrypto/rsa/FORK_SOURCE.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)