Let GSK validate the CN and SAN domains of server certificates#616
Draft
ChongZhou-Broadcom wants to merge 1 commit into
Draft
Let GSK validate the CN and SAN domains of server certificates#616ChongZhou-Broadcom wants to merge 1 commit into
ChongZhou-Broadcom wants to merge 1 commit into
Conversation
Signed-off-by: ch.zhou <chong.zhou@broadcom.com>
|
Contributor
|
@ChongZhou-Broadcom , thanks for opening this; we'll discuss the changes. |
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.



In
httpClientSessionInitv2(), tls socket is initialized without CN/SAN validation.GSK API is capable of validating the CN and SAN domains, but it's not a default behavior. The peer's hostname must be set to the socket handle by
gsk_attribute_set_buffer(). The following code snippet is an example:@ifakhrutdinov Irek said he will be doing some research for this. I created this draft PR for him as a reference.
I tried this change with ZSS. I used the following configuration to test if the hostname validation really takes effect:
Without this change, ZSS worked with both
gatewayHostnamevalues. With this change, only the real host name worked, the IP address, which is not in my certificate, no longer works.