mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 14:28:31 +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),
|
||||
# with and without client authentication.
|
||||
|
||||
set -u
|
||||
|
||||
# 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
|
||||
else
|
||||
GNUTLS_AVAILABLE=0
|
||||
fi
|
||||
|
||||
# catch undefined variables from now on
|
||||
set -u
|
||||
|
||||
# initialise counters
|
||||
let "tests = 0"
|
||||
let "failed = 0"
|
||||
|
|
|
@ -10,6 +10,14 @@
|
|||
|
||||
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
|
||||
: ${P_SRV:=../programs/ssl/ssl_server2}
|
||||
: ${P_CLI:=../programs/ssl/ssl_client2}
|
||||
|
@ -23,7 +31,11 @@ FAILS=0
|
|||
|
||||
MEMCHECK=0
|
||||
FILTER='.*'
|
||||
EXCLUDE='SSLv2' # disabled by default, needs OpenSSL compiled with SSLv2
|
||||
if [ "$OPENSSL_OK" -gt 0 ]; then
|
||||
EXCLUDE='^$'
|
||||
else
|
||||
EXCLUDE='SSLv2'
|
||||
fi
|
||||
|
||||
print_usage() {
|
||||
echo "Usage: $0 [options]"
|
||||
|
@ -245,6 +257,8 @@ cleanup() {
|
|||
# MAIN
|
||||
#
|
||||
|
||||
get_options "$@"
|
||||
|
||||
# sanity checks, avoid an avalanche of errors
|
||||
if [ ! -x "$P_SRV" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
get_options "$@"
|
||||
|
||||
killall -q openssl ssl_server ssl_server2
|
||||
trap cleanup INT TERM HUP
|
||||
|
||||
|
|
Loading…
Reference in a new issue