title: Load Java KeyStore for one alias?
body: <p>Does anyone know if it is possible to load a KeyStore so that it only prompts for the password for the given alias?</p>
  
  <p>Example:</p>
  
  <p>In my key store i have two private keys: Alice's Encryption Certificate and Bob's Encryption Certificate.</p>
  
  <p>When i load my key store:</p>
  
  <pre><code>keyStore = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
  keyStore.load(null);
  </code></pre>
  
  <p>I am prompted for both Alice's and Bob's key store password. Once they are entered i can use <code>getKey("Alice's Encryption Certificate", null);</code> to retrieve Alice's private key. My keys are protected by Entrust's Security Provider, it is who prompts me for the passwords upon loading the key store. If i do not enter Bob's password and try to get his key it will return null, which is fine, but i would like to avoid the password prompt.</p>
  
  <p>Is it possible to somehow specify that i only want Alice's key before loading the key store so i am never prompted for Bob's password?</p>
  
  <p>Thanks.</p>