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 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; michael@0: var hostport; michael@0: michael@0: function initCertErrorDialog() michael@0: { michael@0: pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock); michael@0: dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock); michael@0: michael@0: var isupport = pkiParams.getISupportAtIndex(1); michael@0: cert = isupport.QueryInterface(nsIX509Cert); michael@0: michael@0: var portNumber = dialogParams.GetInt(1); michael@0: var hostName = dialogParams.GetString(1); michael@0: var msg = dialogParams.GetString(2); michael@0: michael@0: hostport = hostName + ":" + portNumber; michael@0: setText("warningText", msg); michael@0: } michael@0: michael@0: function viewCert() michael@0: { michael@0: viewCertHelper(window, cert); michael@0: }