Hello All
I'm trying to fing reason for non-working SSL connection from java app (EJB) to LDAP server.
Code is:
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryimpl");
env.put(Context.PROVIDER_URL, urlLdapServer + baseDN);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "user");
env.put(Context.SECURITY_CREDENTIALS, "password");
And while trying to connect exception is thrown:
Exception while getting data from LDAP:
javax.naming.CommunicationException: simple bind failed: server_address:636 [Root exception 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]
In portal's configuration there is key storage named TrustedCAs containing valid certificate for this LDAP server.
I'm bit stuck, so any help would be highly appreciated.
Thanks in advance
Best Regards
Maciej Gottfried