如何导出根证书(小提琴手)

问题描述:

我使用Fiddler DLL安装小提琴手证书:如何导出根证书(小提琴手)

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

我需要导出通过代码创建的RootCertificate文件。有没有一种方法可以做到这一点?

(我知道这是旧的,但柜面你还没有找到答案,或者是别人搜索)基于您的代码,它看起来像使用的BouncyCastle的制造商证明书,这样你就可以做到这一点,以

导出根certficiate:

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

这将转储“FiddlerBCRoot.pfx”在桌面上用空密码