Skip to content

Commit cae0454

Browse files
committed
Using one of the default certificates instead of null for CURLOPT_CAINFO
1 parent f73f305 commit cae0454

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

test/rules/platform_certs/null.pem

Lines changed: 0 additions & 29 deletions
This file was deleted.

test/rules/src/https_everywhere_checker/http_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pycurl
44
import urllib.parse
55
import io
6+
import pathlib
67
import pickle
78
import tempfile
89
import traceback
@@ -332,7 +333,7 @@ def staticFetch(url, options, platformPath):
332333
# We want to check against only the above path, but unfortunately
333334
# curl will not function properly unless *some* valid certificate
334335
# is provided for CURLOPT_CAINFO. This can not be set to null...
335-
c.setopt(c.CAINFO, 'test/rules/platform_certs/null.pem')
336+
c.setopt(c.CAINFO, str(pathlib.Path('test', 'rules', 'platform_certs', 'default', 'cert001.pem')))
336337
if options.userAgent:
337338
c.setopt(c.USERAGENT, options.userAgent)
338339
# Sending this extra header is necessary for weird edge cases. See https://github.com/EFForg/https-everywhere/pull/10944

0 commit comments

Comments
 (0)