I am using com.novell.ldap.LDAPConnection class to connect to ldap. It
works fine on port 389 (non-ssl).
Now, we want to use TLS bind. I tired following approach -
1. Imported the ssl certificate in the cacerts file
2. Using following java code to connect


LDAPConnection conn = null;
LDAPTLSSocketFactory socketFactory = new LDAPJSSEStartTLSFactory();
conn = new LDAPConnection(5000);
conn.connect("turing-edir.hss.hns.com", 636);
myLogger.trace("Connection successful");
myLogger.trace("isTLS: "+ conn.isTLS());
myLogger.trace("TLS started. isTLS: "+ conn.isTLS());
conn.bind(LDAPConnection.LDAP_V3,ldapLogin,ldapPas sword.getBytes("UTF8"));

Something weird happens on the line conn.startTLS();an code hangs, there
is no exception also.
I tried another thing by commenting the line conn.startTLS(); but then,
I get following exception

> LDAPException: Connection lost waiting for results from
> turing-edir.hss.hns.com:636 (91) Connect Error
> java.io.EOFException: BERDecoder: decode: EOF in Identifier
> at com.novell.ldap.Connection$ReaderThread.run(Unknow n Source)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.EOFException: BERDecoder: decode: EOF in Identifier
> at com.novell.ldap.asn1.ASN1Identifier.<init>(Unknown Source)
> ... 2 more

Any help would be much appreciated.
Saurabh J

invincible_virus's Profile: https://forums.netiq.com/member.php?userid=1599
View this thread: https://forums.netiq.com/showthread.php?t=48768