-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix for TLS 1.3 session resumption on Linux #123239
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
Conversation
|
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamMutualAuthenticationTest.cs
Outdated
Show resolved
Hide resolved
rzikm
left a comment
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, Thanks!
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.
Pull request overview
This PR fixes a regression in TLS 1.3 session resumption on Linux where resumed connections with client certificates incorrectly report IsMutuallyAuthenticated=false and LocalCertificate=null. The issue was introduced in a previous commit that added support for TLS resumption with client certificates.
Changes:
- Added a regression test that verifies mutual authentication is correctly reported across multiple TLS connections (including resumed ones)
- Added
IntPtroverloads forSslSessionReusedandSslGetSessioninterop methods to support the fix - Fixed
NewSessionCallbackinInterop.OpenSsl.csto inherit certificate information from the current session when TLS 1.3 issues new session tickets on resumed connections
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
SslStreamMutualAuthenticationTest.cs |
Added regression test SslStream_Tls13ResumptionWithClientCert_IsMutuallyAuthenticatedTrue that verifies mutual authentication properties are correctly set across initial and resumed TLS connections |
Interop.Ssl.cs |
Added IntPtr overloads for SslSessionReused and SslGetSession methods to enable calling these functions from unmanaged callback contexts |
Interop.OpenSsl.cs |
Fixed NewSessionCallback to retrieve certificate information from the current session when TLS 1.3 issues new tickets on resumed connections (when SSL_get_certificate returns null) |
Fixes #123238