SSL problem with java 1.4 plugin and ApacheSSL (OpenSA build)

Hi,

I'm struggeling with a problem that seems to be some new "feature"

with java 1.4 ssl.

I have an applet running on a site using https.

I can't download the class files when using the 1.4 plugin, but it

works fine with 1.3.x and earlier versions.

To demonstrate, I have created a simple applet that displays a JLabel.

https://129.241.219.174

(don't mind the snakeoil server certificate ;)

The webserver is an OpenSA (www.opensa.org) build of apache and

openSSL

(OpenSA 0.20, apache 1.2.12, build March 3, 2000)

(I get a problem with client certificates as well, Handshake

exceptions)

Here's the output you should get with 1.4:

**********************************************************

Java(TM) Plug-in: Version 1.4.0

Using JRE version 1.4.0 Java HotSpot(TM) Client VM

User home directory = C:\Documents and Settings\t521609.TELENOR

Proxy Configuration: No proxy

-

c:clear console window

...

0-5: set trace level to <n>

-

load: class PureApplet not found.

java.lang.ClassNotFoundException: PureApplet

at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:151)

at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:189)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:112)

at java.lang.ClassLoader.loadClass(ClassLoader.java:262)

at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:478)

at sun.applet.AppletPanel.createApplet(AppletPanel.java:548)

at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1621)

at sun.applet.AppletPanel.runLoader(AppletPanel.java:477)

at sun.applet.AppletPanel.run(AppletPanel.java:290)

at java.lang.Thread.run(Thread.java:536)

Caused by: java.io.IOException: open HTTP connection failed.

at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:224)

at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:40)

at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:141)

at java.security.AccessController.doPrivileged(Native Method)

at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:138)

... 10 more

*********************************************************

with runtime parameter turned on:

-Djavax.net.debug=ssl

You will see alot of "garbage" :

keyStore is :

keyStore type is : jks

init keystore

init keymanager of type SunX509

trustStore is: C:\PROGRA~1\Java\J2RE14~1.0\lib\security\cacerts

trustStore type is : jks

init truststore

adding as trusted cert: [

[

etc etc etc

--

I'm not an ssl expert, I just use the darn thing. I hope someone can

make sense of the -Djavax.net.debug=ssl output.

It might be a bug in 1.4 or some new feature I hopefully can configure

Apache to work with.

Sincerely

am hjemas

[3108 byte] By [annehja] at [2007-9-27 7:11:26]
# 1

I can reproduce the problem but for me it does not seem that it is caused by the SSL handshake because that one is already successfully finished at the moment of the ClassNotFoundException. Did you try the phenomenon with different browsers and/or the appletviewer too ? Maybe it is only a problem of the plugin class loader. How did you convert to Java 1.4 ? I always use a HTML template with an <applet> tag and then use htmlconverter from the JDK to convert it to the needed JRE.

good luck - mad

martindeinhofera at 2007-7-8 10:26:51 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 2

Hi!

Thank you for your answer.

To me it still seems that there is a problem with the handshake.

The exact same applet over http, works fine. But when I turn the SSLEngine on, it can't download the files.

Most of the users have IE, so it must work there..

I have used htmlconverter, as you can see in the html source. You can only specify a minimum required version. If a user has 1.4, it will use the plugin from 1.4.

greetings,

anne

annehja at 2007-7-8 10:26:51 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 3
It helped to upgrade to opensa 1.0.1 for pages converted by 1.3.1 HTML converter.1.3.0 got other errors, so I had to upgrade them to 1.3.1-anne :)
annehja at 2007-7-8 10:26:51 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...