Description
Description
PR: dotnet/runtime#105875
Obsoletion diag id: SYSLIB0058
Message: KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherAlgorithmStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.
ExchangeAlgorithmType, CipherAlgorithmType, HashAlgorithmType enums are being obsoleted because their only usage is on SslStream where they present redundant information (and they at times even discard some information due to missing appropriate members).
Together with those, also following members of SslStream are being obsoleted
- KeyExchangeAlgorithm
- KeyExchangeStrength
- CipherAlgorithm
- CipherAlgorithmStrength
- HashAlgorithm
- HashStrength
The recommended source of truth for the information is the NegotiatedCipherSuite property on SslStream.
Version
.NET 10
Previous behavior
N/A
New behavior
Source code using any of the obsoleted properties will issue a warning. Behavior remains unchanged.
Type of breaking change
- Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
- Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
- Behavioral change: Existing binaries might behave differently at run time.
Reason for change
Obsoleted enum types were outdated and missing members for covering new algorithms. Since the same information is available via TlsCipherSuite NegotiatedCipherSuite property on SslStream (which is kept up-to-date), we decided to obsolete these to make it more clear which one should be used for logging/auditing purposes.
Recommended action
Rely solely on the value of NegotiatedCipherSuite property of SslStream, obsoleted members may present incomplete/misleading information.
Feature area
Core .NET libraries
Affected APIs
ExchangeAlgorithmType, CipherAlgorithmType, HashAlgorithmType enum types
Following SslStream properties
- KeyExchangeAlgorithm
- KeyExchangeStrength
- CipherAlgorithm
- CipherAlgorithmStrength
- HashAlgorithm
- HashStrength