|
- <div class="container">
- <div class="row">
- <div class="col-sm-12">
- <h1><%= t 'Cipher suite:' %> <%= @suite %></h1>
- </div>
- </div>
- <div class="row">
- <table class="table table-bordered table-condensed table-striped col-sm-12">
- <thead>
- <tr>
- <th rowspan="2"><%= t 'User agent' %></th>
- <th rowspan="2"><%= t 'Name' %></th>
- <th rowspan="2"><%= t 'Key exchange' %></th>
- <th rowspan="2"><%= t 'Authentication' %></th>
- <th colspan="4"><%= t 'Encryption' %></th>
- <th colspan="2"><%= t 'MAC' %></th>
- <th rowspan="2"><%= t 'PFS' %></th>
- </tr>
- <tr>
- <th><%= t 'Type' %></th>
- <th><%= t 'Key size' %></th>
- <th><%= t 'Block size' %></th>
- <th><%= t 'Mode' %></th>
- <th><%= t 'Type' %></th>
- <th><%= t 'Size' %></th>
- </tr>
- </thead>
- <tbody>
- <%
- iana_ciphers = Hash[@ciphers.collect { |c| [Rails.application.config.openssl_ciphers[c.name], c] }]
- Rails.application.config.user_agents_ciphers.each do |ua, support|
- cipher = (support['ciphers'].collect(&:first) & iana_ciphers.keys).first
- if cipher
- cipher = iana_ciphers[cipher]
- params = cipher.params
- kex = params[:kex]
- auth = params[:auth]
- enc = params[:enc]
- mac = params[:mac]
- pfs = params[:pfs]
- end
- %>
- <tr>
- <th><%= ua %></th>
- <% if cipher %>
- <th><%= cipher_name_label cipher %></th>
- <%= cipher_kex_type_cell kex&.first %>
- <%= cipher_auth_type_cell auth&.first %>
- <%= 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 %>
- <% else %>
- <td colspan="10"><%= label t('Not supported'), :error %></td>
- <% end %>
- </tr>
- <% end %>
- </tbody>
- </table>
- </div>
- <br/>
- <div class="row">
- <table class="table table-bordered table-condensed table-striped center col-sm-12">
- <thead>
- <tr>
- <th rowspan="2"><%= t 'Name' %></th>
- <th rowspan="2"><%= t 'Key exchange' %></th>
- <th rowspan="2"><%= t 'Authentication' %></th>
- <th colspan="4"><%= t 'Encryption' %></th>
- <th colspan="2"><%= t 'MAC' %></th>
- <th rowspan="2"><%= t 'PFS' %></th>
- </tr>
- <tr>
- <th><%= t 'Type' %></th>
- <th><%= t 'Key size' %></th>
- <th><%= t 'Block size' %></th>
- <th><%= t 'Mode' %></th>
- <th><%= t 'Type' %></th>
- <th><%= t 'Size' %></th>
- </tr>
- </thead>
- <tbody>
- <% @ciphers.each do |cipher|
- params = cipher.params
- kex = params[:kex]
- auth = params[:auth]
- enc = params[:enc]
- mac = params[:mac]
- pfs = params[:pfs]
- %>
- <tr>
- <th><%= cipher_name_label cipher %></th>
- <%= cipher_kex_type_cell kex&.first %>
- <%= cipher_auth_type_cell auth&.first %>
- <%= 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 %>
- </tr>
- <% end %>
- </tbody>
- </table>
- </div>
- </div>
|