curl-and-python

Re: Error 60: SSL failed under pycurl, but works under normal curl

From: Gisle Vanem via curl-and-python <curl-and-python_at_cool.haxx.se>
Date: Tue, 9 Jan 2018 18:37:34 +0100

Jacco van Dorp wrote:

> | * SSL certificate problem: unable to get local issuer certificate
> | * Closing connection 0
> | Traceback (most recent call last):
> | File "C:/Users/User/.PyCharmCE2017.3/config/scratches/scratch.py",
> line 12, in <module>
> | curl.perform()
> | pycurl.error: (60, 'SSL certificate problem: unable to get local
> issuer certificate')

You don't have a %CURL_CA_BUNDLE% set. Or your libcurl was compiled
without a default CA-bundle. Mine was built with:
    -DCURL_CA_BUNDLE='getenv("CURL_CA_BUNDLE")'

But you can set it in your script; first locate your (or from curl)
"cacert.pem" and do e.g.:
   curl.setopt(curl.CAINFO, r"f:\net\src\inet\curl\cacert.pem")

Or (not advisable though):
   curl.setopt (curl.SSL_VERIFYPEER, 0)

-- 
--gv
_______________________________________________
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2018-01-09