Repository navigation
Honor SSL_CERT_FILE and REQUESTS_CA_BUNDLE for TLS verification - #1034
Open
SachuJames wants to merge 1 commit into
Open
SachuJames wants to merge 1 commit into
SachuJames wants to merge 1 commit into
Conversation
Both clients hardcoded the certifi bundle, so custom CA bundles (common behind corporate TLS inspection) were silently ignored. Resolve the CA bundle from SSL_CERT_FILE, then REQUESTS_CA_BUNDLE, falling back to certifi as before.
SachuJames
requested review from
jbonzo,
justinpolygon,
kschoche,
lukeoleson,
mmoghaddam385 and
suever
as code owners
October 12, 2026 12:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both the REST and websocket clients hardcode
certifi.where()for TLS verification, so settingSSL_CERT_FILEorREQUESTS_CA_BUNDLEhas no effect. Anyone behind a corporate proxy with a custom CA bundle cannot use the SDK.Fixes #998
What changed:
massive/certs.pywithca_bundle_path(): resolvesSSL_CERT_FILEfirst, thenREQUESTS_CA_BUNDLE, falling back tocertifi.where().massive/rest/base.py:PoolManagernow usesca_bundle_path()forca_certs.massive/websocket/__init__.py: extracted the inline SSL context into_ssl_context(), loadingca_bundle_path().Tests:
test_rest/test_ssl.py(7 tests): env precedence, certifi default, and client-level check viaconnection_pool_kw["ca_certs"].test_websocket/test_ssl.py(4 tests): mockedload_verify_locationscaptures the bundle path;ws://builds no context.