Skip to content

Commit 836ca40

Browse files
committed
Fix "SSL certificate problem" by using certifi
1 parent d6985d4 commit 836ca40

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pyresttest/resttest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import traceback
66
import yaml
77
import pycurl
8+
import certifi
89
import json
910
import csv
1011
import logging
@@ -324,6 +325,7 @@ def run_test(mytest, test_config=TestConfig(), context=None, curl_handle=None, *
324325
# reset the body, it holds values from previous runs otherwise
325326
headers = MyIO()
326327
body = MyIO()
328+
curl.setopt(pycurl.CAINFO, certifi.where())
327329
curl.setopt(pycurl.WRITEFUNCTION, body.write)
328330
curl.setopt(pycurl.HEADERFUNCTION, headers.write)
329331
if test_config.verbose:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from distutils.core import setup
66

77
# Future is needed for pip distribution for python 3 support
8-
dependencies = ['pyyaml', 'pycurl']
8+
dependencies = ['pyyaml', 'pycurl', 'certifi']
99
test_dependencies = ['django==1.6.5','django-tastypie==0.12.1','jsonpath','jmespath']
1010

1111
# Add additional compatibility shims

0 commit comments

Comments
 (0)