From c1241eae9700a162b36bc63cc56fb96de1af296f Mon Sep 17 00:00:00 2001 From: aeris Date: Sun, 5 Feb 2017 16:09:38 +0100 Subject: [PATCH] Test supported ciphers --- spec/cryptcheck/tls/server_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/cryptcheck/tls/server_spec.rb b/spec/cryptcheck/tls/server_spec.rb index 89a591e..2b025ea 100644 --- a/spec/cryptcheck/tls/server_spec.rb +++ b/spec/cryptcheck/tls/server_spec.rb @@ -131,6 +131,15 @@ describe CryptCheck::Tls::Server do end end + describe '#supported_ciphers' do + it 'must detect supported cipher' do + ciphers = server.supported_ciphers + .map { |k, v| [k.to_sym, v.keys.collect(&:name)] } + .to_h[:TLSv1_2] + expect(ciphers).to match_array %w(ECDHE-ECDSA-AES128-SHA) + end + end + describe '#supported_curves' do it 'must detect no supported curves' do s = server :rsa, ciphers: %w(AES128-SHA)