[<%= 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| %>

<%= rank_label host.grade %> <%= host.ip %> : <%= host.port %> (<%= host.hostname %>)

<%= t 'Checks' %>

<% ::CryptCheck::State.each do |level| %> <% end %>
<%= t 'Severity' %>
<%= label level, "state-#{level}" %> <%= labels level, host.states[level] %>

<%= t 'Certificates' %>

<% host.handshakes.certs.each do |cert| %> <% cert.chain.each do |cert| %> <% end %> <% end %>
<%= t 'Subject' %> [<%= t 'Serial' %>]
<%= t 'Fingerprint' %>
<%= t 'Issuer' %> <%= t 'Not before' %> <%= t 'Not after' %>
<%= cert.subject %> [<%= cert.serial %>]
<%= cert.fingerprint %>
<%= cert.issuer %> <%= l cert.lifetime.not_before %> <%= l cert.lifetime.not_after %> <%= states cert.states %>
<%= cert.subject %> [<%= cert.serial %>]
<%= cert.fingerprint %>
<%= cert.issuer %> <%= l cert.lifetime.not_before %> <%= l cert.lifetime.not_after %>
<% end %>