ensure we use ssl and ldaps is deprecated
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1477967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
99c3321358
commit
29ab886c64
|
@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory;
|
|||
import javax.naming.Context;
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.directory.DirContext;
|
||||
import javax.naming.directory.InitialDirContext;
|
||||
import javax.naming.ldap.LdapName;
|
||||
import javax.naming.ldap.Rdn;
|
||||
import java.util.Collections;
|
||||
|
@ -153,7 +154,7 @@ public class LdapConnection
|
|||
|
||||
if ( config.getHostname() != null )
|
||||
{
|
||||
String protocol = config.isSsl() ? "ldaps" : "ldap";
|
||||
String protocol = "ldap";// config.isSsl() ? "ldaps" : "ldap";
|
||||
if ( config.getPort() != 0 )
|
||||
{
|
||||
env.put( Context.PROVIDER_URL, protocol + "://" + config.getHostname() + ":" + config.getPort() + "/" );
|
||||
|
@ -164,6 +165,11 @@ public class LdapConnection
|
|||
}
|
||||
}
|
||||
|
||||
if ( config.isSsl() )
|
||||
{
|
||||
env.put( Context.SECURITY_PROTOCOL, "ssl" );
|
||||
}
|
||||
|
||||
if ( config.getAuthenticationMethod() != null )
|
||||
{
|
||||
env.put( Context.SECURITY_AUTHENTICATION, config.getAuthenticationMethod() );
|
||||
|
|
Loading…
Reference in New Issue