Support

Home Forums Event Espresso Premium SSL Cert issue: Patch for CA CERT not found

SSL Cert issue: Patch for CA CERT not found

Posted: August 3, 2013 at 12:25 pm

Viewing 2 reply threads


Michael Bernhard

August 3, 2013 at 12:25 pm

Hello, i’m trying to implement the patch found at this forum link but it doesn’t seem to work, can you advise? https://eventespresso.com/forums/2012/05/incomplete-payments-with-paypal-using-ee/

I’ve contacted my hosting company (Hostek) and they’ve given me this workaround, which I am trying to integrate with your line of code after line 91 in the Paypal.php file:

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>$error["set_timeout"] = curl_setopt($ch, CURLOPT_TIMEOUT, 45); // Sets a time limit for curl in seconds (do not set too low)
$error["set_post"] = curl_setopt($ch, CURLOPT_POST, 1); // Set curl to send data using post
$error["set_post_fields"] = curl_setopt($ch, CURLOPT_POSTFIELDS, $req); // Add the request parameters to the post
curl_setopt($ch, CURLOPT_CAINFO, dirname("/PHP") . 'ca-bundle.crt '); // Patch for CA CERT not found
$errors .= $error["set_host"] ? "Success" : "Failure";
Here is what my hosting company told me to use as a workaround

Mike,

It looks like in order to fix the error you were getting, one of the following two things must be done in the CURL configuration used by the PayPal script:

Option 1 – Disable SSL Certificate Verification:

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);

Option 2 – Set CURL CA Certificate File:

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>curl_setopt ($ch, CURLOPT_CAINFO, 'D:PHPca-bundle.crt');

Our techs used the second option (by adding it to the PayPal.php) so that your script could verify the PayPal cert is trusted. The other option was to disable it completely, which is obviously a last resort.


Michael Bernhard

August 4, 2013 at 1:30 am

I used the line of code verbatim provided by my host and now it works. I was overthinking the code!


Dean

August 5, 2013 at 12:26 am

Glad it’s sorted!

Viewing 2 reply threads

The support post ‘SSL Cert issue: Patch for CA CERT not found’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso