title: Boost.Asio: Writing a SSL Server/Client Too many file types
body: <p>I want to make a simple SSL server/client couple using Boost.Asio. Before doing that I have read about SSL, certificates, private keys, public keys etc. I used OpenSSL to generate private key (.key) and a certificate (.crt). My certificate is self-signed.</p>
  
  <p>Then, I started digging the Boost.Asio samples. I first tried to write a client. In the sample the verify file was a *.pem file. I had no idea what it was. After searching a little (googling "how to convert crt to pem" etc.) I got that my .crt file is also a .pem file since it starts with <code>-----BEGIN</code> and encoded in Base64.</p>
  
  <p>So I have done writing my client and using my .crt file as the argument of <code>ctx.load_verify_file()</code>. Is it the appropriate practice?</p>
  
  <p>To test my client, I have started writing a server. Now I have 3 kinds of files, 2 of them that I am not familiar. They are:</p>
  
  <ul>
  <li>certificate chain file</li>
  <li>private key file (the only one I am familiar)</li>
  <li>temporary dh file</li>
  </ul>
  
  <p>In the example the private key file was also a *.pem file, but my private key file is a *.key file. So I am very confused. Do I need to make any conversion?</p>
  
  <p>So could you explain me:</p>
  
  <ul>
  <li>What is *.pem file? How can it represent private key as well as verification?</li>
  <li>What is a certificate chain file?</li>
  <li>What is a temporary dh file?</li>
  </ul>