-
Notifications
You must be signed in to change notification settings - Fork 50
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
Improve name constraints testing and fix bugs found #18
Merged
Commits on Jan 10, 2023
-
dns_name: Update assert string to new API
We don't call anymore `presented_dns_id_matches_reference_dns_id`.
Configuration menu - View commit details
-
Copy full SHA for 29a112d - Browse repository at this point
Copy the full SHA 29a112dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89569af - Browse repository at this point
Copy the full SHA 89569afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1536dba - Browse repository at this point
Copy the full SHA 1536dbaView commit details -
There were two bugs. webpki didn't: 1. read the X.509 Name Constraints field in its entirety, nor 2. check the certificate subject against the constraints correctly (1) is a simple fix, (2) requires reading the Common Name from the certificate. Requires lifting some DER parsing logic from ring to parse UTF8String and Set fields. Ring doesn't support those and isn't likely to in the near future, see briansmith/ring#1265. Closes #3.
Configuration menu - View commit details
-
Copy full SHA for 53d7dc0 - Browse repository at this point
Copy the full SHA 53d7dc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b50a38 - Browse repository at this point
Copy the full SHA 4b50a38View commit details -
Generate tests for name constraints
This uses cryptography.io and can likely to be extended to test other features.
Configuration menu - View commit details
-
Copy full SHA for 698daef - Browse repository at this point
Copy the full SHA 698daefView commit details -
Fix name constraints matching further
For -- and limited to -- server end-entity certificates, subject commonName can be a DNS name that should be subject to DNS name constraints. Name constraints can and should have an impact on path building and certificate validity, even if we don't actually use the commonName for name validation after this. This is annoying, though, because: - not all end-entity certs have a commonName, because it's no longer required, and a missing one shouldn't be considered a name constraints strike. - only server end-entity certs should be given this treatment: clients don't typically have DNS names (see: https://bugzilla.mozilla.org/show_bug.cgi?id=1523484)
Configuration menu - View commit details
-
Copy full SHA for 2b0105a - Browse repository at this point
Copy the full SHA 2b0105aView commit details -
Reject non-contiguous netmasks
Add a specific error for this, and avoid use of BadDER for cases where the DER encoding is actually fine but the syntax of the messages is incorrect.
Configuration menu - View commit details
-
Copy full SHA for 8f491a8 - Browse repository at this point
Copy the full SHA 8f491a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18d5c60 - Browse repository at this point
Copy the full SHA 18d5c60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a09c07 - Browse repository at this point
Copy the full SHA 5a09c07View commit details -
This means adding new errors is not a breaking change, at the cost of disabling exhaustive matching of all errors in downstream code.
Configuration menu - View commit details
-
Copy full SHA for 9281ec5 - Browse repository at this point
Copy the full SHA 9281ec5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e9de6e - Browse repository at this point
Copy the full SHA 8e9de6eView commit details
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.