mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Fix list-reversal (and comment)
Use "tac" (which reverses things) rather than "sort -r" (which will reverse a list only if it was sorted already). Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
This commit is contained in:
parent
2157342d89
commit
7a4106e839
@ -1439,7 +1439,7 @@ server_preference() {
|
||||
ret=6
|
||||
else
|
||||
cipher1=$(grep -wa Cipher $TMPFILE | egrep -avw "New|is" | sed -e 's/^ \+Cipher \+://' -e 's/ //g')
|
||||
list2=$(echo $list1 | tr ':' '\n' | sort -r | tr '\n' ':') # pr_reverse the list
|
||||
list2=$(echo -n $list1':' | tac -s':' | sed -e 's/:$//') # reverse the list
|
||||
$OPENSSL s_client $STARTTLS -cipher $list2 -connect $NODEIP:$PORT $PROXY $SNI </dev/null 2>/dev/null >$TMPFILE
|
||||
cipher2=$(grep -wa Cipher $TMPFILE | egrep -avw "New|is" | sed -e 's/^ \+Cipher \+://' -e 's/ //g')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user