Browse Source

Better output for supported methods/ciphers

new-scoring
aeris 2 years ago
parent
commit
3d12eaacea
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      bin/supported.rb

+ 8
- 4
bin/supported.rb View File

@@ -5,8 +5,12 @@ require 'bundler/setup'
5 5
 require 'cryptcheck'
6 6
 
7 7
 puts 'Supported methods'
8
-puts OpenSSL::SSL::SSLContext::METHODS.select { |m| CryptCheck::Tls::Server::EXISTING_METHODS.include? m  }.sort.join ' '
8
+puts CryptCheck::Tls::Method::SUPPORTED.sort.collect(&:to_s).join ' '
9 9
 
10
-supported = CryptCheck::Tls::Cipher.list
11
-puts "#{supported.size} supported ciphers"
12
-puts supported.collect { |c| c.colorize }.join "\n"
10
+CryptCheck::Tls::Cipher.each do |method, ciphers|
11
+	puts
12
+	puts "#{ciphers.size} supported ciphers for #{method}"
13
+	ciphers.sort.each do |cipher|
14
+		puts "  #{cipher}"
15
+	end
16
+end

Loading…
Cancel
Save