SslStreamSecurityBindingElement.SslProtocols Vlastnost

Definice

Určuje seznam protokolů SSL/TLS, které se mají vyjednat při použití typu přihlašovacích údajů klienta TcpClientCredentialType.Certificate. Hodnota může být kombinací jednoho z několika z následujících členů výčtu: 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

Hodnota vlastnosti

Vrací objekt SslProtocols.

Příklady

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");  

Poznámky

Výchozí hodnota je Ssl3 | | TLS | tls11 Tls12. Verze rozhraní starší než 4.6 podporují pouze protokoly SSL3 a TLS. Pokud nejsou zahrnuty, nebude komunikace s dřívějšími verzemi rozhraní možná. Zadáním tls11 a/nebo TLS12 zakážete používání ssl3, i když je zahrnutý.

Platí pro