WebSphere Portal Server - SSL Implementation

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > September 2004 > SSL Implementation





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SSL Implementation
rothsd

2004-09-16, 5:36 am

I have been trying for several days to establish an SSL connection to an LDAP server from a portlet(servlet). When the code is run as a stand alone application a connection is established. But when the code is run on the WebSphere AppServer there's always the same error : SSL Implementation no available. From other discussions it seems that there was a problem between the ibmjsse.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 was good. I have the appropriate keystore. Here's the JNDI code I'm using to 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 for too long...thanks.

Stefan
rothsd

2004-09-20, 10:31 am

Do not include either the jsse.jar or ibmjsse.jar in the WEB-INF/lib folder. Particularly the ibmjsse.jar will cause the problem with the default ibmjsse.jar installed with the default JRE.

The following link also helped:

http://www-1.ibm.com/support/docvie...s=utf-8&lang=en

quote:
Originally posted by rothsd
I have been trying for several days to establish an SSL connection to an LDAP server from a portlet(servlet). When the code is run as a stand alone application a connection is established. But when the code is run on the WebSphere AppServer there's always the same error : SSL Implementation no available. From other discussions it seems that there was a problem between the ibmjsse.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 was good. I have the appropriate keystore. Here's the JNDI code I'm using to 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 for too long...thanks.

Stefan

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com