-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Setting SslServerAuthenticationOptions.ApplicationProtocols to an empty list fails on Ubuntu #55447
Comments
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue DetailsDepending on how you write your logic, the ApplicationProtocols List may end up being empty (not null).
On Ubuntu.1804.Amd64.Open this causes the following error:
There is no error on Windows, the handshake completes successfully without ALPN. (Mac still isn't supported #27727). Discovered as part of dotnet/aspnetcore#34242 where I was attempting to use the presence of an empty list to disable auto-configuration. Branch: main, 6.0 preview 7
|
Did you look what Windows send on the wire? I'm wondering if we should simple ignore empty list. |
Triage: There is trivial workaround. Not critical for 6.0. Moving to Future. |
When set to an empty list Windows does not send the ALPN extension in the Server Hello. It seems safe to ignore on both platforms. Windows has an explicit check for an empty list: runtime/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs Line 63 in 188c270
runtime/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Windows.cs Line 92 in 188c270
|
OK, So it has essentially same check and that is ok. I was wondering if we are getting to point that give (invalid?) configuration would load on Windows but fail on Linux. And it seems like we are not. |
Depending on how you write your logic, the ApplicationProtocols List may end up being empty (not null).
On Ubuntu.1804.Amd64.Open this causes the following error:
There is no error on Windows, the handshake completes successfully without ALPN. (Mac still isn't supported #27727).
Discovered as part of dotnet/aspnetcore#34242 where I was attempting to use the presence of an empty list to disable auto-configuration.
Branch: main, 6.0 preview 7
The text was updated successfully, but these errors were encountered: