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.
| | |
| | | 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); |
| | |
| | | "true".equalsIgnoreCase(v.toString()); |
| | | if (ldapEnabled && startTLSEnabled) |
| | | { |
| | | ldapUrl = "ldaps://"+getHostNameForLdapUrl(serverProperties)+":"+ |
| | | ldapUrl = "ldap://"+getHostNameForLdapUrl(serverProperties)+":"+ |
| | | serverProperties.get(ServerProperty.LDAP_PORT); |
| | | } |
| | | return ldapUrl; |
| | |
| | | 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"); |
| | | |