Aracılığıyla paylaş


SslStreamSecurityBindingElement.SslProtocols Özellik

Tanım

TcpClientCredentialType.Certificate istemci kimlik bilgisi türü kullanılırken anlaşacak SSL/TLS protokollerinin listesini belirtir. Değer, aşağıdaki sabit listesi üyelerinden birinin daha bir birleşimi olabilir: 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

Özellik Değeri

SslProtocols döndürür.

Örnekler

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

Açıklamalar

Varsayılan değer Ssl3 | Tls | Tls11 | Tls12. Çerçevenin 4.6 öncesi sürümleri yalnızca Ssl3 ve Tls'yi destekler. Bunlar dahil değilse, çerçevenin önceki sürümleriyle iletişim mümkün olmayacaktır. Tls11 ve/veya Tls12 belirtilmesi, dahil edilmiş olsa bile Ssl3 kullanımını devre dışı bırakır.

Şunlara uygulanır