Java Tools Tutorials - Herong's Tutorial Notes
∟'keytool' - Public Key Certificate Tool
∟JDK 1.5 'keytool' - keystore File Management Commands
This section describes all commands supported in JDK 1.5 'keytool' tool to manage certificates stored in 'keystore' files.
"keytool" is command line tool included in to manage keys and certificates
using "keystore". "keytool" replaces the same functions offered by "javakey" in JDK 1.1.
"keytool" offers a number functions through the following major command options:
- "-certreq": Generates a Certificate Signing Request (CSR).
- "-delete": Deletes the entry of the specified alias name.
- "-export": Exports the certificate of the specified key entry or certificate entry
out of the keystore to a certificate file.
- "-genkey": Generates a key pair and stores it as a key entry in the keystore.
- "-help": Lists the basic commands and their options.
- "-identitydb": Reads the JDK 1.1.x-style identity database from the file idb_file,
and adds its entries to the keystore. If no file is given, the identity database is read from stdin.
If a keystore does not exist, it is created.
- "-import": Imports the certificate from a certificate file as a certificate entry into the keystore.
- "-keyclone": Creates a new key entry by copying an existing key entry.
- "-keypasswd": Changes the password under which the private/secret key identified by alias is protected,
from old_keypass to new_keypass, which must be at least 6 characters long.
- "-list": Lists all entries in the keystore.
- "-printcert": Prints summary information of a certificate from a certificate file.
- "-selfcert": Replaces the certificate in a key entry with a new self-signed certificate.
- "-storepasswd": Changes the password used to protect the integrity of the keystore contents.
The new password is new_storepass, which must be at least 6 characters long..
The above list of "keytool" commands are supported by JDK 1.5. See next section for "keytool" commands
supported in JDK 1.6.
Last update: 2015.
Table of Contents
About This Book
Java Tools Terminology
Installing Java 8 on Windows
'javac' - The Java Program Compiler
'java' - The Java Program Launcher
'jdb' - The Java Debugger
'jconsole' - Java Monitoring and Management Console
'jstat' - JVM Statistics Monitoring Tool
JVM Troubleshooting Tools
jvisualvm (Java VisualVM) - JVM Visual Tool
'jar' - The JAR File Tool
'javap' - The Java Class File Disassembler
►'keytool' - Public Key Certificate Tool
Certificates and Certificate Chains
'keystore' - Public Key Certificate Storage File
►JDK 1.5 'keytool' - keystore File Management Commands
JDK 1.6 'keytool' - keystore File Management Commands
Generating Key Pairs and Self-Signed Certificates
Exporting and Import Certificates
Cloning Certificates with New Identities
'native2ascii' - Native-to-ASCII Encoding Converter
Outdated Tutorials
References
PDF Printing Version