[<%= self.type.to_s.upcase %>] <%= @host %> (<%= l @result.date %>) <%= rank_label @result.score.rank %>

<% if Time.now - @result.date >= Rails.configuration.refresh_delay %>
<%= link_to 'Rafraîchir', {action: :refresh}, class: %i(btn btn-default) %>
<% end %>

<% scores = @result.score.details %> <% { 'Protocole' => 'protocol', 'Échange de clef' => 'key_exchange', 'Chiffrement' => 'cipher_strengths', 'Total' => 'score'}.each do |name, v| %> <% end %>
Scores <%= rank_label @result.score.rank %>
<%= name %> <%= score_progress scores[v] %>
<% { 'Bonnes pratiques' => :success, 'Alertes' => :warning, 'Dangers' => :danger, 'Erreurs' => :error }.each do |name, color| names = @result.score[color] next if names.nil? or names.empty? %> <% end %>
Protocoles <%= protocol_labels @result.protocols %>
Clefs

Certificat : <%= key_label @result[:key] %>

Diffie Hellman : <%= key_labels @result.dh %>

<%= name %> <% names.each do |name| %> <%= name.upcase %> <% end %>
<% %w(TLSv1_2 TLSv1_1 TLSv1 SSLv3 SSLv2).each do |protocol| ciphers = @result.ciphers.select { |c| c.protocol == protocol } .sort { |a, b| -1 * (a['size'] <=> b['size']) } unless ciphers.empty? %> <% ciphers.each do |cipher| cipher = CryptCheck::Tls::Cipher.new protocol, [cipher.name, nil, cipher[:size]], cipher.dh %> <% end end end %>
Algorithme Clef DH
<%= protocol_label protocol %>
<%= cipher_name_label cipher, cipher.state %> <%= cipher_size_label cipher %> <%= key_label cipher.dh if cipher.dh %> <%= cipher_labels cipher %>