title: How to enable TLS in a Java project?
body: <p>I developed an application working with TCP sockets. Now I would like it to work with a TLS connection.</p>
  <p>I searched some resources for now 2 days but there is nothing that looks like a tutorial on how to implement TLS.</p>
  <p>Here is what I understood with what I have to do :</p>
  <ul>
  <li>I have to import my root CA in my <em>keystore</em>.</li>
  <li>I have to import some others certificates in my <em>keystore</em> / <em>truststore</em>.</li>
  </ul>
  <p>I can't find a clear sample of code that explain really what to do.</p>
  <p>Can you please help me with some client/server example or other helpful tutorial?
  (I already tried to search &quot;TLS java&quot;, &quot;TLS Java example&quot;, &quot;TLS Java tutorial&quot; etc. But I could not find anything satisfying.)</p>
  <p>Thank you in advance for your attention.</p>