1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3
* The contents of this file are subject to the Mozilla Public
4
* License Version 1.1 (the "License"); you may not use this file
5
* except in compliance with the License. You may obtain a copy of
6
* the License at http://www.mozilla.org/MPL/
8
* Software distributed under the License is distributed on an "AS
9
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
* implied. See the License for the specific language governing
11
* rights and limitations under the License.
13
* The Original Code is mozilla.org code.
15
* The Initial Developer of the Original Code is Netscape
16
* Communications Corporation. Portions created by Netscape are
17
* Copyright (C) 1998 Netscape Communications Corporation. All
21
* Javier Delgadillo <javi@netscape.com>
22
* H�kan Waara <hwaara@chello.se>
26
const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock;
27
const nsIPKIParamBlock = Components.interfaces.nsIPKIParamBlock;
28
const nsIX509Cert = Components.interfaces.nsIX509Cert;
36
pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock);
37
dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock);
39
var isupport = pkiParams.getISupportAtIndex(1);
40
cert = isupport.QueryInterface(nsIX509Cert);
42
var bundle = document.getElementById("newserver_bundle");
44
var intro = bundle.getFormattedString(
45
"newserver.intro", [cert.commonName]);
47
var reason3 = bundle.getFormattedString(
48
"newserver.reason3", [cert.commonName]);
50
var question = bundle.getFormattedString(
51
"newserver.question", [cert.commonName]);
53
setText("intro", intro);
54
setText("reason3", reason3);
55
setText("question", question);
57
window.sizeToContent();
60
function doHelpButton()
62
openHelp('new_web_cert');
67
var selectedID = document.getElementById("whatnow").selectedItem.id;
69
if (selectedID == "refuse") {
70
dialogParams.SetInt(1,0);
73
dialogParams.SetInt(1,1);
75
// 0 = accept perm, 1 = accept for this session
78
if (selectedID == "remember") {
82
dialogParams.SetInt(2, userchoice);
88
dialogParams.SetInt(1,0);
93
viewCertHelper(window, cert);