mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 16:28:15 +00:00
Enable SSLv2 testing if OPENSSL_CMD is set
This commit is contained in:
parent
d6aebe108a
commit
913030c286
2 changed files with 18 additions and 7 deletions
|
@ -5,16 +5,15 @@
|
||||||
# Check each common ciphersuite, with each version, both ways (client/server),
|
# Check each common ciphersuite, with each version, both ways (client/server),
|
||||||
# with and without client authentication.
|
# with and without client authentication.
|
||||||
|
|
||||||
|
set -u
|
||||||
|
|
||||||
# test if those two are set in the environment before assigning defaults
|
# test if those two are set in the environment before assigning defaults
|
||||||
if [ -n "$GNUTLS_CLI" -a -n "$GNUTLS_SERV" ]; then
|
if [ -n "${GNUTLS_CLI:-}" -a -n "${GNUTLS_SERV:-}" ]; then
|
||||||
GNUTLS_AVAILABLE=1
|
GNUTLS_AVAILABLE=1
|
||||||
else
|
else
|
||||||
GNUTLS_AVAILABLE=0
|
GNUTLS_AVAILABLE=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# catch undefined variables from now on
|
|
||||||
set -u
|
|
||||||
|
|
||||||
# initialise counters
|
# initialise counters
|
||||||
let "tests = 0"
|
let "tests = 0"
|
||||||
let "failed = 0"
|
let "failed = 0"
|
||||||
|
|
|
@ -10,6 +10,14 @@
|
||||||
|
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
|
# test if it is defined from the environment before assining default
|
||||||
|
# if yes, assume it means it's a build with all the options we need (SSLv2)
|
||||||
|
if [ -n "${OPENSSL_CMD:-}" ]; then
|
||||||
|
OPENSSL_OK=1
|
||||||
|
else
|
||||||
|
OPENSSL_OK=0
|
||||||
|
fi
|
||||||
|
|
||||||
# default values, can be overriden by the environment
|
# default values, can be overriden by the environment
|
||||||
: ${P_SRV:=../programs/ssl/ssl_server2}
|
: ${P_SRV:=../programs/ssl/ssl_server2}
|
||||||
: ${P_CLI:=../programs/ssl/ssl_client2}
|
: ${P_CLI:=../programs/ssl/ssl_client2}
|
||||||
|
@ -23,7 +31,11 @@ FAILS=0
|
||||||
|
|
||||||
MEMCHECK=0
|
MEMCHECK=0
|
||||||
FILTER='.*'
|
FILTER='.*'
|
||||||
EXCLUDE='SSLv2' # disabled by default, needs OpenSSL compiled with SSLv2
|
if [ "$OPENSSL_OK" -gt 0 ]; then
|
||||||
|
EXCLUDE='^$'
|
||||||
|
else
|
||||||
|
EXCLUDE='SSLv2'
|
||||||
|
fi
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
echo "Usage: $0 [options]"
|
echo "Usage: $0 [options]"
|
||||||
|
@ -245,6 +257,8 @@ cleanup() {
|
||||||
# MAIN
|
# MAIN
|
||||||
#
|
#
|
||||||
|
|
||||||
|
get_options "$@"
|
||||||
|
|
||||||
# sanity checks, avoid an avalanche of errors
|
# sanity checks, avoid an avalanche of errors
|
||||||
if [ ! -x "$P_SRV" ]; then
|
if [ ! -x "$P_SRV" ]; then
|
||||||
echo "Command '$P_SRV' is not an executable file"
|
echo "Command '$P_SRV' is not an executable file"
|
||||||
|
@ -259,8 +273,6 @@ if which $OPENSSL_CMD >/dev/null 2>&1; then :; else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
get_options "$@"
|
|
||||||
|
|
||||||
killall -q openssl ssl_server ssl_server2
|
killall -q openssl ssl_server ssl_server2
|
||||||
trap cleanup INT TERM HUP
|
trap cleanup INT TERM HUP
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue