Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Digitally Signing Applets

 
Lance Walker
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm very new to both java and making applets, so please bear with me.

I need to digitally sign an applet so that it can read and write files on the local system. The applet downloads a file that the user selects and then the user can also upload files to a server.

However, I have absolutely no idea how to go about doing this, and everything that I've read so far is pretty cryptic and gets far to technical for my level of understanding. So far I've looked at http://faq.javaranch.com/java/HowCanAnAppletReadFilesOnTheLocalFileSystem and its references, and tried searching google for a simple tutorial.

Could anyone please define that steps that are necessary to signing an applet, or point me in the right direction? Also, I'm developing the applet on in the Eclipse IDE, so if there is a way to sign applets within eclipse, that would be fantastic .

Thanks in advance for any help!
-Lance
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You need to get a signature ID from one of the various companies that
distribute them. What this gives you is a private key and a public
key. You sign your applets with the private key and give out your
public key so that everyone else can decrypt your private key.
Attached is a URL for one such company:

http://verisign.netscape.com

brief steps for signing a java applet:
1) you develop applet
2) get signature ID from above URL
3) use private key to sign your applet
4) clients get your public key and enter it in their database
5) run applet

To generate a key, use the below java command from command prompt/console

keytool -genkey -alias ujjwal -keyalg -RSA


After this, you will need a digital certificate, if you are looking for free certificates then you will find many site offering free certificates on google.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that for development purposes you can also generate your own certificate (step 2 in Ujjwal's list) instead of getting an official one. That's done using the "keytool" executable that comes with the JDK; the process is described in the articles linked in that FAQ page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic