|
To access the contents, click the chapter and section titles.
Platinum Edition Using HTML 4, XML, and Java 1.2
-alias refers to a shorter name by which you will know this Distinguished Name. For example, I might write keytool -genkey -alias Mike Morgan ⇒-dname CN=Michael L Morgan OU=Software Engineering ⇒ORG=DSE Inc C=US ⇒-keypass A password for Platinum Edition
By default, keytool wraps the public key into a self-signed X.509v1 certificate (but not the newer X.509v3). The two formats (X.509v1 and X.509v3) are similarmost end users who know the difference wont care whether youre using v1 or v3, but they may hesitate before accepting a self-signed certificate. If you want an X.509v3 certificate, youll have to go to a public Certification Authority such as Verisign or obtain your own Certificate Server.
Obtaining a CertificateAfter youve generated your keypair, you need to generate a Certificate Signing Request, or CSR, and send that CSR to the Certificate Authority (CA) of your choiceeither a public CA or your own organizations CA.
To generate a Certificate Signing Request (CSR), type keytool -csr Just as with -genkey, the program will prompt you for any required parameters you omit. You may want to use one or more of the following options:
After youve generated the CSR, send it to your CA following the instructions theyll give you. (CAs generally accept CSRs by email, although some prefer that you copy the CSR and paste it into an HTML form.) After the CA follows its certificate-signing policy to verify your identify (and, in the case of a commercial CA, after theyve received payment), theyll issue you a certificate. This certificate may come by email, or you may be sent to pick it up at a Web page. Either way, get it into a file by itself and type keytool -import
Some other parameters for the import option that you may find useful are
To learn even more about keysigner, point your Web browser to /docs/tooldocs/win32/keytool.html in your JDK directory (on a Windows machine). An analogous directory for Solaris is available should you need to learn about the differences between keytool on Windows and keytool on Solaris. Distributing Your CertificateNow that you have a signed certificate, let people know it exists so they can get your public key. Theyll use this key to verify messages and applets from you. You might type keytool -export -alias mike -file filename You can also specify a filename in the -file parameter. The utility will copy your certificate to the designated filename. Distribute that certificate to people who might use your signed appletthey should verify your signature on the certificate before they put a strange applet to work on their machines. Using jarsigner to Sign a JAR FileAfter you have a public/private keypair and an X.509 certificate that attests to its authenticity, youre able to digitally sign your JAR files. Sun provides the jarsigner utility for this purpose.
In addition to signing JAR files, jarsigner can also verify the integrity of a signed JAR. Just run it with the -verify option.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |