mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 13:55:29 +00:00
Small adjustments in compat.sh
This commit is contained in:
parent
9791a4043e
commit
dfc8d5accc
|
@ -24,6 +24,16 @@ do
|
||||||
shift
|
shift
|
||||||
MODES=$1
|
MODES=$1
|
||||||
;;
|
;;
|
||||||
|
-t|--types)
|
||||||
|
# Key exchange types
|
||||||
|
shift
|
||||||
|
TYPES=$1
|
||||||
|
;;
|
||||||
|
-V|--verify)
|
||||||
|
# Verifiction modes
|
||||||
|
shift
|
||||||
|
VERIFIES=$1
|
||||||
|
;;
|
||||||
-v|--verbose)
|
-v|--verbose)
|
||||||
# Set verbosity
|
# Set verbosity
|
||||||
shift
|
shift
|
||||||
|
@ -35,6 +45,8 @@ do
|
||||||
echo -e " -f|--filter\tFilter ciphersuites to test (Default: all)"
|
echo -e " -f|--filter\tFilter ciphersuites to test (Default: all)"
|
||||||
echo -e " -h|--help\t\tPrint this help."
|
echo -e " -h|--help\t\tPrint this help."
|
||||||
echo -e " -m|--modes\tWhich modes to perform (Default: \"ssl3 tls1 tls1_1 tls1_2\")"
|
echo -e " -m|--modes\tWhich modes to perform (Default: \"ssl3 tls1 tls1_1 tls1_2\")"
|
||||||
|
echo -e " -t|--types\tWhich key exchange type to perform (Default: \"RSA PSK\")"
|
||||||
|
echo -e " -V|--verify\tWhich verification modes to perform (Default: \"NO YES\")"
|
||||||
echo -e " -v|--verbose\t\tSet verbose output."
|
echo -e " -v|--verbose\t\tSet verbose output."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
@ -53,6 +65,21 @@ log () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filter()
|
||||||
|
{
|
||||||
|
LIST=$1
|
||||||
|
FILTER=$2
|
||||||
|
|
||||||
|
NEW_LIST=""
|
||||||
|
|
||||||
|
for i in $LIST;
|
||||||
|
do
|
||||||
|
NEW_LIST="$NEW_LIST $( echo "$i" | grep "$FILTER" )"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "$NEW_LIST"
|
||||||
|
}
|
||||||
|
|
||||||
for VERIFY in $VERIFIES;
|
for VERIFY in $VERIFIES;
|
||||||
do
|
do
|
||||||
|
|
||||||
|
@ -60,7 +87,7 @@ if [ "X$VERIFY" = "XYES" ];
|
||||||
then
|
then
|
||||||
P_SERVER_ARGS="ca_file=data_files/test-ca.crt auth_mode=required"
|
P_SERVER_ARGS="ca_file=data_files/test-ca.crt auth_mode=required"
|
||||||
P_CLIENT_ARGS="ca_file=data_files/test-ca.crt"
|
P_CLIENT_ARGS="ca_file=data_files/test-ca.crt"
|
||||||
O_SERVER_ARGS="-CAfile data_files/test-ca.crt -verify 10"
|
O_SERVER_ARGS="-CAfile data_files/test-ca.crt -Verify 10"
|
||||||
O_CLIENT_ARGS="-CAfile data_files/test-ca.crt"
|
O_CLIENT_ARGS="-CAfile data_files/test-ca.crt"
|
||||||
else
|
else
|
||||||
P_SERVER_ARGS=""
|
P_SERVER_ARGS=""
|
||||||
|
@ -72,6 +99,7 @@ fi
|
||||||
|
|
||||||
for MODE in $MODES;
|
for MODE in $MODES;
|
||||||
do
|
do
|
||||||
|
echo "-----------"
|
||||||
echo "Running for $MODE (Verify: $VERIFY)"
|
echo "Running for $MODE (Verify: $VERIFY)"
|
||||||
echo "-----------"
|
echo "-----------"
|
||||||
|
|
||||||
|
@ -199,21 +227,6 @@ case $TYPE in
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
filter()
|
|
||||||
{
|
|
||||||
LIST=$1
|
|
||||||
FILTER=$2
|
|
||||||
|
|
||||||
NEW_LIST=""
|
|
||||||
|
|
||||||
for i in $LIST;
|
|
||||||
do
|
|
||||||
NEW_LIST="$NEW_LIST $( echo "$i" | grep "$FILTER" )"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$NEW_LIST"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Filter ciphersuites
|
# Filter ciphersuites
|
||||||
if [ "X" != "X$FILTER" ];
|
if [ "X" != "X$FILTER" ];
|
||||||
then
|
then
|
||||||
|
@ -223,7 +236,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
log "$OPENSSL s_server -cert data_files/server2.crt -key data_files/server2.key -www -quiet -cipher NULL,ALL $O_SERVER_ARGS -$MODE"
|
log "$OPENSSL s_server -cert data_files/server2.crt -key data_files/server2.key -www -quiet -cipher NULL,ALL $O_SERVER_ARGS -$MODE"
|
||||||
$OPENSSL s_server -cert data_files/server2.crt -key data_files/server2.key -www -quiet -cipher NULL,ALL $O_SERVER_ARGS -$MODE &
|
$OPENSSL s_server -cert data_files/server2.crt -key data_files/server2.key -www -quiet -cipher NULL,ALL $O_SERVER_ARGS -$MODE >/dev/null 2>&1 &
|
||||||
PROCESS_ID=$!
|
PROCESS_ID=$!
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
Loading…
Reference in a new issue