[or-cvs] r14771: Also delete cert from the treeview. Doesn't help, but it may (torbutton/trunk/src/chrome/content)

mikeperry at seul.org mikeperry at seul.org
Wed May 28 10:22:19 UTC 2008


Author: mikeperry
Date: 2008-05-28 06:22:19 -0400 (Wed, 28 May 2008)
New Revision: 14771

Modified:
   torbutton/trunk/src/chrome/content/torbutton.js
Log:

Also delete cert from the treeview. Doesn't help, but it may
be a step in the right direction..



Modified: torbutton/trunk/src/chrome/content/torbutton.js
===================================================================
--- torbutton/trunk/src/chrome/content/torbutton.js	2008-05-28 10:04:34 UTC (rev 14770)
+++ torbutton/trunk/src/chrome/content/torbutton.js	2008-05-28 10:22:19 UTC (rev 14771)
@@ -1052,6 +1052,7 @@
     var outFile = Components.classes["@mozilla.org/file/local;1"].
         createInstance(Components.interfaces.nsILocalFile); 
     var outList = [];
+    var outIndexList = [];
     
     torbutton_log(2, "Jaring "+name+" certificates: "+mode);
 
@@ -1078,6 +1079,7 @@
         }
 
         outList.push(cert);
+        outIndexList.push(i);
     }
 
     // Write current certs to certjar-tor
@@ -1119,7 +1121,7 @@
         var binaryCerts = [];
         var bitList = [];
 
-        for(var i = 0; i< outList.length; i++) {
+        for(var i = outList.length-1; i>=0; i--) {
             if(outList[i]) {
                 var len = new Object();
                 var data = outList[i].getRawDER(len);
@@ -1137,6 +1139,7 @@
                     bits |= certdb.TRUSTED_OBJSIGN;
                 }
 
+                treeView.removeCert(outIndexList[i]);
                 certdb.deleteCertificate(outList[i]);
 
                 bitList.push(bits); 



More information about the tor-commits mailing list