crypto/x509: avoid false wildcard matches for 2-label exclusions#77962
crypto/x509: avoid false wildcard matches for 2-label exclusions#77962willswire wants to merge 1 commit intogolang:release-branch.go1.25from
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
This PR (HEAD: 7d5958a) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/751880. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/751880. |
When evaluating excluded DNS name constraints against wildcard SANs,
matchDomainConstraint trims one label from both names so that excluded
subdomains like
foo.example.comcorrectly preclude*.example.com.That trimming was also applied to two-label constraints. For a
constraint like
blocked.example, trimming reduces it toexample, whichcan incorrectly match unrelated wildcard names.
Only apply the wildcard/excluded trimming path when the excluded
constraint has more than two labels.
This change adds regression coverage for the wildcard-matching behavior
in
TestExcludedWildcardNameConstraintsand adds a chain-level case inTestConstraintCases.Updates #76935
Updates #77323