1

I tried with this command:

keytool -keypasswd -keystore mykeystore.jks -alias key0

and I get this:

keytool error: java.lang.UnsupportedOperationException: -keypasswd commands not supported if -storetype is PKCS12

however the output of:

keytool -list -keystore mykeystore.jks -v

is the following:

Enter keystore password:  
Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: key0
Creation date: 21 Dec 2017
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
...
mssdvd
  • 21
  • 1
  • 3
  • Have you looked at this https://www.google.dk/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/31228462/how-to-change-pkcs12-keystore-password-using-keytool&ved=0ahUKEwj7wu-d56LYAhVEUlAKHbw0C90QjjgIIzAA&usg=AOvVaw1FZsrOFwOjqOSXGAGvy64R – JoSSte Dec 24 '17 at 14:00
  • @JoSSte Yes but it doesn't work, if I try it I get: `keytool error: java.security.UnrecoverableKeyException: Cannot recover key` – mssdvd Dec 24 '17 at 14:07
  • Try [KeyStore Explorer](http://keystore-explorer.org) for two reasons: 1. It has - unlike keytool - a reliable keystore type detection. 2. It can handle PKCS12 keystores with different passwords for store and key. – Omikron Dec 24 '17 at 15:02

0 Answers0