From 0aa2271015518c76958b4c4ac9bca9e991853621 Mon Sep 17 00:00:00 2001 From: "kaie%netscape.com" Date: Wed, 24 Apr 2002 00:51:33 +0000 Subject: [PATCH] b=129067 Deleted certs still appear in Cert Manager, uses slow workaround, which should get removed once bug 138626 is fixed. r=javi sr=alecf --- .../pki/resources/content/certManager.js | 16 +++++- .../pki/resources/content/certManager.xul | 2 +- .../pki/resources/content/deletecert.js | 7 ++- security/manager/ssl/src/nsCertTree.cpp | 11 ++-- security/manager/ssl/src/nsNSSCertificate.cpp | 51 +++++++++++++++++++ 5 files changed, 81 insertions(+), 6 deletions(-) diff --git a/security/manager/pki/resources/content/certManager.js b/security/manager/pki/resources/content/certManager.js index 993ae886517..164c8ffff55 100644 --- a/security/manager/pki/resources/content/certManager.js +++ b/security/manager/pki/resources/content/certManager.js @@ -80,7 +80,6 @@ function LoadCerts() enableBackupAllButton.setAttribute("enabled",true); } - var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties"); var verifiedColText; if (certdb.ocspOn) { @@ -100,6 +99,14 @@ function ReloadCerts() userTreeView.loadCerts(nsIX509Cert.USER_CERT); } +function CleanUp() +{ + caTreeView = null; + serverTreeView = null; + emailTreeView = null; + userTreeView = null; +} + function getSelectedTab() { var selTab = document.getElementById('certMgrTabbox').selectedItem; @@ -264,6 +271,7 @@ function backupCerts() certdb.exportPKCS12File(null, fp.file, selected_certs.length, selected_certs); } + selected_certs = []; } function backupAllCerts() @@ -289,6 +297,7 @@ function editCerts() 'chrome,width=100,resizable=1,modal'); } } + selected_certs = []; } function restoreCerts() @@ -338,6 +347,7 @@ function deleteCerts() } else { + selected_certs = []; return; } @@ -346,7 +356,10 @@ function deleteCerts() { var cert = selected_certs[t]; params.SetString(t+1, cert.dbKey); + cert = null; } + + selected_certs = []; window.openDialog('chrome://pippki/content/deletecert.xul', "", 'chrome,resizable=1,modal',params); @@ -361,6 +374,7 @@ function viewCerts() for (var t=0; t + onload="LoadCerts();" onclose="CleanUp();">