From 2302060670eb0dc1712249c1eccc54683e63bb8c Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 13 Nov 2007 01:46:38 +0000
Subject: [PATCH] Remove some unused methods. Fix a bug in the uninstall and dsreplication. When the user connected to the servers using LDAP, a null trust manager was used to load the topology (so all certificates were accepted). The code has been fixed to prompt the user to accept non trusted certificates.
---
opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java b/opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
index bf47ebf..f2d9914 100644
--- a/opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
+++ b/opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
@@ -95,6 +95,9 @@
// Indicate if the truststore in in memory
private boolean trustStoreInMemory = false;
+ // Indicate that the trust manager was created with the parameters provided
+ private boolean trustManagerInitialized;
+
// The truststore to use for the SSL or STARTTLS connection
private KeyStore truststore;
@@ -1684,6 +1687,20 @@
isHeadingDisplayed = false;
}
+ /**
+ * Forces the initialization of the trust manager with the arguments provided
+ * by the user.
+ * @throws ArgumentException if there is an error with the arguments provided
+ * by the user.
+ */
+ public void initializeTrustManagerIfRequired() throws ArgumentException
+ {
+ if (!trustManagerInitialized)
+ {
+ initializeTrustManager();
+ }
+ }
+
private void initializeTrustManager() throws ArgumentException
{
// Get truststore info
@@ -1691,5 +1708,7 @@
// Check if we need client side authentication
keyManager = getKeyManagerInternal();
+
+ trustManagerInitialized = true;
}
}
--
Gitblit v1.10.0