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.

ssllabs.erb 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Status SSL/TLS banque &amp; commerce en ligne</title>
  8. <link rel="stylesheet" href="bootstrap.min.css">
  9. <style>
  10. body {
  11. margin-top: 10px;
  12. }
  13. td {
  14. text-align: center;
  15. }
  16. </style>
  17. </head>
  18. <body>
  19. <div class="container-fluid">
  20. <div class="row">
  21. <div class="col-md-12">
  22. <table class="table table-bordered table-hover table-condensed">
  23. <tbody>
  24. <%
  25. first = true
  26. results.each do |r|
  27. unless first
  28. %>
  29. <tr>
  30. <th colspan="8">&nbsp;</th>
  31. </tr>
  32. <%
  33. end
  34. first = false
  35. %>
  36. <tr>
  37. <th colspan="8" id="<%= r[0] %>"><%= r[0] %></th>
  38. </tr>
  39. <tr>
  40. <th>Site (IP)</th>
  41. <td>Rang</td>
  42. <td>Sécurité (bits)</td>
  43. <td class="danger">SSL 2/3 (obsolète)</td>
  44. <td class="success">TLS 1.2 (actuel)</td>
  45. <td class="danger">RC4</td>
  46. <td class="info">PFS</td>
  47. <td class="info">HSTS</td>
  48. </tr>
  49. <% r[1].each do |s|
  50. rank_color = case s.rank
  51. when 'A+' then :info
  52. when 'A', 'A-' then :success
  53. when 'B', 'C' then :warning
  54. else :danger
  55. end
  56. %>
  57. <tr>
  58. <th id="<%= s.hostname %>">
  59. <a href="https://www.ssllabs.com/ssltest/analyze.html?d=<%= s.hostname %>&s=<%= s.ip %>" target="_blank">
  60. <%= s.hostname %> (<%= s.ip %>)
  61. </a>
  62. </th>
  63. <td class="<%= rank_color %>">
  64. <%= s.rank %>
  65. </td>
  66. <td class="<%= s.bits < 128 ? :danger : :success %>">
  67. <%= s.bits %>
  68. (<%= s.bits < 128 ? '☹' : '☺' %>)
  69. </td>
  70. <td class="<%= s.ssl ? :danger : :success %>">
  71. <%= s.ssl ? '✓' : '✗' %>
  72. (<%= s.ssl ? '☹' : '☺' %>)
  73. </td>
  74. <td class="<%= s.tls ? :success : :danger %>">
  75. <%= s.tls ? '✓' : '✗' %>
  76. (<%= s.tls ? '☺' : '☹' %>)
  77. </td>
  78. <td class="<%= s.rc4 ? :danger : :success %>">
  79. <%= s.rc4 ? '✓' : '✗' %>
  80. (<%= s.rc4 ? '☹' : '☺' %>)
  81. </td>
  82. <td class="<%= s.pfs ? :success : :danger %>">
  83. <%= s.pfs ? '✓' : '✗' %>
  84. (<%= s.pfs ? '☺' : '☹' %>)
  85. </td>
  86. <td class="<%= s.hsts ? :success : :danger %>">
  87. <%= s.hsts ? '✓' : '✗' %>
  88. (<%= s.hsts ? '☺' : '☹' %>)
  89. </td>
  90. </tr>
  91. <% end %>
  92. <tr>
  93. <th>Site (IP)</th>
  94. <td>Rang</td>
  95. <td>Sécurité (bits)</td>
  96. <td class="danger">SSL 2/3 (obsolète)</td>
  97. <td class="success">TLS 1.2 (actuel)</td>
  98. <td class="danger">RC4</td>
  99. <td class="success">PFS</td>
  100. <td class="success">HSTS</td>
  101. </tr>
  102. <% end %>
  103. </tbody>
  104. </table>
  105. </div>
  106. </div>
  107. </div>
  108. </body>
  109. </html>