aspose file tools*
The moose likes Security and the fly likes Connecting to LDAP server over SSL without using certificates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Connecting to LDAP server over SSL without using certificates" Watch "Connecting to LDAP server over SSL without using certificates" New topic
Author

Connecting to LDAP server over SSL without using certificates

Vijay Bharghav bheemineni
Greenhorn

Joined: Aug 31, 2005
Posts: 29
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting to LDAP server over SSL without using certificates