TcpTransportSecurity.SslProtocols Property

Definition

Specifies the list of SSL/TLS protocols to negotiate when using a client credential type of TcpClientCredentialType.Certificate. The value can be a combination of one of more of the following enumeration members: Ssl3, Tls, Tls11, Tls12.

C#
public System.Security.Authentication.SslProtocols SslProtocols { get; set; }

Property Value

Returns SslProtocols.

Examples

C#
NetTcpBinding b = new NetTcpBinding();  
b.Security.Mode = SecurityMode.Transport;  
b.Security.Transport.ClientCredentialType = TcpClientCredentialType.Certificate;  
b.Security.Transport.SslProtocols = SslProtocols.Tls11 | SslProtocols.Tls12;  
EndpointAddress a = new EndpointAddress("net.tcp://contoso.com/TcpAddress");  
ChannelFactory<ICalculator> cf = new ChannelFactory<ICalculator>(b, a);  
cf.Credentials.ClientCertificate.SetCertificate(  
    StoreLocation.LocalMachine,  
    StoreName.My,  
    X509FindType.FindByThumbprint,  
    "0000000000000000000000000000000000000000");  

Remarks

The default value is Ssl3 | Tls | Tls11 | Tls12. Versions of the framework prior to 4.6 only support Ssl3 and Tls. If these are not included, communication with earlier versions of the framework will not be possible. Specifying Tls11 and/or Tls12 will disable the usage of Ssl3, even if it has been included.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)