如何导出根证书(Fiddler)

如何导出根证书(Fiddler),fiddler,Fiddler,我使用Fiddler dll安装Fiddler证书: public static bool InstallCertificate() { if (!string.IsNullOrEmpty(certmakerBcCert)) { FiddlerApplication.Prefs.SetStringPref("fiddler.certmaker.bc.key", certmakerBcKey); Fidd

我使用Fiddler dll安装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;
    }

我需要导出通过代码创建的RootCertificate文件。有什么方法可以这样做吗?

我知道这很旧,但万一你没有找到答案或者其他人正在搜索

根据您的代码,看起来您正在使用BouncyCastle证书生成器,因此您可以执行以下操作以导出根证书:

FiddlerApplication.Prefs.SetBoolPref("fiddler.certmaker.bc.EmitRootCertFile", true)
这将在桌面上以空密码转储FiddlerBCRoot.pfx