mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 13:35:42 +01:00
Merge pull request #4136 from daverodgman/ssl-opt-gnutls-priority
ssl-opt.sh: add --priority=normal to gnutls-serv
This commit is contained in:
commit
e31fb03310
@ -634,6 +634,21 @@ detect_dtls() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check if the given command uses gnutls and sets global variable CMD_IS_GNUTLS
|
||||||
|
is_gnutls() {
|
||||||
|
case "$1" in
|
||||||
|
*gnutls-cli*)
|
||||||
|
CMD_IS_GNUTLS=1
|
||||||
|
;;
|
||||||
|
*gnutls-serv*)
|
||||||
|
CMD_IS_GNUTLS=1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CMD_IS_GNUTLS=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
# Compare file content
|
# Compare file content
|
||||||
# Usage: find_in_both pattern file1 file2
|
# Usage: find_in_both pattern file1 file2
|
||||||
# extract from file1 the first line matching the pattern
|
# extract from file1 the first line matching the pattern
|
||||||
@ -726,6 +741,30 @@ run_test() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# update CMD_IS_GNUTLS variable
|
||||||
|
is_gnutls "$SRV_CMD"
|
||||||
|
|
||||||
|
# if the server uses gnutls but doesn't set priority, explicitly
|
||||||
|
# set the default priority
|
||||||
|
if [ "$CMD_IS_GNUTLS" -eq 1 ]; then
|
||||||
|
case "$SRV_CMD" in
|
||||||
|
*--priority*) :;;
|
||||||
|
*) SRV_CMD="$SRV_CMD --priority=NORMAL";;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# update CMD_IS_GNUTLS variable
|
||||||
|
is_gnutls "$CLI_CMD"
|
||||||
|
|
||||||
|
# if the client uses gnutls but doesn't set priority, explicitly
|
||||||
|
# set the default priority
|
||||||
|
if [ "$CMD_IS_GNUTLS" -eq 1 ]; then
|
||||||
|
case "$CLI_CMD" in
|
||||||
|
*--priority*) :;;
|
||||||
|
*) CLI_CMD="$CLI_CMD --priority=NORMAL";;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
# fix client port
|
# fix client port
|
||||||
if [ -n "$PXY_CMD" ]; then
|
if [ -n "$PXY_CMD" ]; then
|
||||||
CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$PXY_PORT/g )
|
CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$PXY_PORT/g )
|
||||||
|
Loading…
Reference in New Issue
Block a user