diff options
Diffstat (limited to 'base/console/src/com')
7 files changed, 165 insertions, 69 deletions
diff --git a/base/console/src/com/netscape/admin/certsrv/config/CACertsTab.java b/base/console/src/com/netscape/admin/certsrv/config/CACertsTab.java index 4cbc2edbb..02f4a591a 100644 --- a/base/console/src/com/netscape/admin/certsrv/config/CACertsTab.java +++ b/base/console/src/com/netscape/admin/certsrv/config/CACertsTab.java @@ -17,18 +17,38 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.admin.certsrv.config; -import com.netscape.admin.certsrv.*; -import com.netscape.admin.certsrv.connection.*; -import com.netscape.admin.certsrv.ug.*; -import javax.swing.*; -import java.awt.event.*; -import java.awt.*; -import java.util.*; - -import com.netscape.management.client.util.*; -import com.netscape.management.client.console.*; -import com.netscape.certsrv.common.*; -import com.netscape.admin.certsrv.keycert.*; +import java.awt.Color; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.event.ActionEvent; +import java.awt.event.MouseEvent; +import java.util.Vector; + +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.ListSelectionModel; + +import com.netscape.admin.certsrv.CMSAdminUtil; +import com.netscape.admin.certsrv.CMSBaseResourceModel; +import com.netscape.admin.certsrv.EAdminException; +import com.netscape.admin.certsrv.LabelCellRenderer; +import com.netscape.admin.certsrv.connection.AdminConnection; +import com.netscape.admin.certsrv.keycert.CertSetupWizard; +import com.netscape.admin.certsrv.keycert.CertSetupWizardInfo; +import com.netscape.admin.certsrv.ug.CMSBaseUGTab; +import com.netscape.admin.certsrv.ug.CertViewDialog; +import com.netscape.certsrv.common.Constants; +import com.netscape.certsrv.common.DestDef; +import com.netscape.certsrv.common.NameValuePairs; +import com.netscape.certsrv.common.ScopeDef; +import com.netscape.cmsutil.crypto.CryptoUtil; +import com.netscape.management.client.console.ConsoleInfo; +import com.netscape.management.client.util.Debug; +import com.netscape.management.client.util.JButtonFactory; /** * CA certs Tab @@ -356,7 +376,7 @@ public class CACertsTab extends CMSBaseUGTab { if (colonindex != -1) v.addElement(nickname.substring(0, colonindex)); else - v.addElement("internal"); + v.addElement(CryptoUtil.INTERNAL_TOKEN_NAME); mDataModel.addRow(v); } } diff --git a/base/console/src/com/netscape/admin/certsrv/config/WBaseKeyPage.java b/base/console/src/com/netscape/admin/certsrv/config/WBaseKeyPage.java index cd5ebfc25..b77ad6a23 100644 --- a/base/console/src/com/netscape/admin/certsrv/config/WBaseKeyPage.java +++ b/base/console/src/com/netscape/admin/certsrv/config/WBaseKeyPage.java @@ -17,13 +17,18 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.admin.certsrv.config; -import java.awt.*; -import javax.swing.*; -import javax.swing.event.*; -import com.netscape.admin.certsrv.*; -import com.netscape.admin.certsrv.connection.*; -import com.netscape.admin.certsrv.wizard.*; -import com.netscape.certsrv.common.*; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; + +import javax.swing.JComboBox; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.JTextField; + +import com.netscape.admin.certsrv.CMSAdminUtil; +import com.netscape.admin.certsrv.wizard.WizardBasePanel; /** * Setup CA signing cert for installation wizard. @@ -82,7 +87,7 @@ public class WBaseKeyPage extends WizardBasePanel { add(tokenLbl, gbc); mTokenBox = new JComboBox(); - mTokenBox.addItem("internal"); + mTokenBox.addItem(CryptoUtil.INTERNAL_TOKEN_NAME); CMSAdminUtil.resetGBC(gbc); gbc.anchor = gbc.NORTHWEST; gbc.insets = new Insets(COMPONENT_SPACE,0, diff --git a/base/console/src/com/netscape/admin/certsrv/config/install/WICACert1Page.java b/base/console/src/com/netscape/admin/certsrv/config/install/WICACert1Page.java index 8b511ced5..59ecfe5d2 100644 --- a/base/console/src/com/netscape/admin/certsrv/config/install/WICACert1Page.java +++ b/base/console/src/com/netscape/admin/certsrv/config/install/WICACert1Page.java @@ -17,13 +17,19 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.admin.certsrv.config.install; -import java.awt.*; -import javax.swing.*; -import javax.swing.event.*; -import com.netscape.admin.certsrv.*; -import com.netscape.admin.certsrv.connection.*; -import com.netscape.admin.certsrv.wizard.*; -import com.netscape.certsrv.common.*; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; + +import javax.swing.JComboBox; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextArea; + +import com.netscape.admin.certsrv.CMSAdminUtil; +import com.netscape.admin.certsrv.wizard.IWizardPanel; +import com.netscape.admin.certsrv.wizard.WizardBasePanel; +import com.netscape.admin.certsrv.wizard.WizardInfo; /** * Setup CA signing cert for installation wizard. @@ -106,7 +112,7 @@ class WICACert1Page extends WizardBasePanel implements IWizardPanel { add(tokenLbl, gbc); mTokenBox = new JComboBox(); - mTokenBox.addItem("internal"); + mTokenBox.addItem(CryptoUtil.INTERNAL_TOKEN_NAME); CMSAdminUtil.resetGBC(gbc); gbc.anchor = gbc.NORTHWEST; gbc.insets = new Insets(COMPONENT_SPACE,0, diff --git a/base/console/src/com/netscape/admin/certsrv/config/install/WILDAPPublishingPage.java b/base/console/src/com/netscape/admin/certsrv/config/install/WILDAPPublishingPage.java index 0dd19333c..5392cf4a5 100644 --- a/base/console/src/com/netscape/admin/certsrv/config/install/WILDAPPublishingPage.java +++ b/base/console/src/com/netscape/admin/certsrv/config/install/WILDAPPublishingPage.java @@ -17,12 +17,23 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.admin.certsrv.config.install; -import java.awt.*; -import javax.swing.*; -import com.netscape.admin.certsrv.*; -import com.netscape.admin.certsrv.connection.*; -import com.netscape.admin.certsrv.wizard.*; -import com.netscape.certsrv.common.*; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; + +import javax.swing.JCheckBox; +import javax.swing.JComboBox; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.JTextField; + +import com.netscape.admin.certsrv.CMSAdminUtil; +import com.netscape.admin.certsrv.wizard.IWizardPanel; +import com.netscape.admin.certsrv.wizard.WizardBasePanel; +import com.netscape.admin.certsrv.wizard.WizardInfo; +import com.netscape.certsrv.common.Constants; +import com.netscape.cmsutil.crypto.CryptoUtil; /** * Introduction page for installation wizard. @@ -215,7 +226,7 @@ class WILDAPPublishingPage extends WizardBasePanel implements IWizardPanel { CMSAdminUtil.resetGBC(gbc); mCertBox = new JComboBox(); - mCertBox.addItem("internal"); + mCertBox.addItem(CryptoUtil.INTERNAL_TOKEN_NAME); gbc.fill = gbc.NONE; gbc.anchor = gbc.NORTHWEST; gbc.insets = new Insets(0, COMPONENT_SPACE, COMPONENT_SPACE, diff --git a/base/console/src/com/netscape/admin/certsrv/keycert/WKeyPage.java b/base/console/src/com/netscape/admin/certsrv/keycert/WKeyPage.java index 6c9c981ef..cebb695e5 100644 --- a/base/console/src/com/netscape/admin/certsrv/keycert/WKeyPage.java +++ b/base/console/src/com/netscape/admin/certsrv/keycert/WKeyPage.java @@ -17,19 +17,40 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.admin.certsrv.keycert; -import java.awt.*; -import java.awt.event.*; -import java.util.*; -import javax.swing.*; -import javax.swing.border.*; - -import com.netscape.admin.certsrv.*; -import com.netscape.admin.certsrv.connection.*; -import com.netscape.admin.certsrv.wizard.*; -import com.netscape.certsrv.common.*; +import java.awt.Color; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.util.StringTokenizer; + +import javax.swing.ButtonGroup; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.JTextArea; +import javax.swing.JTextField; +import javax.swing.border.TitledBorder; +import javax.swing.text.JTextComponent; + +import com.netscape.admin.certsrv.CMSAdminUtil; +import com.netscape.admin.certsrv.EAdminException; +import com.netscape.admin.certsrv.config.WarningDialog; +import com.netscape.admin.certsrv.connection.AdminConnection; +import com.netscape.admin.certsrv.wizard.IWizardPanel; +import com.netscape.admin.certsrv.wizard.WizardBasePanel; +import com.netscape.admin.certsrv.wizard.WizardInfo; +import com.netscape.certsrv.common.Constants; +import com.netscape.certsrv.common.DestDef; +import com.netscape.certsrv.common.NameValuePairs; +import com.netscape.certsrv.common.ScopeDef; import com.netscape.cmsutil.crypto.CryptoUtil; -import com.netscape.admin.certsrv.config.*; -import javax.swing.text.*; /** * Setup key information for certificate setup wizard. @@ -103,7 +124,7 @@ class WKeyPage extends WizardBasePanel implements IWizardPanel, ItemListener { String str = wizardInfo.getNicknames(); StringTokenizer tokenizer1 = new StringTokenizer(str, ","); while (tokenizer1.hasMoreTokens()) { - mNicknameBox.addItem((String)tokenizer1.nextToken()); + mNicknameBox.addItem(tokenizer1.nextToken()); } } } else { @@ -128,7 +149,7 @@ class WKeyPage extends WizardBasePanel implements IWizardPanel, ItemListener { String tokenList = wizardInfo.getTokenList(); StringTokenizer tokenizer = new StringTokenizer(tokenList, ","); while (tokenizer.hasMoreTokens()) { - mTokenBox.addItem((String)tokenizer.nextToken()); + mTokenBox.addItem(tokenizer.nextToken()); } mTokenBox.addItemListener(this); @@ -253,11 +274,11 @@ class WKeyPage extends WizardBasePanel implements IWizardPanel, ItemListener { if (mKeyTypeBox.isVisible()) { wizardInfo.addEntry(Constants.PR_KEY_TYPE, - (String)mKeyTypeBox.getSelectedItem()); + mKeyTypeBox.getSelectedItem()); nvps.put(Constants.PR_KEY_TYPE, (String) mKeyTypeBox.getSelectedItem()); } else if (mDSAKeyTypeBox.isVisible()) { wizardInfo.addEntry(Constants.PR_KEY_TYPE, - (String)mDSAKeyTypeBox.getSelectedItem()); + mDSAKeyTypeBox.getSelectedItem()); nvps.put(Constants.PR_KEY_TYPE, (String) mDSAKeyTypeBox.getSelectedItem()); } } @@ -302,7 +323,7 @@ class WKeyPage extends WizardBasePanel implements IWizardPanel, ItemListener { if (mNewKeyBtn.isSelected()) { String tokenName = (String)mTokenBox.getSelectedItem(); - if (tokenName.equals("internal")) + if (tokenName.equals(CryptoUtil.INTERNAL_TOKEN_NAME)) tokenName = CryptoUtil.INTERNAL_TOKEN_NAME; nvps.clear(); nvps.put(Constants.PR_TOKEN_NAME, tokenName); diff --git a/base/console/src/com/netscape/admin/certsrv/keycert/WTokenLogonPage.java b/base/console/src/com/netscape/admin/certsrv/keycert/WTokenLogonPage.java index 46c9b61df..617aeebbc 100644 --- a/base/console/src/com/netscape/admin/certsrv/keycert/WTokenLogonPage.java +++ b/base/console/src/com/netscape/admin/certsrv/keycert/WTokenLogonPage.java @@ -17,13 +17,26 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.admin.certsrv.keycert; -import java.awt.*; -import javax.swing.*; - -import com.netscape.admin.certsrv.*; -import com.netscape.admin.certsrv.connection.*; -import com.netscape.admin.certsrv.wizard.*; -import com.netscape.certsrv.common.*; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; + +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JPasswordField; +import javax.swing.JTextArea; + +import com.netscape.admin.certsrv.CMSAdminUtil; +import com.netscape.admin.certsrv.EAdminException; +import com.netscape.admin.certsrv.connection.AdminConnection; +import com.netscape.admin.certsrv.wizard.IWizardPanel; +import com.netscape.admin.certsrv.wizard.WizardBasePanel; +import com.netscape.admin.certsrv.wizard.WizardInfo; +import com.netscape.certsrv.common.Constants; +import com.netscape.certsrv.common.DestDef; +import com.netscape.certsrv.common.NameValuePairs; +import com.netscape.certsrv.common.ScopeDef; import com.netscape.cmsutil.crypto.CryptoUtil; /** @@ -88,7 +101,7 @@ class WTokenLogonPage extends WizardBasePanel implements IWizardPanel { AdminConnection connection = wizardInfo.getAdminConnection(); String tokenname = mTokenNameText.getText().trim(); - if (tokenname.equals("internal")) { + if (tokenname.equals(CryptoUtil.INTERNAL_TOKEN_NAME)) { tokenname = CryptoUtil.INTERNAL_TOKEN_NAME; } diff --git a/base/console/src/com/netscape/admin/certsrv/security/CertRequestSelectTokenPane.java b/base/console/src/com/netscape/admin/certsrv/security/CertRequestSelectTokenPane.java index cab38e8d3..200c74a1b 100644 --- a/base/console/src/com/netscape/admin/certsrv/security/CertRequestSelectTokenPane.java +++ b/base/console/src/com/netscape/admin/certsrv/security/CertRequestSelectTokenPane.java @@ -17,13 +17,33 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.admin.certsrv.security; -import java.awt.*; -import java.awt.event.*; -import java.util.*; -import javax.swing.*; -import javax.swing.border.*; -import com.netscape.management.client.util.*; -import com.netscape.management.nmclf.*; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Vector; + +import javax.swing.Box; +import javax.swing.ButtonGroup; +import javax.swing.JComboBox; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.border.CompoundBorder; +import javax.swing.border.EmptyBorder; +import javax.swing.border.EtchedBorder; +import javax.swing.border.TitledBorder; + +import com.netscape.cmsutil.crypto.CryptoUtil; +import com.netscape.management.client.util.GridBagUtil; +import com.netscape.management.client.util.MultilineLabel; +import com.netscape.management.client.util.ResourceSet; +import com.netscape.management.client.util.UtilConsoleGlobals; +import com.netscape.management.nmclf.SuiConstants; +import com.netscape.management.nmclf.SuiOptionPane; /** * @@ -206,7 +226,7 @@ IKeyCertPage { ResourceSet resource = KeyCertUtility.getKeyCertWizardResourceSet(); - _internal = resource.getString("SelectToken", "internal"); + _internal = resource.getString("SelectToken", CryptoUtil.INTERNAL_TOKEN_NAME); _defaultToken = resource.getString("SelectToken", "defaultToken"); _no = new JRadioButton(resource.getString("SelectToken", "no"), |