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
* David Drinan <ddrinan@netscape.com>
25
const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock;
26
const nsIPKIParamBlock = Components.interfaces.nsIPKIParamBlock;
27
const nsIX509Cert = Components.interfaces.nsIX509Cert;
35
pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock);
36
dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock);
37
var isupport = pkiParams.getISupportAtIndex(1);
38
var cert = isupport.QueryInterface(nsIX509Cert);
39
bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties");
42
addAttributeFromCert('organization', cert.organization);
43
// Organizational Unit
44
addAttributeFromCert('orgunit', cert.organizationalUnit);
46
//Set the focus so key press events work.
47
document.getElementById('ok-button').focus();
52
dialogParams.SetInt(1,1);
58
dialogParams.SetInt(1,0);
62
function managerCrls()
64
window.open('chrome://pippki/content/crlManager.xul', "",
65
'chrome,centerscreen,dialog,resizable');
68
function addAttributeFromCert(nodeName, value)
70
var node = document.getElementById(nodeName);
72
value = bundle.GetStringFromName('notPresent');
74
node.setAttribute('value',value)