Skip to content

Use EphemeralKeySet for certificate cloning with macOS fallback#3

Closed
Copilot wants to merge 2 commits into
developfrom
copilot/sub-pr-1-again
Closed

Use EphemeralKeySet for certificate cloning with macOS fallback#3
Copilot wants to merge 2 commits into
developfrom
copilot/sub-pr-1-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

macOS throws PlatformNotSupportedException when EphemeralKeySet is used with X509CertificateLoader, requiring a platform-aware fallback.

Changes

  • DockerCertificate.Clone: Replace PersistKeySet with EphemeralKeySet | Exportable on Windows/Linux; use Exportable only on macOS where ephemeral keys are unsupported.
var keyStorageFlags = OperatingSystem.IsMacOS()
    ? X509KeyStorageFlags.Exportable
    : X509KeyStorageFlags.EphemeralKeySet | X509KeyStorageFlags.Exportable;

This avoids persisting private key material to disk on all platforms while remaining compatible with macOS.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…Linux, Exportable-only on macOS

Co-authored-by: henrikhimself <1175002+henrikhimself@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on macOS EphemeralKeySet support Use EphemeralKeySet for certificate cloning with macOS fallback 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