mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 14:25:40 +01:00
Minor compat.sh clean-up
This commit is contained in:
parent
d701c9aec9
commit
9dea8bd658
@ -14,38 +14,7 @@ OPENSSL=openssl
|
||||
FILTER=""
|
||||
VERBOSE=""
|
||||
|
||||
# Parse arguments
|
||||
#
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
-f|--filter)
|
||||
# Filter ciphersuites
|
||||
shift
|
||||
FILTER=$1
|
||||
;;
|
||||
-m|--modes)
|
||||
# Perform modes
|
||||
shift
|
||||
MODES=$1
|
||||
;;
|
||||
-t|--types)
|
||||
# Key exchange types
|
||||
shift
|
||||
TYPES=$1
|
||||
;;
|
||||
-V|--verify)
|
||||
# Verifiction modes
|
||||
shift
|
||||
VERIFIES=$1
|
||||
;;
|
||||
-v|--verbose)
|
||||
# Set verbosity
|
||||
shift
|
||||
VERBOSE=1
|
||||
;;
|
||||
-h|--help)
|
||||
# print help
|
||||
print_usage() {
|
||||
echo "Usage: $0"
|
||||
echo -e " -f|--filter\tFilter ciphersuites to test (Default: all)"
|
||||
echo -e " -h|--help\t\tPrint this help."
|
||||
@ -53,16 +22,39 @@ do
|
||||
echo -e " -t|--types\tWhich key exchange type to perform (Default: \"ECDSA RSA PSK\")"
|
||||
echo -e " -V|--verify\tWhich verification modes to perform (Default: \"NO YES\")"
|
||||
echo -e " -v|--verbose\t\tSet verbose output."
|
||||
exit 1
|
||||
}
|
||||
|
||||
get_options() {
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-f|--filter)
|
||||
shift; FILTER=$1
|
||||
;;
|
||||
-m|--modes)
|
||||
shift; MODES=$1
|
||||
;;
|
||||
-t|--types)
|
||||
shift; TYPES=$1
|
||||
;;
|
||||
-V|--verify)
|
||||
shift; VERIFIES=$1
|
||||
;;
|
||||
-v|--verbose)
|
||||
VERBOSE=1
|
||||
;;
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
# print error
|
||||
echo "Unknown argument: '$1'"
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
log() {
|
||||
if [ "X" != "X$VERBOSE" ]; then
|
||||
@ -553,6 +545,12 @@ run_client() {
|
||||
esac
|
||||
}
|
||||
|
||||
#
|
||||
# MAIN
|
||||
#
|
||||
|
||||
get_options "$@"
|
||||
|
||||
killall -q openssl ssl_server ssl_server2
|
||||
trap cleanup INT TERM HUP
|
||||
|
||||
|
@ -221,6 +221,10 @@ cleanup() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
#
|
||||
# MAIN
|
||||
#
|
||||
|
||||
get_options "$@"
|
||||
|
||||
killall -q openssl ssl_server ssl_server2
|
||||
|
Loading…
Reference in New Issue
Block a user