title: RestTemplate HTTS & Choosing the Client Certificate
body: <p>Can someone help me understand how to use HTTPS mutual authentication such that I can programmatically choose which client certificate to use during authentication?</p>
  
  <p>Here is the context of the question.  I am using:</p>
  
  <ul>
  <li>A JKS containing multiple client certificates</li>
  <li>Apache SSLContextBuilder to create the SslContext</li>
  <li>Apache HttpClients to create a CloseableHttpClient</li>
  <li>Spring HttpComponentsClientHttpRequestFactory to create the RestTemplate</li>
  </ul>
  
  <p>The approach I'm taking is similar to <a href="https://stackoverflow.com/questions/37065133/java-rest-call-with-different-user-certs">Java Rest call with different user certs
  </a> and <a href="https://stackoverflow.com/a/30776194">Spring Boot SSL Client</a>.  In neither of these examples do I see where the specific alias within the KeyStore is specified.</p>
  
  <p>How can I have an application that initiates multiple mutual HTTPS connections using a distinct client certificate for each connection?</p>