Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py] Allows setting Remote webdriver ca_certs through REQUESTS_CA_BUNDLE env variable. #11957

Merged
merged 10 commits into from
Aug 14, 2023
5 changes: 3 additions & 2 deletions py/selenium/webdriver/remote/remote_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class RemoteConnection:

browser_name = None
_timeout = socket._GLOBAL_DEFAULT_TIMEOUT
_ca_certs = certifi.where()
_ca_certs = os.getenv("REQUESTS_CA_BUNDLE") if "REQUESTS_CA_BUNDLE" in os.environ else certifi.where()

@classmethod
def get_timeout(cls):
Expand Down Expand Up @@ -162,7 +162,8 @@ def reset_timeout(cls):
def get_certificate_bundle_path(cls):
"""
:Returns:
Paths of the .pem encoded certificate to verify connection to command executor
Paths of the .pem encoded certificate to verify connection to command executor. Defaults
to certifi.where() or REQUESTS_CA_BUNDLE env variable if set.
"""
return cls._ca_certs

Expand Down