Skip to content

Commit 0b80c46

Browse files
committed
Fix "SSL certificate problem" by using certifi
1 parent d6985d4 commit 0b80c46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
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:

0 commit comments

Comments
 (0)