Skip to content

Commit

Permalink
Merge branch 'master' into aia_ca_issuers_must_have_http_only
Browse files Browse the repository at this point in the history
  • Loading branch information
christopher-henderson authored Jun 16, 2024
2 parents bbb82c7 + ae8d594 commit 566c6e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewCommonNameMailboxValidated() lint.LintInterface {
}

func (l *commonNameMailboxValidated) CheckApplies(c *x509.Certificate) bool {
return util.IsMailboxValidatedCertificate(c)
return util.IsMailboxValidatedCertificate(c) && util.IsSubscriberCert(c)
}

func (l *commonNameMailboxValidated) Execute(c *x509.Certificate) *lint.LintResult {
Expand Down
15 changes: 3 additions & 12 deletions v3/lints/rfc/lint_crl_revoked_certificates_field_empty.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,14 @@ func (l *revokedCertificates) Execute(c *x509.RevocationList) *lint.LintResult {
// or confirmed to be missing from the ASN.1 data structure.
input := cryptobyte.String(c.Raw)

// From crypto/x509/parser.go: we read the SEQUENCE including length and tag
// bytes so that we can populate RevocationList.Raw, before unwrapping the
// SEQUENCE so it can be operated on
if !input.ReadASN1Element(&input, cryptobyte_asn1.SEQUENCE) {
return &lint.LintResult{Status: lint.Fatal, Details: "malformed CRL"}
}
// Extract the CertificateList
if !input.ReadASN1(&input, cryptobyte_asn1.SEQUENCE) {
return &lint.LintResult{Status: lint.Fatal, Details: "malformed CRL"}
}

var tbs cryptobyte.String
// From crypto/x509/parser.go: do the same trick again as above to extract
// the raw bytes for Certificate.RawTBSCertificate
if !input.ReadASN1Element(&tbs, cryptobyte_asn1.SEQUENCE) {
return &lint.LintResult{Status: lint.Fatal, Details: "malformed TBS CRL"}
}
if !tbs.ReadASN1(&tbs, cryptobyte_asn1.SEQUENCE) {
// Extract the TBSCertList from the CertificateList
if !input.ReadASN1(&tbs, cryptobyte_asn1.SEQUENCE) {
return &lint.LintResult{Status: lint.Fatal, Details: "malformed TBS CRL"}
}

Expand Down
2 changes: 1 addition & 1 deletion v3/util/gtld_map.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 566c6e0

Please sign in to comment.