Commit 4f1388c7 authored by tufengqi's avatar tufengqi

https信任任何证书

parent 7b1ecbfc
......@@ -160,6 +160,8 @@ class CurlHttpClient
if (self::METHOD_POST === $this->method) {
curl_setopt($this->curl_handle, CURLOPT_POSTFIELDS, $this->post_fields);
}
curl_setopt($this->curl_handle, CURLOPT_SSL_VERIFYPEER, false); // 信任任何证书
curl_setopt($this->curl_handle, CURLOPT_SSL_VERIFYHOST, 0); // 检查证书中是否设置域名(为0也可以,就是连域名存在与否都不验证了)
$this->post_fields = '';
curl_setopt($this->curl_handle, CURLOPT_URL, $full_url);
$this->response = curl_exec($this->curl_handle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment