unable to get local issuer certificate code60
来源:互联网 发布:四川大学软件学院考研 编辑:程序博客网 时间:2024/05/29 15:26
SSL certificate problem: unable to get local issuer certificate。
的错误信息。
此问题的出现是由于没有配置信任的服务器HTTPS验证。默认,cURL被设为不信任任何CAs,就是说,它不信任任何服务器验证。
因此,这就是浏览器无法通过HTTPs访问你服务器的原因。
解决此报错有2种处理方法
1.如果你的内容不敏感,一个快捷的方法是使用curl_exec()之前跳过ssl检查项。
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
2.下载一个ca-bundle.crt ,放到对应的目录,在php.ini文件中配置下路径
https://github.com/bagder/ca-bundle/blob/e9175fec5d0c4d42de24ed6d84a06d504d5e5a09/ca-bundle.crt
在php.ini加入 ,重启web服务器
curl.cainfo="真实路径/ca-bundle.crt"
注:项目使用的是laravel框架,在window电脑下,我首先查找的是如下链接:
http://stackoverflow.com/questions/24611640/curl-60-ssl-certificate-unable-to-get-local-issuer-certificate
解决办法如下:
证书在 https://curl.haxx.se/docs/caextract.html 链接里面。
关于“SSL证书问题:无法获取本地颁发者证书”错误。很明显,这适用于发送CURL请求的系统(并且没有服务器接收请求)
1)从https://curl.haxx.se/ca/cacert.pem下载最新的cacert.pem
2)将以下行添加到php.ini(如果这是共享托管,并且您无法访问php.ini,那么可以在public_html中添加到.user.ini)
curl.cainfo=/path/to/downloaded/cacert.pem
3)默认情况下,FastCGI进程将每隔300秒解析新文件(如果需要,可以通过添加几个文件来更改频率,如https://ss88.uk/blog/fast-cgi-and-user-ini -files-the-new-htaccess /)
但是,下载的证书不可用,然后只好用
https://github.com/bagder/ca-bundle/blob/e9175fec5d0c4d42de24ed6d84a06d504d5e5a09/ca-bundle.crt
链接提供的证书解决了问题。
将下载的证书放在php.ini的当前目录下的extras/ssl/下面。
然后在php.ini文件中加入
curl.cainfo="真实路径/ca-bundle.crt"(curl扩展是必须开启的)
- unable to get local issuer certificate code60
- git SSL certificate problem: unable to get local issuer certificate
- SSL certificate problem: unable to get local issuer certificate
- SSL certificate problem: unable to get local issuer certificate
- SSL certificate problem: unable to get local issuer certificate 解决方法
- Git: SSL certificate problem: unable to get local issuer certificate
- SSL certificate problem: unable to get local issuer certificate
- SSL certificate problem: unable to get local issuer certificate
- pycurl https error: unable to get local issuer certificate
- curl: (60) SSL certificate problem: unable to get local issuer certificate
- php curl 报错:SSL certificate problem: unable to get local issuer certificate
- git clone: SSL certificate problem: unable to get local issuer certificate
- git获取代码提示SSL certificate problem: unable to get local issuer certificate
- 【error】git clone: SSL certificate problem: unable to get local issuer certificate
- HTTP 599: SSL certificate problem: unable to get local issuer certificate错误
- symfony cURL error 60: SSL certificate: unable to get local issuer certificate
- 错误pycurl.error: (60, 'SSL certificate problem: unable to get local issuer certificate')解决方案
- curl: (60) SSL certificate problem: unable to get local issuer certificate 错误
- FileZilla Server 设置
- C++设计模式——外观模式
- Android 一款简单的视频的播放器
- Reading Note: Be Your Own Prada: Fashion Synthesis with Structural Coherence
- C++笔记
- unable to get local issuer certificate code60
- 程序员编程生涯中常会犯的7个错误
- Sqoop异常解决ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No
- CoDeSys简介
- synchronized在JVM底层的实现原理及Java多线程锁理解
- 【paint和paintComponent的区别,兼谈Canvas和JPanel】
- HTTP协议的前世今生——各版本HTTP协议对比
- z扫描
- Android图片缓存和显示能力(笔记)