title: How do I pass the client certificate with HTTP client?
body: <p>I want to use mutual SSL authentication between service A and B. I'm currently implementing passing the client certificate from service A in Java. I'm using Apache DefaultHttpClient to execute my requests. I was able to retrieve the client certificate for my service A from an internal credential manager and I keep it as an array of bytes.</p>
  
  <pre><code>DefaultHttpClient client = new DefaultHttpClient();
  byte [] certificate = localCertManager.retrieveCert();
  </code></pre>
  
  <p>I have very little experience in this area and I'd appreciate your help!</p>
  
  <p>I thought maybe it should be somehow passed through arguments in the HTTP client or maybe in the headers.</p>
  
  <p>How do I pass the client certificate with HTTP client?</p>