Common Keytool commands
Keytool is a tool for managing security keys and certificates in JAVA environment. It manages a keystore that stores private keys and validates the X.509 certificate chain associated with them (equivalent to a database that holds multiple X.509 standard certificates).
Common Keytool commands:
Check a keystore
Keytool-list-v-keystore c:\ server.jks check the contents of a keystore
Keytool-list-v-keystore c:\ server.jks
Add a trust root certificate to the keystore file
Keytool-import-alias newroot-file root.cer-keystore server.jks
Import a signed certificate from CA
Keytool-import-keystore c:\ server.jks-alias tomcat-file c:\ cert.txt
Export a certificate file from KEYSTORE
Keytool-export-alias myssl-keystore server.jks-rfc-file server.cer
* Note: "- rfc" means to output the file as base64, otherwise as binary.
Delete a certificate from KEYSTORE
Keytool-delete-keystore server.jks-alias tomcat
* Note: the certificate aliased as tomcat has been deleted.