ServicePointManager.EncryptionPolicy 属性
定义
获取此 ServicePointManager 实例的 EncryptionPolicy。Gets the EncryptionPolicy for this ServicePointManager instance.
public:
static property System::Net::Security::EncryptionPolicy EncryptionPolicy { System::Net::Security::EncryptionPolicy get(); };
public static System.Net.Security.EncryptionPolicy EncryptionPolicy { get; }
member this.EncryptionPolicy : System.Net.Security.EncryptionPolicy
Public Shared ReadOnly Property EncryptionPolicy As EncryptionPolicy
属性值
用于此 ServicePointManager 实例的加密策略。The encryption policy to use for this ServicePointManager instance.
注解
如果未在配置文件中指定值, EncryptionPolicy 属性默认为 EncryptionPolicy.RequireEncryption 。If a value is not specified in the configuration file, the EncryptionPolicy property defaults to EncryptionPolicy.RequireEncryption. 这适用于此实例上的 SSL/TLS 会话 ServicePointManager 。This is applied to an SSL/TLS session on this ServicePointManager instance.
当加密策略设置为时,需要使用 Null 密码 EncryptionPolicy.NoEncryption 。The use of the Null cipher is required when the encryption policy is set to EncryptionPolicy.NoEncryption.