-
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
[PoC] surface Quic transport errors #87679
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThis implements proposal from #72666. We would currently surface TransportError on cipher mismatch. I suspect that both MsQuic and other implementations may have more codes that we do not handle so the actual set may be bigger. Looking at the cases again when we throw on transport error, I would like to prose change on QUIC_STATUS_USER_CANCELED. While that maps to MsQuic status, I feel cancellation has specific meaning in .NET around cancellation tokens. - System.Security.Authentication.AuthenticationException: Authentication failed because the remote party sent a TLS alert: 'UserCanceled'.
+ System.Net.Quic.QuicException: QUIC encountered transport error '346' I also feel that when we would surface as transport error, we would be more following RFC than MsQuic internals. In either case there is not much the code can do e.g. this is purely diagnostic.
|
src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicCipherSuitesPolicyTests.cs
Outdated
Show resolved
Hide resolved
I'm not a fan of this particular proposition: - System.Security.Authentication.AuthenticationException: Authentication failed because the remote party sent a TLS alert: 'UserCanceled'.
+ System.Net.Quic.QuicException: QUIC encountered transport error '346' I don't think making exception more obscure is better. I don't find the combination of TLS alert and cancel misleading, but if you find it unsuitable, is there anything better we could replace this with? |
This part of runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs Lines 583 to 590 in 2c62994
|
closing in favor of #88550 |
This implements proposal from #72666.
We would currently surface TransportError on cipher mismatch. I suspect that both MsQuic and other implementations may have more codes that we do not handle so the actual set may be bigger.
Looking at the cases again when we throw on transport error, I would like to prose change on QUIC_STATUS_USER_CANCELED.
While that maps to MsQuic status, I feel cancellation has specific meaning in .NET around cancellation tokens.
In tests where this happens there is no cancellation nor user. Typically this is failure to complete handshake operation. (like callback failure)
I also feel that when we would surface as transport error, we would be more following RFC than MsQuic internals. In either case there is not much the code can do e.g. this is purely diagnostic.