Okay, so I have had to do this about ten times now and every time I have had to go look this up so I figure I’ll just add it here so I can at least know where to look it up.
While working on some rest services
You can list what is in your current keystore using the keytool and the -list option.
C:\jdk1.6.0_17\jre\lib\security>keytool list -keystore cacerts
Here is a summary of all the other stuff you can do with -list
-list {-alias alias} {-storetype storetype} {-keystore keystore} [-storepass storepass] {-providerName provider_name} {-providerClass provider_class_name {-providerArg provider_arg}} {-v | -rfc} {-protected} {-Jjavaoption}
Export the certificate
Using a web browser (I used Firefox) you want to export the certificate as a .cer file.
Import the servers certificate
keytool -importcert -alias abc -file ABCCA.cer
More information can be found here: Sun Help












