The KeyStore password and The Key password

Post date: Dec 10, 2014 1:1:0 AM

The KeyStore password and The Key password should be the same. Otherwise the following error will be thrown

java.security.UnrecoverableKeyException: Cannot recover key

To change KeyStore password, use the following command

keytool -storepasswd -new newpassword -keystore KeyStore.jks

To change Alias key Password, then do

keytool -keypasswd -alias MyKeyAlias -new newpassword -keystore KeyStore.jks