title: how to change PKCS12 keystore password using keytool?
body: <p>I cannot change PKCS keystore password using keytool (java 8). When I tried to change the key password:</p>
  
  <pre><code>keytool -keypasswd -keystore keystore.p12 -storetype PKCS12 -storepass oldpass -keypass oldpass -new newpass
  keytool error: java.lang.UnsupportedOperationException: -keypasswd commands not supported if -storetype is PKCS12
  </code></pre>
  
  <p>It means key password cannot be changed for PKCS12 keystore. Then I tried to change the keystore password:</p>
  
  <pre><code>keytool -storepasswd -keystore keystore.p12 -storetype PKCS12 -storepass oldpass -new newpass
  Warning:  Different store and key passwords not supported for PKCS12 KeyStores. Ignoring user-specified -new value.
  keytool error: java.io.FileNotFoundException: keystore.p12 (Access is denied)
  </code></pre>
  
  <p>It means, we have to change keystore password and keypassword together. But there is no command to change both. What can I do?</p>