lib/scalyr/constants.rb in logstash-output-scalyr-0.2.6 vs lib/scalyr/constants.rb in logstash-output-scalyr-0.2.7.beta
- old
+ new
@@ -1,15 +1,14 @@
# encoding: utf-8
-PLUGIN_VERSION = "v0.2.6"
+PLUGIN_VERSION = "v0.2.7.beta"
# Special event level attribute name which can be used for setting event level serverHost attribute
EVENT_LEVEL_SERVER_HOST_ATTRIBUTE_NAME = '__origServerHost'
# Path to the bundled root CA certs used to sign server cert
-CA_CERT_PATH = File.expand_path(File.join(File.dirname(__FILE__), + "/certs/ca_certs.crt"))
+CA_CERTS_PATH = File.expand_path(File.join(File.dirname(__FILE__), + "/certs/ca_certs.crt"))
-# Cert which is append to a copy of "/etc/ssl/certs/ca-bundle.crt" file.
-# This is done for backward compatibility and convenience reasons when "appending_builtin_cert"
-# plugin config option is set to true - eventually we want to default it to false and just rely
-# on system ca bundle by default.
-CA_CERT_STRING = File.read(CA_CERT_PATH)
+# Additional check on import to catch this issue early (in case of a invalid path or similar)
+if not File.file?(CA_CERTS_PATH)
+ raise Errno::ENOENT.new("Invalid path specified for CA_CERTS_PATH module constant (likely a developer error).")
+end