From d6b84ef43c4c7427ca4d124740034305a16472f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 26 Mar 2025 18:29:24 +0100 Subject: [PATCH] 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. --- check.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/check.rb b/check.rb index 32f3bc9..09dbede 100755 --- a/check.rb +++ b/check.rb @@ -66,14 +66,7 @@ def show_ssl_certs puts "", "Below affect only Ruby net/http connections:" puts t = ENV['SSL_CERT_FILE'] || OpenSSL::X509::DEFAULT_CERT_FILE - ssl_file = if File.exist? t - "✅ exists #{t}" - elsif RUBY_PLATFORM.end_with? 'linux' - t = '/etc/ssl/certs/ca-certificates.crt' - File.exist?(t) ? "✅ exists #{t}" : "❌ is missing #{t}" - else - "❌ is missing #{t}" - end + ssl_file = File.exist?(t) ? "✅ exists #{t}" : "❌ is missing #{t}" puts "SSL_CERT_FILE: %s" % ssl_file t = ENV['SSL_CERT_DIR'] || OpenSSL::X509::DEFAULT_CERT_DIR