title: Change keystore password from no password to a non blank password
body: <p>I have a jks keystore with no password.  When I run the command</p>
  
  <pre><code>keytool -list -keystore mykeystore.jks
  </code></pre>
  
  <p>And it prompts me for the keystore password, I simply hit 'enter'.</p>
  
  <p>Please note that the keystore password IS NOT the default java password of 'changeit'. It is blank</p>
  
  <p>When I try to run</p>
  
  <pre><code>keytool -storepasswd -keystore mykeystore.jks
  </code></pre>
  
  <p>to change the password to a non blank string. It firsts prompts me for the current password. Simply hitting enter since it is blank says</p>
  
  <pre><code>keytool -storepasswd -keystore mykeystore.jks
  Enter keystore password:
  Keystore password is too short - must be at least 6 characters 
  </code></pre>
  
  <p>Just to confirm with everyone that the password is not 'changeit'</p>
  
  <pre><code>keytool -storepasswd -keystore mykeystore.jks
  Enter keystore password:  changeit
  keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
  </code></pre>
  
  <p>Any idea how I can change the keystore password if the existing password is blank?</p>