diff --git a/lib/cryptcheck/tls/cipher.rb b/lib/cryptcheck/tls/cipher.rb index 1a19239..24f82e2 100644 --- a/lib/cryptcheck/tls/cipher.rb +++ b/lib/cryptcheck/tls/cipher.rb @@ -64,6 +64,14 @@ module CryptCheck end @name.colorize colors end + + def state + ok = Proc.new { |n| self.send "#{n}?" } + { success: %i(pfs).select { |n| ok.call n }, + warning: %i(des3 sha1).select { |n| ok.call n }, + danger: %i(md5 psk srp anonymous null export des rc2 rc4).select { |n| ok.call n } + } + end end end end