CertPolicy.CheckValidationResult C# (CSharp) Method

CheckValidationResult() public method

public CheckValidationResult ( ServicePoint, srvPoint, X509Certificate, certificate, WebRequest, request, int certificateProblem ) : bool
srvPoint ServicePoint,
certificate X509Certificate,
request WebRequest,
certificateProblem int
return bool
        public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request,	int certificateProblem)
        {
            // you can do your own certificate checking here
            // you can get the error values from WinError.h, all the certificate errors start with Cert_
            /*
            if(unchecked((int)(0x800B0109L)) == certificateProblem) //A certificate chain processed correctly, but terminated in a root certificate which is not trusted by the trust provider.
            {
                return true;
            }  */
            // we just return true so any certificate will work with this sample
            return true;
        }