CAA: Handle non-empty RRSets correctly during wildcard checking #8033
+16
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When checking CAA, issuance is allowed if the relevant RRSet (as defined in RFC 8659, Section 3) does not contain any records of the right Property kind (issue or issuewild) for the kind of checking being attempted. Previously, we correctly detected that a non-wildcard issuance attempt could short-circuit our validation logic if no issue records are present. However, we did not do a similar short-circuit for wildcard issuance attempts when no issue records and no issuewild records are present.
Add a test which demonstrates that a nearly-empty RRSet accidentally forbade issuance of wildcard certs. Update our logic to perform the "no relevant records" check slightly later, so that it catches both the wildcard and non-wildcard cases, causing the new test to pass.
Fixes #8032