title: How to verify a certificate in fiddler core?
body: <p>I want to verify the certificate issued by the server to be valid and alert the user to choose if it cannot be verified. Presently it seems all certificates are accepted by fiddler without alerting the user. Is there a mechanism to do it? perhaps in the following code as found in fiddler core sample project. I want to alert user for  Self-signed certificates with an untrusted root.</p>
  
  <pre><code> static void CheckCert(object sender, ValidateServerCertificateEventArgs e)
      {
          if (null != e.ServerCertificate)
          {
              Console.WriteLine("Certificate for " + e.ExpectedCN + " was for site " + e.ServerCertificate.Subject + " and errors were " + e.CertificatePolicyErrors.ToString());
  
  
              if (e.ServerCertificate.Subject.Contains("fiddler2.com"))
              {
                  Console.WriteLine("Got a certificate for fiddler2.com. We'll say this is also good for any other site, like https://fiddlertool.com.");
                  e.ValidityState = CertificateValidity.ForceValid;
              }
          }
      }
  </code></pre>