Update PHP cURL request from SSLv3 to TLS..?

后端 未结 4 612
忘了有多久
忘了有多久 2020-12-30 12:36

Because of the recent vulnerability discovered in SSLv3, many web service providers (ie. PayPal, Facebook, Google) are disabling that and wanting us to use TLS instead. I\'

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 13:26

    A better solution until Paypal updates its core SDK would be to override the CURLOPT_SSL_CIPHER_LIST directly in your application. This way you don't have to interfere with the sdk-core-php package directly and you will be free to upgrade it in future.

    You could add something like the following to your app's bootstrap or payment processing logic:

    PPHttpConfig::$DEFAULT_CURL_OPTS[CURLOPT_SSL_CIPHER_LIST] = 'TLSv1';
    

    Just make sure you comment it thoroughly and remember to take it out later when the issue has been patched in the core.

提交回复
热议问题