ICertificatePolicy.CheckValidationResult 方法

定义

验证服务器证书。

public:
 bool CheckValidationResult(System::Net::ServicePoint ^ srvPoint, System::Security::Cryptography::X509Certificates::X509Certificate ^ certificate, System::Net::WebRequest ^ request, int certificateProblem);
public bool CheckValidationResult (System.Net.ServicePoint srvPoint, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Net.WebRequest request, int certificateProblem);
abstract member CheckValidationResult : System.Net.ServicePoint * System.Security.Cryptography.X509Certificates.X509Certificate * System.Net.WebRequest * int -> bool
Public Function CheckValidationResult (srvPoint As ServicePoint, certificate As X509Certificate, request As WebRequest, certificateProblem As Integer) As Boolean

参数

srvPoint
ServicePoint

将使用此证书的 ServicePoint

certificate
X509Certificate

要验证的证书。

request
WebRequest

接收到此证书的请求。

certificateProblem
Int32

使用此证书时遇到的问题。

返回

如果应遵守此证书,则为 true;否则为 false

注解

方法 CheckValidationResult 实现应用程序证书验证策略。 方法可以检查 srvPointcertificaterequestcertificateProblem 参数,以确定是否应遵循证书。

参数 certificateProblem 是 SSPI) 状态代码 (安全支持提供程序接口。 有关详细信息,请参阅 MSDN 上的 SSPI 文档。

适用于