title: Drupal Curl SSL Certificate Error
body: <p>We are using a Drupal / Ubercart site, and recently I noticed that payment requests are failing.</p>
  
  <p>In the Drupal logs I see an error like so:</p>
  
  <blockquote>
    <p>cURL error: SSL certificate problem: unable to get local issuer
    certificate</p>
  </blockquote>
  
  <p>I found a number of solutions, and tried implementing them but with no results. Some things I have tried are:</p>
  
  <ol>
  <li>Modifying my <code>/etc/php5/fpm/php.ini</code> file to include the line <code>curl.cainfo = /srv/keys/cacert.pem</code> (which is a file I downloaded from <a href="http://curl.haxx.se/ca/cacert.pem" rel="nofollow">http://curl.haxx.se/ca/cacert.pem</a>).</li>
  <li>Adding the code in the <code>uc_authorizenet.module</code> file to specify the cainfo directly: <code>curl_setopt($ch, CURLOPT_CAINFO, "/srv/keys/cacert.pem");</code>.</li>
  </ol>
  
  <p>Before taking these steps, I ensured that the <code>ca-certificates</code> package is installed and up to date. After each change I restarted <code>php5-fpm</code> and <code>nginx</code>, but I still get the same error about how it is unable to get the local issuer certificate.</p>
  
  <p>Thanks for any help!</p>