compat.sh: don't start server if no ciphersuite

This commit is contained in:
Manuel Pégourié-Gonnard 2014-02-27 11:11:33 +01:00
parent 79d090b340
commit 42d195acc1

View file

@ -74,7 +74,8 @@ filter()
NEW_LIST="$NEW_LIST $( echo "$i" | grep "$FILTER" )" NEW_LIST="$NEW_LIST $( echo "$i" | grep "$FILTER" )"
done done
echo "$NEW_LIST" # make sure the list is actually empty if it contains only whitespace
echo "$NEW_LIST" | sed -e 's/^[[:space:]]*//'
} }
setup_ciphersuites() setup_ciphersuites()
@ -374,11 +375,15 @@ add_polarssl_ciphersuites()
esac esac
# Filter new ciphersuites and add them # Filter new ciphersuites and add them
if [ "X" != "X$FILTER" ]; if [ "X" != "X$FILTER" ]; then
then
ADD_CIPHERS=$( filter "$ADD_CIPHERS" "$FILTER" ) ADD_CIPHERS=$( filter "$ADD_CIPHERS" "$FILTER" )
fi fi
P_CIPHERS="$P_CIPHERS $ADD_CIPHERS" # avoid P_CIPHERS being only ' '
if [ "X" != "X$P_CIPHERS" ]; then
P_CIPHERS="$P_CIPHERS $ADD_CIPHERS"
else
P_CIPHERS="$ADD_CIPHERS"
fi
} }
setup_arguments() setup_arguments()
@ -561,27 +566,31 @@ for VERIFY in $VERIFIES; do
setup_arguments setup_arguments
setup_ciphersuites setup_ciphersuites
start_server "OpenSSL" if [ "X" != "X$P_CIPHERS" ]; then
start_server "OpenSSL"
for i in $P_CIPHERS; do
run_client PolarSSL $i
done
stop_server
fi
for i in $P_CIPHERS; do if [ "X" != "X$O_CIPHERS" ]; then
run_client PolarSSL $i start_server "PolarSSL"
done for i in $O_CIPHERS; do
run_client OpenSSL $i
stop_server done
stop_server
start_server "PolarSSL" fi
for i in $O_CIPHERS; do
run_client OpenSSL $i
done
add_polarssl_ciphersuites add_polarssl_ciphersuites
for i in $P_CIPHERS; do if [ "X" != "X$P_CIPHERS" ]; then
run_client PolarSSL $i start_server "PolarSSL"
done for i in $P_CIPHERS; do
run_client PolarSSL $i
stop_server done
stop_server
fi
done done
done done