You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

suite.html.erb 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <div class="container">
  2. <div class="row">
  3. <div class="col-sm-12">
  4. <h1><%= t 'Cipher suite:' %> <%= @suite %></h1>
  5. </div>
  6. </div>
  7. <div class="row">
  8. <table class="table table-bordered table-condensed table-striped center col-sm-12">
  9. <thead>
  10. <tr>
  11. <th rowspan="2"><%= t 'User agent' %></th>
  12. <th rowspan="2"><%= t 'Name' %></th>
  13. <th rowspan="2"><%= t 'Key exchange' %></th>
  14. <th rowspan="2"><%= t 'Authentication' %></th>
  15. <th colspan="4"><%= t 'Encryption' %></th>
  16. <th colspan="2"><%= t 'MAC' %></th>
  17. <th rowspan="2"><%= t 'PFS' %></th>
  18. </tr>
  19. <tr>
  20. <th><%= t 'Type' %></th>
  21. <th><%= t 'Key size' %></th>
  22. <th><%= t 'Block size' %></th>
  23. <th><%= t 'Mode' %></th>
  24. <th><%= t 'Type' %></th>
  25. <th><%= t 'Size' %></th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <%
  30. iana_ciphers = Hash[@ciphers.collect { |c| [Rails.application.config.openssl_ciphers[c.name], c] }]
  31. Rails.application.config.user_agents_ciphers.each do |ua, support|
  32. cipher = (support['ciphers'].collect(&:first) & iana_ciphers.keys).first
  33. if cipher
  34. cipher = iana_ciphers[cipher]
  35. kex = cipher.kex
  36. auth = cipher.auth
  37. enc = cipher.encryption
  38. mac = cipher.hmac
  39. pfs = cipher.pfs?
  40. end
  41. %>
  42. <tr>
  43. <th><%= ua %></th>
  44. <% if cipher %>
  45. <th><%= cipher_name_label cipher %></th>
  46. <%= cipher_auth_type_cell auth %>
  47. <%= cipher_kex_type_cell kex %>
  48. <%= cipher_enc_type_cell enc[0] %>
  49. <%= cipher_enc_key_size_cell enc[1] %>
  50. <%= cipher_enc_block_size_cell enc[2] %>
  51. <%= cipher_enc_mode_cell enc[3] %>
  52. <%= cipher_mac_type_cell mac[0] %>
  53. <%= cipher_mac_size_cell mac[1] %>
  54. <%= cipher_pfs_cell pfs %>
  55. <% else %>
  56. <td colspan="10" class="left"><%= label t('Not supported'), :error, false %></td>
  57. <% end %>
  58. </tr>
  59. <% end %>
  60. </tbody>
  61. </table>
  62. </div>
  63. <br/>
  64. <div class="row">
  65. <table class="table table-bordered table-condensed table-striped center col-sm-12">
  66. <thead>
  67. <tr>
  68. <th rowspan="2"><%= t 'Name' %></th>
  69. <th rowspan="2"><%= t 'Key exchange' %></th>
  70. <th rowspan="2"><%= t 'Authentication' %></th>
  71. <th colspan="4"><%= t 'Encryption' %></th>
  72. <th colspan="2"><%= t 'MAC' %></th>
  73. <th rowspan="2"><%= t 'PFS' %></th>
  74. </tr>
  75. <tr>
  76. <th><%= t 'Type' %></th>
  77. <th><%= t 'Key size' %></th>
  78. <th><%= t 'Block size' %></th>
  79. <th><%= t 'Mode' %></th>
  80. <th><%= t 'Type' %></th>
  81. <th><%= t 'Size' %></th>
  82. </tr>
  83. </thead>
  84. <tbody>
  85. <% @ciphers.each do |cipher|
  86. kex = cipher.kex
  87. auth = cipher.auth
  88. enc = cipher.encryption
  89. mac = cipher.hmac
  90. pfs = cipher.pfs?
  91. %>
  92. <tr>
  93. <th><%= cipher_name_label cipher %></th>
  94. <%= cipher_auth_type_cell auth %>
  95. <%= cipher_kex_type_cell kex %>
  96. <%= cipher_enc_type_cell enc[0] %>
  97. <%= cipher_enc_key_size_cell enc[1] %>
  98. <%= cipher_enc_block_size_cell enc[2] %>
  99. <%= cipher_enc_mode_cell enc[3] %>
  100. <%= cipher_mac_type_cell mac[0] %>
  101. <%= cipher_mac_size_cell mac[1] %>
  102. <%= cipher_pfs_cell pfs %>
  103. </tr>
  104. <% end %>
  105. </tbody>
  106. </table>
  107. </div>
  108. </div>