title: SSL certificate pinning with libcurl
body: <p>I'd like to know if this example is enough to provide certificate pinning with libcurl:
  <a href="http://curl.haxx.se/libcurl/c/cacertinmem.html" rel="nofollow">http://curl.haxx.se/libcurl/c/cacertinmem.html</a></p>
  
  <p>because I have found that curl also allows <a href="http://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html" rel="nofollow">http://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html</a></p>
  
  <p>Since I'll be using a self-signed certificate and only trust on it I don't know if it's truly necessary to pinn it too.</p>
  
  <p>resume: Can the connection be compromised if I only add my certificate (self-signed) to the x509 certificate store like the example? do I need to add extra checks? do I need to use the CURLOPT_PINNEDPUBLICKEY option?</p>
  
  <p>Thanks.</p>