Solution to SSLHandshakeException (skip the certificate for Java and LDAP bind)

While connecting a java client with LDAP , it may get SSLHandshakeException or CommunicationException .To avoid this , add SSL certificate or write a java class that skip the SSL certificate verification .

In the below example , we created java classes to skip or disable the SSL certificate check to avoid SSLHandshakeException.

Steps to skip the certificate verification to avoid SSLHandshakeException :