Skip to content

Commit a1fe5a0

Browse files
committed
human edits
1 parent d5e7963 commit a1fe5a0

File tree

2 files changed

+12
-41
lines changed

2 files changed

+12
-41
lines changed
Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,38 @@
11
---
22
title: "Breaking change - HttpClient/SslStream default certificate revocation check mode changed to Online"
3-
description: "Learn about the breaking change in .NET 10 Preview 6 where the default certificate revocation check mode changed from NoCheck to Online."
3+
description: "Learn about the breaking change in .NET 10 where the default certificate revocation check mode changed from 'NoCheck' to 'Online'."
44
ms.date: 06/23/2025
55
ai-usage: ai-assisted
66
ms.custom: https://github.com/dotnet/docs/issues/46824
77
---
88

9-
# HttpClient/SslStream default certificate revocation check mode changed to Online
9+
# HttpClient/SslStream default certificate revocation check mode changed to `Online`
1010

11-
<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>.
11+
The default values of <xref:System.Net.Security.SslClientAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> and <xref:System.Net.Security.SslServerAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> have changed from `NoCheck` to `Online`. This change enhances security and makes the behavior consistent with <xref:System.Security.Cryptography.X509Certificates.X509ChainPolicy?displayProperty=nameWithType>.
1212

1313
## Version introduced
1414

1515
.NET 10 Preview 6
1616

1717
## Previous behavior
1818

19-
<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.
20-
21-
```csharp
22-
var clientOptions = new SslClientAuthenticationOptions
23-
{
24-
TargetHost = "example.com"
25-
// CertificateRevocationCheckMode defaults to NoCheck
26-
};
27-
28-
var serverOptions = new SslServerAuthenticationOptions
29-
{
30-
ServerCertificate = serverCertificate
31-
// CertificateRevocationCheckMode defaults to NoCheck
32-
};
33-
```
19+
Previously, the default value of <xref:System.Net.Security.SslClientAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> and <xref:System.Net.Security.SslServerAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> default values was `NoCheck`, meaning certificate revocation lists weren't checked by default.
3420

3521
## New behavior
3622

37-
<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.
38-
39-
```csharp
40-
var clientOptions = new SslClientAuthenticationOptions
41-
{
42-
TargetHost = "example.com"
43-
// CertificateRevocationCheckMode defaults to Online
44-
};
45-
46-
var serverOptions = new SslServerAuthenticationOptions
47-
{
48-
ServerCertificate = serverCertificate
49-
// CertificateRevocationCheckMode defaults to Online
50-
};
51-
```
23+
Starting in .NET 10, the default value of <xref:System.Net.Security.SslClientAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> and <xref:System.Net.Security.SslServerAuthenticationOptions.CertificateRevocationCheckMode?displayProperty=nameWithType> is `Online`, meaning certificate revocation lists are checked online by default.
5224

5325
## Type of breaking change
5426

55-
This is a [behavioral change](../../categories.md#behavioral-change).
27+
This change is a [behavioral change](../../categories.md#behavioral-change).
5628

5729
## Reason for change
5830

5931
This change enhances security and ensures consistency between APIs related to X.509 certificate revocation checking.
6032

6133
## Recommended action
6234

63-
If certificate revocation checking is not desired, specify `X509RevocationMode.NoCheck` explicitly:
35+
If certificate revocation checking is not desired, specify <xref:System.Security.Cryptography.X509Certificates.X509RevocationMode.NoCheck?displayProperty=nameWithType> explicitly:
6436

6537
```csharp
6638
var clientOptions = new SslClientAuthenticationOptions
@@ -76,15 +48,16 @@ var serverOptions = new SslServerAuthenticationOptions
7648
};
7749
```
7850

79-
In situations where the code might not be modified, previous behavior can be enabled by setting either:
51+
In situations where you can't modify the code, you can enable the previous behavior with one of the following settings:
8052

81-
- `System.Net.Security.NoRevocationCheckByDefault` AppContext switch to `true`
82-
- `DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT` environment variable to `true`
53+
- Set `System.Net.Security.NoRevocationCheckByDefault` AppContext switch to `true`.
54+
- Set `DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT` environment variable to `true`.
8355

8456
## Affected APIs
8557

8658
- <xref:System.Net.Security.SslStream.AuthenticateAsClient%2A?displayProperty=fullName>
8759
- <xref:System.Net.Security.SslStream.AuthenticateAsClientAsync%2A?displayProperty=fullName>
8860
- <xref:System.Net.Security.SslStream.AuthenticateAsServer%2A?displayProperty=fullName>
8961
- <xref:System.Net.Security.SslStream.AuthenticateAsServerAsync%2A?displayProperty=fullName>
90-
- <xref:System.Net.Http.HttpClient?displayProperty=fullName>
62+
- <xref:System.Net.Http.HttpClient.Send*?displayProperty=fullName> (when using either <xref:System.Net.Http.WinHttpHandler> or <xref:System.Net.Http.SocketsHttpHandler>)
63+
- <xref:System.Net.Http.HttpClient.SendAsync*?displayProperty=fullName> (when using either <xref:System.Net.Http.WinHttpHandler> or <xref:System.Net.Http.SocketsHttpHandler>)

docs/core/compatibility/toc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,8 +1912,6 @@ items:
19121912
items:
19131913
- name: .NET 10
19141914
items:
1915-
- name: HttpClient/SslStream default certificate revocation check mode changed to Online
1916-
href: networking/10.0/ssl-certificate-revocation-check-default.md
19171915
- name: Streaming HTTP responses enabled by default in browser HTTP clients
19181916
href: networking/10.0/default-http-streaming.md
19191917
- name: .NET 9

0 commit comments

Comments
 (0)