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

show warning if HTTPS_PROXY is set and there is a certificate error #1348

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/heroku/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ 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
true
Expand Down