1 SSL: certificate subject name ‘WMSvc-GWAMSERVER02‘ does not match target host name
把curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
2 Curl error: SSL certificate problem: self signed certificate in certificat
这个是CURLOPT_SSL_VERIFYHOST 设为1引起,不同版本的libcurl对curl的CURLOPT_SSL_VERIFYHOST有影响
先在mac下,然后centos7下libcurl版本7.4以上 出现类似问题
解决方案
1
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
2 降低libcurl版本 到7.4下
wget http://curl.haxx.se/download/curl-7.38.0.tar.gz
tar xzvf curl-7.38.0.tar.gz
cd curl-7.38.0/
./configure
486 make && make install
原文:http://www.cnblogs.com/jking10/p/7273735.html