lib/airbrake/sender.rb in airbrake-3.0.7 vs lib/airbrake/sender.rb in airbrake-3.0.8

- old
+ new

@@ -104,13 +104,13 @@ http.read_timeout = http_read_timeout http.open_timeout = http_open_timeout if secure? http.use_ssl = true - - if File.exist?(OpenSSL::X509::DEFAULT_CERT_FILE) - http.ca_file = OpenSSL::X509::DEFAULT_CERT_FILE - elsif !use_system_ssl_cert_chain? + + if use_system_ssl_cert_chain? && File.exist?(OpenSSL::X509::DEFAULT_CERT_FILE) + http.ca_file = OpenSSL::X509::DEFAULT_CERT_FILE + else http.ca_file = Sender.local_cert_path # ca-bundle.crt built from source, see resources/README.md end http.verify_mode = OpenSSL::SSL::VERIFY_PEER else http.use_ssl = false