mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
26.43.2007 a9ba1c2545ef442f76928469a424a6521cfa4725
opendj-sdk/opends/src/ads/org/opends/admin/ads/util/ConnectionUtils.java
@@ -703,6 +703,28 @@
  }
  /**
   * Returns the LDAP URL for the provided parameters.
   * @param host the host name.
   * @param port the LDAP port.
   * @param useSSL whether to use SSL or not.
   * @return the LDAP URL for the provided parameters.
   */
  public static String getLDAPUrl(String host, int port, boolean useSSL)
  {
    String ldapUrl;
    host = getHostNameForLdapUrl(host);
    if (useSSL)
    {
      ldapUrl = "ldaps://"+host+":"+port;
    }
    else
    {
      ldapUrl = "ldap://"+host+":"+port;
    }
    return ldapUrl;
  }
  /**
   * Tells whether the provided Throwable was caused because of a problem with
   * a certificate while trying to establish a connection.
   * @param t the Throwable to analyze.