2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-22 14:23:41 +01:00

Add PFS key size to results

This commit is contained in:
Julien Vehent 2013-09-24 17:02:31 +02:00
parent 4a51ef71d6
commit 627701ec63

View File

@ -26,13 +26,13 @@ test_cipher_on_target() {
$REQUEST $REQUEST
EOF EOF
# Parse the result # Parse the result
result="$(grep "New, " $tmp|awk '{print $5}') $(grep -E "^\s+Protocol\s+:" $tmp|awk '{print $3}')" result="$(grep "New, " $tmp|awk '{print $5}') $(grep -E "^\s+Protocol\s+:" $tmp|awk '{print $3}') $(grep 'Server Temp Key' $tmp|awk '{print $4$5$6$7}')"
rm "$tmp" rm "$tmp"
if [ -z "$result" ]; then if [ -z "$result" ]; then
verbose "handshake failed, no ciphersuite was returned" verbose "handshake failed, no ciphersuite was returned"
result='ConnectionFailure' result='ConnectionFailure'
return 2 return 2
elif [ "$result" == '(NONE) ' ]; then elif [ "$result" == '(NONE) ' ]; then
verbose "handshake failed, server returned ciphersuite '$result'" verbose "handshake failed, server returned ciphersuite '$result'"
return 1 return 1
else else
@ -121,9 +121,9 @@ for cipher in "${cipherspref[@]}"; do
done done
if [ $DOBENCHMARK -eq 1 ]; then if [ $DOBENCHMARK -eq 1 ]; then
header="prio ciphersuite protocol avg_handshake_microsec" header="prio ciphersuite protocol pfs_keysize avg_handshake_microsec"
else else
header="prio ciphersuite protocol" header="prio ciphersuite protocol pfs_keysize"
fi fi
ctr=0 ctr=0
for result in "${results[@]}"; do for result in "${results[@]}"; do