title: Java TLS/SSL socket with custom public private keys?
body: <p>How would I go about making a socket connection between two java SE applications where the key is not from a trusted store or certificate but instead is hardcoded in the application itself.</p>
  
  <p>e.g. public key hardcoded on the clients and private key on the server. How would I go about doing it while still using the standard TLS/SSL socket api?</p>