Skip to content

Commit

Permalink
Merge pull request #41557 from dotnet/main
Browse files Browse the repository at this point in the history
Merge main into live
  • Loading branch information
dotnet-policy-service[bot] authored Jun 26, 2024
2 parents 03d6184 + 5cc8f5d commit e513d16
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
6 changes: 5 additions & 1 deletion docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
{
"files": [
"Compiler Breaking Changes - DotNet 7.md",
"Compiler Breaking Changes - DotNet 8.md"
"Compiler Breaking Changes - DotNet 8.md",
"Compiler Breaking Changes - DotNet 9.md"
],
"src": "_roslyn/docs/compilers/CSharp",
"dest": "csharp/whats-new/breaking-changes",
Expand Down Expand Up @@ -493,6 +494,7 @@
"_csharplang/proposals/*.md": "05/15/2024",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "11/08/2022",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 8.md": "09/26/2023",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md": "06/26/2024",
"_vblang/spec/*.md": "07/21/2017"
},
"ms.subservice": {
Expand Down Expand Up @@ -662,6 +664,7 @@
"_csharplang/proposals/params-collections.md": "Params collections",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "C# compiler breaking changes since C# 10",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 8.md": "C# compiler breaking changes since C# 11",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md": "C# compiler breaking changes since C# 12",
"_vblang/spec/introduction.md": "Introduction",
"_vblang/spec/lexical-grammar.md": "Lexical grammar",
"_vblang/spec/preprocessing-directives.md": "Preprocessing directives",
Expand Down Expand Up @@ -777,6 +780,7 @@
"_csharplang/proposals/params-collections.md": "Allow the `params` modifier on collection types beyond arrays, including `IEnumerable` types.",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 7.md": "Learn about any breaking changes since the initial release of C# 10",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 8.md": "Learn about any breaking changes since the initial release of C# 11",
"_roslyn/docs/compilers/CSharp/Compiler Breaking Changes - DotNet 9.md": "Learn about any breaking changes since the initial release of C# 12",
"_vblang/spec/introduction.md": "This chapter provides and introduction to the Visual Basic language.",
"_vblang/spec/lexical-grammar.md": "This chapter defines the lexical grammar for Visual Basic.",
"_vblang/spec/preprocessing-directives.md": "This chapter defines the preprocessing directives allowed in Visual Basic",
Expand Down
1 change: 1 addition & 0 deletions docs/core/compatibility/9.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff
## See also

- [What's new in .NET 9](../whats-new/dotnet-9/overview.md)
- [C# 13 breaking changes](../../../_roslyn/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20DotNet%209.md)
2 changes: 2 additions & 0 deletions docs/csharp/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ items:
- name: C# 13
displayName: what's New
href: whats-new/csharp-13.md
- name: Breaking changes in C# 13
href: ../../_roslyn/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20DotNet%209.md
- name: C# 12
displayName: what's New
href: whats-new/csharp-12.md
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/interop/default-marshalling-for-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,12 @@ void New(long [][][] ar );

```vb
Sub New1( ar As System.Array )
Sub New2( <MarshalAs(UnmanagedType.Safe array)> ar As System.Array )
Sub New2( <MarshalAs(UnmanagedType.SafeArray)> ar As System.Array )
```

```csharp
void New1( System.Array ar );
void New2( [MarshalAs(UnmanagedType.Safe array)] System.Array ar );
void New2( [MarshalAs(UnmanagedType.SafeArray)] System.Array ar );
```

#### Unmanaged signature
Expand Down
20 changes: 9 additions & 11 deletions docs/framework/network-programming/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,26 @@ For more information see [TLS protocol version support in Schannel](/windows/win

## Recommendations

- For TLS 1.3, target .NET Framework 4.8 or later. ([here](#audit-your-code-and-make-code-changes) is how to check what is your `target framework`.)
- Do not specify the TLS version explicitly. (i.e. don't use the method overloads of SslStream that take an explicit SslProtocols parameter.)
- For TLS 1.3, target .NET Framework 4.8 or later. Check [Audit your code](#audit-your-code-and-make-code-changes) section how to verify your `target framework`.
- Do not specify the TLS version explicitly, i.e. don't use the method overloads of `SslStream` that take an explicit `SslProtocols` parameter.
- That way your code will let the OS decide on the TLS version.
- If you must set <xref:System.Net.ServicePointManager.SecurityProtocol?displayProperty=nameWithType>, then set it to <xref:System.Net.SecurityProtocolType.SystemDefault?displayProperty=nameWithType>. That will also use OS default.
- If you must use the method overloads of SslStream that take an explicit SslProtocols parameter, then pass `SslProtocols.SystemDefault` as argument. That will also use OS default.
- If you must use the method overloads of `SslStream` that take an explicit `SslProtocols` parameter, then pass `SslProtocols.SystemDefault` as argument. That will also use OS default.
- Perform a thorough code audit to verify you're not specifying a TLS or SSL version explicitly.

> [!WARNING]
> Do not use `SslProtocols.Default`. (because it sets TLS version to SSL3 and TLS1.0 which is obsoleted.)
> Do not use `SslProtocols.Default`, because it sets TLS version to SSL3 and TLS 1.0 which are obsoleted.
When your app lets the OS choose the TLS version:

- It automatically takes advantage of new protocols added in the future.
- The OS blocks protocols that are discovered not to be secure.

The section [Audit your code and make code changes](#audit-your-code-and-make-code-changes) covers auditing and updating your code.
- It automatically takes advantage of new TLS protocols added in the future.
- The OS blocks protocols that are discovered not to be secure (e.g. SSL3 and TLS 1.0).

This article explains how to enable the strongest security available for the version of .NET Framework that your app targets and runs on. When an app explicitly sets a security protocol and version, it opts out of any other alternative, and opts out of .NET Framework and OS default behavior. If you want your app to be able to negotiate a TLS 1.3 connection, explicitly setting to a lower TLS version prevents a TLS 1.3 connection.

If you can't avoid specifying a protocol version explicitly, we strongly recommend that you specify TLS1.2 or TLS 1.3 (which is `currently considered secure`). For guidance on identifying and removing TLS 1.0 dependencies, download the [Solving the TLS 1.0 Problem](https://www.microsoft.com/download/details.aspx?id=55266) white paper.
If you can't avoid specifying a protocol version explicitly, we strongly recommend that you specify TLS 1.2 or TLS 1.3 (which is `currently considered secure`). For guidance on identifying and removing TLS 1.0 dependencies, download the [Solving the TLS 1.0 Problem](https://www.microsoft.com/download/details.aspx?id=55266) white paper.

WCF Supports TLS 1.2 as the default in .NET Framework 4.7. Starting with .NET Framework 4.7.1, WCF defaults to the operating system configured version. If an application is explicitly configured with `SslProtocols.None`, WCF uses the operating system default setting when using the NetTcp transport.
WCF supports TLS 1.2 as the default in .NET Framework 4.7. Starting with .NET Framework 4.7.1, WCF defaults to the operating system configured version. If an application is explicitly configured with `SslProtocols.None`, WCF uses the operating system default setting when using the NetTcp transport.

You can ask questions about this document in the GitHub issue [Transport Layer Security (TLS) best practices with the .NET Framework](https://github.com/dotnet/docs/issues/4675).

Expand All @@ -88,7 +86,7 @@ Use the following sections to verify you're not using a specific TLS or SSL vers

## If you must explicitly set a Security Protocol

If you must explicitly set a security protocol instead of letting .NET or the OS pick the security protocol pick these protocols:
If you must explicitly set a security protocol instead of letting .NET or the OS pick the security protocol, pick these protocols:

- For .NET Framework 3.5: TLS 1.2
- For .NET Framework 4.6.2 or later: TLS 1.3
Expand Down

0 comments on commit e513d16

Please sign in to comment.