Module: LogStash::Util::ManticoreSSLConfigHelper
- Extended by:
- ManticoreSSLConfigHelper
- Defined in:
- lib/logstash/util/manticore_ssl_config_helper.rb
Instance Method Summary collapse
-
#manticore_ssl_options_from_config(namespace, settings) ⇒ Hash<Symbol,Object>
Extract Manticore-style SSL directives from the given configuration.
Instance Method Details
#manticore_ssl_options_from_config(namespace, settings) ⇒ Hash<Symbol,Object>
Extract Manticore-style SSL directives from the given configuration.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/logstash/util/manticore_ssl_config_helper.rb', line 14 def (namespace, settings) ssl_settings = strip_prefix(settings, "var.#{namespace}.ssl.") # boolean settings may be strings if set through the cli # or booleans if set through the yaml file, so we use .to_s if ssl_settings.include?('enabled') && !coerce_boolean(ssl_settings['enabled']) logger.warn('SSL explicitly disabled; other SSL settings will be ignored') if logger && ssl_settings.size > 1 return {} end { :verify => ssl_settings.fetch('verification_mode', :strict).to_sym, :ca_file => ssl_settings.fetch('certificate_authority', nil), :client_cert => ssl_settings.fetch('certificate', nil), :client_key => ssl_settings.fetch('key', nil), } end |