Skip to content

support SSL_CERT_FILE overrides#31

Open
vlinkz wants to merge 1 commit intostatsig-io:mainfrom
vlinkz:main
Open

support SSL_CERT_FILE overrides#31
vlinkz wants to merge 1 commit intostatsig-io:mainfrom
vlinkz:main

Conversation

@vlinkz
Copy link

@vlinkz vlinkz commented Feb 7, 2026

The reqwest dependency uses rustls-tls which bundles Mozilla's root CAs via webpki-roots. This means the HTTP client ignores system certificate stores and environment variables like SSL_CERT_FILE, blocking me from connecting to endpoints using internal/private CAs (e.g. statsig-forward-proxy with platform-issued TLS certificates).

Switching to rustls-tls-native-roots makes reqwest use rustls-native-certs to load certificates from the system store at runtime, which respects SSL_CERT_FILE and SSL_CERT_DIR.

@sandermvanvliet-stack
Copy link

I've been working on this exact issue (hacky approach in #33) and was looking for a better approach.

I see you have rustls-native-roots in this PR but would like to suggest to also add rustls-tls-webpki-root so that the original behaviour is maintained as well for systems that don't have any trust stores.

@vlinkz
Copy link
Author

vlinkz commented Feb 10, 2026

Added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants