Sha256: 76f610d476d8dc96a8d4865ce90d0dea0f9bf34302ae47f49a1370ea625bce4a

Contents?: true

Size: 587 Bytes

Versions: 9

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

# Ruby internal

# TLS map module
module TLSmap
  # TLS mapping
  class App
    # Timeout https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ssl/sslproto.h
    # so use github RO mirror instead.
    NSS_URL = 'https://raw.githubusercontent.com/nss-dev/nss/master/lib/ssl/sslproto.h'

    def parse_nss
      File.read(@nss_file.path).scan(/(TLS_[a-zA-Z0-9_]+)\s+0x([[:xdigit:]]{4})/) do |alg|
        @tls_map.each do |h|
          h[:nss] ||= h[:codepoint] == alg[1].upcase ? alg[0] : nil
        end
      end
    end

    private :parse_nss
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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