Hello,
 
I’m
turning to the mailing list with a problem we have with one of our bundles. It
is an authentication bundle that validates users against ldap. The code uses a
separate keystore where the LDAP’s public key is stored. The code works
perfectly in junit tests, but unfortunately in virgo 2.1 the keystore is not
used for some reason. I could only get it working if I import the LDAP’s public
cert into the JRE’s cacerts keystore. I even tried to put the public key into
the $VIRGO/config/keystore, still no luck.
 
Imports:
 
import com.novell.ldap.LDAPConnection;
import com.novell.ldap.LDAPEntry;
import com.novell.ldap.LDAPException;
import com.novell.ldap.LDAPJSSESecureSocketFactory;
import com.novell.ldap.LDAPSearchResults;
 
Here
is the code:
 
Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("javax.net.ssl.trustStore", “keystore.jks”);
LDAPConnection.setSocketFactory(new
LDAPJSSESecureSocketFactory());
ldapConnection = new LDAPConnection();
ldapConnection.connect(host, 636);
ldapConnection.bind(V3, loginDN, password);
 
Is
there anything different in virgo than in say servlet containers that would
cause this issue ?
 
Thank
you.
 
Jan