parent
8ce7f2abfc
commit
d4be6af200
@ -1 +1 @@ |
||||
2.3.8-cryptcheck |
||||
3.1.1 |
||||
|
@ -0,0 +1 @@ |
||||
//= link_tree ../images
|
@ -1,3 +0,0 @@ |
||||
##= require jquery |
||||
##= require bootstrap/dropdown |
||||
##= require_tree . |
@ -1,22 +0,0 @@ |
||||
var _paq = window._paq || []; |
||||
|
||||
document.addEventListener('DOMContentLoaded', function() { |
||||
const { matomoUrl: url, matomoSite: site } = document.documentElement.dataset |
||||
console.log(url, site); |
||||
if ( url == undefined || site == undefined ) return; |
||||
|
||||
_paq.push(['trackPageView']); |
||||
_paq.push(['enableLinkTracking']); |
||||
_paq.push(['setTrackerUrl', url]); |
||||
_paq.push(['setSiteId', site]); |
||||
|
||||
const d = document, |
||||
g = d.createElement('script'), |
||||
s = d.getElementsByTagName('script')[0] |
||||
|
||||
g.type = 'text/javascript' |
||||
g.async = true |
||||
g.defer = true |
||||
g.src = url |
||||
s.parentNode.insertBefore(g, s) |
||||
}) |
@ -1,166 +0,0 @@ |
||||
//= require_tree . |
||||
//= require_self |
||||
@import 'bootstrap-sprockets'; |
||||
@import 'bootstrap'; |
||||
@import 'bootstrap/variables'; |
||||
@import 'bootstrap/mixins'; |
||||
@import 'bootstrap/normalize'; |
||||
@import 'bootstrap/scaffolding'; |
||||
@import 'bootstrap/type'; |
||||
@import 'bootstrap/grid'; |
||||
@import 'bootstrap/tables'; |
||||
@import 'bootstrap/forms'; |
||||
@import 'bootstrap/buttons'; |
||||
@import 'bootstrap/dropdowns'; |
||||
@import 'bootstrap/navs'; |
||||
@import 'bootstrap/navbar'; |
||||
@import 'bootstrap/progress-bars'; |
||||
@import 'bootstrap/labels'; |
||||
@import 'bootstrap/badges'; |
||||
@import 'bootstrap/alerts'; |
||||
@import 'bootstrap/utilities'; |
||||
@import 'bootstrap/responsive-utilities'; |
||||
@import 'font-awesome-sprockets'; |
||||
@import 'font-awesome'; |
||||
|
||||
* { |
||||
box-sizing: border-box; |
||||
} |
||||
|
||||
$navbar-offset: $navbar-height + 10px; |
||||
body { |
||||
padding-top: $navbar-offset; |
||||
} |
||||
|
||||
:target:before { |
||||
display: block; |
||||
content: " "; |
||||
margin-top: -$navbar-offset; |
||||
height: $navbar-offset; |
||||
visibility: hidden; |
||||
} |
||||
|
||||
.label-error, .progress-bar-error { |
||||
background-color: #000; |
||||
} |
||||
|
||||
.label-critical, .progress-bar-critical { |
||||
background-color: #000; |
||||
} |
||||
|
||||
table.center { |
||||
td { |
||||
text-align: center; |
||||
|
||||
&.left { |
||||
text-align: left; |
||||
} |
||||
} |
||||
} |
||||
|
||||
td.error { |
||||
background-color: #ddd; |
||||
} |
||||
|
||||
td.primary { |
||||
background-color: $state-info-bg; |
||||
} |
||||
|
||||
<% unless Rails.env == 'production' %> |
||||
.translation_missing { |
||||
border: 1px solid red; |
||||
} |
||||
|
||||
<% end %> |
||||
|
||||
.progress-bar-default { |
||||
background-color: $label-default-bg; |
||||
} |
||||
|
||||
.progress { |
||||
margin: 0; |
||||
} |
||||
|
||||
#check, |
||||
#ssh_check, |
||||
#tls_check { |
||||
margin-top: 100px; |
||||
} |
||||
|
||||
$color-critical: #d9534f; |
||||
$color-error: #e4804e; |
||||
$color-warning: #f0ad4e; |
||||
$color-good: #beb052; |
||||
$color-best: #8db457; |
||||
$color-great: #5cb85c; |
||||
|
||||
.label-state-critical { |
||||
background-color: $color-critical; |
||||
} |
||||
|
||||
.label-state-error { |
||||
background-color: $color-error; |
||||
} |
||||
|
||||
.label-state-warning { |
||||
background-color: $color-warning; |
||||
color: $text-color; |
||||
} |
||||
|
||||
.label-state-good { |
||||
background-color: $color-good; |
||||
color: $text-color; |
||||
} |
||||
|
||||
.label-state-best { |
||||
background-color: $color-best; |
||||
} |
||||
|
||||
.label-state-great { |
||||
background-color: $color-great; |
||||
} |
||||
|
||||
.label-state-default { |
||||
background-color: $label-default-bg; |
||||
} |
||||
|
||||
.label-state-success { |
||||
background-color: $label-success-bg; |
||||
} |
||||
|
||||
$lighten-alert: 35%; |
||||
.alert-critical { |
||||
background-color: lighten($color-critical, $lighten-alert); |
||||
color: $color-critical; |
||||
border-color: $color-critical; |
||||
} |
||||
|
||||
.alert-error { |
||||
background-color: lighten($color-error, $lighten-alert); |
||||
color: $color-error; |
||||
border-color: $color-error; |
||||
} |
||||
|
||||
.alert-warning { |
||||
background-color: lighten($color-warning, $lighten-alert); |
||||
color: $color-warning; |
||||
border-color: $color-warning; |
||||
} |
||||
|
||||
.alert-good { |
||||
background-color: lighten($color-good, $lighten-alert); |
||||
color: $color-good; |
||||
border-color: $color-good; |
||||
} |
||||
|
||||
.alert-best { |
||||
background-color: lighten($color-best, $lighten-alert); |
||||
color: $color-best; |
||||
border-color: $color-best; |
||||
} |
||||
|
||||
.alert-great { |
||||
background-color: lighten($color-great, $lighten-alert); |
||||
color: $color-great; |
||||
border-color: $color-great; |
||||
} |
@ -1,36 +0,0 @@ |
||||
#about, #help { |
||||
margin-bottom: 20px; |
||||
} |
||||
|
||||
#about, #help .scoring { |
||||
p { |
||||
font-size: 1.25em; |
||||
} |
||||
} |
||||
|
||||
|
||||
#donorbox { |
||||
background: #2d81c5 url(<%= image_path 'donorbox.png' %>) no-repeat 18px center; |
||||
color: #fff; |
||||
text-decoration: none; |
||||
font-family: Verdana, sans-serif; |
||||
display: inline-block; |
||||
font-size: 16px; |
||||
padding: 13px 17px 13px 56px; |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
box-shadow: 0 1px 0 0 #1f5a89; |
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3); |
||||
} |
||||
|
||||
#liberapay, #donorbox, #paypal { |
||||
img { |
||||
height: 50px; |
||||
max-width: 140px; |
||||
} |
||||
} |
||||
|
||||
table.scoring img { |
||||
width: 30px; |
||||
} |
@ -1,3 +0,0 @@ |
||||
// Place all the styles related to the Xmpp controller here. |
||||
// They will automatically be included in application.css. |
||||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -1,226 +1,224 @@ |
||||
module CheckHelper |
||||
private def __label(value, color, state=true) |
||||
color = :default unless color |
||||
color = "state-#{color}" if state |
||||
"<span class=\"label label-#{color}\">#{value}</span>" |
||||
end |
||||
|
||||
def label(value, color, state=true) |
||||
__label(value, color, state).html_safe |
||||
end |
||||
|
||||
def cell(value, color, state=true) |
||||
"<td class=\"label-state-#{color}\">#{value}</td>".html_safe |
||||
end |
||||
|
||||
def labels(level, states, state=true) |
||||
states.each_pair.collect do |name, value| |
||||
color = if value.nil? |
||||
:default |
||||
elsif ::CryptCheck::State.bad? level |
||||
value ? :danger : :success |
||||
else |
||||
value ? :success : :danger |
||||
end |
||||
__label name, color, state |
||||
end.join(' ').html_safe |
||||
end |
||||
|
||||
def states(states) |
||||
::CryptCheck::State.collect do |level| |
||||
states[level].each_pair |
||||
.select { |_, v| v == true } |
||||
.collect { |name, _| __label name, level } |
||||
end.flatten(1).join(' ').html_safe |
||||
end |
||||
|
||||
def rank_color(rank) |
||||
case rank |
||||
when :'A+', :A |
||||
:great |
||||
when :'B+', :B |
||||
:best |
||||
when :'C+', :C |
||||
:good |
||||
when :D |
||||
nil |
||||
when :E |
||||
:warning |
||||
when :F |
||||
:error |
||||
else |
||||
:critical |
||||
end |
||||
end |
||||
|
||||
def rank_label(rank) |
||||
l = %i(0 V T X).include? rank |
||||
label rank, rank_color(rank), !l |
||||
end |
||||
|
||||
def protocol_label(protocol) |
||||
label protocol.to_sym, protocol.status |
||||
end |
||||
|
||||
def protocol_labels(protocols) |
||||
protocols.collect { |p| protocol_label p }.join("\n").html_safe |
||||
end |
||||
|
||||
def key_label(key) |
||||
return label('Aucune', :error) unless key |
||||
label "#{key[:type].upcase} #{key[:size]} bits", key_color(key) |
||||
end |
||||
|
||||
def key_labels(keys) |
||||
return label('Aucune', :error) if keys.empty? |
||||
keys.sort { |a, b| -1 * (a[:size] <=> b[:size]) }.collect { |k| key_label k }.join("\n").html_safe |
||||
end |
||||
|
||||
def cipher_size_label(cipher) |
||||
size = cipher.size if cipher.is_a? CryptCheck::Tls::Cipher |
||||
label "#{size} bits", cipher_color(size) |
||||
end |
||||
|
||||
def key_color(key) |
||||
case key[:size] |
||||
when nil then |
||||
:default |
||||
when 0...1024 then |
||||
:error |
||||
when 1024...2048 then |
||||
:danger |
||||
when 2048...4096 then |
||||
:warning |
||||
else |
||||
:success |
||||
end |
||||
end |
||||
|
||||
def cipher_color(key) |
||||
case key |
||||
when nil then |
||||
:default |
||||
when 0...128 then |
||||
:error |
||||
when 112...128 then |
||||
:danger |
||||
when 128...256 then |
||||
:success |
||||
else |
||||
:primary |
||||
end |
||||
end |
||||
|
||||
def cipher_name_label(cipher) |
||||
status = cipher.status |
||||
status = :success if status == :good |
||||
label(" ", status) + " #{cipher.name}".html_safe |
||||
end |
||||
|
||||
def cipher_labels(cipher) |
||||
cipher.state.collect { |c, ls| ls.collect { |l| label l.upcase, c } } |
||||
.flatten(1).join("\n").html_safe |
||||
end |
||||
|
||||
def cipher_kex_type_cell(kex) |
||||
color = case kex |
||||
when :ecdh then |
||||
nil |
||||
when :dh then |
||||
:warning |
||||
when :rsa then |
||||
:error |
||||
else |
||||
:critical |
||||
end |
||||
kex ||= 'None' |
||||
cell kex.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_kex_size_cell(kex) |
||||
color = key_color kex |
||||
cell kex&.[](:size), color |
||||
end |
||||
|
||||
def cipher_auth_type_cell(auth) |
||||
color = case auth |
||||
when :ecdsa, :rsa then |
||||
nil |
||||
else |
||||
:critical |
||||
end |
||||
auth ||= 'None' |
||||
cell auth.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_auth_size_cell(auth) |
||||
color = key_color auth |
||||
cell auth&.[](:size), color |
||||
end |
||||
|
||||
def cipher_enc_type_cell(enc) |
||||
color = case enc |
||||
when :chacha20 |
||||
:success |
||||
when nil, :rc4 |
||||
:critical |
||||
end |
||||
enc ||= 'NONE' |
||||
cell enc.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_enc_block_size_cell(enc) |
||||
color = case |
||||
when enc == :stream |
||||
nil |
||||
when enc.nil? |
||||
nil |
||||
when enc <= 64 |
||||
:critical |
||||
when enc < 128 |
||||
:error |
||||
end |
||||
cell enc, color |
||||
end |
||||
|
||||
def cipher_enc_key_size_cell(enc) |
||||
color = case |
||||
when enc.nil? |
||||
nil |
||||
when enc < 128 |
||||
:critical |
||||
end |
||||
cell enc, color |
||||
end |
||||
|
||||
def cipher_enc_mode_cell(enc) |
||||
color = case enc |
||||
when :gcm, :ccm, :aead |
||||
:success |
||||
end |
||||
cell enc.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_mac_type_cell(mac) |
||||
color = case mac |
||||
when :poly1305 then |
||||
:success |
||||
when :sha384, :sha256 then |
||||
nil |
||||
when :sha1 then |
||||
:warning |
||||
else |
||||
:critical |
||||
end |
||||
cell mac.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_mac_size_cell(mac) |
||||
cell mac, nil |
||||
end |
||||
|
||||
def cipher_pfs_cell(pfs) |
||||
return cell 'PFS', nil if pfs |
||||
cell 'No PFS', :error |
||||
end |
||||
private def __label(value, color, state = true) |
||||
color = :default unless color |
||||
color = "state-#{color}" if state |
||||
"<span class=\"badge badge-#{color}\">#{value}</span>" |
||||
end |
||||
|
||||
def label(value, color, state = true) |
||||
__label(value, color, state).html_safe |
||||
end |
||||
|
||||
def cell(value, color, state = true) |
||||
"<td class=\"badge-state-#{color}\">#{value}</td>".html_safe |
||||
end |
||||
|
||||
def labels(level, states, state = true) |
||||
states.each_pair.collect do |name, value| |
||||
color = if value.nil? |
||||
:default |
||||
elsif ::CryptCheck::State.bad? level |
||||
value ? :danger : :success |
||||
else |
||||
value ? :success : :danger |
||||
end |
||||
__label name, color, state |
||||
end.join(' ').html_safe |
||||
end |
||||
|
||||
def states(states) |
||||
::CryptCheck::State.collect do |level| |
||||
states[level].each_pair |
||||
.select { |_, v| v == true } |
||||
.collect { |name, _| __label name, level } |
||||
end.flatten(1).join(' ').html_safe |
||||
end |
||||
|
||||
def rank_color(rank) |
||||
case rank |
||||
when :'A+', :A |
||||
:great |
||||
when :'B+', :B |
||||
:best |
||||
when :'C+', :C |
||||
:good |
||||
when :D |
||||
nil |
||||
when :E |
||||
:warning |
||||
when :F |
||||
:error |
||||
else |
||||
:critical |
||||
end |
||||
end |
||||
|
||||
def rank_label(rank) |
||||
l = %i(0 V T X).include? rank |
||||
label rank, rank_color(rank), !l |
||||
end |
||||
|
||||
def protocol_label(protocol) |
||||
label protocol.to_sym, protocol.status |
||||
end |
||||
|
||||
def protocol_labels(protocols) |
||||
protocols.collect { |p| protocol_label p }.join("\n").html_safe |
||||
end |
||||
|
||||
def key_label(key) |
||||
return label('Aucune', :error) unless key |
||||
label "#{key[:type].upcase} #{key[:size]} bits", key_color(key) |
||||
end |
||||
|
||||
def key_labels(keys) |
||||
return label('Aucune', :error) if keys.empty? |
||||
keys.sort { |a, b| -1 * (a[:size] <=> b[:size]) }.collect { |k| key_label k }.join("\n").html_safe |
||||
end |
||||
|
||||
def cipher_size_label(cipher) |
||||
size = cipher.size if cipher.is_a? CryptCheck::Tls::Cipher |
||||
label "#{size} bits", cipher_color(size) |
||||
end |
||||
|
||||
def key_color(key) |
||||
case key[:size] |
||||
when nil then |
||||
:default |
||||
when 0...1024 then |
||||
:error |
||||
when 1024...2048 then |
||||
:danger |
||||
when 2048...4096 then |
||||
:warning |
||||
else |
||||
:success |
||||
end |
||||
end |
||||
|
||||
def cipher_color(key) |
||||
case key |
||||
when nil then |
||||
:default |
||||
when 0...128 then |
||||
:error |
||||
when 112...128 then |
||||
:danger |
||||
when 128...256 then |
||||
:success |
||||
else |
||||
:primary |
||||
end |
||||
end |
||||
|
||||
def cipher_name_label(cipher) |
||||
status = cipher.status |
||||
status = :success if status == :good |
||||
label(" ", status) + " #{cipher.name}".html_safe |
||||
end |
||||
|
||||
def cipher_labels(cipher) |
||||
cipher.state.collect { |c, ls| ls.collect { |l| label l.upcase, c } } |
||||
.flatten(1).join("\n").html_safe |
||||
end |
||||
|
||||
def cipher_kex_type_cell(kex) |
||||
color = case kex |
||||
when :ecdh |
||||
:success |
||||
when :dh |
||||
:warning |
||||
when :rsa |
||||
:error |
||||
else |
||||
:critical |
||||
end |
||||
kex ||= 'None' |
||||
cell kex.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_kex_size_cell(kex) |
||||
color = key_color kex |
||||
cell kex&.[](:size), color |
||||
end |
||||
|
||||
def cipher_auth_type_cell(auth) |
||||
color = case auth |
||||
when :ecdsa |
||||
:success |
||||
when :rsa |
||||
:default |
||||
else |
||||
:critical |
||||
end |
||||
auth ||= 'None' |
||||
cell auth.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_auth_size_cell(auth) |
||||
color = key_color auth |
||||
cell auth&.[](:size), color |
||||
end |
||||
|
||||
def cipher_enc_type_cell(enc) |
||||
color = case enc |
||||
when :chacha20 |
||||
:success |
||||
when nil, :rc4 |
||||
:critical |
||||
end |
||||
enc ||= 'NONE' |
||||
cell enc.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_enc_block_size_cell(enc) |
||||
color = case |
||||
when :stream |
||||
:default |
||||
when enc <= 64 |
||||
:critical |
||||
when enc < 128 |
||||
:error |
||||
end |
||||
cell enc, color |
||||
end |
||||
|
||||
def cipher_enc_key_size_cell(enc) |
||||
color = case |
||||
when enc < 128 |
||||
:critical |
||||
end |
||||
cell enc, color |
||||
end |
||||
|
||||
def cipher_enc_mode_cell(enc) |
||||
color = case enc |
||||
when :gcm, :ccm, :aead |
||||
:success |
||||
end |
||||
cell enc.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_mac_type_cell(mac) |
||||
color = case mac |
||||
when :poly1305 |
||||
:success |
||||
when :sha384, :sha256 |
||||
:default |
||||
when :sha1 |
||||
:warning |
||||
else |
||||
:critical |
||||
end |
||||
cell mac.to_s.upcase, color |
||||
end |
||||
|
||||
def cipher_mac_size_cell(mac) |
||||
cell mac, :default |
||||
end |
||||
|
||||
def cipher_pfs_cell(pfs) |
||||
return cell 'PFS', nil if pfs |
||||
cell 'No PFS', :error |
||||
end |
||||
end |
||||
|
@ -0,0 +1,189 @@ |
||||
//@import "~bootstrap/scss/bootstrap"; |
||||
|
||||
@import "~bootstrap/scss/functions"; |
||||
@import "~bootstrap/scss/variables"; |
||||
@import "~bootstrap/scss/mixins"; |
||||
@import "~bootstrap/scss/utilities"; |
||||
|
||||
@import "~bootstrap/scss/root"; |
||||
@import "~bootstrap/scss/reboot"; |
||||
//@import "~bootstrap/scss/type"; |
||||
//@import "~bootstrap/scss/images"; |
||||
@import "~bootstrap/scss/containers"; |
||||
@import "~bootstrap/scss/grid"; |
||||
@import "~bootstrap/scss/tables"; |
||||
@import "~bootstrap/scss/forms"; |
||||
@import "~bootstrap/scss/buttons"; |
||||
//@import "~bootstrap/scss/transitions"; |
||||
//@import "~bootstrap/scss/dropdown"; |
||||
//@import "~bootstrap/scss/button-group"; |
||||
@import "~bootstrap/scss/nav"; |
||||
@import "~bootstrap/scss/navbar"; |
||||
//@import "~bootstrap/scss/card"; |
||||
//@import "~bootstrap/scss/accordion"; |
||||
//@import "~bootstrap/scss/breadcrumb"; |
||||
//@import "~bootstrap/scss/pagination"; |
||||
@import "~bootstrap/scss/badge"; |
||||
@import "~bootstrap/scss/alert"; |
||||
@import "~bootstrap/scss/progress"; |
||||
//@import "~bootstrap/scss/list-group"; |
||||
//@import "~bootstrap/scss/close"; |
||||
//@import "~bootstrap/scss/toasts"; |
||||
//@import "~bootstrap/scss/modal"; |
||||
//@import "~bootstrap/scss/tooltip"; |
||||
//@import "~bootstrap/scss/popover"; |
||||
//@import "~bootstrap/scss/carousel"; |
||||
//@import "~bootstrap/scss/spinners"; |
||||
//@import "~bootstrap/scss/offcanvas"; |
||||
//@import "~bootstrap/scss/placeholders"; |
||||
|
||||
//@import "~bootstrap/scss/helpers"; |
||||
|
||||
@import "~bootstrap/scss/utilities/api"; |
||||
|
||||
$fa-font-path: "~font-awesome/fonts"; |
||||
@import "~font-awesome/scss/font-awesome"; |
||||
|
||||
.badge-error, .progress-bar-error { |
||||
background-color: #000; |
||||
} |
||||
|
||||
.badge-critical, .progress-bar-critical { |
||||
background-color: #000; |
||||
} |
||||
|
||||
table.center { |
||||
td { |
||||
text-align: center; |
||||
|
||||
&.left { |
||||
text-align: left; |
||||
} |
||||
} |
||||
} |
||||
|
||||
td.error { |
||||
background-color: #ddd; |
||||
} |
||||
|
||||
.progress { |
||||
margin: 0; |
||||
} |
||||
|
||||
#check, |
||||
#ssh_check, |
||||
#tls_check { |
||||
margin-top: 100px; |
||||
} |
||||
|
||||
$color-critical: #d9534f; |
||||
$color-error: #e4804e; |
||||
$color-warning: #f0ad4e; |
||||
$color-good: #beb052; |
||||
$color-best: #8db457; |
||||
$color-great: #5cb85c; |
||||
|
||||
.badge-state-critical, td.badge-state-critical { |
||||
background-color: $color-critical; |
||||
} |
||||
|
||||
.badge-state-error, td.badge-state-error { |
||||
background-color: $color-error; |
||||
} |
||||
|
||||
.badge-state-warning, td.badge-state-warning { |
||||
background-color: $color-warning; |
||||
} |
||||
|
||||
.badge-state-good, td.badge-state-good { |
||||
background-color: $color-good; |
||||
} |
||||
|
||||
.badge-state-best, td.badge-state-best { |
||||
background-color: $color-best; |
||||
} |
||||
|
||||
.badge-state-great, td.badge-state-great { |
||||
background-color: $color-great; |
||||
} |
||||
|
||||
.badge-state-default { |
||||
background-color: $secondary; |
||||
} |
||||
|
||||
.badge-state-success, td.badge-state-success { |
||||
background-color: $color-great; |
||||
} |
||||
|
||||
$lighten-alert: 35%; |
||||
.alert-critical { |
||||
background-color: lighten($color-critical, $lighten-alert); |
||||
color: $color-critical; |
||||
border-color: $color-critical; |
||||
} |
||||
|
||||
.alert-error { |
||||
background-color: lighten($color-error, $lighten-alert); |
||||
color: $color-error; |
||||
border-color: $color-error; |
||||
} |
||||
|
||||
.alert-warning { |
||||
background-color: lighten($color-warning, $lighten-alert); |
||||
color: $color-warning; |
||||
border-color: $color-warning; |
||||
} |
||||
|
||||
.alert-good { |
||||
background-color: lighten($color-good, $lighten-alert); |
||||
color: $color-good; |
||||
border-color: $color-good; |
||||
} |
||||
|
||||
.alert-best { |
||||
background-color: lighten($color-best, $lighten-alert); |
||||
color: $color-best; |
||||
border-color: $color-best; |
||||
} |
||||
|
||||
.alert-great { |
||||
background-color: lighten($color-great, $lighten-alert); |
||||
color: $color-great; |
||||
border-color: $color-great; |
||||
} |
||||
|
||||
table.scoring img { |
||||
width: 30px; |
||||
} |
||||
|
||||
#about, #help { |
||||
margin-bottom: 20px; |
||||
} |
||||
|
||||
#about, #help .scoring { |
||||
p { |
||||
font-size: 1.25em; |
||||
} |
||||
} |
||||
|
||||
#donorbox { |
||||
background: #2d81c5 url("../images/donorbox.png") no-repeat 18px center; |
||||
color: #fff; |
||||
text-decoration: none; |
||||
font-family: Verdana, sans-serif; |
||||
display: inline-block; |
||||
font-size: 16px; |
||||
padding: 13px 17px 13px 56px; |
||||
-webkit-border-radius: 2px; |
||||
-moz-border-radius: 2px; |
||||
border-radius: 2px; |
||||
box-shadow: 0 1px 0 0 #1f5a89; |
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3); |
||||
} |
||||
|
||||
#liberapay, #donorbox, #paypal { |
||||
img { |
||||
height: 50px; |
||||
max-width: 140px; |
||||
} |
||||
} |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1 @@ |
||||
import 'css/application' |
@ -1,39 +1,18 @@ |
||||
<header> |
||||
<nav class="navbar navbar-inverse navbar-fixed-top"> |
||||
<div class="container"> |
||||
<div class="navbar-header"> |
||||
<span> |
||||
<%= link_to 'CryptCheck', root_path, class: %i(navbar-brand) %> |
||||
</span> |
||||
</div> |
||||
<ul class="nav navbar-nav"> |
||||
<li><%= link_to 'HTTPS / SMTP / XMPP', root_path %></li> |
||||
<li><%= link_to 'TLS', tls_path %></li> |
||||
<li><%= link_to 'SSH', ssh_path %></li> |
||||
</ul> |
||||
<ul class="nav navbar-nav navbar-right"> |
||||
<li><%= link_to t('User agent compatibility'), suite_path %></li> |
||||
<li><%= link_to t('Supported cipher suites'), ciphers_path %></li> |
||||
<li><%= link_to t('Help'), help_path %></li> |
||||
<li><%= link_to t('About'), about_path %></li> |
||||
<!-- |
||||
<li class="dropdown"> |
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> |
||||
Hall of f/sh·ame |
||||
<span class="caret"></span> |
||||
</a> |
||||
<ul class="dropdown-menu"> |
||||
<li><a href="#">Misc</a></li> |
||||
<li><a href="#">Syndicats</a></li> |
||||
<li><a href="#">SecureDrop</a></li> |
||||
<li><a href="#">Presse</a></li> |
||||
<li><a href="#">Top 500 Alexa</a></li> |
||||
<li><a href="#">Porn</a></li> |
||||
<li><a href="#">US gov</a></li> |
||||
</ul> |
||||
</li> |
||||
--> |
||||
</ul> |
||||
</div> |
||||
</nav> |
||||
</header> |
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4"> |
||||
<div class="container-fluid"> |
||||
<%= link_to 'CryptCheck', root_path, class: %i(navbar-brand) %> |
||||
|
||||
<ul class="navbar-nav mr-auto me-auto mb-2 mb-lg-0"> |
||||
<li class="nav-item"><%= link_to 'HTTPS / SMTP / XMPP', root_path, class: %i(nav-link) %></li> |
||||
<li class="nav-item"><%= link_to 'TLS', tls_path, class: %i(nav-link) %></li> |
||||
<li class="nav-item"><%= link_to 'SSH', ssh_path, class: %i(nav-link) %></li> |
||||
</ul> |
||||
|
||||
<ul class="navbar-nav mr-auto ms-auto mb-2 mb-lg-0"> |
||||
<li class="nav-item"><%= link_to t('User agent compatibility'), suite_path, class: %i(nav-link) %></li> |
||||
<li class="nav-item"><%= link_to t('Supported cipher suites'), ciphers_path, class: %i(nav-link) %></li> |
||||
<li class="nav-item"><%= link_to t('Help'), help_path, class: %i(nav-link) %></li> |
||||
<li class="nav-item"><%= link_to t('About'), about_path, class: %i(nav-link) %></li> |
||||
</ul> |
||||
</div> |
||||
</nav> |
||||
|
@ -1,4 +0,0 @@ |
||||
<noscript> |
||||
<img src="<%= config.url %>?idsite=<%= config.site %>&rec=1" style="border:0;" alt=""/> |
||||
</noscript> |
||||
|
@ -1,17 +1,17 @@ |
||||
<!DOCTYPE html> |
||||
<% data = Matomo.enabled? ? { matomo_url: Matomo.url, matomo_site: Matomo.site } : {} %> |
||||
<%= content_tag :html, data: data do %> |
||||
<head> |
||||
<title>CryptCheck</title> |
||||
<%= stylesheet_link_tag 'application', media: 'all' %> |
||||
<%= javascript_include_tag 'application' %> |
||||
<%= csrf_meta_tags %> |
||||
<%= yield :head %> |
||||
</head> |
||||
<body> |
||||
<%= render partial: 'headers' %> |
||||
<html> |
||||
<head> |
||||
<title>CryptCheck</title> |
||||
<%= stylesheet_pack_tag 'application', media: 'all' %> |
||||
<%= javascript_pack_tag 'application' %> |
||||
<%= csrf_meta_tags %> |
||||
<%= yield :head %> |
||||
</head> |
||||
<body> |
||||
<%= render partial: 'headers' %> |
||||
<main class="container"> |
||||
<%= render partial: 'flash' %> |
||||
<%= yield %> |
||||
<%= render partial: 'matomo', locals: { config: Matomo } if Matomo.enabled? %> |
||||
</body> |
||||
<% end %> |
||||
</main> |
||||
</body> |
||||
</html> |
||||
|
@ -1,20 +1,17 @@ |
||||
<div id="check" class="container"> |
||||
<div class="row"> |
||||
<div class="col-sm-12"> |
||||
<h1><%= t 'Check your domain' %></h1> |
||||
<%= form_tag root_path do %> |
||||
<div class="form-group"> |
||||
<div class="col-sm-8"> |
||||
<%= text_field_tag :host, nil, class: %i(form-control input-lg), placeholder: 'your-site.com' %> |
||||
</div> |
||||
<div class="col-sm-2"> |
||||
<%= select_tag :type, options_for_select({'HTTPS' => :https, 'SMTP' => :smtp, 'XMPP' => :xmpp}), class: %i(form-control input-lg) %> |
||||
</div> |
||||
<div class="col-sm-2"> |
||||
<%= submit_tag t('Test me!'), class: %i(form-control btn btn-primary input-lg pull-right) %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
<h1><%= t 'Check your domain' %></h1> |
||||
<%= form_tag root_path, class: %i[container-fluid] do %> |
||||
<div class="row input-group input-group-lg mb-3"> |
||||
<div class="col input-group-lg"> |
||||
<%= text_field_tag :host, nil, class: %i[form-control], |
||||
placeholder: 'your-site.com', required: true %> |
||||
</div> |
||||
|
||||
<div class="col-auto input-group-lg"> |
||||
<%= select_tag :type, options_for_select({ 'HTTPS' => :https, 'SMTP' => :smtp, 'XMPP' => :xmpp }), class: %i[form-select] %> |
||||
</div> |
||||
|
||||
<div class="col-auto input-group-lg"> |
||||
<%= submit_tag t('Test me!'), class: %i[btn btn-outline-primary] %> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
|
@ -1,18 +1,14 @@ |
||||
<div id="check" class="container"> |
||||
<div class="row"> |
||||
<div class="col-sm-12"> |
||||
<h1><%= t 'User agent compatibility' %></h1> |
||||
<h2><%= t 'Cipher suite' %></h2> |
||||
<%= form_tag suite_path do %> |
||||
<div class="form-group"> |
||||
<div class="col-sm-10"> |
||||
<%= text_field_tag :suite, nil, class: %i(form-control input-lg), placeholder: 'EECDH+AES' %> |
||||
</div> |
||||
<div class="col-sm-2"> |
||||
<%= submit_tag t('Test me!'), class: %i(form-control btn btn-primary input-lg pull-right) %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
<h1><%= t 'User agent compatibility' %></h1> |
||||
<h2><%= t 'Cipher suite' %></h2> |
||||
<%= form_tag suite_path, class: %i[container-fluid] do %> |
||||
<div class="row input-group input-group-lg mb-3"> |
||||
<div class="col input-group-lg"> |
||||
<%= text_field_tag :suite, nil, class: %i[form-control], placeholder: 'EECDH+AES' %> |
||||
</div> |
||||
|
||||
<div class="col-auto input-group-lg"> |
||||
<%= submit_tag t('Test me!'), class: %i[btn btn-outline-primary] %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
</div> |
||||
|
@ -1,21 +1,21 @@ |
||||
<div id="ssh_check" class="container"> |
||||
<div class="row"> |
||||
<div class="col-sm-12"> |
||||
<h1><%= t 'Check your SSH server' %></h1> |
||||
<%= form_tag root_path do %> |
||||
<div class="form-group"> |
||||
<div class="col-sm-8"> |
||||
<%= text_field_tag :host, nil, class: %i(form-control input-lg), placeholder: 'your-site.com' %> |
||||
</div> |
||||
<div class="col-sm-2"> |
||||
<%= text_field_tag :port, nil, class: %i(form-control input-lg), placeholder: 'port' %> |
||||
</div> |
||||
<div class="col-sm-2"> |
||||
<%= hidden_field_tag :type, :ssh %> |
||||
<%= submit_tag t('Test me!'), class: %i(form-control btn btn-primary input-lg pull-right) %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
<h1><%= t 'Check your SSH server' %></h1> |
||||
<%= form_tag root_path, class: %i[container-fluid] do %> |
||||
<%= hidden_field_tag :type, :ssh %> |
||||
<div class="row input-group input-group-lg mb-3"> |
||||
<div class="col input-group-lg"> |
||||
<%= text_field_tag :host, nil, class: %i[form-control], |
||||
placeholder: 'your-site.com', required: true %> |
||||
</div> |
||||
|
||||
<div class="col-auto input-group-lg"> |
||||
<%= text_field_tag :port, nil, class: %i[form-control], placeholder: 'port', |
||||
type: :number, min: 0, max: 65535, required: true |
||||
%> |
||||
</div> |
||||
|
||||
<div class="col-auto input-group-lg"> |
||||
<%= submit_tag t('Test me!'), class: %i[btn btn-outline-primary] %> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
|
||||
|
@ -1,21 +1,20 @@ |
||||
<div id="tls_check" class="container"> |
||||
<div class="row"> |
||||
<div class="col-sm-12"> |
||||
<h1><%= t 'Check your TLS server' %></h1> |
||||
<%= form_tag root_path do %> |
||||
<div class="form-group"> |
||||
<div class="col-sm-8"> |
||||
<%= text_field_tag :host, nil, class: %i(form-control input-lg), placeholder: 'your-site.com' %> |
||||
</div> |
||||
<div class="col-sm-2"> |
||||
<%= text_field_tag :port, nil, class: %i(form-control input-lg), placeholder: 'port' %> |
||||
</div> |
||||
<div class="col-sm-2"> |
||||
<%= hidden_field_tag :type, :tls %> |
||||
<%= submit_tag t('Test me!'), class: %i(form-control btn btn-primary input-lg pull-right) %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
<h1><%= t 'Check your TLS server' %></h1> |
||||
<%= form_tag root_path, class: %i[container-fluid] do %> |
||||
<%= hidden_field_tag :type, :tls %> |
||||
<div class="row input-group input-group-lg mb-3"> |
||||
<div class="col input-group-lg"> |
||||
<%= text_field_tag :host, nil, class: %i[form-control], |
||||
placeholder: 'your-site.com', required: true %> |
||||
</div> |
||||
|
||||
<div class="col-auto input-group-lg"> |
||||
<%= text_field_tag :port, nil, class: %i[form-control], placeholder: 'port', |
||||
type: :number, min: 0, max: 65535, required: true %> |
||||
</div> |
||||
|
||||
<div class="col-auto input-group-lg"> |
||||
<%= submit_tag t('Test me!'), class: %i[btn btn-outline-primary] %> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<% end %> |
||||
|
||||
|
@ -0,0 +1,82 @@ |
||||
module.exports = function(api) { |
||||
var validEnv = ['development', 'test', 'production'] |
||||
var currentEnv = api.env() |
||||
var isDevelopmentEnv = api.env('development') |
||||
var isProductionEnv = api.env('production') |
||||
var isTestEnv = api.env('test') |
||||