File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes SSL & JAAS  Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "SSL & JAAS  Exception" Watch "SSL & JAAS  Exception" New topic
Author

SSL & JAAS Exception

Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Hi,
am developing an application on tomcat3.22 and jdk1.3.1. iam trying to implement jaas for security. i get the below mentioned exception

javax.naming.CommunicationException: query-ldap.de.intranet.db.com:30636 [Root exception is java.net.SocketException: SSL implementation not available]

how to tackle this error ? i read about importing the certficate using keytool and etc. i used the following to generate the keystore .

keytool -genkey -alias tomcat -keyalg RSA
still i am getting the same error. any help highly appreciated. its urgent pls..

Regards,
Raj
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 157
Hi,
You implemented SSL in tomcat and I hope you must have made changes in server.xml and must have uncomment the <connector tag where a ssl port 8443 is mentioned and in that tahe u have to specify the path of ur certificates and password of ur certificates.and i hope it would work fine ,please check again ur server.xml file .
thanks


jasmine kaur
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Hi Jasmine,
yes i had modified the server.xml and it looks as below.

<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port" value="8443"/>
<Parameter name="socketFactory" value="org.apache.tomcat.net.SSLSocketFactory" />
</Connector>

but i dont see anything related to certificates. can you send an example

Rgds,
Rajendar
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 157
Hello,
Thanks for responding well when I impelmented SSL in tomcat i made the following changes in server.xml
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="100" debug="8" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
keystoreFile="c:\Tomcat_40\conf\jass" keystorePass="twinsoft"
clientAuth="false" protocol="TLS" />
</Connector>
This connector tag was commented earlier and to support SSL we have to make this connector tag uncommnet and then specify your certificates path and passsword as I mentioned in <facotry> tag ,then save ur file and start tomcat again and run tomcat like https://localhost:8443/index.html.And it would run .

I hope you must have set JSSE_HOME and must have saved the three file in jdk.1.3lib/ext/three.jar files.
So do ask what errors u are getting .
Thanks
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Thx Jasmine,
well i didnt try placing in the attributes mentioned in Factory Tag but now am ending up with some other exception like below.
i need to tell u ,that in addition to SSL ,i am using JAAS where in i defined a LoginModule, a Login.config file and etc. any idea like why this is happening ? am totally new to these Certificates and etc..


javax.naming.CommunicationException: query-ldap.de.intranet.db.com:30636. Root exception is
java.net.SocketException: SSL implementation not available
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA6275)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.jndi.ldap.Connection.<init>(Connection.java:199)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:113)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2384)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:244)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:79)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:83)
at com.db.ta.security.util.NamingUtil.getDirContext(NamingUtil.java:68)
at com.db.ta.security.util.NamingUtil$RetryingHandler.<init>(NamingUtil.java:110)
at com.db.ta.security.util.NamingUtil$RetryingHandler.<init>(NamingUtil.java:102)
at com.db.ta.security.util.NamingUtil.getRetryingDirContext(NamingUtil.java:96)
at com.db.ta.gd.GlobalDirectoryEntry.getAaContext(GlobalDirectoryEntry.java:221)
at com.db.ta.gd.GlobalDirectoryLoginModule.login(GlobalDirectoryLoginModule.java:57)
at com.db.ta.security.auth.NamePasswordLoginModule.login(NamePasswordLoginModule.java:40)


Rgds,
Rajendar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSL & JAAS Exception
 
Similar Threads
Connecting to LDAP server using SSL
Keytool Exception: Failed to establish the chain-[Need Help]
[JSSE installation] Question on installation procedure
[Update - Success] Adding SSL certificate to Server.xml
Public keys in reply and keystore don't match