Sha256: 59cb5e6ce2b8b854ab772d21008e7618c15d4d83bb262bc533971b8846be7296

Contents?: true

Size: 839 Bytes

Versions: 35

Compression:

Stored size: 839 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)
    ]

    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

35 entries across 35 versions & 5 rubygems

Version Path
sp-logstash-input-http-3.3.9-java lib/logstash/inputs/http/tls.rb
sp-logstash-input-http-3.3.8-java lib/logstash/inputs/http/tls.rb
sp-logstash-input-http-3.3.7-java lib/logstash/inputs/http/tls.rb
logstash-input-http-3.4.5-java lib/logstash/inputs/http/tls.rb
logstash-input-http-3.4.4-java lib/logstash/inputs/http/tls.rb
logstash-input-http-3.4.3-java lib/logstash/inputs/http/tls.rb
logstash-input-http_bold-5.0.1-java lib/logstash/inputs/http_bold/tls.rb
logstash-input-http_bold-5.0.0-java lib/logstash/inputs/http_bold/tls.rb
logstash-input-http_bold-3.6.0-java lib/logstash/inputs/http/tls.rb
logstash-input-http-3.4.2-java lib/logstash/inputs/http/tls.rb
logstash-input-http_bold-3.5.4-java lib/logstash/inputs/http/tls.rb
logstash-input-http_bold-3.5.0-java lib/logstash/inputs/http/tls.rb
logstash-input-http_bold-3.4.1-java lib/logstash/inputs/http/tls.rb
logstash-promtail-http-input-4.2-java lib/logstash/inputs/http/tls.rb
logstash-input-http-3.4.1-java lib/logstash/inputs/http/tls.rb
logstash-input-http-3.4.0-java lib/logstash/inputs/http/tls.rb
logstash-promtail-http-input-4.1-java lib/logstash/inputs/http/tls.rb
logstash-promtail-http-input-4.0.1-java lib/logstash/inputs/http/tls.rb
logstash-promtail-input-http-4.0.0-java lib/logstash/inputs/http/tls.rb
logstash-promtail-input-http-1.0.0-java lib/logstash/inputs/http/tls.rb