title: Java HTTPS client certificate authentication
body: <p>I'm fairly new to <code>HTTPS/SSL/TLS</code> and I'm a bit confused over what exactly the clients are supposed to present when authenticating with certificates.</p>
  
  <p>I'm writing a Java client that needs to do a simple <code>POST</code> of data to a particular <code>URL</code>. That part works fine, the only problem is it's supposed to be done over <code>HTTPS</code>. The <code>HTTPS</code> part is fairly easy to handle (either with <code>HTTPclient</code> or using Java's built-in <code>HTTPS</code> support), but I'm stuck on authenticating with client certificates. I've noticed there's already a very similar question on here, which I haven't tried out with my code yet (will do so soon enough). My current issue is that - whatever I do - the Java client never sends along the certificate (I can check this with <code>PCAP</code> dumps).</p>
  
  <p>I would like to know what exactly the client is supposed to present to the server when authenticating with certificates (specifically for Java - if that matters at all)? Is this a <code>JKS</code> file, or <code>PKCS#12</code>? What's supposed to be in them; just the client certificate, or a key? If so, which key? There's quite a bit of confusion about all the different kinds of files, certificate types and such.</p>
  
  <p>As I've said before I'm new to <code>HTTPS/SSL/TLS</code> so I would appreciate some background information as well (doesn't have to be an essay; I'll settle for links to good articles).</p>