|Re: [virgo-dev] LDAP over SSL and keystore|
I will try running in Quinox and post on the list my findings, even if I didn’t find anything, but it will take me couple of days before I get to it.
You might try running your bundle in Equinox to narrow down the environment. If it still fails, you can then ask on the Equinox forum and mailing list which may have others who've seen this before.
You've tried googling on "javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", right?
Sometimes the JRE makes hierarchical class loading assumptions and it is necessary to add implementation packages to the boot delegation property, so that's another angle. To find this, debug deep into the failing path to find out what's going on. If you hit native code, which is not unlikely for security code, too bad.
On 12 Apr 2011, at 22:06, Fetyko, Jan wrote:
I have tried this, but still no luck. I get the same error, which is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I will keep digging, but I hope somebody has more hints.
On 7 April 2011 06:39, Fetyko, Jan <Jan.Fetyko@xxxxxxxxxxxx> wrote:
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.
Here is the code:
ldapConnection = new LDAPConnection();
ldapConnection.bind(V3, loginDN, password);
Is there anything different in virgo than in say servlet containers that would cause this issue ?