From fed578ac33b31f9d9a35f161f5d0e1d47069b505 Mon Sep 17 00:00:00 2001 From: Florian Ebeling Date: Fri, 28 Dec 2018 14:41:20 +0100 Subject: [PATCH] Fix CA configuration by environment variable The environment variable `SSL_CERT_DIR` is documented to configure an alternative trust CA, but that wasn't used before; fixed. --- lib/httpclient.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/httpclient.rb b/lib/httpclient.rb index e1f18647..ef74913f 100644 --- a/lib/httpclient.rb +++ b/lib/httpclient.rb @@ -1076,6 +1076,9 @@ def load_environment else self.proxy = getenv('http_proxy') end + if getenv('SSL_CERT_DIR') + self.ssl_config.add_trust_ca(getenv('SSL_CERT_DIR')) + end # no_proxy self.no_proxy = getenv('no_proxy') end