If you are using WebRequests or something similiar, you can hook into the ServicePointManager.ServerCertificateValidationCallback
and add a custom validation scenario as
ServicePointManager.ServerCertificateValidationCallback = delegate(
Object obj, X509Certificate certificate, X509Chain chain,
SslPolicyErrors errors)
{
if (errors == SslPolicyErrors.RemoteCertificateNameMismatch)
{
return (true);
}
};
see the MSDN for details