-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SslServerAuthenticationOptions.ApplicationProtocols empty list error #55772
Conversation
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue Details#55447 (Draft while tests confirm original behavior)
|
Should we make same check for Windows & macOS so the ALPN handling is consistent? (even if it does not break on Windows right now?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Windows already has this check: runtime/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs Line 63 in 188c270
I couldn't find the Mac code path at first, but I've fixed it now, as well as android. |
Fixes #55447 SslStream is inconsistent across platforms about checking if the ApplicationProtocol list is null vs empty. On Windows it checks both, but on other platforms it only checks for null so an empty list will cause unexpected failures on other platforms.