mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 16:55:43 +01:00
Invoke config.py instead of config.pl in reverted content
perl -i -pe 's/\bconfig\.pl/config.py/g' $(git grep -l -Fw config.pl -- . '#!tests/scripts/test_config_script.py')
This commit is contained in:
parent
7e771c767f
commit
3b46cd3f15
@ -46,10 +46,10 @@ do_config()
|
||||
echo ""
|
||||
echo "config-$NAME:"
|
||||
cp configs/config-$NAME.h $CONFIG_H
|
||||
scripts/config.pl unset MBEDTLS_SSL_SRV_C
|
||||
scripts/config.py unset MBEDTLS_SSL_SRV_C
|
||||
|
||||
for FLAG in $UNSET_LIST; do
|
||||
scripts/config.pl unset $FLAG
|
||||
scripts/config.py unset $FLAG
|
||||
done
|
||||
|
||||
grep -F SSL_MAX_CONTENT_LEN $CONFIG_H || echo 'SSL_MAX_CONTENT_LEN=16384'
|
||||
|
@ -699,7 +699,7 @@ component_test_no_pem_no_fs () {
|
||||
|
||||
component_test_sslv3 () {
|
||||
msg "build: Default + SSLv3 (ASan build)" # ~ 6 min
|
||||
scripts/config.pl set MBEDTLS_SSL_PROTO_SSL3
|
||||
scripts/config.py set MBEDTLS_SSL_PROTO_SSL3
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -716,7 +716,7 @@ component_test_sslv3 () {
|
||||
|
||||
component_test_no_renegotiation () {
|
||||
msg "build: Default + !MBEDTLS_SSL_RENEGOTIATION (ASan build)" # ~ 6 min
|
||||
scripts/config.pl unset MBEDTLS_SSL_RENEGOTIATION
|
||||
scripts/config.py unset MBEDTLS_SSL_RENEGOTIATION
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -745,8 +745,8 @@ component_test_rsa_no_crt () {
|
||||
|
||||
component_test_small_ssl_out_content_len () {
|
||||
msg "build: small SSL_OUT_CONTENT_LEN (ASan build)"
|
||||
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 16384
|
||||
scripts/config.pl set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
|
||||
scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 16384
|
||||
scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -756,8 +756,8 @@ component_test_small_ssl_out_content_len () {
|
||||
|
||||
component_test_small_ssl_in_content_len () {
|
||||
msg "build: small SSL_IN_CONTENT_LEN (ASan build)"
|
||||
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 4096
|
||||
scripts/config.pl set MBEDTLS_SSL_OUT_CONTENT_LEN 16384
|
||||
scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 4096
|
||||
scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 16384
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -767,7 +767,7 @@ component_test_small_ssl_in_content_len () {
|
||||
|
||||
component_test_small_ssl_dtls_max_buffering () {
|
||||
msg "build: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #0"
|
||||
scripts/config.pl set MBEDTLS_SSL_DTLS_MAX_BUFFERING 1000
|
||||
scripts/config.py set MBEDTLS_SSL_DTLS_MAX_BUFFERING 1000
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -777,7 +777,7 @@ component_test_small_ssl_dtls_max_buffering () {
|
||||
|
||||
component_test_small_mbedtls_ssl_dtls_max_buffering () {
|
||||
msg "build: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #1"
|
||||
scripts/config.pl set MBEDTLS_SSL_DTLS_MAX_BUFFERING 240
|
||||
scripts/config.py set MBEDTLS_SSL_DTLS_MAX_BUFFERING 240
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -999,15 +999,15 @@ component_build_no_std_function () {
|
||||
|
||||
component_build_no_ssl_srv () {
|
||||
msg "build: full config except ssl_srv.c, make, gcc" # ~ 30s
|
||||
scripts/config.pl full
|
||||
scripts/config.pl unset MBEDTLS_SSL_SRV_C
|
||||
scripts/config.py full
|
||||
scripts/config.py unset MBEDTLS_SSL_SRV_C
|
||||
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O0'
|
||||
}
|
||||
|
||||
component_build_no_ssl_cli () {
|
||||
msg "build: full config except ssl_cli.c, make, gcc" # ~ 30s
|
||||
scripts/config.pl full
|
||||
scripts/config.pl unset MBEDTLS_SSL_CLI_C
|
||||
scripts/config.py full
|
||||
scripts/config.py unset MBEDTLS_SSL_CLI_C
|
||||
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O0'
|
||||
}
|
||||
|
||||
@ -1015,9 +1015,9 @@ component_build_no_sockets () {
|
||||
# Note, C99 compliance can also be tested with the sockets support disabled,
|
||||
# as that requires a POSIX platform (which isn't the same as C99).
|
||||
msg "build: full config except net_sockets.c, make, gcc -std=c99 -pedantic" # ~ 30s
|
||||
scripts/config.pl full
|
||||
scripts/config.pl unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc.
|
||||
scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY # uses syscall() on GNU/Linux
|
||||
scripts/config.py full
|
||||
scripts/config.py unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc.
|
||||
scripts/config.py set MBEDTLS_NO_PLATFORM_ENTROPY # uses syscall() on GNU/Linux
|
||||
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O0 -std=c99 -pedantic' lib
|
||||
}
|
||||
|
||||
@ -1048,7 +1048,7 @@ component_test_memory_buffer_allocator () {
|
||||
component_test_no_max_fragment_length () {
|
||||
# Run max fragment length tests with MFL disabled
|
||||
msg "build: default config except MFL extension (ASan build)" # ~ 30s
|
||||
scripts/config.pl unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
scripts/config.py unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -1058,7 +1058,7 @@ component_test_no_max_fragment_length () {
|
||||
|
||||
component_test_asan_remove_peer_certificate () {
|
||||
msg "build: default config with MBEDTLS_SSL_KEEP_PEER_CERTIFICATE disabled (ASan build)"
|
||||
scripts/config.pl unset MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
|
||||
scripts/config.py unset MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -1074,9 +1074,9 @@ component_test_asan_remove_peer_certificate () {
|
||||
|
||||
component_test_no_max_fragment_length_small_ssl_out_content_len () {
|
||||
msg "build: no MFL extension, small SSL_OUT_CONTENT_LEN (ASan build)"
|
||||
scripts/config.pl unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 16384
|
||||
scripts/config.pl set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
|
||||
scripts/config.py unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
|
||||
scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 16384
|
||||
scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -1155,9 +1155,9 @@ component_test_aes_fewer_tables_and_rom_tables () {
|
||||
|
||||
component_test_ctr_drbg_aes_256_sha_256 () {
|
||||
msg "build: full + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
|
||||
scripts/config.pl full
|
||||
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||
scripts/config.pl set MBEDTLS_ENTROPY_FORCE_SHA256
|
||||
scripts/config.py full
|
||||
scripts/config.py unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||
scripts/config.py set MBEDTLS_ENTROPY_FORCE_SHA256
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -1167,9 +1167,9 @@ component_test_ctr_drbg_aes_256_sha_256 () {
|
||||
|
||||
component_test_ctr_drbg_aes_128_sha_512 () {
|
||||
msg "build: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY (ASan build)"
|
||||
scripts/config.pl full
|
||||
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||
scripts/config.pl set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
|
||||
scripts/config.py full
|
||||
scripts/config.py unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||
scripts/config.py set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -1179,10 +1179,10 @@ component_test_ctr_drbg_aes_128_sha_512 () {
|
||||
|
||||
component_test_ctr_drbg_aes_128_sha_256 () {
|
||||
msg "build: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
|
||||
scripts/config.pl full
|
||||
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||
scripts/config.pl set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
|
||||
scripts/config.pl set MBEDTLS_ENTROPY_FORCE_SHA256
|
||||
scripts/config.py full
|
||||
scripts/config.py unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||
scripts/config.py set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
|
||||
scripts/config.py set MBEDTLS_ENTROPY_FORCE_SHA256
|
||||
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
@ -1403,7 +1403,7 @@ component_build_armcc () {
|
||||
|
||||
component_test_allow_sha1 () {
|
||||
msg "build: allow SHA1 in certificates by default"
|
||||
scripts/config.pl set MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
|
||||
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
|
||||
|
@ -47,10 +47,10 @@ for my $kex (@kexes) {
|
||||
print "******************************************\n";
|
||||
|
||||
# full config with all key exchanges disabled except one
|
||||
system( "scripts/config.pl full" ) and abort "Failed config full\n";
|
||||
system( "scripts/config.py full" ) and abort "Failed config full\n";
|
||||
for my $k (@kexes) {
|
||||
next if $k eq $kex;
|
||||
system( "scripts/config.pl unset $k" )
|
||||
system( "scripts/config.py unset $k" )
|
||||
and abort "Failed to disable $k\n";
|
||||
}
|
||||
|
||||
|
@ -296,9 +296,9 @@ requires_not_i686() {
|
||||
}
|
||||
|
||||
# Calculate the input & output maximum content lengths set in the config
|
||||
MAX_CONTENT_LEN=$( ../scripts/config.pl get MBEDTLS_SSL_MAX_CONTENT_LEN || echo "16384")
|
||||
MAX_IN_LEN=$( ../scripts/config.pl get MBEDTLS_SSL_IN_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
|
||||
MAX_OUT_LEN=$( ../scripts/config.pl get MBEDTLS_SSL_OUT_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
|
||||
MAX_CONTENT_LEN=$( ../scripts/config.py get MBEDTLS_SSL_MAX_CONTENT_LEN || echo "16384")
|
||||
MAX_IN_LEN=$( ../scripts/config.py get MBEDTLS_SSL_IN_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
|
||||
MAX_OUT_LEN=$( ../scripts/config.py get MBEDTLS_SSL_OUT_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
|
||||
|
||||
if [ "$MAX_IN_LEN" -lt "$MAX_CONTENT_LEN" ]; then
|
||||
MAX_CONTENT_LEN="$MAX_IN_LEN"
|
||||
@ -2846,7 +2846,7 @@ run_test "Authentication: client no cert, ssl3" \
|
||||
# default value (8)
|
||||
|
||||
MAX_IM_CA='8'
|
||||
MAX_IM_CA_CONFIG=$( ../scripts/config.pl get MBEDTLS_X509_MAX_INTERMEDIATE_CA)
|
||||
MAX_IM_CA_CONFIG=$( ../scripts/config.py get MBEDTLS_X509_MAX_INTERMEDIATE_CA)
|
||||
|
||||
if [ -n "$MAX_IM_CA_CONFIG" ] && [ "$MAX_IM_CA_CONFIG" -ne "$MAX_IM_CA" ]; then
|
||||
printf "The ${CONFIG_H} file contains a value for the configuration of\n"
|
||||
|
Loading…
Reference in New Issue
Block a user