Retain flag after custom critical extensions check#3030
Merged
samuel40791765 merged 1 commit intoaws:mainfrom Feb 26, 2026
Merged
Retain flag after custom critical extensions check#3030samuel40791765 merged 1 commit intoaws:mainfrom
samuel40791765 merged 1 commit intoaws:mainfrom
Conversation
skmcgrail
approved these changes
Feb 24, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3030 +/- ##
==========================================
+ Coverage 78.30% 78.36% +0.05%
==========================================
Files 689 689
Lines 120966 121011 +45
Branches 16989 16991 +2
==========================================
+ Hits 94722 94827 +105
+ Misses 25349 25288 -61
- Partials 895 896 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
justsmth
approved these changes
Feb 24, 2026
Contributor
Author
|
Synced up s2n-tls team that this won't break them or their consumers. |
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.
Description of changes:
check_custom_critical_extensionspreviously cleared theEXFLAG_CRITICALbit from a certificate's cachedex_flagsafter successfully validating custom critical extensions. The original intent was to record that the certificate's critical extensions had been handled, preserving that outcome for the certificate going forward.However, custom critical extension validation is a property of the verification context, not the certificate itself. This change removes the flag clearing so that the custom extension check is evaluated during each verification rather than permanently mutated on the
cert. This ensures that re-verifying the sameX509object without a custom callback correctly reportsX509_V_ERR_UNHANDLED_CRITICAL_EXTENSION.Call-outs:
N/A
Testing:
Tweak and add minor test that checks the behavior.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.