Enum SslProtectionLevel
Specifies the level of protection to be used with SSL/TLS.
public enum SslProtectionLevelMembers
- NoProtection: Specifies that no encryption or integrity protection is applied to messages. This is typically used for debugging or when the underlying transport protocol provides sufficient security.
- Sign: Specifies that messages are protected against tampering but are not encrypted. This provides message integrity.
- EncryptAndSign: Specifies that messages are both encrypted and protected against tampering. This provides both confidentiality and message integrity. This is the most secure option.
Remarks
The SslProtectionLevel
enumeration is used to specify the desired level of security when establishing an SSL/TLS connection. It is used in conjunction with the SslStream
class to control how data is protected.
When setting the SslProtectionLevel
for an SslStream
, you are indicating the minimum level of protection you require. The actual level of protection negotiated during the SSL/TLS handshake may be higher depending on the capabilities of the client and server and their respective security settings.
For most applications, SslProtectionLevel.EncryptAndSign
is recommended to ensure the confidentiality and integrity of data exchanged over the network.