Freigeben über


SslStreamSecurityBindingElement.SslProtocols Eigenschaft

Definition

Gibt die Liste der bei Verwendung des Client-Anmeldeinformationstyps "TcpClientCredentialType.Certificate" auszuhandelnden SSL/TLS-Protokolle an. Der Wert kann eine Kombination aus einem oder mehreren der folgenden Enumerationsmember sein: 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

Eigenschaftswert

Gibt SslProtocols zurück.

Beispiele

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

Hinweise

Der Standardwert ist Ssl3 | Tls | Tls11 | Tls12. Versionen des Frameworks vor 4.6 unterstützen nur Ssl3 und Tls. Wenn diese nicht enthalten sind, ist die Kommunikation mit früheren Versionen des Frameworks nicht möglich. Die Angabe von Tls11 und/oder Tls12 deaktiviert die Verwendung von Ssl3, auch wenn es eingeschlossen wurde.

Gilt für: