CURL parameters for PayPal (CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST)

I have a code from the PayPal website:

// turning off the server and peer verification(TrustManager Concept).
// really paypal??? why not just include a recent cert???
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

As you can see in your comment, I wonder why paypal will disable these options on the ground.

I know (from previous goals) :) that on Windows cURL uses an obsolete certificate file.

But I have a new certs file on my server that I could just use:

curl_setopt($ch, CURLOPT_CAINFO, 'E:\path\to\curl-ca-bundle.crt');

So, why PayPal "recommends" disabling it if all that is required is to use a different (newer) certificate file.

Wouldn't it be safer?

Or am I missing something (I'm sure PayPal has enough money for a valid certificate: p)?

+5
source share
2 answers

, , CA. ( , .)

+6

, , , script, $1/, ..
? . -, ctrl + c ctrl + v, .

edit: VERIFYPEER VERIFYHOST. , SSL, .

+4

All Articles