I developed an wpf application based on fiddlerCore,witchhelp me capture https resources.then i found a question.It's also alert a window that notice to install certificate(DO_NOT_TRUST_FiddlerRoot).i want hide this window. enter image description here
install certificate method just as below:
public static bool InstallCertificate()
{
if (!CertMaker.rootCertExists())
{
if (!CertMaker.createRootCert())
return false;
if (!CertMaker.trustRootCert())
return false;
Cert = FiddlerApplication.Prefs.GetStringPref("fiddler.certmaker.bc.cert", null);
Key = FiddlerApplication.Prefs.GetStringPref("fiddler.certmaker.bc.key", null);
}
return true;
}
Fortunatly,i found a soulution to resolve this problem. add codes as below to public void DoFiddler() in myfiddler.cs:
CONFIG.bCaptureCONNECT = true;
CONFIG.IgnoreServerCertErrors = false;
if (!CertMaker.rootCertExists())
{
if (!CertMaker.createRootCert())
{
throw new Exception("Unable to create cert for FiddlerCore.");
}
X509Store certStore = new X509Store(StoreName.Root, StoreLocation.LocalMachine);
certStore.Open(OpenFlags.ReadWrite);
try
{
certStore.Add(CertMaker.GetRootCertificate());
}
finally
{
certStore.Close();
}
}
just install certification and store it.
like this , you will not found "DO_NOT_TRUST_FiddlerRoot" window!