mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Add grade cap reasons and warnings to JSON/CSV
This commit is contained in:
parent
13a76bc719
commit
db84e5c87c
28
testssl.sh
28
testssl.sh
@ -20541,7 +20541,7 @@ run_rating() {
|
|||||||
local c1_score c2_score c3_score c1_wscore c2_wscore c3_wscore
|
local c1_score c2_score c3_score c1_wscore c2_wscore c3_wscore
|
||||||
local c1_worst c1_best
|
local c1_worst c1_best
|
||||||
local c3_worst c3_best c3_worst_cb c3_best_cb
|
local c3_worst c3_best c3_worst_cb c3_best_cb
|
||||||
local old_ifs=$IFS sorted_reasons sorted_warnings reason_loop=0 warning_loop=0
|
local old_ifs=$IFS sorted_reasons sorted_warnings reason_nr=0 warning_nr=0
|
||||||
|
|
||||||
outln "\n";
|
outln "\n";
|
||||||
pr_headlineln " Rating (experimental) "
|
pr_headlineln " Rating (experimental) "
|
||||||
@ -20705,35 +20705,25 @@ run_rating() {
|
|||||||
|
|
||||||
# Pretty print - again, it's just nicer to read
|
# Pretty print - again, it's just nicer to read
|
||||||
for reason in "${sorted_reasons[@]}"; do
|
for reason in "${sorted_reasons[@]}"; do
|
||||||
if [[ $reason_loop -eq 0 ]]; then
|
if [[ $reason_nr -eq 0 ]]; then
|
||||||
pr_bold " Grade cap reasons "; outln "$reason"
|
pr_bold " Grade cap reasons "; outln "$reason"
|
||||||
let reason_loop++
|
|
||||||
else
|
else
|
||||||
outln " $reason"
|
outln " $reason"
|
||||||
fi
|
fi
|
||||||
|
let reason_nr++
|
||||||
|
fileout "grade_cap_reason_${reason_nr}" "INFO" "$reason"
|
||||||
done
|
done
|
||||||
|
|
||||||
for warning in "${sorted_warnings[@]}"; do
|
for warning in "${sorted_warnings[@]}"; do
|
||||||
if [[ $warning_loop -eq 0 ]]; then
|
if [[ $warning_nr -eq 0 ]]; then
|
||||||
pr_bold " Grade warning "; prln_svrty_medium "$warning"
|
pr_bold " Grade warning "; prln_svrty_medium "$warning"
|
||||||
let warning_loop++
|
|
||||||
else
|
else
|
||||||
prln_svrty_medium " $warning"
|
prln_svrty_medium " $warning"
|
||||||
fi
|
fi
|
||||||
|
let warning_nr++
|
||||||
|
fileout "grade_cap_warning_${warning_nr}" "INFO" "$warning"
|
||||||
done
|
done
|
||||||
|
|
||||||
case $GRADE_CAP in
|
|
||||||
# A-E: WIP
|
|
||||||
A) fileout "grade_cap_reasons" "INFO" "" ;;
|
|
||||||
B) fileout "grade_cap_reasons" "INFO" "" ;;
|
|
||||||
C) fileout "grade_cap_reasons" "INFO" "" ;;
|
|
||||||
D) fileout "grade_cap_reasons" "INFO" "" ;;
|
|
||||||
E) fileout "grade_cap_reasons" "INFO" "" ;;
|
|
||||||
M) fileout "grade_cap_reasons" "INFO" "SAN / CN mismatch" ;;
|
|
||||||
F) fileout "grade_cap_reasons" "INFO" "Severe vulnerability or cryptographic problem" ;;
|
|
||||||
T) fileout "grade_cap_reasons" "INFO" "Issue with certificate" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user