Drupal ubercart log shows “cURL error: Peer’s certificate issuer has been marked as not trusted by the user.” after installing wildcard SSL certificate

Recently our shopping cart (Ubercart under Drupal) stopped finalizing transactions. The orders got up to the review step, but then, instead of completing the order, visitors were redirected back to the first step of the ordering process (entering shipping address). Looking at “recent log messages” under “Reports” in Drupal reviled a “cURL error: Peer’s certificate issuer has been marked as not trusted by the user.” error message.

Investigating online suggested the issue was related to root certificates.
I followed the following steps to resolve this issue:

  • Download cacert.pem from https://curl.se/docs/caextract.html and upload the file to your server. I uploaded to “/etc/” which is the same folder where my php.ini file is located
  • Open “php.ini” file (mine was at “/etc”) and add curl.cainfo = "/etc/cacert.pem" under the “[curl]” section
  • Reboot the server / restart Apache

Let me know in the comments if this helped you.

Leave a Reply

Your email address will not be published. Required fields are marked *