Allow callers to ignore selected critical extensions#485
Open
xyzzyz wants to merge 1 commit intorustls:mainfrom
Open
Allow callers to ignore selected critical extensions#485xyzzyz wants to merge 1 commit intorustls:mainfrom
xyzzyz wants to merge 1 commit intorustls:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #485 +/- ##
==========================================
+ Coverage 96.97% 97.03% +0.05%
==========================================
Files 20 20
Lines 3936 4007 +71
==========================================
+ Hits 3817 3888 +71
Misses 119 119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add ExtensionId and an opt-in EndEntityCert constructor that accepts a DER OID allowlist for unsupported critical extensions on the leaf certificate. Existing TryFrom parsing remains strict by default. Add verify_for_usage_with_ignored_critical_extensions so callers can explicitly apply an allowlist when path building parses intermediate certificates. Existing verify_for_usage remains strict for intermediates. Supported extensions are still parsed and validated normally; the allowlist only suppresses UnsupportedCriticalExtension for exact OID matches. Add integration tests for leaf and intermediate allowlisting, exact-match behavior, and supported-extension parsing.
1667c76 to
88fc6de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I'm working with a system that uses private critical extensions on X.509 certificate. They don't play a role during building a path, but are then used to enforce constraints on the objects being authenticated. Therefore, I'd like to be able to make
rustls-webpkiignore these extensions when building a path, and verify these later separately.I don't like how I had to add a new method to make sure that API is backwards-compatible. I think that
verify_for_usagealready has too many arguments as it is. I'd suggest adding a new API that's extensible by design: it should take anOptionssort of an object as argument, the fields of which should be private; this way new functionality can be added by adding new public methods on theOptionsobject.I could do it in a separate PR, and then once it's merged, rebase this one on top of the other one. Thoughts?