Fix hostname validation with OpenSSL/QuicTLS - #6274
Merged
Merged
Conversation
Document the distinction between endpoint and IP-only formatting, increase QUIC_ADDR_STR to the platform maximum, and expand parsing and formatting coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25e9a5bc-61c1-44b4-9221-b75067ecca54
Anthony Rossi (anrossi)
approved these changes
Aug 28, 2026
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6274 +/- ##
==========================================
+ Coverage 84.07% 85.46% +1.38%
==========================================
Files 60 60
Lines 18974 18989 +15
==========================================
+ Hits 15952 16228 +276
+ Misses 3022 2761 -261 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Guillaume Hetier (guhetier)
added a commit
that referenced
this pull request
Aug 28, 2026
## Description Addresses https://microsoft.visualstudio.com/OS/_workitems/edit/62840655 When using the OpenSSL or QuicTLS backends, the target hostname was not properly validated against the server certificate. `X509_VERIFY_PARAM_set1_host` and `X509_VERIFY_PARAM_set1_ip_asc` are now properly called. The server name provided to `ConnectionStart` is used for the validation, if it isn't provided, the target IP address is used instead. ## Testing CI. Manual testing validating a connection succeeds and fail as expected against various certificate matching or not the hostname and/or IP. New automated test cases will be added in a follow up. ## Documentation N/A Copilot-Session: 25e9a5bc-61c1-44b4-9221-b75067ecca54
Guillaume Hetier (guhetier)
added a commit
that referenced
this pull request
Aug 28, 2026
## Description Addresses https://microsoft.visualstudio.com/OS/_workitems/edit/62840655 When using the OpenSSL or QuicTLS backends, the target hostname was not properly validated against the server certificate. `X509_VERIFY_PARAM_set1_host` and `X509_VERIFY_PARAM_set1_ip_asc` are now properly called. The server name provided to `ConnectionStart` is used for the validation, if it isn't provided, the target IP address is used instead. ## Testing CI. Manual testing validating a connection succeeds and fail as expected against various certificate matching or not the hostname and/or IP. New automated test cases will be added in a follow up. ## Documentation N/A Copilot-Session: 25e9a5bc-61c1-44b4-9221-b75067ecca54
Guillaume Hetier (guhetier)
added a commit
that referenced
this pull request
Aug 28, 2026
## Description Addresses https://microsoft.visualstudio.com/OS/_workitems/edit/62840655 When using the OpenSSL or QuicTLS backends, the target hostname was not properly validated against the server certificate. `X509_VERIFY_PARAM_set1_host` and `X509_VERIFY_PARAM_set1_ip_asc` are now properly called. The server name provided to `ConnectionStart` is used for the validation, if it isn't provided, the target IP address is used instead. ## Testing CI. Manual testing validating a connection succeeds and fail as expected against various certificate matching or not the hostname and/or IP. New automated test cases will be added in a follow up. ## Documentation N/A --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25e9a5bc-61c1-44b4-9221-b75067ecca54
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
Addresses https://microsoft.visualstudio.com/OS/_workitems/edit/62840655
When using the OpenSSL or QuicTLS backends, the target hostname was not properly validated against the server certificate.
X509_VERIFY_PARAM_set1_hostandX509_VERIFY_PARAM_set1_ip_ascare now properly called.The server name provided to
ConnectionStartis used for the validation, if it isn't provided, the target IP address is used instead.Testing
CI. Manual testing validating a connection succeeds and fail as expected against various certificate matching or not the hostname and/or IP.
New automated test cases will be added in a follow up.
Documentation
N/A