Fix for TLS 1.3 session resumption on Linux#123239
Merged
liveans merged 8 commits intodotnet:mainfrom Jan 20, 2026
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
This was referenced Jan 16, 2026
rzikm
reviewed
Jan 16, 2026
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
liveans
approved these changes
Jan 19, 2026
Contributor
There was a problem hiding this comment.
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #123238