Skip to content

Commit d6b84ef

Browse files
Improve certificate info
It's unclear why this extra file is checked on Linux since it was not explained when originally introduced. In addition to that, this may hide real issues when this additional file does not exist by the actual problem is with the value in `ENV["SSL_CERT_FILE"]`, for example, because of an unexpanded tilde.
1 parent ffefe0f commit d6b84ef

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

check.rb

+1-8
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,7 @@ def show_ssl_certs
6666
puts "", "Below affect only Ruby net/http connections:"
6767
puts
6868
t = ENV['SSL_CERT_FILE'] || OpenSSL::X509::DEFAULT_CERT_FILE
69-
ssl_file = if File.exist? t
70-
"✅ exists #{t}"
71-
elsif RUBY_PLATFORM.end_with? 'linux'
72-
t = '/etc/ssl/certs/ca-certificates.crt'
73-
File.exist?(t) ? "✅ exists #{t}" : "❌ is missing #{t}"
74-
else
75-
"❌ is missing #{t}"
76-
end
69+
ssl_file = File.exist?(t) ? "✅ exists #{t}" : "❌ is missing #{t}"
7770
puts "SSL_CERT_FILE: %s" % ssl_file
7871

7972
t = ENV['SSL_CERT_DIR'] || OpenSSL::X509::DEFAULT_CERT_DIR

0 commit comments

Comments
 (0)