mirror of
https://github.com/mozilla/cipherscan.git
synced 2024-11-05 07:23:42 +01:00
Fix test of all ciphers individually
This commit is contained in:
parent
d6556f5620
commit
7c55288a7e
@ -170,17 +170,16 @@ for result in "${results[@]}"; do
|
||||
echo $result|grep -v '(NONE)'
|
||||
done|column -t
|
||||
|
||||
# If asked, test every single cipher individually
|
||||
if [ $ALLCIPHERS -gt 0 ]; then
|
||||
echo; echo "All accepted ciphersuites"
|
||||
for cipher in $($OPENSSLBIN ciphers -v ALL:COMPLEMENTOFALL 2>/dev/null |awk '{print $1}'|sort|uniq); do
|
||||
osslcommand="timeout $TIMEOUT $OPENSSLBIN s_client -connect $TARGET -cipher $cipher"
|
||||
for c in $($OPENSSLBIN ciphers -v ALL:COMPLEMENTOFALL 2>/dev/null |awk '{print $1}'|sort|uniq); do
|
||||
r="fail"
|
||||
osslcommand="timeout $TIMEOUT $OPENSSLBIN s_client -connect $TARGET -cipher $c"
|
||||
test_cipher_on_target "$osslcommand"
|
||||
r=$?
|
||||
if [ $r -eq 0 ]; then
|
||||
echo -en '\E[40;32m'"OK"; tput sgr0
|
||||
else
|
||||
echo -en '\E[40;31m'"KO"; tput sgr0
|
||||
if [ $? -eq 0 ]; then
|
||||
r="pass"
|
||||
fi
|
||||
echo " $cipher"
|
||||
echo "$c $r"|awk '{printf "%-35s %s\n",$1,$2}'
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user