title: keytool -list shows different aliases for p12 keystore, depending on whether you provide the password
body: <p><em>Really</em> weird behaviour on a particular p12 file.</p>
  
  <p>If I run</p>
  
  <pre><code>keytool -list -storetype pkcs12 -keystore my_debug_keystore.p12 -storepass debug
  keytool -v -list -storetype pkcs12 -keystore my_debug_keystore.p12 -storepass debug
  </code></pre>
  
  <p>I get,</p>
  
  <pre><code>Alias name: 1
  Creation date: Aug 17, 2014
  Entry type: PrivateKeyEntry
  Certificate chain length: 1
  Certificate[1]:
  Owner: CN=sixminute, OU=, O=, C=IE
  Issuer: CN=sixminute, OU=, O=, C=IE
  Serial number: xxxxxxxxxxxxxxxxx
  Valid from: Wed Nov 07 13:34:40 GMT 2012 until: Sun Nov 08 13:34:40 GMT 2037
  Certificate fingerprints:
       MD5:  xxxxxxxxxxxxxxxxx
       SHA1: xxxxxxxxxxxxxxxxx
       Signature algorithm name: SHA1withRSA
       Version: 3
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Your keystore contains 1 entry
  
  1, Aug 17, 2014, PrivateKeyEntry,
  Certificate fingerprint (MD5): xxxxxxxxxxxxxxxxx
  </code></pre>
  
  <p>However, if I <em>don't</em> provide the password in the commands, </p>
  
  <pre><code>keytool -list -storetype pkcs12 -keystore my_debug_keystore.p12
  keytool -v -list -storetype pkcs12 -keystore my_debug_keystore.p12
  </code></pre>
  
  <p>the output is different,</p>
  
  <pre><code>Alias name: 2
  Creation date: Aug 17, 2014
  Entry type: PrivateKeyEntry
  Certificate chain length: 1
  Certificate[1]:
  Owner: CN=sixminute, OU=, O=, C=IE
  Issuer: CN=sixminute, OU=, O=, C=IE
  Serial number: 2d36623161363935353a31336165303361636133313a2d38303030
  Valid from: Wed Nov 07 13:34:40 GMT 2012 until: Sun Nov 08 13:34:40 GMT 2037
  Certificate fingerprints:
       MD5:  xxxxxxxxxxxxxxxxx
       SHA1: xxxxxxxxxxxxxxxxx
       Signature algorithm name: SHA1withRSA
       Version: 3
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Your keystore contains 1 entry
  
  2, Aug 17, 2014, PrivateKeyEntry,
  Certificate fingerprint (MD5): xxxxxxxxxxxxxxxxx
  </code></pre>
  
  <p>Specifically a different alias for the same key (the MD5 and SHA1 are still the same for the keys).</p>
  
  <p>Any idea at all why this would be the case?</p>