JCEKS Keypassword change with keytool
843811May 17 2008 — edited Jun 18 2008Hi,
I am trying to change the Keystore passowrd by using following
keytool -storepasswd -new newpass -storepass oldpass -keystore .databasekey -storetype JCEKS
Above runs successfully and it has changed the passowrd too.
Then I am trying to change keypassword with following for the same
keytool -keypasswd -alias DBKey -keypass oldkpass -new newkpass -keystore .databasekey -storetype JCEKS -storepass newpass
Then I am getting following error:
keytool error: java.lang.Exception: Recovered key is not a private key
Is this because, in JCEKS only secret key is stored in keystore file?Then how can I change above?
How can I resolve this?As I am new to Java security... so might be what ever information I have given here can be insufficient. Please advice me what more I can provide. I have really stuck with this.
Thanks in advance