From 532ff712aaceaae29a02f82e05529f0dd29c9f6b Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Sun, 1 Jan 2017 14:06:43 -0800 Subject: [PATCH 1/2] cipherscan: always define a curves_ordering column value Signed-off-by: Steven Noonan --- cipherscan | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cipherscan b/cipherscan index 5f79abd..853db26 100755 --- a/cipherscan +++ b/cipherscan @@ -659,6 +659,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" @@ -783,6 +784,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 @@ -803,11 +806,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 From 981cf0744e11c5825f907ba5a5003f423a03d01c Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Sun, 1 Jan 2017 13:38:38 -0800 Subject: [PATCH 2/2] cipherscan: fix benchmark mode output The microsecond measurement column wasn't being rendered. Signed-off-by: Steven Noonan --- cipherscan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cipherscan b/cipherscan index 853db26..64cc018 100755 --- a/cipherscan +++ b/cipherscan @@ -837,8 +837,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