如何将证书安装到Firefox(Fiddler)?

时间:2017-03-15 23:29:26

标签: c# fiddler

我使用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;
    }

但是,它们不会安装到firefox中。除Firefox之外,每个浏有没有办法将它们安装到Firefox中通过代码?

谢谢!

注意:我已经有一个程序在Firefox中安装证书,但我需要先生成它们才能生成......

1 个答案:

答案 0 :(得分:0)

我相信你可以生成并告诉提琴手使用它。我猜想如果它不存在,fiddler会在安装时创建一个this here implies there is a set location