Module: Fluent::TLS
- Defined in:
- lib/fluent/plugin/prometheus_pushgateway/tls.rb
Constant Summary collapse
- DEFAULT_VERSION =
:TLSv1_2
- SUPPORTED_VERSIONS =
if defined?(OpenSSL::SSL::TLS1_3_VERSION) %i[TLSv1_1 TLSv1_2 TLSv1_3 TLS1_1 TLS1_2 TLS1_3].freeze else %i[TLSv1_1 TLSv1_2 TLS1_1 TLS1_2].freeze end
- CIPHERS_DEFAULT =
follow httpclient configuration by nahi OpenSSL 0.9.8 default: “ALL:!ADH:!LOW:!EXP:!MD5:+SSLv2:@STRENGTH”
'ALL:!aNULL:!eNULL:!SSLv2'.freeze
Class Method Summary collapse
-
.set_version_to_context(ctx, version, min_version, max_version) ⇒ Object
Helper for old syntax/method support: ruby 2.4 uses ssl_version= but this method is now deprecated.
Class Method Details
.set_version_to_context(ctx, version, min_version, max_version) ⇒ Object
Helper for old syntax/method support: ruby 2.4 uses ssl_version= but this method is now deprecated. min_version=/max_version= use ‘TLS1_2’ but ssl_version= uses ‘TLSv1_2’
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/fluent/plugin/prometheus_pushgateway/tls.rb', line 58 def set_version_to_context(ctx, version, min_version, max_version) if MIN_MAX_AVAILABLE case when min_version.nil? && max_version.nil? min_version = METHODS_MAP[version] || version max_version = METHODS_MAP[version] || version when min_version.nil? && max_version raise Fluent::ConfigError, "When you set max_version, must set min_version together" when min_version && max_version.nil? raise Fluent::ConfigError, "When you set min_version, must set max_version together" else min_version = METHODS_MAP[min_version] || min_version max_version = METHODS_MAP[max_version] || max_version end ctx.min_version = min_version ctx.max_version = max_version else ctx.ssl_version = METHODS_MAP[version] || version end ctx end |