Thanks for replying. I was a bit occupied, so I could not back soon. Going by your mail, I went through the certificate generation process again. What I found is that for some reason, the cacert.pem file(which is the certificate for the CA) shows the following -
 X509v3 extensions:
            X509v3 Basic Constraints:
I am attaching the steps I followed and the certificate files generated as per the tutorial

Shouldn't the above field be CA:true? Also, how do I make sure that the flag that you mentioned below gets set to "SSL server".

On Fri, May 28, 2010 at 11:44 PM, Brett @Google <> wrote:
On Fri, May 28, 2010 at 9:39 AM, s g <> wrote:

javax.naming.CommunicationException: simple bind failed: [Root exception is Netscape cert type does not permit use for SSL server]
     at com.sun.jndi.ldap.LdapClient.authenticate(
     at com.sun.jndi.ldap.LdapCtx.connect(
     at com.sun.jndi.ldap.LdapCtx.<init>(

You probably have your certs round the wrong way. The server cert (on the ldap server)  should have 'SSL Server' usage flag the client cert (on the ldap client) should have 'SSL Client' usage flag.

The usage flags are embedded when you make the csr (certificate request) which will then usually be reflected in the generated certificate, unless your CA overrides them.

Do a "openssl x509 -in <cert file> -noout -text" to compare the two certificates.