我正在玩Fiddler核心,试图设置代理并检查Https流量。对于Chrome和Internet Explorer,fiddler非常支持:
if (!CertMaker.rootCertExists())
{
if (!CertMaker.createRootCert())
return false;
if (!CertMaker.trustRootCert())
return false;
}
任何人都知道如何处理Mozilla?如何在那里安装证书?
答案 0 :(得分:2)
Fiddler / FiddlerCore本身没有任何东西可以做到这一点。您可以从Firefox扩展程序轻松启动该过程(请参阅Fiddler&#39安装文件夹中的overlay.js):
var certdb = Components.classes["@mozilla.org/security/x509certdb;1"].getService(Components.interfaces.nsIX509CertDB);
var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).
get("Desk", Components.interfaces.nsIFile);
file.append("FiddlerRoot.cer");
try {
alert("On the following screen, tick the first checkbox: 'Trust this CA to identify websites.'");
certdb.importCertsFromFile(null, file, Components.interfaces.nsIX509Cert.CA_CERT);
} catch (e) { alert("Trust function returned:\n\n" + e); }
从Firefox外部或绕过所有提示,您需要戳他们的API;见例如How to add a trusted Certificate Autority to Firefox with JSS显示了一种方法。