• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connecting to LDAP server over SSL without using certificates

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic