Sha256: 0ff3f7e7fea93883a6ddbdff4ba2910f111e5c190ed9e9e35f77f86466a4836b
Contents?: true
Size: 902 Bytes
Versions: 5
Compression:
Stored size: 902 Bytes
Contents
# frozen_string_literal: true require 'json' module Yawast module Scanner module Plugins module SSL module SSLLabs class Info def self.call_info(endpoint) uri = endpoint.copy uri.path = '/api/v3/info' body = Yawast::Shared::Http.get uri body end def self.extract_msg(body) ret = [] begin json = JSON.parse body rescue => e # rubocop:disable Style/RescueStandardError raise Exception, "Invalid response from SSL Labs: '#{e.message}'" end unless json['messages'].nil? json['messages'].each do |msg| ret.push msg end end ret end end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems