![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e223. Creating a New Key Pair and Self-Signed Certificate Using keytoolThis example uses thekeytool program to create a new key pair and
self-signed certificate for the principal Duke . The example
generates a 1024-bit Digital Signature Algorithm (DSA) key pair.
> keytool -genkey -alias alias -keystore .keystore Enter keystore password: password What is your first and last name? [Unknown]: Duke What is the name of your organizational unit? [Unknown]: JavaSoft What is the name of your organization? [Unknown]: Sun What is the name of your City or Locality? [Unknown]: Cupertino What is the name of your State or Province? [Unknown]: CA What is the two-letter country code for this unit? [Unknown]: US Is <CN=Duke, OU=JavaSoft, O=Sun, L=Cupertino, ST=CA, C=US> correct? [no]: yesTo create a 1024-bit RSA key: > keytool -genkey -keyalg RSA -keysize 1024 -alias alias -keystore .keystore
e225. Importing a Certificate from a File e226. Listing All Available Certificate Formats e227. Getting the Subject and Issuer Distinguished Names of an X509 Certificate
© 2002 Addison-Wesley. |