Search code examples
cmdwebclientkeystore

Adding certificate in keystore


I am adding my certificate in keystore through this command:

keytool -import -alias joe -keystore my.keystore -file my_recently_exported.cer

After I run this command on cmd is says that certificate was added to keystore. However when I run command:

keytool -list

it says that keystore file does not exist. I don't know what should I do now. Any suggessions?


Solution

  • keytool will look for a keystone file named '.keystore' by default, so you should use

    keytool -list -keystore my.keystore
    

    Hope this helps,