CipherSuitesPolicy.AllowedCipherSuites 属性

定义

重要

此 API 不符合 CLS。

获取作为此策略中允许用于协商的密码套件集合传入 CipherSuitesPolicy(IEnumerable<TlsCipherSuite>) 构造函数的有效密码套件的子集。Gets a subset of valid cipher suites passed into CipherSuitesPolicy(IEnumerable<TlsCipherSuite>) constructor as a collection of cipher suites allowed in this policy for negotiation.

public:
 property System::Collections::Generic::IEnumerable<System::Net::Security::TlsCipherSuite> ^ AllowedCipherSuites { System::Collections::Generic::IEnumerable<System::Net::Security::TlsCipherSuite> ^ get(); };
[System.CLSCompliant(false)]
public System.Collections.Generic.IEnumerable<System.Net.Security.TlsCipherSuite> AllowedCipherSuites { get; }
[<System.CLSCompliant(false)>]
member this.AllowedCipherSuites : seq<System.Net.Security.TlsCipherSuite>
Public ReadOnly Property AllowedCipherSuites As IEnumerable(Of TlsCipherSuite)

属性值

IEnumerable<TlsCipherSuite>

此策略中允许用于协商的密码套件集合。The collection of cipher suites allowed in this policy for negotiation.

属性

注解

备注

如果在身份验证时定义密码套件策略 SslStream ,则会阻止 OS 确定哪些是要与之协商的最佳密码套件,并要求你手动检查和更新此代码。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.

与操作系统的基础 SSL/TLS 实现不同, TlsCipherSuite 中元素的顺序 allowedCipherSuites 并不保证它们在客户端-服务器协商中的优先级。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. 如果使用的是 OpenSSL 1.1.1 或更高版本的 Linux 系统或 macOS,则只能初始化此类的实例。You can only initialize an instance of this class if you're using Linux systems with OpenSSL 1.1.1 or higher or macOS.

适用于