fix: respect SSL_CERT_FILE env var for corporate proxy support #762
+23
−1
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.
Summary
Adds support for the standard
SSL_CERT_FILEenvironment variable, enabling users behind corporate proxies (e.g., Zscaler, BlueCoat, Fortinet) to use Kimi CLI without SSL certificate verification errors.Fixes #760
Problem
Users behind corporate proxies experience SSL certificate verification failures when running
/login:This occurs because
src/kimi_cli/utils/aiohttp.pyhardcodescertifi.where()and ignores the standardSSL_CERT_FILEenvironment variable that corporate users set to include their proxy's CA certificate.Solution
SSL_CERT_FILEenvironment variable before falling back to certifiChanges
src/kimi_cli/utils/aiohttp.py_get_ssl_ca_file()function that respectsSSL_CERT_FILESecurity Considerations
SSL_CERT_FILE)Test Plan
make format-kimi-clipassesmake check-kimi-clipasses (ruff + pyright)SSL_CERT_FILEto custom CA bundle and verify/loginworksSSL_CERT_FILEand verify default behavior (certifi) still worksDocumentation
The
SSL_CERT_FILEenvironment variable is a widely recognized standard:🤖 Generated with Claude Code