Skip to content

Retain PersistKeySet for SslStream TLS client auth — EphemeralKeySet unsupported on Windows#2

Closed
Copilot wants to merge 1 commit into
developfrom
copilot/sub-pr-1
Closed

Retain PersistKeySet for SslStream TLS client auth — EphemeralKeySet unsupported on Windows#2
Copilot wants to merge 1 commit into
developfrom
copilot/sub-pr-1

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

A review suggested switching Clone() to use EphemeralKeySet to reduce key persistence risk. However, EphemeralKeySet is fundamentally incompatible with SslStream TLS client authentication on Windows (all versions, including Windows 11).

Why EphemeralKeySet breaks on Windows

Windows delegates TLS to Schannel, which runs out-of-process. Ephemeral keys are in-process only, so Schannel cannot access them during the handshake:

Win32Exception (0x8009030E): No credentials are available in the security package

Tracked in dotnet/runtime#23749 and dotnet/runtime#103101 — this is an OS-level constraint, not a .NET bug.

Decision

PersistKeySet | Exportable in Clone() is retained as-is — it is the correct and required combination for cross-platform SslStream client certificate usage. EphemeralKeySet would be viable on Linux/macOS (where TLS is in-process) but breaks Windows without a viable workaround.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] [WIP] Address feedback on Windows 11 support for EphemeralKeySet in SslStream Retain PersistKeySet for SslStream TLS client auth — EphemeralKeySet unsupported on Windows Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants