This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Signed Applets: automation issue.

 
Mariam A. Shamsi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody,

I need to run "Signed" JApplet within apache tomcat. To do this, I need to
have jar files of whatever packages I have. In my project, I have three
packages:

1. bank (import com, gnu-crypto, java-security, and others)
2. client -- contains the JApplet.class (import com, gnu-crypto, java-security, and others)
3. com (import some JRE6 classes, e.g. HashMab, etc)

First of all, I need to create jar files of the above packages to be
signed later, for this purpose I used Eclipse built-in exporter with the
following option:

"Export generated class files and resources"

Then, I completed the signing process to get the signed jars. My
index.html with applet tag is as follow:



Within apache tomcat, I have the index file located under WebContent
folder, and all the required jars (in the archive) are also in the same
path.

Launching the browser notifies the user about the "self-signed" Cert., and
this is what I want. My problem is when trying to automate the generation
of the applet packages for signing purpose. I created a small .sh file
that creates the jar files of the above packages without using Eclipse build-in Jar exporter:



But, when I open the browser the "self-signed" Crt. is not starting,
as if the code is not signed!

Where is the problem, is it in the step of creating the jars, or is it in the index.html file?
Do I need to include all the imported packages not only the package classes?

Please I spent more than 4 weeks trying to figure out this.

[ December 24, 2008: Message edited by: Mariam A. Shamsi ]

[ UD: added linebreaks to preserve layout ]
[ December 24, 2008: Message edited by: Ulf Dittmer ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I open the browser the "self-signed" Crt. is not starting, as if the code is not signed!

Does this mean the applet runs or that it doesn't run? Are there any message sin the Java Console?

You can check whether the jar files are signed by unpacking them (jar -xf) and looking at the manifest; there should be information about the certificate being used.
 
Mariam A. Shamsi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

The applet starts, but the code Cert. is not showing up, and this
cause some permission problems.

I unjar one of the signed jars, and got the following



It seems that the jar is signed (right?).

I don't know what eclipse do when it exports the generated
class file and resources into jar file?

BTW, for each of the packages that I have, they call other packages
and also import other jars, e.g.

bank package imports the following:

1. com package;
2. gnu-crypto.jar;
3. javax-security.jar;
4. and other JRE-6 jars.

When jaring the bank package I only combine the generated classes into bank.jar, and I don't know if I need also to include other things?

BTW, what do they mean by saying:

"Export the generated class files and resources", what do they mean by "resources"?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic