2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-04 15:03:41 +01:00

Merge pull request #107 from tomato42/ecdsa-certs

properly detect ECDSA certs for size compare
This commit is contained in:
Julien Vehent 2015-11-19 08:54:43 -05:00
commit a9cfcc8376

View File

@ -762,6 +762,7 @@ display_results_in_terminal() {
fi
local cipher_data=($cipher)
if [[ $ctr -eq 1 ]]; then
cipher="${cipher_data[1]}"
pubkey="${cipher_data[2]}"
sigalg="${cipher_data[3]}"
trusted="${cipher_data[4]}"
@ -826,7 +827,7 @@ display_results_in_terminal() {
done|column -t
echo
if [[ ($sigalg =~ RSA && $pubkey -ge 2047) || ($sigalg =~ ECDSA && $pubkey -gt 255) ]]; then
if [[ ($sigalg =~ RSA && $pubkey -ge 2047) || ($cipher =~ ECDSA && $pubkey -gt 255) ]]; then
pubkey="${c_green}${pubkey}${c_reset}"
else
pubkey="${c_red}${pubkey}${c_reset}"