httpclient
httpclient copied to clipboard
Fix CA configuration by SSL_CERT_DIR
The environment variable SSL_CERT_DIR
is documented to configure an
alternative trust CA.
This expected behavior is documented in the SSLConfig module here. It doesn't take effect, though. When searching the library's code for SSL_CERT_DIR
it doesn't occur.
This setting is important in cases when a user wants to use a debug proxy, the connection is encrypted, and the client code doesn't use httpclient
directly, but through third-party API SDKs, e.g. the google-cloud-storage
gem.
Fixes #369
Note there is an alternative PR for this bug in #386.
Test failures are unrelated to this change. The above mentioned PR states that test failures of master are due to expired fixture certificates.
I'll keep this change deliberately narrow, only fixing the problem at hand.
@nahi Any thoughts on this fix?
bump, would be good to get this in as it affects other gems, such as OpenIDConnect when attempting to perform discovery
@nahi Please let me know if I can close, or if there's interest.