1

I am playing with Fiddler core , trying to set up with a proxy and check Https traffic. For Chrome and Internet Explorer fiddler have great support:

  if (!CertMaker.rootCertExists())
        {
            if (!CertMaker.createRootCert())
                return false;

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

Anyone knows what to do with Mozilla ? How to install certificate there ?

StringBuilder
  • 1,619
  • 4
  • 32
  • 52

1 Answers1

2

There's nothing in Fiddler/FiddlerCore itself that will do this. You can easily start the process from a Firefox extension (see overlay.js in Fiddler's install folder):

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

From outside Firefox or to bypass all prompts, you'd need to poke their API; see e.g. How to add a trusted Certificate Autority to Firefox with JSS shows one approach.

Community
  • 1
  • 1
EricLaw
  • 56,563
  • 7
  • 151
  • 196