From a12eb578b2b06f6ba9d929f4a2c7b81e13eae7cc Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 01 Jul 2016 14:30:12 +0000
Subject: [PATCH] Partial OPENDJ-2625 Convert all code that uses JNDI to use the SDK instead

---
 opendj-server-legacy/src/main/java/org/opends/quicksetup/util/Utils.java |   43 -------------------------------------------
 1 files changed, 0 insertions(+), 43 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/Utils.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/Utils.java
index 82e57bf..ac6aea0 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/Utils.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/util/Utils.java
@@ -43,7 +43,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Locale;
@@ -59,10 +58,7 @@
 import javax.naming.NoPermissionException;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
-import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapName;
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.TrustManager;
 
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.LocalizableMessageBuilder;
@@ -646,45 +642,6 @@
   }
 
   /**
-   * Creates an LDAP+StartTLS connection and returns the corresponding
-   * LdapContext. This method first creates an LdapContext with anonymous bind.
-   * Then it requests a StartTlsRequest extended operation. The StartTlsResponse
-   * is setup with the specified hostname verifier. Negotiation is done using a
-   * TrustSocketFactory so that the specified TrustManager gets called during
-   * the SSL handshake. If trust manager is null, certificates are not checked
-   * during SSL handshake.
-   *
-   * @param ldapsURL
-   *          the target *LDAPS* URL.
-   * @param dn
-   *          passed as Context.SECURITY_PRINCIPAL if not null.
-   * @param pwd
-   *          passed as Context.SECURITY_CREDENTIALS if not null.
-   * @param timeout
-   *          passed as com.sun.jndi.ldap.connect.timeout if > 0.
-   * @param env
-   *          null or additional environment properties.
-   * @param trustManager
-   *          null or the trust manager to be invoked during SSL. negociation.
-   * @param verifier
-   *          null or the hostname verifier to be setup in the StartTlsResponse.
-   * @return the established connection with the given parameters.
-   * @throws NamingException
-   *           the exception thrown when instantiating InitialLdapContext.
-   * @see javax.naming.Context
-   * @see javax.naming.ldap.InitialLdapContext
-   * @see javax.naming.ldap.StartTlsRequest
-   * @see javax.naming.ldap.StartTlsResponse
-   * @see org.opends.admin.ads.util.TrustedSocketFactory
-   */
-
-  public static InitialLdapContext createStartTLSContext(String ldapsURL, String dn, String pwd, int timeout,
-      Hashtable<String, String> env, TrustManager trustManager, HostnameVerifier verifier) throws NamingException
-  {
-    return ConnectionUtils.createStartTLSContext(ldapsURL, dn, pwd, timeout, env, trustManager, null, verifier);
-  }
-
-  /**
    * Returns a message object for the given NamingException. The code assume
    * that we are trying to connect to the local server.
    *

--
Gitblit v1.10.0