System.Net.ICertificatePolicy.CheckValidationResult Method

Validates a server certificate.

Syntax

public bool CheckValidationResult (ServicePoint srvPoint, System.Security.Cryptography.X509Certificates.X509Certificate certificate, WebRequest request, int certificateProblem)

Parameters

srvPoint
The System.Net.ServicePoint that will use the certificate.
certificate
The certificate to validate.
request
The request that received the certificate.
certificateProblem
The problem that was encountered when using the certificate.

Returns

true if the certificate should be honored; otherwise, false.

Remarks

The ICertificatePolicy.CheckValidationResult(ServicePoint, System.Security.Cryptography.X509Certificates.X509Certificate, WebRequest, int) method implements the application certificate validation policy. The method can examine the srvPoint, certificate, request, and certificateProblem parameters to determine whether the certificate should be honored.

The certificateProblem parameter is a Security Support Provider Interface (SSPI) status code. For more information, see the SSPI documentation on MSDN.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0