tls: preserve CN name constraints with OpenSSL 4.1 - #65957
Open
panva wants to merge 2 commits into
Open
Conversation
OpenSSL no longer applies DNS name constraints to the subject CN by default, but tls.checkServerIdentity() still uses it without a DNS SAN. Enable subject checking during chain verification only when no DNS SAN exists, preserving the existing hostname verification policy. Assisted-by: Codex Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65957 +/- ##
==========================================
- Coverage 90.17% 90.17% -0.01%
==========================================
Files 771 771
Lines 265489 265489
Branches 50471 50478 +7
==========================================
- Hits 239405 239394 -11
- Misses 17042 17048 +6
- Partials 9042 9047 +5
🚀 New features to boost your workflow:
|
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 opening this after checking out the OpenSSL 4.1 alpha release and having an LLM find behaviour changes, this one stood out as something that might need ironing out. Other 4.1 related test or doc fixes are in #65956.
I would much rather that someone more aware of TLS takes a look at this instead.
OpenSSL 4.1 no longer applies DNS name constraints to the subject CN by default, but tls.checkServerIdentity() still uses it without a DNS SAN. Enable subject checking during chain verification only when no DNS SAN exists, preserving the existing hostname verification policy.
Assisted-by: Codex
Refs: https://openssl-library.org/post/2026-09-09-openssl-4.1-alpha/