Skip to content

Commit

Permalink
Fix pycurl SSL Verification (#426)
Browse files Browse the repository at this point in the history
CurlHttpEventStream: fix pycurl CAINFO typo, disable cert verification by default
  • Loading branch information
BobbyRyterski authored and jgehrcke committed Feb 28, 2017
1 parent f52632d commit f8d0724
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ def __init__(self, url, auth, verify):
self.curl.setopt(pycurl.HTTPAUTH, pycurl.HTTPAUTH_BASIC)
self.curl.setopt(pycurl.USERPWD, '%s:%s' % auth)
if verify:
self.curl.setopt(pycurl.CA_INFO, verify)
self.curl.setopt(pycurl.CAINFO, verify)
else:
self.curl.setopt(pycurl.SSL_VERIFYHOST, 0)
self.curl.setopt(pycurl.SSL_VERIFYPEER, 0)

self.curl.setopt(pycurl.HTTPHEADER, headers)

Expand Down

0 comments on commit f8d0724

Please sign in to comment.