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

jvergara
05.51.2007 ca4513ac9832ea8a6a24c9fb87c6132ed050f5cd
When installing update the Start TLS property on the registration information.  This way when we try to commit to a server using the standard LDAP port and startTLS is configured we will use it to connect.

Update a typo in the connection code to use ldap instead of ldaps to create the URL for startTLS.
2 files modified
19 ■■■■ changed files
opends/src/ads/org/opends/admin/ads/util/ServerLoader.java 10 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java 9 ●●●●● patch | view | raw | blame | history
opends/src/ads/org/opends/admin/ads/util/ServerLoader.java
@@ -114,10 +114,14 @@
    if (!isOver)
    {
      isInterrupted = true;
      String ldapUrl = getLdapUrl(serverProperties);
      String ldapUrl = getLdapsUrl(serverProperties);
      if (ldapUrl == null)
      {
        ldapUrl = getLdapsUrl(serverProperties);
        ldapUrl = getStartTlsLdapUrl(serverProperties);
      }
      if (ldapUrl == null)
      {
        ldapUrl = getLdapUrl(serverProperties);
      }
      lastException = new TopologyCacheException(
          TopologyCacheException.Type.TIMEOUT, null, trustManager, ldapUrl);
@@ -310,7 +314,7 @@
    "true".equalsIgnoreCase(v.toString());
    if (ldapEnabled && startTLSEnabled)
    {
      ldapUrl = "ldaps://"+getHostNameForLdapUrl(serverProperties)+":"+
      ldapUrl = "ldap://"+getHostNameForLdapUrl(serverProperties)+":"+
      serverProperties.get(ServerProperty.LDAP_PORT);
    }
    return ldapUrl;
opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -2229,6 +2229,15 @@
      serverProperties.put(ADSContext.ServerProperty.LDAPS_ENABLED, "false");
    }
    if (sec.getEnableStartTLS())
    {
      serverProperties.put(ADSContext.ServerProperty.STARTTLS_ENABLED, "true");
    }
    else
    {
      serverProperties.put(ADSContext.ServerProperty.STARTTLS_ENABLED, "false");
    }
    serverProperties.put(ADSContext.ServerProperty.JMX_PORT, "1689");
    serverProperties.put(ADSContext.ServerProperty.JMX_ENABLED, "false");