title: changing SSL certificates to a different location
body: <p>Currently we read from HTTPS using cURL. Everything works fine. </p>
  
  <p>We set up certficates in curl as follows:</p>
  
  <pre><code>curl_easy_setopt(curl,CURLOPT_SSLCERTTYPE,"PEM");
  curl_easy_setopt(curl,CURLOPT_SSLCERT,"/etc/ssl/certs/abc.cert.pem");
  
  curl_easy_setopt(curl,CURLOPT_SSLKEYTYPE,"PEM");
  curl_easy_setopt(curl,CURLOPT_SSLKEY,"/etc/ssl/certs/abc.key.pem");
  </code></pre>
  
  <p>Now we want to move these certificate files to a different directory. Even if I change the path in the commands above it does not work because I think the certificate path is hard coded as /etc/ssl in libcurl.</p>
  
  <p>Based on googling I tried adding first,</p>
  
  <pre><code>curl_easy_setopt(curl, CURLOPT_CAPATH, "/MyDir/");
  </code></pre>
  
  <p>and then the four lines with the correct relative path. It didnt work. </p>
  
  <p>How to change the path (the directory where the certificates are stored) into something I want. Example or explanation will be appreciated.</p>
  
  <p>Thanks</p>
  
  <p>James</p>