mirror of
https://github.com/mozilla/cipherscan.git
synced 2024-11-21 22:13:40 +01:00
Merge pull request #134 from tycho/fix-benchmark-output
fix -b (benchmark) output
This commit is contained in:
commit
757bfefc6d
13
cipherscan
13
cipherscan
@ -662,6 +662,7 @@ test_cipher_on_target() {
|
||||
else
|
||||
# resolve the openssl curve to the proper IANA name
|
||||
current_curves="$(get_curve_name "$(echo $pfs|cut -d ',' -f2)")"
|
||||
curves_ordering="unknown"
|
||||
fi
|
||||
fi
|
||||
result="$cipher $protocols $pubkey $sigalg $trusted $tickethint $ocspstaple $npn $pfs $current_curves $curves_ordering"
|
||||
@ -786,6 +787,8 @@ display_results_in_terminal() {
|
||||
npn="${cipher_data[7]}"
|
||||
if [[ $TEST_CURVES == "True" && -n ${cipher_data[10]} ]]; then
|
||||
curvesordering="${cipher_data[10]}"
|
||||
else
|
||||
curvesordering="unknown"
|
||||
fi
|
||||
else
|
||||
if [[ "$pubkey" != "${cipher_data[2]}" ]]; then
|
||||
@ -806,11 +809,7 @@ display_results_in_terminal() {
|
||||
if [[ "$npn" != "${cipher_data[7]}" ]]; then
|
||||
different=True
|
||||
fi
|
||||
if [[ -z $curvesordering && -n "${cipher_data[10]}" ]]; then
|
||||
curvesordering="${cipher_data[10]}"
|
||||
fi
|
||||
if [[ -n $curvesordering && "$curvesordering" != "${cipher_data[10]}" ]]; then
|
||||
echo "CURVESORDERING"
|
||||
if [[ "$TEST_CURVES" == "True" && "$curvesordering" != "${cipher_data[10]}" ]]; then
|
||||
different=True
|
||||
fi
|
||||
fi
|
||||
@ -841,8 +840,8 @@ display_results_in_terminal() {
|
||||
if [[ $different == "True" ]]; then
|
||||
echo "$result"|grep -v '(NONE)'
|
||||
else
|
||||
# prints priority, ciphersuite, protocols and pfs
|
||||
awk '!/(NONE)/{print $1 " " $2 " " $3 " " $10 " " $11}' <<<"$result"
|
||||
# prints priority, ciphersuite, protocols, pfs and benchmark time (if any)
|
||||
awk '!/(NONE)/{print $1 " " $2 " " $3 " " $10 " " $11 " " $13 }' <<<"$result"
|
||||
fi
|
||||
done|column -t
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user