2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-05 15:33:42 +01:00

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 1b917883b8

View File

@ -750,27 +750,48 @@ display_results_in_terminal() {
fi fi
done|column -t done|column -t
echo echo
pubkey_eval="KO"
if (( $pubkey > 2047 )); then
pubkey_eval="OK"
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 if [[ $different != "True" ]]; then
if [[ "$trusted" == "True" ]]; then echo "Certificate: $trusted, $pubkey bit [$pubkey_eval], $sigalg signature [$sigalg_eval]"
echo "Certificate: trusted, $pubkey bit, $sigalg signature"
else
echo "Certificate: UNTRUSTED, $pubkey bit, $sigalg signature"
fi
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