aspose file tools*
The moose likes Applets and the fly likes Digitally Signing Applets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Digitally Signing Applets" Watch "Digitally Signing Applets" New topic
Author

Digitally Signing Applets

Lance Walker
Greenhorn

Joined: Mar 09, 2009
Posts: 23
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

Joined: Mar 28, 2007
Posts: 403
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.


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41906
    
  63
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.


Ping & DNS - my free Android networking tools app
 
Consider Paul's rocket mass heater.
 
subject: Digitally Signing Applets