Sha256: f09bee55e10913c4fd0e13bdb64eb1b0d653b2152490fa7b115680d1f981494f
Contents?: true
Size: 876 Bytes
Versions: 20
Compression:
Stored size: 876 Bytes
Contents
# encoding: utf-8 module LogStash module Inputs class Http class TLS class TLSOption include Comparable attr_reader :name, :version def initialize(name, version) @name = name @version = version end def <=>(other) version <=> other.version end end TLS_PROTOCOL_OPTIONS = [ TLSOption.new("TLSv1", 1), TLSOption.new("TLSv1.1", 1.1), TLSOption.new("TLSv1.2", 1.2), TLSOption.new("TLSv1.3", 1.3) ] def self.min TLS_PROTOCOL_OPTIONS.min end def self.max TLS_PROTOCOL_OPTIONS.max end def self.get_supported(versions) if versions.is_a?(Range) TLS_PROTOCOL_OPTIONS.select { |tls| versions.cover?(tls.version) } else TLS_PROTOCOL_OPTIONS.select { |tls| versions == tls.version } end end end end; end; end
Version data entries
20 entries across 20 versions & 1 rubygems