OPENSSL file_get_contents(): Failed to enable crypto

前端 未结 2 871
渐次进展
渐次进展 2020-11-27 04:46

I\'m building a personal stock platform (not distributed). A component I would like to have is the EPS graph on this page:

https://eresearch.fidelity.com/eresearch/e

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 05:23

    Ok I have found a solution. The problem is that the site uses SSLv3. And I know that there are some problems in the openssl module. Some time ago I had the same problem with the SSL versions.

    
    

    When you set the SSL Version with curl to v3 then it works.

    Edit:

    Another problem under Windows is that you don't have access to the certificates. So put the root certificates directly to curl.

    http://curl.haxx.se/docs/caextract.html

    here you can download the root certificates.

    curl_setopt($ch, CURLOPT_CAINFO, __DIR__ . "/certs/cacert.pem");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    

    Then you can use the CURLOPT_SSL_VERIFYPEER option with true otherwise you get an error.

提交回复
热议问题