Sha256: 1dfdad08ce4e4ea67aa4091ce949a99fef194b9649af3e0ddd7d4282855c3069

Contents?: true

Size: 877 Bytes

Versions: 22

Compression:

Stored size: 877 Bytes

Contents

# encoding: utf-8
module LogStash module Inputs class Beats
  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

22 entries across 22 versions & 1 rubygems

Version Path
logstash-input-beats-6.9.1-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.9.0-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.8.4-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.8.3-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.8.2-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.8.1-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.8.0-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.7.2-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.7.1-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.7.0-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.6.4-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.6.3-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.6.2-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.6.1-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.6.0-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.5.0-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.4.4-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.4.3-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.4.1-java lib/logstash/inputs/beats/tls.rb
logstash-input-beats-6.4.0-java lib/logstash/inputs/beats/tls.rb