-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add breaking change documentation for OpenSSL cryptographic primitives on macOS #46924
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7455430
Initial plan for issue
Copilot a5516be
Add OpenSSL cryptographic primitives breaking change documentation fo…
Copilot c39b6f7
human edits
gewarren 26bc6e6
resolve merge conflicts
gewarren f7119b0
Fix grammar in breaking change title by adding missing verb
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
58 changes: 58 additions & 0 deletions
58
docs/core/compatibility/cryptography/10.0/openssl-macos-unsupported.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| --- | ||
| title: "Breaking change: OpenSSL cryptographic primitives aren't supported on macOS" | ||
| description: "Learn about the breaking change in .NET 10 where OpenSSL cryptographic primitives are no longer supported on macOS." | ||
| ms.date: 06/23/2025 | ||
| ai-usage: ai-assisted | ||
| ms.custom: https://github.com/dotnet/docs/issues/46789 | ||
| --- | ||
| # OpenSSL cryptographic primitives are not supported on macOS | ||
|
|
||
| Starting in .NET 10, OpenSSL-backed cryptographic primitives are no longer supported on macOS. <xref:System.Security.Cryptography.AesCcm?displayProperty=fullName> and classes that are specific to OpenSSL, such as <xref:System.Security.Cryptography.RSAOpenSsl?displayProperty=fullName>, now throw a <xref:System.PlatformNotSupportedException> on macOS. | ||
|
|
||
| ## Version introduced | ||
|
|
||
| .NET 10 Preview 6 | ||
|
|
||
| ## Previous behavior | ||
|
|
||
| Previously, classes that are specific to OpenSSL, such as <xref:System.Security.Cryptography.RSAOpenSsl?displayProperty=fullName>, worked on macOS if OpenSSL was available. | ||
|
|
||
| <xref:System.Security.Cryptography.AesCcm?displayProperty=fullName> worked on macOS if OpenSSL was available. | ||
|
|
||
| ## New behavior | ||
|
|
||
| Classes that are specific to OpenSSL, such as <xref:System.Security.Cryptography.RSAOpenSsl>, don't work on macOS even if OpenSSL is available, and a <xref:System.PlatformNotSupportedException> exception is thrown. | ||
|
|
||
| <xref:System.Security.Cryptography.AesCcm> throws a <xref:System.PlatformNotSupportedException> exception. | ||
|
|
||
| ## Type of breaking change | ||
|
|
||
| This is a [behavioral change](../../categories.md#behavioral-change). | ||
|
|
||
| ## Reason for change | ||
|
|
||
| Support for the OpenSSL-backed primitives originated from .NET Core 1.0, where cryptography on macOS was implemented with OpenSSL. This wasn't ideal because a recent version of OpenSSL doesn't come on macOS, and acquiring and configuring OpenSSL on macOS was troublesome. In the .NET Core 2.0 timeframe, cryptography was moved to Apple's built-in functionality, so cryptographic functionality "just worked" without needing to acquire any additional components. | ||
|
|
||
| The types that are suffixed as `OpenSsl` were left as being implemented by OpenSSL, and <xref:System.Security.Cryptography.AesCcm> doesn't have an implementation in Apple's cryptographic libraries. | ||
|
|
||
| Supporting these OpenSSL-backed primitives on macOS has become more difficult as Apple has made it more difficult to load libraries from certain paths, and it complicates distributing software on macOS. | ||
|
|
||
| ## Recommended action | ||
|
|
||
| If you're using OpenSSL-backed primitives without any specific intention of using OpenSSL, the recommendation is to use the factories that provide a macOS implementation: | ||
|
|
||
| * `new DSAOpenSsl(...)` -> `DSA.Create(...)` | ||
| * `new ECDiffieHellmanOpenSsl(...)` -> `ECDiffieHellman.Create(...)` | ||
| * `new ECDsaOpenSsl(...)` -> `ECDsa.Create(...)` | ||
| * `new RSAOpenSsl(...)` -> `RSA.Create(...)` | ||
|
|
||
| <xref:System.Security.Cryptography.AesCcm?displayProperty=fullName> has no functional equivalent on macOS. Consider using a different cryptographic primitive, such as <xref:System.Security.Cryptography.AesGcm?displayProperty=fullName>, instead. | ||
|
|
||
| ## Affected APIs | ||
|
|
||
| * <xref:System.Security.Cryptography.AesCcm?displayProperty=fullName> (all constructors) | ||
| * <xref:System.Security.Cryptography.DSAOpenSsl?displayProperty=fullName> (all constructors) | ||
| * <xref:System.Security.Cryptography.ECDiffieHellmanOpenSsl?displayProperty=fullName> (all constructors) | ||
| * <xref:System.Security.Cryptography.ECDsaOpenSsl?displayProperty=fullName> (all constructors) | ||
| * <xref:System.Security.Cryptography.RSAOpenSsl?displayProperty=fullName> (all constructors) | ||
| * <xref:System.Security.Cryptography.SafeEvpPKeyHandle?displayProperty=fullName> (entire class) |
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
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.
Uh oh!
There was an error while loading. Please reload this page.