lib/tls_map.rb in tls-map-1.0.0 vs lib/tls_map.rb in tls-map-1.1.0

- old
+ new

@@ -8,19 +8,21 @@ require 'tls_map/iana' require 'tls_map/openssl' require 'tls_map/gnutls' require 'tls_map/nss' require 'tls_map/output' +require 'tls_map/ciphersuiteinfo' # TLS map module module TLSmap # TLS mapping class App # Will automatically fetch source files and parse them. def initialize @iana_file = tmpfile('iana', IANA_URL) @openssl_file = tmpfile('openssl', OPENSSL_URL) + @openssl_file2 = tmpfile('openssl', OPENSSL_URL2) @gnutls_file = tmpfile('gnutls', GNUTLS_URL) @nss_file = tmpfile('nss', NSS_URL) @tls_map = [] parse @@ -41,9 +43,10 @@ # Accepted values: +:all+ (default), +:codepoint+, +:iana+, +:openssl+, # +:gnutls+, +:nss+. # @return [Hash] The corresponding type matching +term+. def search(critera, term, output = :all) @tls_map.each do |alg| + term = term.upcase if critera == :codepoint next unless alg[critera] == term return alg if output == :all return { output => alg[output] } end