title: How I can tell alias of the wanted key-entry to SSLSocket before connecting?
body: <p>I have two certificate/key pairs in a java keystore. Aliases of those key-entries are "foo" and "bar".</p>
  
  <p>My TLS client (java program) uses the keystore. TLS client authentication is done during connection opening. 
  The client program should use "foo" key-entry when TLS server request certificate from the client.
  Now the client send wrong certificate ("bar") to the server during connection handshake.</p>
  
  <p>How I can tell alias of the wanted key-entry to SSLSocket before connecting?</p>
  
  <p>Currently the code is following:</p>
  
  <pre><code>final SSLSocket ss = (SSLSocket)SSLSocketFactory.getDefault().createSocket(); 
  ss.setEnabledProtocols( new String[] {"TLSv1"});
  ss.connect( targetAddress ); 
  </code></pre>