mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Merge branch '2.9dev_html' of https://github.com/drwetter/testssl.sh into 2.9dev_html
This commit is contained in:
commit
68cf590366
22
testssl.sh
22
testssl.sh
@ -5013,7 +5013,7 @@ read_dhbits_from_file() {
|
||||
|
||||
|
||||
run_server_preference() {
|
||||
local cipher1 cipher2
|
||||
local cipher1 cipher2 prev_cipher=""
|
||||
local default_cipher default_cipher_ossl default_proto
|
||||
local remark4default_cipher supported_sslv2_ciphers
|
||||
local -a cipher proto
|
||||
@ -5279,25 +5279,17 @@ run_server_preference() {
|
||||
|
||||
for i in 1 2 3 4 5 6; do
|
||||
if [[ -n "${cipher[i]}" ]]; then # cipher not empty
|
||||
if [[ -z "${cipher[i-1]}" ]]; then # previous one empty
|
||||
#outln
|
||||
if [[ -z "$prev_cipher" ]] || [[ "$prev_cipher" != "${cipher[i]}" ]]; then
|
||||
[[ -n "$prev_cipher" ]] && outln
|
||||
if [[ "$DISPLAY_CIPHERNAMES" =~ openssl ]]; then
|
||||
out "$(printf -- " %-30s %s" "${cipher[i]}:" "${proto[i]}")" # print out both
|
||||
else
|
||||
out "$(printf -- " %-51s %s" "${cipher[i]}:" "${proto[i]}")" # print out both
|
||||
fi
|
||||
else # previous NOT empty
|
||||
if [[ "${cipher[i-1]}" == "${cipher[i]}" ]]; then # and previous protocol same cipher
|
||||
out ", ${proto[i]}" # same cipher --> only print out protocol behind it
|
||||
else
|
||||
outln
|
||||
if [[ "$DISPLAY_CIPHERNAMES" =~ openssl ]]; then
|
||||
out "$(printf -- " %-30s %s" "${cipher[i]}:" "${proto[i]}")" # print out both
|
||||
else
|
||||
out "$(printf -- " %-51s %s" "${cipher[i]}:" "${proto[i]}")" # print out both
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
out ", ${proto[i]}" # same cipher --> only print out protocol behind it
|
||||
fi
|
||||
prev_cipher="${cipher[i]}"
|
||||
fi
|
||||
fileout "order_${proto[i]}_cipher" "INFO" "Default cipher on ${proto[i]}: ${cipher[i]} $remark4default_cipher"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user