From 43e9c7913fc664b725e167090fe6d389a4558315 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 08 Jun 2007 14:43:45 +0000
Subject: [PATCH] The following commit adds all the code necessary to be able to configure replication using the setup.
---
opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java | 71 -----------------------------------
1 files changed, 1 insertions(+), 70 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java b/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java
index f9e844f..0101bc4 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java
@@ -77,8 +77,6 @@
private JTextField tfPort;
private JRadioButton rbUseSelfSignedCertificate;
private JRadioButton rbUseExistingCertificate;
- private JLabel lSelfSignedName;
- private JTextField tfSelfSignedName;
private JLabel lKeystoreType;
private JRadioButton rbPKCS11;
private JRadioButton rbJKS;
@@ -163,8 +161,6 @@
}
UIFactory.setTextStyle(cbEnableSSL,
UIFactory.TextStyle.SECONDARY_FIELD_VALID);
- UIFactory.setTextStyle(lSelfSignedName,
- UIFactory.TextStyle.SECONDARY_FIELD_VALID);
UIFactory.setTextStyle(lKeystorePath,
UIFactory.TextStyle.SECONDARY_FIELD_VALID);
UIFactory.setTextStyle(lKeystorePwd,
@@ -203,7 +199,7 @@
if (rbUseSelfSignedCertificate.isSelected())
{
ops = SecurityOptions.createSelfSignedCertificateOptions(
- tfSelfSignedName.getText(), enableSSL, enableStartTLS, sslPort);
+ enableSSL, enableStartTLS, sslPort);
}
else if (rbJKS.isSelected())
{
@@ -365,15 +361,6 @@
getMsg("use-self-signed-tooltip"),
UIFactory.TextStyle.SECONDARY_FIELD_VALID);
rbUseSelfSignedCertificate.addActionListener(l);
- lSelfSignedName = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
- getMsg("self-signed-certificate-name-label"),
- UIFactory.TextStyle.SECONDARY_FIELD_VALID);
- lSelfSignedName.setOpaque(false);
- String selfSignedName = securityOptions.getSelfSignedCertificateName();
- tfSelfSignedName = UIFactory.makeJTextField(selfSignedName,
- getMsg("self-signed-certificate-name-tooltip"),
- UIFactory.HOST_FIELD_SIZE, UIFactory.TextStyle.TEXTFIELD);
- lSelfSignedName.setLabelFor(tfSelfSignedName);
rbUseExistingCertificate = UIFactory.makeJRadioButton(
getMsg("use-existing-certificate-label"),
getMsg("use-existing-certificate-tooltip"),
@@ -517,22 +504,6 @@
aux2Panel = new JPanel(new GridBagLayout());
aux2Panel.setOpaque(false);
- gbc.weightx = 0.0;
- gbc.gridwidth = 3;
- aux2Panel.add(lSelfSignedName, gbc);
- gbc.gridwidth = GridBagConstraints.RELATIVE;
- gbc.insets.left = UIFactory.LEFT_INSET_SECONDARY_FIELD;
- aux2Panel.add(tfSelfSignedName, gbc);
- gbc.weightx = 1.0;
- gbc.gridwidth = GridBagConstraints.REMAINDER;
- gbc.insets.left = 0;
- aux2Panel.add(Box.createHorizontalGlue(), gbc);
- gbc.insets.top = UIFactory.TOP_INSET_SECONDARY_FIELD;
- gbc.insets.left = UIFactory.LEFT_INSET_RADIO_SUBORDINATE;
- auxPanel.add(aux2Panel, gbc);
-
- aux2Panel = new JPanel(new GridBagLayout());
- aux2Panel.setOpaque(false);
gbc.gridwidth = GridBagConstraints.RELATIVE;
gbc.insets = UIFactory.getEmptyInsets();
gbc.weightx = 0.0;
@@ -679,8 +650,6 @@
errorMsgs.addAll(checkPort());
- errorMsgs.addAll(checkSelfSigned());
-
errorMsgs.addAll(checkKeystore());
return errorMsgs;
@@ -796,7 +765,6 @@
case SELF_SIGNED_CERTIFICATE:
rbUseSelfSignedCertificate.setSelected(true);
- tfSelfSignedName.setText(securityOptions.getSelfSignedCertificateName());
break;
case JKS:
@@ -851,10 +819,6 @@
tfPort.setEnabled(enableSSL);
rbUseSelfSignedCertificate.setEnabled(useSSL);
- lSelfSignedName.setEnabled(
- rbUseSelfSignedCertificate.isSelected() && useSSL);
- tfSelfSignedName.setEnabled(
- rbUseSelfSignedCertificate.isSelected() && useSSL);
rbUseExistingCertificate.setEnabled(useSSL);
lKeystoreType.setEnabled(
@@ -965,38 +929,6 @@
}
/**
- * Checks the self-signed certificate parameters.
- * @return the error messages found while checking self-signed certificate
- * parameters.
- */
- private ArrayList<String> checkSelfSigned()
- {
- ArrayList<String> errorMsgs = new ArrayList<String>();
-
- if (rbUseSelfSignedCertificate.isSelected() &&
- (cbEnableSSL.isSelected() || cbEnableStartTLS.isSelected()))
- {
- String name = tfSelfSignedName.getText();
- if ((name != null) && (name.length() > 0))
- {
- /* TODO: We might try to do something to check if the user provided a
- * valid host name, but we cannot guarantee that the check will be valid
- * AND we might want to allow the user to use a common name for the
- * certificate that is not the host name.
- */
- }
- else
- {
- errorMsgs.add(getMsg("no-self-signed-cert-name-provided"));
- }
- }
-
- setValidLater(lSelfSignedName, errorMsgs.size() == 0);
-
- return errorMsgs;
- }
-
- /**
* Checks the existing keystore parameters.
* @return the error messages found while checking existing keystore
* parameters.
@@ -1045,7 +977,6 @@
if (pathValid && pwdValid)
{
- // TODO: put the password in a temporary file to do the checks.
try
{
CertificateManager certManager;
--
Gitblit v1.10.0