SslStreamSecurityBindingElement.SslProtocols Eigenschap
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee geeft u de lijst met SSL/TLS-protocollen die moeten worden onderhandeld bij het gebruik van een clientreferentietype van TcpClientCredentialType.Certificate. De waarde kan een combinatie zijn van een van de volgende opsommingsleden: 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
Waarde van eigenschap
Retourneert SslProtocols.
Voorbeelden
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");
Opmerkingen
De standaardwaarde is Ssl3 | Tls | Tls11 | Tls12. Versies van het framework vóór 4.6 ondersteunen alleen Ssl3 en Tls. Als deze niet zijn opgenomen, is communicatie met eerdere versies van het framework niet mogelijk. Als u Tls11 en/of Tls12 opgeeft, wordt het gebruik van Ssl3 uitgeschakeld, zelfs als deze is opgenomen.