Hi ,
Could you any let me know how to connect to LDAP server over SSL with out using certficates, I mean to say I must be able to connect to LDAP server with out generation of certificates or some thing like that.
Below is my code snippet which works fine when I try to connect LDAP with out SSL. I need make changes to this,so that it connects to LDAP server over SSL with out certificates.
Thanks in advance for sparing your time.
===========================================================================
public DirContext authenticate(
String principle, String password) throws Exception
{
Debug.out("principle: "+principle);
Debug.out("password: "+password);
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://10.241.23.252:389");
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_PRINCIPAL,principle);
env.put(Context.SECURITY_CREDENTIALS,password);
DirContext ctx = new InitialDirContext(env);
return ctx;
}
===========================================================================
Regards,
Vijay Bharghav Bheemineni.