Add OK/KO flags in terminal output

This commit is contained in:
Julien Vehent 2015-09-18 12:36:26 -04:00
parent 249b3be23d
commit 55918f3afb
1 changed files with 34 additions and 11 deletions

View File

@ -750,27 +750,50 @@ display_results_in_terminal() {
fi fi
done|column -t done|column -t
echo echo
if [[ $different != "True" ]]; then pubkey_eval="KO"
if [[ "$trusted" == "True" ]]; then if [[ ! -z $pubkey ]]; then
echo "Certificate: trusted, $pubkey bit, $sigalg signature" if (( $pubkey > 2047 )); then
else pubkey_eval="OK"
echo "Certificate: UNTRUSTED, $pubkey bit, $sigalg signature"
fi fi
fi
sigalg_eval="OK"
if [[ $sigalg =~ md5|sha1 ]]; then
sigalg_eval="KO"
fi
if [[ $trusted == "True" ]]; then
trusted="trusted [OK]"
else
trusted="untrusted [KO]"
fi
if [[ $different != "True" ]]; then
echo "Certificate: $trusted, $pubkey bit [$pubkey_eval], $sigalg signature [$sigalg_eval]"
echo "TLS ticket lifetime hint: $tickethint" echo "TLS ticket lifetime hint: $tickethint"
fi fi
if [[ $ocspstaple == "True" ]]; then if [[ $ocspstaple == "True" ]]; then
echo "OCSP stapling: supported" echo "OCSP stapling: supported [OK]"
else else
echo "OCSP stapling: not supported" echo "OCSP stapling: not supported [KO]"
fi fi
if [[ $serverside == "True" ]]; then if [[ $serverside == "True" ]]; then
echo "Cipher ordering: server" echo "Cipher ordering: server [OK]"
else else
echo "Cipher ordering: client" echo "Cipher ordering: client [KO]"
fi fi
if [[ $TEST_CURVES == "True" ]]; then if [[ $TEST_CURVES == "True" ]]; then
echo "Curves ordering: $curvesordering" if [[ $curvesordering == "server" ]]; then
echo "Curves fallback: $fallback_supported" curvesordering="$curvesordering [OK]"
else
if [[ $curvesordering == "" ]]; then
curvesordering="none"
fi
curvesordering="$curvesordering [KO]"
fi
if [[ $fallback_supported == "True" ]]; then
fallback_supported="$fallback_supported [OK]"
else
fallback_supported="$fallback_supported [KO]"
fi
echo "Curves ordering: $curvesordering - fallback: $fallback_supported"
fi fi
if [[ $TEST_TOLERANCE == "True" ]]; then if [[ $TEST_TOLERANCE == "True" ]]; then