在测试Amazom的MWS Sample程序时,卡在这里,一直提示
SSL certificate problem: unable to get local issuer certificate
搜索到的解决方案
1. 添加crt到系统目录中。不行
2. 将 CURLOPT_SSL_VERIFYPEER 设置为 false,
将 CURLOPT_SSL_VERIFYHOST 设置为 false. 也不行(不知道是不是我设置时候的程序问题)
有没有人遇到过相同的问题,你们的解决办法是什么呢?
SSL certificate problem: unable to get local issuer certificate
搜索到的解决方案
1. 添加crt到系统目录中。不行
2. 将 CURLOPT_SSL_VERIFYPEER 设置为 false,
将 CURLOPT_SSL_VERIFYHOST 设置为 false. 也不行(不知道是不是我设置时候的程序问题)
有没有人遇到过相同的问题,你们的解决办法是什么呢?
解决方案 »
- 静态页面无刷新评论,急
- PHP 中 HTTP头能否用白话解释一下!
- 把一个图片放入一个表格里,如何能让其只显示一个呢?
- 想安装phplib,然后按照网上的文章做,但是无法成功,奈何奈何
- PHP中的整除是哪个符号?
- 有关php与asp问题
- 这些网站的php简繁体转换为什么会这么快啊?请大家帮忙看看啊,给100分
- 大侠们有没有试过!php进行递归调用行吗?
- 谁能给我推荐几本关于php的书,以及那里有他的下载???
- php判断session丢失还是根本没设置session
- 将sql语句转换成thinkPHP的格式
- AJAX交互中的数据编码问题(前端页面gbk,后端返回为utf-8,ajax获取响应utf-8)
SSL证书的问题:无法获取本地发行者证书CURLOPT_SSL_VERIFYPEER 设置为 false 只是说不需要检验证书
但对方一定要检验呢?
应该说,如果不需要验证证书的话,就没必要用 https 协议,直接 http 就是了
curl: (60) SSL certificate problem: unable to get local issuer certificateIf you get the following error when using curl for SSL address, here is an easy fix. Your error will probably look something like the following.curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.htmlcurl performs SSL certificate verification by default, using a “bundle”
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn’t adequate, you can specify an alternate file
using the –cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you’d like to turn off curl’s verification of the certificate, use
the -k (or –insecure) option.Just go to http://curl.haxx.se/ca/cacert.pem it has a list of certification providers. View as source and save it to a file cacert.pem. Then on the curl command just add this in the end pointing to your file –cacert cacert.pem Note you can also try the -k option but that’s cheating :)
用浏览器访问https浏览器会自动获取证书完成握手的过程。但是用php代码要怎么实现呢,怎么拿到服务证书的副本?
CURL 的CURLOPT_CAINFO和CURLOPT_SSLCERT指定的分别是什么证书呢? 望指教,谢谢!