Java keytool useful commands

Here are some useful commands when manipulating Java keystores. (I will update this post from time to time)

(default keystore password: changeit)

Import a certficate into a Java keystore

keytool -import -alias certAlias -keystore /jre/lib/security/cacerts -file mycertificate.der

List the certificates of a keystore in a file report.txt

keytool -list -v -keystore /jre/lib/security/cacerts > report.txt

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s