Sha256: 98b1e2aa4982d7c67d545df3283d0a4dd92b51a0d2f09d428195d918f020a18a

Contents?: true

Size: 607 Bytes

Versions: 8

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

# Ruby internal

# TLS map module
module TLSmap
  # TLS mapping
  class App
    GNUTLS_URL = 'https://gitlab.com/gnutls/gnutls/raw/master/lib/algorithms/ciphersuites.c'

    def parse_gnutls
      reg = /(GNUTLS_[a-zA-Z0-9_]+)\s+{\s?(0x[[:xdigit:]]{2},\s?0x[[:xdigit:]]{2})\s?}/
      File.read(@gnutls_file.path).scan(reg).each do |alg|
        codepoint = codepoint_iana(alg[1])
        name = alg[0][7..]
        @tls_map.each do |h|
          h[:gnutls] ||= h[:codepoint] == codepoint.upcase ? name : nil
        end
      end
    end

    private :parse_gnutls
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tls-map-2.2.0 lib/tls_map/app/gnutls.rb
tls-map-2.1.0 lib/tls_map/app/gnutls.rb
tls-map-2.0.0 lib/tls_map/app/gnutls.rb
tls-map-1.3.2 lib/tls_map/gnutls.rb
tls-map-1.3.1 lib/tls_map/gnutls.rb
tls-map-1.3.0 lib/tls_map/gnutls.rb
tls-map-1.2.0 lib/tls_map/gnutls.rb
tls-map-1.1.0 lib/tls_map/gnutls.rb