-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Configure ALPN for callback scenarios #34242
Conversation
listenOptions.UseHttps((_, _, _, _) => | ||
ValueTask.FromResult(new SslServerAuthenticationOptions() | ||
{ | ||
ServerCertificate = _x509Certificate2, |
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.
Can we add a test case confirming that adding
ServerCertificate = _x509Certificate2, | |
ServerCertificate = _x509Certificate2, | |
ApplicationProtocols = new(), |
disables ALPN? Assuming it does ofc.
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.
It worked on Windows but fails on Ubuntu 😢. I'll file a runtime bug for that. dotnet/runtime#55447
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.
Fixed in rc1 (main), dotnet/runtime#55772. Waiting for a runtime update.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Fixes #31303 by stashing HttpProtocols on TlsHandshakeCallbackOptions just like we did for HttpsConnectionAdapterOptions. If either of the callbacks don't supply ALPN settings then we will. ApplicationProtocols can be set to an empty list to disable ALPN.
Is this too magical?
Is it breaking for people that were using ServerOptionsSelectionCallback and suddenly HTTP/2 starts working?