I defined a delegate method in my class and registered it in the constructor for System :: Net :: ServicePointManager :: ServerCertificateValidationCallback
bool CMyClass::AcceptingCertificate(System::Object^ rObjectSender, X509Certificate^ rX509Certificate, X509Chain^ rX509Chain , SslPolicyErrors rErrors)
{
return true;
}
CMyClass::CMyClass(void)
{
System::Net::ServicePointManager::ServerCertificateValidationCallback = gcnew RemoteCertificateValidationCallback(&CMyClass::AcceptingCertificate);
}
source
share