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')
diff --git a/scripts/memory.sh b/scripts/memory.sh
index 3dad289..c415f92 100755
--- a/scripts/memory.sh
+++ b/scripts/memory.sh
@@ -46,10 +46,10 @@
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'
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index 481665a..f6861c9 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -699,7 +699,7 @@
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_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_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_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_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_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_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 @@
# 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_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_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_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_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_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_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_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
diff --git a/tests/scripts/key-exchanges.pl b/tests/scripts/key-exchanges.pl
index 3bf7ae3..be029c7 100755
--- a/tests/scripts/key-exchanges.pl
+++ b/tests/scripts/key-exchanges.pl
@@ -47,10 +47,10 @@
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";
}
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index d952f33..c92c152 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -296,9 +296,9 @@
}
# 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 @@
# 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"