2017-04-03 1 views
0

-je utiliser dll Fiddler pour installer des certificats Fiddler:Comment exporter des certificats racine (Fiddler)

public static bool InstallCertificate() 
    { 
     if (!string.IsNullOrEmpty(certmakerBcCert)) 
     { 
      FiddlerApplication.Prefs.SetStringPref("fiddler.certmaker.bc.key", certmakerBcKey); 
      FiddlerApplication.Prefs.SetStringPref("fiddler.certmaker.bc.cert", certmakerBcCert); 
     } 

     if (!CertMaker.rootCertExists()) 
     { 
      //CLog.writeNoLogInDB("Creating SSL certificate"); 
      if (!CertMaker.createRootCert()) 
       return false; 

      if (!CertMaker.trustRootCert()) 
       return false; 

      certmakerBcCert = FiddlerApplication.Prefs.GetStringPref("fiddler.certmaker.bc.cert", null); 
      certmakerBcKey = FiddlerApplication.Prefs.GetStringPref("fiddler.certmaker.bc.key", null); 
     } 
     return true; 
    } 

je besoin d'exporter le fichier créé certificat racine par le code. Y a-t-il une méthode pour le faire?

Répondre

1

(je sais que c'est vieux, mais Incase vous ne trouvez pas la réponse ou quelqu'un d'autre est à la recherche)

En fonction de votre code, il ressemble à votre utilisant le fabricant de certificat BouncyCastle, vous pouvez le faire à exporter le certficiate racine:

FiddlerApplication.Prefs.SetBoolPref("fiddler.certmaker.bc.EmitRootCertFile", true) 

Cela videra un « FiddlerBCRoot.pfx » sur votre bureau avec un mot de passe vide