SslStreamSecurityBindingElement.SslProtocols Propriedade

Definição

Especifica a lista de protocolos SSL/TLS a serem negociados ao usar um tipo de credencial do cliente TcpClientCredentialType.Certificate.Specifies the list of SSL/TLS protocols to negotiate when using a client credential type of TcpClientCredentialType.Certificate. O valor pode ser uma combinação de um ou mais dos seguintes membros de enumeração: Ssl3, Tls, Tls11 e Tls12.The value can be a combination of one of more of the following enumeration members: Ssl3, Tls, Tls11, Tls12.

public:
 property System::Security::Authentication::SslProtocols SslProtocols { System::Security::Authentication::SslProtocols get(); void set(System::Security::Authentication::SslProtocols value); };
public System.Security.Authentication.SslProtocols SslProtocols { get; set; }
member this.SslProtocols : System.Security.Authentication.SslProtocols with get, set
Public Property SslProtocols As SslProtocols

Valor da propriedade

Exemplos

NetTcpBinding netTcpBinding = new NetTcpBinding(SecurityMode.Transport);  
netTcpBinding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Certificate;  
CustomBinding b = new CustomBinding(netTcpBinding);  
SslStreamSecurityBindingElement sslStream = b.Elements.Find<SslStreamSecurityBindingElement>();  
sslStream.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");  

Comentários

O valor padrão é Ssl3 | TLS | Tls11 | Tls12.The default value is Ssl3 | Tls | Tls11 | Tls12. Versões do Framework anteriores a 4,6 suportam apenas Ssl3 e TLS.Versions of the framework prior to 4.6 only support Ssl3 and Tls. Se eles não estiverem incluídos, a comunicação com versões anteriores do Framework não será possível.If these are not included, communication with earlier versions of the framework will not be possible. Especificar Tls11 e/ou Tls12 desabilitará o uso de Ssl3, mesmo que tenha sido incluído.Specifying Tls11 and/or Tls12 will disable the usage of Ssl3, even if it has been included.

Aplica-se a