Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JCEKS Keypassword change with keytool

843811May 17 2008 — edited Jun 18 2008
Hi,
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2008
Added on May 17 2008
2 comments
590 views