BitterSweetJaVa

February 2, 2009

Manage Java Keystores (1)

Filed under: Security — Tags: , , , — .|2ic|K @ 3:04 PM

The default location of the keystore file is:

$JAVA_HOME/jre/lib/cacerts

where cacerts is the name of the trusted keystore file. The default password (if you haven’t changed it), should be changeit.

 

If we want to add a certificate to the keystore, we should use the command keytool (which comes with the JRE)

keytool -import -file [filename] -alias [alias we want to give to the certificate] -keystore [path to the keystore file]

How to list all the certificates in a specific file:

keytool -list -keystore [path to the keystore file] -alias [alias, if we know it]

How to delete a certificate:

keytool -delete -alias [alias of the certificate to delete] -keystore [path to the keystore file]

 

more to come…

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.