From d65316c746990cbe4c2b433b007afe00e9492c36 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 30 Jul 2007 15:53:44 +0000
Subject: [PATCH] The following modifications are done in order to be able to handle properly secure connections in both the status command-line and the status panel. Some options to specify a keystore, a trustore, etc. have been added to the status command-line so that is consistent with the other command-lines that use LDAP. As for these command-lines if the user does not specify to use Start TLS or LDAPS, the command-line will try to use LDAP to connect. But if there is no LDAP port enabled, the command-line will try to connect to the LDAPS port.
---
opends/src/quicksetup/org/opends/quicksetup/util/Utils.java | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index 27c5846..0dd79b6 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -34,7 +34,6 @@
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.RandomAccessFile;
-import java.security.GeneralSecurityException;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -44,7 +43,6 @@
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapName;
import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.TrustManager;
import org.opends.admin.ads.util.ConnectionUtils;
@@ -894,16 +892,7 @@
*/
public static boolean isCertificateException(Throwable t)
{
- boolean returnValue = false;
-
- while (!returnValue && (t != null))
- {
- returnValue = (t instanceof SSLHandshakeException) ||
- (t instanceof GeneralSecurityException);
- t = t.getCause();
- }
-
- return returnValue;
+ return ConnectionUtils.isCertificateException(t);
}
/**
--
Gitblit v1.10.0