final LdapURL ldapUrl = new LdapURL(cc.getLdapUrl()); factory = ThreadLocalTLSSocketFactory.getHostnameVerifierFactory(cc.getSslConfig(), ldapUrl.getHostnames()); threadLocal = true;
final LdapURL ldapUrl = new LdapURL(cc.getLdapUrl()); factory = ThreadLocalTLSSocketFactory.getHostnameVerifierFactory(cc.getSslConfig(), ldapUrl.getHostnames()); threadLocal = true;
/** * Returns a jndi connection factory using the properties found in the supplied connection config. If the supplied env * is null, the environment is retrieved from {@link #getDefaultEnvironment(ConnectionConfig, String)}. * * @param cc connection config * @param env context environment or null to use the default * * @return jndi connection factory */ protected JndiConnectionFactory getJndiConnectionFactory(final ConnectionConfig cc, final Map<String, Object> env) { SSLSocketFactory factory = config.getSslSocketFactory(); if (factory == null && (cc.getUseSSL() || cc.getLdapUrl().toLowerCase().contains("ldaps://"))) { // LDAPS hostname verification does not occur by default // set a default hostname verifier final LdapURL ldapUrl = new LdapURL(cc.getLdapUrl()); factory = ThreadLocalTLSSocketFactory.getHostnameVerifierFactory(cc.getSslConfig(), ldapUrl.getHostnames()); } return new JndiConnectionFactory( cc.getLdapUrl(), config, env != null ? env : getDefaultEnvironment(cc, factory != null ? factory.getClass().getName() : null)); }
logger.debug("Following referral with URLs: {}", urls); for (String url : urls) { final LdapURL ldapUrl = new LdapURL(url); if (ldapUrl.getEntry().getHostname() == null) { continue;
logger.debug("Following referral with URLs: {}", urls); for (String url : urls) { final LdapURL ldapUrl = new LdapURL(url); if (ldapUrl.getEntry().getHostname() == null) { continue;
logger.debug("Following referral with URLs: {}", urls); for (String url : urls) { final LdapURL ldapUrl = new LdapURL(url); if (ldapUrl.getEntry().getHostname() == null) { continue;
new Object[][] { new Object[] { new LdapURL("ldap://"), new LdapURL.Entry[] { new LdapURL.Entry( }, new Object[] { new LdapURL("ldaps://"), new LdapURL.Entry[] { new LdapURL.Entry( }, new Object[] { new LdapURL("ldap:///o=University%20of%20Michigan,c=US"), new LdapURL.Entry[] { new LdapURL.Entry( }, new Object[] { new LdapURL("ldap://ldap1.example.net/o=University%20of%20Michigan,c=US"), new LdapURL.Entry[] { new LdapURL.Entry( }, new Object[] { new LdapURL("ldap://ldap1.example.net/o=University%20of%20Michigan,c=US" + "?postalAddress"), new LdapURL.Entry[] {
throws LdapException final LdapURL ldapUrl = new LdapURL(url); ldapConnectionConfig.setLdapHost(ldapUrl.getLastEntry().getHostname()); ldapConnectionConfig.setLdapPort(ldapUrl.getLastEntry().getPort());
final LdapURL ldapUrl = new LdapURL(cc.getLdapUrl()); final SSLContextInitializer contextInit; if (cc.getSslConfig() != null && !cc.getSslConfig().isEmpty()) {