Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
show warning if SSL_CERT_FILE is set and there is a certificate error
Browse files Browse the repository at this point in the history
  • Loading branch information
dickeyxxx committed Jan 5, 2015
1 parent cdfd5ec commit 8273f6c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/heroku/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8273f6c

Please sign in to comment.