Using the Netscape Object Signing Tool
Java's sandbox model for applet security is often too restrictive to be useful. For example, the sandbox model doesn't allow applets to write to the user's local computer, even if there is a valid reason to do so. Code signing is a way to step out of the sandbox. The idea behind code signing is that if you trust the person vouching for a piece of code, you may be willing to take a risk and run the code that person has created.
An important thing to note is that just because an applet is digitally signed, it is not necessarily secure. A digital signature will not prevent an applet from formatting your hard drive if you allow it write access to your system. The user has to make a decision whether or not to trust the person whose certificate generated the digital signature. Keep that fact in mind when you encounter signed code in unfamiliar territory on the Internet.
Getting a certificateGenerally, the steps for getting a certificate will vary based on the vendor, so we won't cover getting a certificate here. However, if you're interested, more information on getting a certificate from Verisign can be found in the article "Sandboxes and Signatures, part 2", which discussed older Netscape signing tools that have since been scrapped.
Exporting and importing certificatesIt is a good idea to export your certificate to a file, just in case you install a new version of Communicator over your old one. Doing so also allows your certificate to follow you to other machines.
To export a certificate, bring up Communicator's Security Info dialog box by clicking on the padlock icon on the toolbar. Select "Yours" under the "Certificates" heading from the items along the left. Select the certificate you wish to export by clicking on its name. Then, click on the Export button. At this point, you may be asked to enter the password that protects your local browser's certificate database.
If this is the first time the certificate database has been modified in your browser, you may be prompted to create a password. The certificate database needs a password if other people share your computer. If not, feel free to use a blank password. Next, you will be asked to enter a password to protect the certificate data. This password is used to make sure that no one can steal your certificate if they see an exported copy of it somewhere. Once the certificate password is created and verified, Netscape will prompt you for a filename for storing the certificate. You can copy the certificate file to other machines so you can sign code from there as well.
To import a certificate from a file, which is different than importing a certificate directly from a Certificate Authority, follow the same instructions for exporting, except do not select a certificate from the listing that appears in the "Yours" page. Press the "Import a Certificate" button. If you have not previously entered the password protecting the certificate database of the local copy of Netscape, you will now be prompted for it. After entering the correct password, a file dialog box will come up; use it to select the file containing your certificate.
After selecting the file, you will be prompted for the certificate's password, which is the password that was entered when you exported the certificate. Assuming all has gone well, you should get a dialog box indicating success.
Page 1 of 2