1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/pki/resources/content/escrowWarn.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 + 1.11 +const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock; 1.12 +const nsIPKIParamBlock = Components.interfaces.nsIPKIParamBlock; 1.13 +const nsIX509Cert = Components.interfaces.nsIX509Cert; 1.14 + 1.15 +var dialogParams; 1.16 +var pkiParams; 1.17 +var cert=null; 1.18 + 1.19 +function onLoad() 1.20 +{ 1.21 + pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock); 1.22 + dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock); 1.23 + 1.24 + var isupports = pkiParams.getISupportAtIndex(1); 1.25 + cert = isupports.QueryInterface(nsIX509Cert); 1.26 + var bundle = document.getElementById("pippki_bundle"); 1.27 + var dispName = cert.commonName; 1.28 + if (dispName == null) 1.29 + dispName = cert.windowTitle; 1.30 + 1.31 + var msg = bundle.getFormattedString("escrowFinalMessage", [dispName]); 1.32 + setText("message1",msg); 1.33 +} 1.34 + 1.35 +function doOK() 1.36 +{ 1.37 + dialogParams.SetInt(1,1); 1.38 + return true; 1.39 +} 1.40 + 1.41 +function doCancel() 1.42 +{ 1.43 + dialogParams.SetInt(1,0); 1.44 + return true; 1.45 +} 1.46 + 1.47 +function viewCert() 1.48 +{ 1.49 + viewCertHelper(window, cert); 1.50 +}