[Rating] Fix cipher strength rating, and add penalty for weak cipher suites

This commit is contained in:
Magnus Larsen 2021-11-06 08:45:55 +01:00
parent 75dd8fc89b
commit cc25613138

View File

@ -1116,6 +1116,9 @@ set_ciph_str_score() {
[[ $size -gt $CIPH_STR_BEST ]] && let CIPH_STR_BEST=$size
[[ $size -lt $CIPH_STR_WORST ]] && let CIPH_STR_WORST=$size
[[ $size -lt 112 || $size == "None" ]] && set_grade_cap "F" "Using cipher suites weaker than 112 bits"
return 0
}
@ -22001,7 +22004,7 @@ run_rating() {
# Determine the score for the worst key
if [[ $c3_worst_cb -gt 0 && $c3_worst_cb -lt 128 ]]; then
c3_worst=20
elif [[ $c3_worst_cb -lt 256 ]]; then
elif [[ $c3_worst_cb -ge 128 && $c3_worst_cb -lt 256 ]]; then
c3_worst=80
elif [[ $c3_worst_cb -ge 256 ]]; then
c3_worst=100