diff --git a/py/selenium/webdriver/remote/remote_connection.py b/py/selenium/webdriver/remote/remote_connection.py index 54da8cdbc43a3..c5472ed621da5 100644 --- a/py/selenium/webdriver/remote/remote_connection.py +++ b/py/selenium/webdriver/remote/remote_connection.py @@ -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): @@ -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