security/manager/pki/resources/content/certerror.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/pki/resources/content/certerror.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock;
     1.9 +const nsIPKIParamBlock    = Components.interfaces.nsIPKIParamBlock;
    1.10 +const nsIX509Cert         = Components.interfaces.nsIX509Cert;
    1.11 +
    1.12 +var dialogParams;
    1.13 +var pkiParams;
    1.14 +var cert;
    1.15 +var hostport;
    1.16 +
    1.17 +function initCertErrorDialog()
    1.18 +{
    1.19 +  pkiParams    = window.arguments[0].QueryInterface(nsIPKIParamBlock);
    1.20 +  dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock);
    1.21 +
    1.22 +  var isupport = pkiParams.getISupportAtIndex(1);
    1.23 +  cert = isupport.QueryInterface(nsIX509Cert);
    1.24 +
    1.25 +  var portNumber = dialogParams.GetInt(1);
    1.26 +  var hostName = dialogParams.GetString(1);
    1.27 +  var msg = dialogParams.GetString(2);
    1.28 +
    1.29 +  hostport = hostName + ":" + portNumber;
    1.30 +  setText("warningText", msg);
    1.31 +}
    1.32 +
    1.33 +function viewCert()
    1.34 +{
    1.35 +  viewCertHelper(window, cert);
    1.36 +}

mercurial