Merge pull request #4407 from ARMmbed/dev3_signoffs
Merge development_3.0 into development
This commit is contained in:
commit
12f93f4fc2
183 changed files with 834 additions and 12758 deletions
|
@ -51,9 +51,9 @@
|
|||
# * arm-gcc and mingw-gcc
|
||||
# * ArmCC 5 and ArmCC 6, unless invoked with --no-armcc
|
||||
# * OpenSSL and GnuTLS command line tools, recent enough for the
|
||||
# interoperability tests. If they don't support SSLv3 then a legacy
|
||||
# version of these tools must be present as well (search for LEGACY
|
||||
# below).
|
||||
# interoperability tests. If they don't support old features which we want
|
||||
# to test, then a legacy version of these tools must be present as well
|
||||
# (search for LEGACY below).
|
||||
# See the invocation of check_tools below for details.
|
||||
#
|
||||
# This script must be invoked from the toplevel directory of a git
|
||||
|
@ -254,7 +254,7 @@ Tool path options:
|
|||
--gnutls-legacy-cli=<GnuTLS_cli_path> GnuTLS client executable to use for legacy tests.
|
||||
--gnutls-legacy-serv=<GnuTLS_serv_path> GnuTLS server executable to use for legacy tests.
|
||||
--openssl=<OpenSSL_path> OpenSSL executable to use for most tests.
|
||||
--openssl-legacy=<OpenSSL_path> OpenSSL executable to use for legacy tests e.g. SSLv3.
|
||||
--openssl-legacy=<OpenSSL_path> OpenSSL executable to use for legacy tests..
|
||||
--openssl-next=<OpenSSL_path> OpenSSL executable to use for recent things like ARIA
|
||||
EOF
|
||||
}
|
||||
|
@ -809,71 +809,12 @@ component_test_psa_crypto_client () {
|
|||
make test
|
||||
}
|
||||
|
||||
component_test_zlib_make() {
|
||||
msg "build: zlib enabled, make"
|
||||
scripts/config.py set MBEDTLS_ZLIB_SUPPORT
|
||||
make ZLIB=1 CFLAGS='-Werror -O1'
|
||||
|
||||
msg "test: main suites (zlib, make)"
|
||||
make test
|
||||
|
||||
msg "test: ssl-opt.sh (zlib, make)"
|
||||
if_build_succeeded tests/ssl-opt.sh
|
||||
}
|
||||
support_test_zlib_make () {
|
||||
base=support_test_zlib_$$
|
||||
cat <<'EOF' > ${base}.c
|
||||
#include "zlib.h"
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
gcc -o ${base}.exe ${base}.c -lz 2>/dev/null
|
||||
ret=$?
|
||||
rm -f ${base}.*
|
||||
return $ret
|
||||
}
|
||||
|
||||
component_test_zlib_cmake() {
|
||||
msg "build: zlib enabled, cmake"
|
||||
scripts/config.py set MBEDTLS_ZLIB_SUPPORT
|
||||
cmake -D ENABLE_ZLIB_SUPPORT=On -D CMAKE_BUILD_TYPE:String=Check .
|
||||
make
|
||||
|
||||
msg "test: main suites (zlib, cmake)"
|
||||
make test
|
||||
|
||||
msg "test: ssl-opt.sh (zlib, cmake)"
|
||||
if_build_succeeded tests/ssl-opt.sh
|
||||
}
|
||||
support_test_zlib_cmake () {
|
||||
support_test_zlib_make "$@"
|
||||
}
|
||||
|
||||
component_test_ref_configs () {
|
||||
msg "test/build: ref-configs (ASan build)" # ~ 6 min 20s
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
record_status tests/scripts/test-ref-configs.pl
|
||||
}
|
||||
|
||||
component_test_sslv3 () {
|
||||
msg "build: Default + SSLv3 (ASan build)" # ~ 6 min
|
||||
scripts/config.py set MBEDTLS_SSL_PROTO_SSL3
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
msg "test: SSLv3 - main suites (inc. selftests) (ASan build)" # ~ 50s
|
||||
make test
|
||||
|
||||
msg "build: SSLv3 - compat.sh (ASan build)" # ~ 6 min
|
||||
if_build_succeeded tests/compat.sh -m 'tls1 tls1_1 tls1_2 dtls1 dtls1_2'
|
||||
if_build_succeeded env OPENSSL_CMD="$OPENSSL_LEGACY" tests/compat.sh -m 'ssl3'
|
||||
|
||||
msg "build: SSLv3 - ssl-opt.sh (ASan build)" # ~ 6 min
|
||||
if_build_succeeded tests/ssl-opt.sh
|
||||
|
||||
msg "build: SSLv3 - context-info.sh (ASan build)" # ~ 15 sec
|
||||
if_build_succeeded tests/context-info.sh
|
||||
}
|
||||
|
||||
component_test_no_renegotiation () {
|
||||
msg "build: Default + !MBEDTLS_SSL_RENEGOTIATION (ASan build)" # ~ 6 min
|
||||
scripts/config.py unset MBEDTLS_SSL_RENEGOTIATION
|
||||
|
@ -2137,7 +2078,6 @@ component_test_null_entropy () {
|
|||
scripts/config.py unset MBEDTLS_ENTROPY_NV_SEED
|
||||
scripts/config.py unset MBEDTLS_PLATFORM_NV_SEED_ALT
|
||||
scripts/config.py unset MBEDTLS_ENTROPY_HARDWARE_ALT
|
||||
scripts/config.py unset MBEDTLS_HAVEGE_C
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan -D UNSAFE_BUILD=ON .
|
||||
make
|
||||
|
||||
|
@ -2560,21 +2500,6 @@ component_build_armcc () {
|
|||
armc6_build_test "--target=aarch64-arm-none-eabi -march=armv8.2-a"
|
||||
}
|
||||
|
||||
component_build_ssl_hw_record_accel() {
|
||||
msg "build: default config with MBEDTLS_SSL_HW_RECORD_ACCEL enabled"
|
||||
scripts/config.pl set MBEDTLS_SSL_HW_RECORD_ACCEL
|
||||
make CFLAGS='-Werror -O1'
|
||||
}
|
||||
|
||||
component_test_allow_sha1 () {
|
||||
msg "build: allow SHA1 in certificates by default"
|
||||
scripts/config.py set MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
|
||||
make CFLAGS='-Werror -Wall -Wextra'
|
||||
msg "test: allow SHA1 in certificates by default"
|
||||
make test
|
||||
if_build_succeeded tests/ssl-opt.sh -f SHA-1
|
||||
}
|
||||
|
||||
component_test_tls13_experimental () {
|
||||
msg "build: default config with MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL enabled"
|
||||
scripts/config.pl set MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL
|
||||
|
|
|
@ -118,10 +118,6 @@ echo '################ compat.sh ################'
|
|||
sh compat.sh -m 'tls1 tls1_1 tls1_2 dtls1 dtls1_2'
|
||||
echo
|
||||
|
||||
echo '#### compat.sh: legacy (SSLv3)'
|
||||
OPENSSL_CMD="$OPENSSL_LEGACY" sh compat.sh -m 'ssl3'
|
||||
echo
|
||||
|
||||
echo '#### compat.sh: legacy (null, DES, RC4)'
|
||||
OPENSSL_CMD="$OPENSSL_LEGACY" \
|
||||
GNUTLS_CLI="$GNUTLS_LEGACY_CLI" GNUTLS_SERV="$GNUTLS_LEGACY_SERV" \
|
||||
|
|
|
@ -90,15 +90,16 @@ done
|
|||
|
||||
printf "Likely typos: "
|
||||
sort -u actual-macros enum-consts > _caps
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h )
|
||||
HEADERS="$HEADERS library/*.h"
|
||||
HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
|
||||
LIBRARY="$( ls library/*.c )"
|
||||
LIBRARY="$LIBRARY 3rdparty/everest/library/everest.c 3rdparty/everest/library/x25519.c"
|
||||
NL='
|
||||
'
|
||||
sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \
|
||||
$HEADERS $LIBRARY \
|
||||
cat $HEADERS $LIBRARY \
|
||||
| grep -v -e '//no-check-names' -e '#error' \
|
||||
| sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \
|
||||
| grep MBEDTLS | sort -u > _MBEDTLS_XXX
|
||||
TYPOS=$( diff _caps _MBEDTLS_XXX | sed -n 's/^> //p' \
|
||||
| egrep -v 'XXX|__|_$|^MBEDTLS_.*CONFIG_FILE$' || true )
|
||||
|
|
|
@ -23,7 +23,8 @@ use open qw(:std utf8);
|
|||
|
||||
-d 'include/mbedtls' or die "$0: must be run from root\n";
|
||||
|
||||
@ARGV = grep { ! /compat-1\.3\.h/ } <include/mbedtls/*.h>;
|
||||
@ARGV = <include/mbedtls/*.h>;
|
||||
push @ARGV, <library/*.h>;
|
||||
push @ARGV, "3rdparty/everest/include/everest/everest.h";
|
||||
push @ARGV, "3rdparty/everest/include/everest/x25519.h";
|
||||
push @ARGV, glob("library/*.h");
|
||||
|
|
|
@ -47,9 +47,9 @@ done
|
|||
|
||||
if [ $INTERNAL ]
|
||||
then
|
||||
HEADERS=$( ls include/mbedtls/*_internal.h library/*.h | egrep -v 'compat-1\.3\.h|bn_mul' )
|
||||
HEADERS=$( ls library/*.h )
|
||||
else
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h library/*.h | egrep -v 'compat-1\.3\.h|bn_mul' )
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h library/*.h )
|
||||
HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
|
||||
fi
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ if [ -d include/mbedtls ]; then :; else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h )
|
||||
HEADERS="$HEADERS library/*.h"
|
||||
HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue