From 34ca3cd969666b064720f177becc53ada9a3b4ed Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Mon, 5 Jan 2015 10:32:49 -0800 Subject: [PATCH 1/2] show warning if HTTPS_PROXY is set and there is a certificate error --- lib/heroku/client.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/heroku/client.rb b/lib/heroku/client.rb index 353aa5da9..e03a32df5 100644 --- a/lib/heroku/client.rb +++ b/lib/heroku/client.rb @@ -507,6 +507,7 @@ def read_logs(app_name, options=[]) http.ca_file = local_ca_file http.verify_callback = lambda do |preverify_ok, ssl_context| if (!preverify_ok) || ssl_context.error != 0 + $stderr.puts "HTTPS_PROXY is set. This is likely causing SSL verification to fail." if ENV['HTTPS_PROXY'] error "WARNING: Unable to verify SSL certificate for #{host}\nTo disable SSL verification, run with HEROKU_SSL_VERIFY=disable" end true From 722d0f8666fc50b3b1b9736cd9056493b33c0afa Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Mon, 5 Jan 2015 11:32:04 -0800 Subject: [PATCH 2/2] show warning if SSL_CERT_FILE is set and there is a certificate error --- lib/heroku/client.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/heroku/client.rb b/lib/heroku/client.rb index e03a32df5..04f73e517 100644 --- a/lib/heroku/client.rb +++ b/lib/heroku/client.rb @@ -507,6 +507,7 @@ def read_logs(app_name, options=[]) http.ca_file = local_ca_file http.verify_callback = lambda do |preverify_ok, ssl_context| if (!preverify_ok) || ssl_context.error != 0 + $stderr.puts "SSL_CERT_FILE is set. This is likely causing SSL verification to fail." if ENV['SSL_CERT_FILE'] $stderr.puts "HTTPS_PROXY is set. This is likely causing SSL verification to fail." if ENV['HTTPS_PROXY'] error "WARNING: Unable to verify SSL certificate for #{host}\nTo disable SSL verification, run with HEROKU_SSL_VERIFY=disable" end