title: Certificate for <123.123.123.123> doesn't match common name of the certificate subject
body: <p>I'm connecting to a host using an IP address (ex. 123.123.123.123) rather than a hostname and I get this exception:</p>
  
  <pre><code>javax.net.ssl.SSLException: Certificate for &lt;123.123.123.123&gt; doesn't match common name of the certificate subject: abcdef.test.group
  </code></pre>
  
  <p>I can see the actual hostname of 123.123.123.123 in the debug output under 'peer alternative names' so I am guessing that the problem is because I am using the IP address and it's unable to resolve this to a hostname and so match against the peer host list.</p>
  
  <p>I'm using the IP address because the local DNS has not been setup, and before I ask admins to update the /etc/hosts file to map that IP to a host I want to check that the problem is indeed that I am using an IP address. </p>
  
  <p>As I've typed this in I've convinced myself that it is - but it would be good if someone else agreed.</p>