mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Rearrange code
Just a slight rearrangement of the code in order to remove some redundancy.
This commit is contained in:
parent
76c34dd148
commit
e2161aef5e
17
testssl.sh
17
testssl.sh
@ -5013,24 +5013,15 @@ run_server_preference() {
|
||||
|
||||
for i in 1 2 3 4 5 6; do
|
||||
if [[ -n "${cipher[i]}" ]]; then # cipher not empty
|
||||
if [[ -z "$prev_cipher" ]]; then # previous one empty
|
||||
#outln
|
||||
if [[ -z "$prev_cipher" ]] || [[ "$prev_cipher" != "${cipher[i]}" ]]; then
|
||||
[[ -n "$prev_cipher" ]] && outln
|
||||
if [[ -z "$SHOW_RFC" ]]; then
|
||||
printf -- " %-30s %s" "${cipher[i]}:" "${proto[i]}" # print out both
|
||||
else
|
||||
printf -- " %-51s %s" "${cipher[i]}:" "${proto[i]}" # print out both
|
||||
fi
|
||||
else # previous NOT empty
|
||||
if [[ "$prev_cipher" == "${cipher[i]}" ]]; then # and previous protocol same cipher
|
||||
out ", ${proto[i]}" # same cipher --> only print out protocol behind it
|
||||
else
|
||||
outln
|
||||
if [[ -z "$SHOW_RFC" ]]; then
|
||||
printf -- " %-30s %s" "${cipher[i]}:" "${proto[i]}" # print out both
|
||||
else
|
||||
printf -- " %-51s %s" "${cipher[i]}:" "${proto[i]}" # print out both
|
||||
fi
|
||||
fi
|
||||
else
|
||||
out ", ${proto[i]}" # same cipher --> only print out protocol behind it
|
||||
fi
|
||||
prev_cipher="${cipher[i]}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user