title: SSL Certificate Verification in Java
body: <p>Say I have two Java apps that I wrote: <code>Ping.jar</code> and <code>Pong.jar</code> and they get deployed and ran on two separate servers (<code>Ping.jar</code> deploys to <code>srv-01.myorg.com</code> and <code>Pong.jar</code> deploys to <code>srv-02.myorg.com</code>), and these two apps need to communicate with each other (2-way) via SSL. Let's also assume that each app has its own SSL Certificate.</p>
  
  <ul>
  <li>How do I, a Java programmer, code <code>Ping</code> and <code>Pong</code> to verify each other's SSL cert? Does each CA provide some kind of RESTful API that I can hit with, say, <code>HttpClient</code>? Does Java have its own certificate-verifying API? Are there open source third party JARs or services I can use?</li>
  </ul>
  
  <p>I was surprised by how little turned up when I searched for this online.</p>