Repository navigation
Utilize SAN extension matching during SSL/TLS peer verification - #482
Merged
Merged
Conversation
Contributor
Author
|
@m6w6 Ping. I've applied the suggested |
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.
Even when specifying appropriate
CN_matchcontext settings it's not always possible to correctly verify peersusing the existing PHP encryption wrappers. Consider a scenario in which we connect to a party whose
certificate utilizes the Subject Alternative Name (SAN) X.509 extension. A real-world example is
github.comwhose common name (CN) isgithub.combut whose certificate lists SAN entries of bothgithub.comandwww.github.com. An RFC 2818-compliant implementation will verify either name as correct:At this time PHP's encryption wrappers do not verify peer names against a cert's SAN list. As a result
the peer verification routine fails when attempting to verify the provided certificate with a
CN_matchfield equal to"www.github.com".Note that this patch has no BC implications and should be safe to merge with 5.4 and 5.5 branches.