October 23, 2016
Hot Topics:

Using the Netscape Object Signing Tool

  • October 8, 1998
  • By John Viega
  • Send Email »
  • More Articles »

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.

A person vouches for code by digitally signing it. That signature can be tested for authenticity on your local machine. If the signature is authentic, then you have the option of letting the attached code out of the restrictive sandbox, in part or in full. Much more on the implications of code signing for Java can be found in the article "Sandboxes and Signatures, part 1" and in the book Securing Java. Unfortunately, there are three different, largely incompatible systems for signing Java. So if you want to be able to leave the sandbox at will, you will probably have to support several types of digital signatures. Over the next three weeks, we'll teach you how to use each system, starting with Netscape's Object Signing tool.

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 certificate

Generally, 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 certificates
It 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

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel