Browse Source

Fix XMPP test

new-scoring
aeris 3 years ago
parent
commit
8232415f5a
  1. 5
      lib/cryptcheck/tls.rb
  2. 3
      lib/cryptcheck/tls/xmpp.rb
  3. 2
      lib/cryptcheck/tls/xmpp/host.rb

5
lib/cryptcheck/tls.rb

@ -3,6 +3,11 @@ require 'parallel'
module CryptCheck
module Tls
def self.analyze(hostname, port)
host = Host.new hostname, port
self.aggregate host
end
def self.aggregate(hosts)
hosts = [hosts] unless hosts.respond_to? :collect
hosts.inject([]) { |l, h| l + h.to_h }

3
lib/cryptcheck/tls/xmpp.rb

@ -17,8 +17,7 @@ module CryptCheck
srv.collect { |s| [s.target.to_s, s.port] }
end
hosts.collect { |args| Host.new *args, domain: hostname }
p hosts
Tls.aggregate hosts.collect { |args| Host.new *args, domain: hostname }
end
end
end

2
lib/cryptcheck/tls/xmpp/host.rb

@ -7,8 +7,6 @@ module CryptCheck
def initialize(*args, domain: nil, type: :s2s)
@domain, @type = domain, type
super *args
Logger.info { '' }
Logger.info { self.required? ? 'Required'.colorize(:good) : 'Not required'.colorize(:warning) }
end
private

Loading…
Cancel
Save