X509ServiceCertificateAuthentication.RevocationMode 属性

定义

获取或设置用于 ChainTrust 和 PeerOrChainTrust X.509 证书验证模式的证书吊销模式。

public:
 property System::Security::Cryptography::X509Certificates::X509RevocationMode RevocationMode { System::Security::Cryptography::X509Certificates::X509RevocationMode get(); void set(System::Security::Cryptography::X509Certificates::X509RevocationMode value); };
public System.Security.Cryptography.X509Certificates.X509RevocationMode RevocationMode { get; set; }
member this.RevocationMode : System.Security.Cryptography.X509Certificates.X509RevocationMode with get, set
Public Property RevocationMode As X509RevocationMode

属性值

X509RevocationMode

X509RevocationMode 中的值之一:NoCheckOnlineOffline

例外

试图在凭据为只读时进行设置。

示例

下面的代码演示如何设置此属性。

ClientCredentials creds = new ClientCredentials();

// Configure chain trust.

creds.ServiceCertificate.Authentication.CertificateValidationMode =
X509CertificateValidationMode.ChainTrust;

creds.ServiceCertificate.Authentication.RevocationMode =
X509RevocationMode.NoCheck;
Dim creds As New ClientCredentials()

' Configure chain trust.

creds.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.ChainTrust

creds.ServiceCertificate.Authentication.RevocationMode = X509RevocationMode.NoCheck

该属性也可以在配置文件中设置。

注解

使用证书时,系统通过检查客户端证书不在吊销证书列表中来验证客户端证书未被吊销。 此检查可通过联机或根据缓存的吊销列表来执行。 将此属性设置为 NoCheck 可关闭吊销检查。

适用于