This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

SSL & JAAS Exception

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 can't take it! You are too smart for me! Here is the tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic