Bug 910207 Comment 94 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Dana Keeler [:keeler] (use needinfo?) from comment #92)
> Comment on attachment 8908601 [details]
> Bug 910207 - Disable preconnect when user certificates are installed
> 
> https://reviewboard.mozilla.org/r/180266/#review186070
> 
> PSM parts look good to me with comments addressed. I'm not familiar with the
> speculative connect code to be able to definitively say that part will work
> as expected, so you might get a necko peer to review that. Let me know if
> you want any pointers on the mochitests - I think you should just be able to
> use the nsIX509CertDB apis to remove and add back the client cert.

For some reason I can't properly delete the cert.

I tried this, but even though the delete-cert observer event is sent, the cert is not deleted from the DB.

var gCertDB = Cc["@mozilla.org/security/x509certdb;1"]
                .getService(Ci.nsIX509CertDB);
function findCertByCommonName(commonName) {
  let certEnumerator = gCertDB.getCerts().getEnumerator();
  while (certEnumerator.hasMoreElements()) {
    let cert = certEnumerator.getNext().QueryInterface(Ci.nsIX509Cert);
    if (cert.commonName == commonName) {
      return cert;
    }
  }
  return null;
}

var cert = findCertByCommonName("Mochitest client");
info("deleting cert "+cert);
gCertDB.deleteCertificate(cert);

cert = findCertByCommonName("Mochitest client");
info("found cert" + cert);

Back to Bug 910207 Comment 94