2017-03-14 1 views
0

J'ai développé une application wpf basée sur fiddlerCore, qui m'aide à capturer les ressources https. Puis j'ai trouvé une question.Elle alertera également une fenêtre de notification d'installation du certificat (DO_NOT_TRUST_FiddlerRoot) .je veux cacher cette fenêtre. enter image description hereComment pourrais-je cacher la fenêtre que l'on remarque pour installer le certificat (DO_NOT_TRUST_FiddlerRoot)?

méthode d'installation de certificat comme ci-dessous:

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; 
    } 

Répondre

0

amuserez, j'ai trouvé un Soulution pour résoudre ce problème. ajouter des codes comme ci-dessous pour DoFiddler public void() dans 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(); 
     } 
    } 

juste installer la certification et le stocker.

comme ça, vous ne trouverez pas la fenêtre "DO_NOT_TRUST_FiddlerRoot"!