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

<% if Time.now - @result.date >= Rails.configuration.refresh_delay %>
<%= link_to t('Refresh'), {action: :refresh}, class: %i(btn btn-default) %>
<% end %>
<% @result.hosts.each do |host| if host.error error, host = host.error, host.host %>

<%= host.name %> - <%= host.ip %> : <%= host.port %>

<%= t 'Error during analysis:' %> <%= error %>
<% else host, grade, handshake = host.host, host.grade, host.handshake %>

<%= host.name %> - <%= host.ip %> : <%= host.port %>

<% { 'Protocol' => 'protocol', 'Key exchange' => 'key_exchange', 'Cipher' => 'cipher_strengths', 'Overall' => 'score'}.each do |name, v| %> <% end %>
Scores <%= rank_label grade.rank %>
<%= t name %> <%= score_progress grade.details[v] %>
<% { 'Good practices' => :success, 'Warning' => :warning, 'Critical' => :danger, 'Fatal' => :error }.each do |name, color| names = grade[color] next if names.nil? or names.empty? %> <% end %>
<%= t 'Protocols' %> <%= protocol_labels handshake.protocols %>
<%= t 'Keys' %>

<%= t 'Certificates:' %> <%= key_label handshake[:key] %>

Diffie Hellman : <%= key_labels handshake.dh %>

<%= t name %> <% names.each do |name| %> <%= name.upcase %> <% end %>
<% CryptCheck::Tls::Server::EXISTING_METHODS.each do |protocol| ciphers = CryptCheck::Tls::Cipher.sort(handshake.ciphers.select { |c| c.protocol == protocol.to_s } .collect { |c| CryptCheck::Tls::Cipher.new protocol, [c.name, nil, c[:size]], c.dh, handshake[:key] }) unless ciphers.empty? %> <% ciphers.each do |cipher| params = cipher.params kex = params[:kex] auth = params[:auth] enc = params[:enc] mac = params[:mac] pfs = params[:pfs] %> <%= cipher_kex_type_cell kex&.first %> <%= cipher_kex_size_cell kex&.last %> <%= cipher_auth_type_cell auth&.first %> <%= cipher_auth_size_cell auth&.last %> <%= cipher_enc_type_cell enc&.first %> <%= cipher_enc_key_size_cell enc&.[] 1 %> <%= cipher_enc_block_size_cell enc&.[] 2 %> <%= cipher_enc_mode_cell enc&.last %> <%= cipher_mac_type_cell mac&.first %> <%= cipher_mac_size_cell mac&.last %> <%= cipher_pfs_cell pfs %> <% end end end %>
<%= t 'Name' %> <%= t 'Key exchange' %> <%= t 'Authentication' %> <%= t 'Encryption' %> <%= t 'MAC' %> <%= t 'PFS' %>
<%= t 'Type' %> <%= t 'Key size' %> <%= t 'Type' %> <%= t 'Key size' %> <%= t 'Type' %> <%= t 'Key size' %> <%= t 'Block size' %> <%= t 'Mode' %> <%= t 'Type' %> <%= t 'Size' %>
<%= protocol_label protocol %>
<%= cipher_name_label cipher %>
<% end end %>