Skip to content

Commit 8220f11

Browse files
committed
Hopefully fixing links, some rewording
1 parent 11f7b4a commit 8220f11

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/code-quality/ca5361.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ f1_keywords:
2525

2626
## Cause
2727

28-
A <xref:System.AppContext.SetSwitch?displayProperty=nameWithType> method call sets `Switch.System.Net.DontEnableSchUseStrongCrypto` to `true`.
28+
A <xref:System.AppContext.SetSwitch%2A?displayProperty=nameWithType> method call sets `Switch.System.Net.DontEnableSchUseStrongCrypto` to `true`.
2929

3030
## Rule description
3131

32-
Setting `Switch.System.Net.DontEnableSchUseStrongCrypto` to `true` weakens the security of outgoing Transport Layer Security (TLS) connections, by using weaker cryptography. See [Transport Layer Security (TLS) best practices with the .NET Framework](/dotnet/framework/network-programming/tls#switchsystemnetdontenableschusestrongcrypto) for more information.
32+
Setting `Switch.System.Net.DontEnableSchUseStrongCrypto` to `true` weakens the cryptography used in outgoing Transport Layer Security (TLS) connections. Weaker cryptography can compromise the confidentiality of communication between your application and the server, making it easier for attackers to eavesdrop sensitive data. For more information, see [Transport Layer Security (TLS) best practices with the .NET Framework](/dotnet/framework/network-programming/tls#switchsystemnetdontenableschusestrongcrypto).
3333

3434
## How to fix violations
3535

36-
- If your application targets .NET Framework v4.6 or later, you can remove the <xref:System.AppContext.SetSwitch?displayProperty=nameWithType> method call.
36+
- If your application targets .NET Framework v4.6 or later, you can remove the <xref:System.AppContext.SetSwitch%2A?displayProperty=nameWithType> method call.
3737
- If your application targets .NET Framework earlier than v4.6, and runs on .NET Framework v4.6 or later, set the switch's value to `false`.
3838

3939
## When to suppress warnings
4040

41-
Suppress this warning if you must connect to a legacy service that cannot be upgraded to use more secure configurations of TLS.
41+
You can suppress this warning if you need to connect to a legacy service, which can't be upgraded to use secure TLS configurations.
4242

4343
## Pseudo-code examples
4444

@@ -63,7 +63,7 @@ Imports System
6363
Public Class ExampleClass
6464
Public Sub ExampleMethod()
6565
' CA5361 violation
66-
AppContext.SetSwitch(""Switch.System.Net.DontEnableSchUseStrongCrypto"", true)
66+
AppContext.SetSwitch("Switch.System.Net.DontEnableSchUseStrongCrypto", true)
6767
End Sub
6868
End Class
6969
```
@@ -77,7 +77,7 @@ public class ExampleClass
7777
{
7878
public void ExampleMethod()
7979
{
80-
AppContext.SetSwitch(""Switch.System.Net.DontEnableSchUseStrongCrypto"", false);
80+
AppContext.SetSwitch("Switch.System.Net.DontEnableSchUseStrongCrypto", false);
8181
}
8282
}
8383
```
@@ -87,7 +87,7 @@ Imports System
8787

8888
Public Class ExampleClass
8989
Public Sub ExampleMethod()
90-
AppContext.SetSwitch(""Switch.System.Net.DontEnableSchUseStrongCrypto"", false)
90+
AppContext.SetSwitch("Switch.System.Net.DontEnableSchUseStrongCrypto", false)
9191
End Sub
9292
End Class
9393
```

0 commit comments

Comments
 (0)