michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * 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: michael@0: const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock; michael@0: const nsIPKIParamBlock = Components.interfaces.nsIPKIParamBlock; michael@0: const nsIX509Cert = Components.interfaces.nsIX509Cert; michael@0: michael@0: var dialogParams; michael@0: var pkiParams; michael@0: var cert=null; michael@0: michael@0: function onLoad() michael@0: { michael@0: pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock); michael@0: dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock); michael@0: michael@0: var isupports = pkiParams.getISupportAtIndex(1); michael@0: cert = isupports.QueryInterface(nsIX509Cert); michael@0: var bundle = document.getElementById("pippki_bundle"); michael@0: var dispName = cert.commonName; michael@0: if (dispName == null) michael@0: dispName = cert.windowTitle; michael@0: michael@0: var msg = bundle.getFormattedString("escrowFinalMessage", [dispName]); michael@0: setText("message1",msg); michael@0: } michael@0: michael@0: function doOK() michael@0: { michael@0: dialogParams.SetInt(1,1); michael@0: return true; michael@0: } michael@0: michael@0: function doCancel() michael@0: { michael@0: dialogParams.SetInt(1,0); michael@0: return true; michael@0: } michael@0: michael@0: function viewCert() michael@0: { michael@0: viewCertHelper(window, cert); michael@0: }