09-16-04 10:36 AM
I have been trying for several days to establish an SSL connection to an LDA
P server from a portlet(servlet). When the code is run as a stand alone app
lication a connection is established. But when the code is run on the WebSp
here AppServer there's always the same error : SSL Implementation no availab
le. From other discussions it seems that there was a problem between the ib
mjsse.jar and the SUN's jsse.jar. I have tried to use both without success.
The server's java.security file is set up correctly. The defaut setting w
as good. I have the appropriate keystore. Here's the JNDI code I'm using t
o connect:
try{
Properties props = new Properties();
props.put(javax.naming.Context.PROVIDER_URL,"ldap://some.address.cz:636");
props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
props.put(javax.naming.Context.SECURITY_PRINCIPAL, "cn=user,o=ou");
props.put(javax.naming.Context.SECURITY_CREDENTIALS, "password");
props.put(Context.SECURITY_AUTHENTICATION, "simple");
props.put(Context.SECURITY_PROTOCOL, "ssl");
DirContext m_dirContext = new InitialDirContext(props);
}catch(NamingException E){
System.out.println(E.toString());
}
Please, any ideas would be great! I've been struggling with this problem fo
r too long...thanks.
Stefan
[ Post a follow-up to this message ]
|