pycurl.error: (60, ‘SSL certificate problem: self signed certificate in certific
  admin 发表于 2017-04-20 12:54  分类:技术资料  1,407 次阅读  0条评论

通过Pycurl发送HTTPS请求时报错:

pycurl.error: (60, 'SSL certificate problem: self signed certificate in certific

很明显,验证证书的时候出现了问题。

通过搜索找到这篇贴子,速度解决困惑拿出来给大家分享(关键点)

It's basically an up-to-date copy of mozilla's built in certificate chain wrapped in a python package which can be kept up to date using pip. certifi.where() gives you the location to the certificate bundle.

To make pycurses to use it, set the CAINFO option:

import pycurl

import certifi

curl = pycurl.Curl()

curl.setopt(pycurl.CAINFO, certifi.where())

curl.setopt(pycurl.URL, 'https://www.quora.com')

curl.perform()

原帖地址:http://stackoverflow.com/questions/16192832/pycurl-https-error-unable-to-get-local-issuer-certificate

本文固定链接: http://www.youduoshao.com/2017-04-20/201704202794.html

填写您的称呼和邮箱即可发布评论

快捷键:Ctrl+Enter