dcsimg
Can I do http tunnelling to a servlet from an applet using JSSE?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Siva_P
Posted On:   Thursday, October 24, 2002 09:28 AM

I work on a product which has an applet client and servlet server base. We use SSLava for secure socket communication between applet and servlet which is done thru http tunnelling. I'm working on replacing SSLava with the free JSSE from Sun. The server is an apache based server using JServ servlet engine. Here's the creation of JSSE socket part which seems to work fine (atleast no exceptions obtained) java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); System.setProperty ("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); SocketPermission p1=new SocketPermission(serverName,"connect,accept,listen,resolve"); SSLSocketFactory ssl   More>>

I work on a product which has an applet client and servlet server base. We use SSLava for secure socket communication between applet and servlet which is done thru http tunnelling. I'm working on replacing SSLava with the free JSSE from Sun. The server is an apache based server using JServ servlet engine. Here's the creation of JSSE socket part which seems to work fine (atleast no exceptions obtained)

			
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty ("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");

SocketPermission p1=new SocketPermission(serverName,"connect,accept,listen,resolve");

SSLSocketFactory sslFact =
(SSLSocketFactory)SSLSocketFactory.getDefault();
theSocket=
(SSLSocket)sslFact.createSocket(serverName, thePort);


But, when I tried to send a serialized request to the server, I get an exception :

			

java.lang.NoClassDefFoundError: COM/rsa/jsafe/SunJSSE_z
at com.sun.net.ssl.internal.ssl.Handshaker.c(DashoA6275)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(DashoA6275)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at java.io.DataOutputStream.writeBytes(Unknown Source)
at FWAppletProxy.sendRequest(C:/FWAppletProxy.java:349)
at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

But the signed applet jar has all the files including the one that it says cannot be found. We use JDK1.3.1_02 (we cant go to JDK1.4 until a few months from now). Am I doing anything wrong here? I dont have JSSE installed on the server(as I never had SSLava installed on server either) Any help will be greatly appreciated.

   <<Less
About | Sitemap | Contact