michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: const nsIX509Cert = Components.interfaces.nsIX509Cert; michael@0: const nsX509CertDB = "@mozilla.org/security/x509certdb;1"; michael@0: const nsIX509CertDB = Components.interfaces.nsIX509CertDB; michael@0: const nsIPKIParamBlock = Components.interfaces.nsIPKIParamBlock; michael@0: const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock; michael@0: michael@0: var certdb; michael@0: var gParams; michael@0: michael@0: function setWindowName() michael@0: { michael@0: gParams = window.arguments[0].QueryInterface(nsIDialogParamBlock); michael@0: michael@0: var typeFlag = gParams.GetString(0); michael@0: var numberOfCerts = gParams.GetInt(0); michael@0: michael@0: var bundle = document.getElementById("pippki_bundle"); michael@0: var title; michael@0: var confirm; michael@0: var impact; michael@0: michael@0: if(typeFlag == "mine_tab") michael@0: { michael@0: title = bundle.getString("deleteUserCertTitle"); michael@0: confirm = bundle.getString("deleteUserCertConfirm"); michael@0: impact = bundle.getString("deleteUserCertImpact"); michael@0: } michael@0: else if(typeFlag == "websites_tab") michael@0: { michael@0: title = bundle.getString("deleteSslCertTitle3"); michael@0: confirm = bundle.getString("deleteSslCertConfirm3"); michael@0: impact = bundle.getString("deleteSslCertImpact3"); michael@0: } michael@0: else if(typeFlag == "ca_tab") michael@0: { michael@0: title = bundle.getString("deleteCaCertTitle2"); michael@0: confirm = bundle.getString("deleteCaCertConfirm2"); michael@0: impact = bundle.getString("deleteCaCertImpactX2"); michael@0: } michael@0: else if(typeFlag == "others_tab") michael@0: { michael@0: title = bundle.getString("deleteEmailCertTitle"); michael@0: confirm = bundle.getString("deleteEmailCertConfirm"); michael@0: impact = bundle.getString("deleteEmailCertImpactDesc"); michael@0: } michael@0: else if(typeFlag == "orphan_tab") michael@0: { michael@0: title = bundle.getString("deleteOrphanCertTitle"); michael@0: confirm = bundle.getString("deleteOrphanCertConfirm"); michael@0: impact = ""; michael@0: } michael@0: else michael@0: { michael@0: return; michael@0: } michael@0: var confirReference = document.getElementById('confirm'); michael@0: var impactReference = document.getElementById('impact'); michael@0: document.title = title; michael@0: michael@0: setText("confirm",confirm); michael@0: michael@0: var box=document.getElementById("certlist"); michael@0: var text; michael@0: for(var x=0;x