-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add breaking change documentation for SSL certificate revocation check mode change in .NET 10 #46928
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
Add breaking change documentation for SSL certificate revocation check mode change in .NET 10 #46928
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
afa0936
Initial plan
Copilot d5e7963
Add breaking change documentation for SSL certificate revocation chec…
Copilot a1fe5a0
human edits
gewarren b91447b
Address review feedback: improve wording and consistency
Copilot 02079a1
Update docs/core/compatibility/networking/10.0/ssl-certificate-revoca…
gewarren 251c515
Add line break
gewarren 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
90 changes: 90 additions & 0 deletions
90
.../core/compatibility/networking/10.0/ssl-certificate-revocation-check-default.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,90 @@ | ||
| --- | ||
| title: "Breaking change - HttpClient/SslStream default certificate revocation check mode changed to Online" | ||
| description: "Learn about the breaking change in .NET 10 Preview 6 where the default certificate revocation check mode changed from NoCheck to Online." | ||
| ms.date: 06/23/2025 | ||
| ai-usage: ai-assisted | ||
| ms.custom: https://github.com/dotnet/docs/issues/46824 | ||
| --- | ||
|
|
||
| # HttpClient/SslStream default certificate revocation check mode changed to Online | ||
|
|
||
| <xref:System.Net.Security.SslClientAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> and <xref:System.Net.Security.SslServerAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> default values have changed from `NoCheck` to `Online`. This change enhances security and makes the behavior consistent with <xref:System.Security.Cryptography.X509Certificates.X509ChainPolicy?displayProperty=nameWithType>. | ||
|
|
||
| ## Version introduced | ||
|
|
||
| .NET 10 Preview 6 | ||
|
|
||
| ## Previous behavior | ||
|
|
||
| <xref:System.Net.Security.SslClientAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> and <xref:System.Net.Security.SslServerAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> default values were `NoCheck`, meaning certificate revocation lists weren't checked by default. | ||
|
|
||
| ```csharp | ||
| var clientOptions = new SslClientAuthenticationOptions | ||
| { | ||
| TargetHost = "example.com" | ||
| // CertificateRevocationCheckMode defaults to NoCheck | ||
| }; | ||
|
|
||
| var serverOptions = new SslServerAuthenticationOptions | ||
| { | ||
| ServerCertificate = serverCertificate | ||
| // CertificateRevocationCheckMode defaults to NoCheck | ||
| }; | ||
| ``` | ||
|
|
||
| ## New behavior | ||
|
|
||
| <xref:System.Net.Security.SslClientAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> and <xref:System.Net.Security.SslServerAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> default values are `Online`, meaning certificate revocation lists are checked online by default. | ||
|
|
||
| ```csharp | ||
| var clientOptions = new SslClientAuthenticationOptions | ||
| { | ||
| TargetHost = "example.com" | ||
| // CertificateRevocationCheckMode defaults to Online | ||
| }; | ||
|
|
||
| var serverOptions = new SslServerAuthenticationOptions | ||
| { | ||
| ServerCertificate = serverCertificate | ||
| // CertificateRevocationCheckMode defaults to Online | ||
| }; | ||
| ``` | ||
|
|
||
| ## Type of breaking change | ||
|
|
||
| This is a [behavioral change](../../categories.md#behavioral-change). | ||
|
|
||
| ## Reason for change | ||
|
|
||
| This change enhances security and ensures consistency between APIs related to X.509 certificate revocation checking. | ||
|
|
||
| ## Recommended action | ||
|
|
||
| If certificate revocation checking is not desired, specify `X509RevocationMode.NoCheck` explicitly: | ||
|
|
||
| ```csharp | ||
| var clientOptions = new SslClientAuthenticationOptions | ||
| { | ||
| TargetHost = "example.com", | ||
| CertificateRevocationCheckMode = X509RevocationMode.NoCheck | ||
| }; | ||
|
|
||
| var serverOptions = new SslServerAuthenticationOptions | ||
| { | ||
| ServerCertificate = serverCertificate, | ||
| CertificateRevocationCheckMode = X509RevocationMode.NoCheck | ||
| }; | ||
| ``` | ||
|
|
||
| In situations where the code might not be modified, previous behavior can be enabled by setting either: | ||
|
|
||
| - `System.Net.Security.NoRevocationCheckByDefault` AppContext switch to `true` | ||
| - `DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT` environment variable to `true` | ||
|
|
||
| ## Affected APIs | ||
|
|
||
| - <xref:System.Net.Security.SslStream.AuthenticateAsClient%2A?displayProperty=fullName> | ||
| - <xref:System.Net.Security.SslStream.AuthenticateAsClientAsync%2A?displayProperty=fullName> | ||
| - <xref:System.Net.Security.SslStream.AuthenticateAsServer%2A?displayProperty=fullName> | ||
| - <xref:System.Net.Security.SslStream.AuthenticateAsServerAsync%2A?displayProperty=fullName> | ||
| - <xref:System.Net.Http.HttpClient?displayProperty=fullName> | ||
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
Oops, something went wrong.
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.