Upraviť

Zdieľať cez


CipherSuitesPolicy(IEnumerable<TlsCipherSuite>) Constructor

Definition

Important

This API is not CLS-compliant.

Initializes a new instance of the CipherSuitesPolicy class that can be used for client or server authentication.

public:
 CipherSuitesPolicy(System::Collections::Generic::IEnumerable<System::Net::Security::TlsCipherSuite> ^ allowedCipherSuites);
[System.CLSCompliant(false)]
public CipherSuitesPolicy (System.Collections.Generic.IEnumerable<System.Net.Security.TlsCipherSuite> allowedCipherSuites);
[<System.CLSCompliant(false)>]
new System.Net.Security.CipherSuitesPolicy : seq<System.Net.Security.TlsCipherSuite> -> System.Net.Security.CipherSuitesPolicy
Public Sub New (allowedCipherSuites As IEnumerable(Of TlsCipherSuite))

Parameters

allowedCipherSuites
IEnumerable<TlsCipherSuite>

The collection of cipher suites allowed in this policy for negotiation.

Attributes

Exceptions

Platform is not a Linux system with OpenSSL 1.1.1 or higher or a macOS.

Remarks

Note

Defining a cipher suite policy on SslStream authentication will prevent the OS from deciding which are the best cipher suites to negotiate with and requires that you manually check and update this code. We strongly recommend that you avoid using this feature and rely on your constantly updated OS policy.

Unlike the operating system's underlying SSL/TLS implementation, the order of the TlsCipherSuite elements in allowedCipherSuites doesn't guarantee their priority in client-server negotiation. You can only initialize an instance of this class if you're using Linux systems with OpenSSL 1.1.1 or higher or macOS.

Applies to