- Notifications
You must be signed in to change notification settings - Fork5.2k
Support TLS Resume with client certificates on Linux#102656
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Support TLS Resume with client certificates on Linux#102656
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/libraries/System.Net.Security/src/System/Net/Security/SslStreamPal.Unix.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
rzikm commentedMay 24, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
wfurt commentedMay 28, 2024
I don't quite understand the comment. I thought we only support stateless e.g. tickets to avoid large server cache. But I would also think that it does not matter e.g. the resumption is possible in either way. |
src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamAllowTlsResumeTests.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
rzikm commentedMay 30, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I meant that Linux .NET server does not issue resumption tokens in TLS 1.3, so I had to test against different server (Windows in this case). Edit: my bad, it turns out that the resumption ticket was not transmitted because we close the connection without actually transmitting any user data, adding a ping-pong to the tests fixed the problem. |
rzikm commentedJun 6, 2024
/azp run runtime-extra-platforms |
| Azure Pipelines successfully started running 1 pipeline(s). |
rzikm commentedJun 6, 2024
/azp run runtime-libraries coreclr-outerloop |
| No pipelines are associated with this pull request. |
rzikm commentedJun 6, 2024
/azp list |
rzikm commentedJun 6, 2024
/azp run runtime-libraries-coreclr outerloop |
| Azure Pipelines successfully started running 1 pipeline(s). |
rzikm commentedJun 11, 2024
/azp run runtime-extra-platforms |
rzikm commentedJun 11, 2024
/azp run runtime-libraries-coreclr outerloop |
| Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
| Azure Pipelines successfully started running 1 pipeline(s). |
rzikm commentedJun 12, 2024
/ba-g Test failures are all unrelated, relevant stages (System.Net.Security.Tests) all pass |
LoopedBard3 commentedJun 18, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Related regression:dotnet/perf-autofiling-issues#36400 (Only the SSLStreamTests) Linux Arm64:dotnet/perf-autofiling-issues#36652 |
rzikm commentedJun 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I realize I did not post any measurements here, so here we are: The |
rzikm commentedJun 19, 2024
cc@stephentoub,@ManickaP, since this might look well in your future blog posts |
stephentoub commentedJun 19, 2024
already on my list :) |

Uh oh!
There was an error while loading.Please reload this page.
Closes#94561.
This PR enables TLS resume on Linux if client certificate is provided. The feature is triggered if local certificate selection routine manages to select a certificate, i.e. either of these situations:
The feature is enabled by caching SSL_CTX as before, certificate thumbprint has been added to the cache key to mirror what we do on Windows. The caching code has been reused from MsQuicConfiguration cache (and in further PR can be unified with the caching code we have for SslStream credentials on Windows).
I stressed the caching code under a dedicated program, there does not seem to be any leakage.