Skip to content

Commit 17a2aa8

Browse files
authored
[py] Allows setting Remote webdriver ca_certs through REQUESTS_CA_BUNDLE env variable. (#11957)
1 parent 074e7c8 commit 17a2aa8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

py/selenium/webdriver/remote/remote_connection.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class RemoteConnection:
134134

135135
browser_name = None
136136
_timeout = socket._GLOBAL_DEFAULT_TIMEOUT
137-
_ca_certs = certifi.where()
137+
_ca_certs = os.getenv("REQUESTS_CA_BUNDLE") if "REQUESTS_CA_BUNDLE" in os.environ else certifi.where()
138138

139139
@classmethod
140140
def get_timeout(cls):
@@ -162,7 +162,8 @@ def reset_timeout(cls):
162162
def get_certificate_bundle_path(cls):
163163
"""
164164
:Returns:
165-
Paths of the .pem encoded certificate to verify connection to command executor
165+
Paths of the .pem encoded certificate to verify connection to command executor. Defaults
166+
to certifi.where() or REQUESTS_CA_BUNDLE env variable if set.
166167
"""
167168
return cls._ca_certs
168169

0 commit comments

Comments
 (0)