在测试Amazom的MWS Sample程序时,卡在这里,一直提示
SSL certificate problem: unable to get local issuer certificate
搜索到的解决方案
    1. 添加crt到系统目录中。不行
    2. 将 CURLOPT_SSL_VERIFYPEER 设置为 false,
         将 CURLOPT_SSL_VERIFYHOST 设置为 false. 也不行(不知道是不是我设置时候的程序问题)
有没有人遇到过相同的问题,你们的解决办法是什么呢?

解决方案 »

  1.   

    SSL certificate problem: unable to get local issuer certificate
    SSL证书的问题:无法获取本地发行者证书CURLOPT_SSL_VERIFYPEER 设置为 false 只是说不需要检验证书
    但对方一定要检验呢?
      

  2.   

    是的!
    应该说,如果不需要验证证书的话,就没必要用 https 协议,直接 http 就是了
      

  3.   


    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 :)
      

  4.   


    用浏览器访问https浏览器会自动获取证书完成握手的过程。但是用php代码要怎么实现呢,怎么拿到服务证书的副本?
    CURL 的CURLOPT_CAINFO和CURLOPT_SSLCERT指定的分别是什么证书呢?  望指教,谢谢!