Signing third-parties JARs

Hi all,

I'm having a problem trying to run an applet that connects to a MySQL database. I can run it normally in my workstation, by editing the java.policy. However, I want to make it viewable by people in the intranet.

I saw posts about signing JARs for this goal. My problem is that I use two JAR files: my personal JAR, and the MySQL connector JAR file (which I donwloaded). I assume that I must sign both JAR files, right. Well, singing them with "jarsinger" tool, creating a certification (.cer), didn't work out.

My html applet tag looks like this:

<applet

width=900

height=600

codebase=.

class=Applet.class

archive="signed_MyJar.jar,signed_mysqlConnector.jar">

The "Do you trust" pop-up even shows up, but chosing "yes" doesn't make the applet run. I saw in some pages that you have to sign the JARs specificly for the Internet Explorer (browser that I'm using), using some CAB tools. That didn't work out fine either. Is that the problem?

I don't know if it's the JRE (which is 1.5.0), or the MySQL Connector jar file.

Can someone please help me on this issue? I'd be very flattered.

Thanks,

Alexandre.

[1245 byte] By [alexandre_cursia] at [2007-10-2 0:19:14]
# 1

> applet that connects to a MySQL database ... I want to make it viewable by people in the intranet.

Bad idea:

http://forum.java.sun.com/thread.jspa?threadID=646161&tstart=45 1st reply

> and the MySQL connector JAR file (which I donwloaded). I assume that I must

> sign both JAR files,

wrong, you can't sign someone else's jar file and pretend it's yours. All clients

have to install the 3rd party jars in their lib/ext

Applet tag uses depreciated html and can cause problems when clients have IE.

Use the htmlconverter in the jdk/bin directory.

If you still want to go ahead and make a bad desinged applet then read this:

http://forum.java.sun.com/thread.jspa?threadID=646161&tstart=45 1st reply

it has tips on signing the applet and dishing out security for Intranet

environments.

harmmeijera at 2007-7-15 16:20:47 > top of Java-index,Security,Signed Applets...
# 2

1. as mensioned DB connection in applet is doomed by design

2. if the original jar is signed, let it use its own signature.

3. in special occasions of an intranet or a VPN controlled restricted user domain, I would generally prefer java web start applications to applet to perform this.

babakNa at 2007-7-15 16:20:47 > top of Java-index,Security,Signed Applets...