From f8d0724c090cc1da53a79a5c69721a83ac3affd1 Mon Sep 17 00:00:00 2001 From: Bobby Ryterski Date: Tue, 28 Feb 2017 09:12:19 -0600 Subject: [PATCH] Fix pycurl SSL Verification (#426) CurlHttpEventStream: fix pycurl CAINFO typo, disable cert verification by default --- utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 2b4d08af..bd0e43e1 100644 --- a/utils.py +++ b/utils.py @@ -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)