Skip to content

Commit 823559a

Browse files
gilles-peskine-armronald-cron-arm
authored andcommitted
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')
1 parent 9247618 commit 823559a

File tree

4 files changed

+39
-39
lines changed

4 files changed

+39
-39
lines changed

scripts/memory.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ do_config()
4646
echo ""
4747
echo "config-$NAME:"
4848
cp configs/config-$NAME.h $CONFIG_H
49-
scripts/config.pl unset MBEDTLS_SSL_SRV_C
49+
scripts/config.py unset MBEDTLS_SSL_SRV_C
5050

5151
for FLAG in $UNSET_LIST; do
52-
scripts/config.pl unset $FLAG
52+
scripts/config.py unset $FLAG
5353
done
5454

5555
grep -F SSL_MAX_CONTENT_LEN $CONFIG_H || echo 'SSL_MAX_CONTENT_LEN=16384'

tests/scripts/all.sh

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ component_test_no_pem_no_fs () {
699699

700700
component_test_sslv3 () {
701701
msg "build: Default + SSLv3 (ASan build)" # ~ 6 min
702-
scripts/config.pl set MBEDTLS_SSL_PROTO_SSL3
702+
scripts/config.py set MBEDTLS_SSL_PROTO_SSL3
703703
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
704704
make
705705

@@ -716,7 +716,7 @@ component_test_sslv3 () {
716716

717717
component_test_no_renegotiation () {
718718
msg "build: Default + !MBEDTLS_SSL_RENEGOTIATION (ASan build)" # ~ 6 min
719-
scripts/config.pl unset MBEDTLS_SSL_RENEGOTIATION
719+
scripts/config.py unset MBEDTLS_SSL_RENEGOTIATION
720720
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
721721
make
722722

@@ -745,8 +745,8 @@ component_test_rsa_no_crt () {
745745

746746
component_test_small_ssl_out_content_len () {
747747
msg "build: small SSL_OUT_CONTENT_LEN (ASan build)"
748-
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 16384
749-
scripts/config.pl set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
748+
scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 16384
749+
scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
750750
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
751751
make
752752

@@ -756,8 +756,8 @@ component_test_small_ssl_out_content_len () {
756756

757757
component_test_small_ssl_in_content_len () {
758758
msg "build: small SSL_IN_CONTENT_LEN (ASan build)"
759-
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 4096
760-
scripts/config.pl set MBEDTLS_SSL_OUT_CONTENT_LEN 16384
759+
scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 4096
760+
scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 16384
761761
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
762762
make
763763

@@ -767,7 +767,7 @@ component_test_small_ssl_in_content_len () {
767767

768768
component_test_small_ssl_dtls_max_buffering () {
769769
msg "build: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #0"
770-
scripts/config.pl set MBEDTLS_SSL_DTLS_MAX_BUFFERING 1000
770+
scripts/config.py set MBEDTLS_SSL_DTLS_MAX_BUFFERING 1000
771771
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
772772
make
773773

@@ -777,7 +777,7 @@ component_test_small_ssl_dtls_max_buffering () {
777777

778778
component_test_small_mbedtls_ssl_dtls_max_buffering () {
779779
msg "build: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #1"
780-
scripts/config.pl set MBEDTLS_SSL_DTLS_MAX_BUFFERING 240
780+
scripts/config.py set MBEDTLS_SSL_DTLS_MAX_BUFFERING 240
781781
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
782782
make
783783

@@ -999,25 +999,25 @@ component_build_no_std_function () {
999999

10001000
component_build_no_ssl_srv () {
10011001
msg "build: full config except ssl_srv.c, make, gcc" # ~ 30s
1002-
scripts/config.pl full
1003-
scripts/config.pl unset MBEDTLS_SSL_SRV_C
1002+
scripts/config.py full
1003+
scripts/config.py unset MBEDTLS_SSL_SRV_C
10041004
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O0'
10051005
}
10061006

10071007
component_build_no_ssl_cli () {
10081008
msg "build: full config except ssl_cli.c, make, gcc" # ~ 30s
1009-
scripts/config.pl full
1010-
scripts/config.pl unset MBEDTLS_SSL_CLI_C
1009+
scripts/config.py full
1010+
scripts/config.py unset MBEDTLS_SSL_CLI_C
10111011
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O0'
10121012
}
10131013

10141014
component_build_no_sockets () {
10151015
# Note, C99 compliance can also be tested with the sockets support disabled,
10161016
# as that requires a POSIX platform (which isn't the same as C99).
10171017
msg "build: full config except net_sockets.c, make, gcc -std=c99 -pedantic" # ~ 30s
1018-
scripts/config.pl full
1019-
scripts/config.pl unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc.
1020-
scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY # uses syscall() on GNU/Linux
1018+
scripts/config.py full
1019+
scripts/config.py unset MBEDTLS_NET_C # getaddrinfo() undeclared, etc.
1020+
scripts/config.py set MBEDTLS_NO_PLATFORM_ENTROPY # uses syscall() on GNU/Linux
10211021
make CC=gcc CFLAGS='-Werror -Wall -Wextra -O0 -std=c99 -pedantic' lib
10221022
}
10231023

@@ -1048,7 +1048,7 @@ component_test_memory_buffer_allocator () {
10481048
component_test_no_max_fragment_length () {
10491049
# Run max fragment length tests with MFL disabled
10501050
msg "build: default config except MFL extension (ASan build)" # ~ 30s
1051-
scripts/config.pl unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1051+
scripts/config.py unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
10521052
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
10531053
make
10541054

@@ -1058,7 +1058,7 @@ component_test_no_max_fragment_length () {
10581058

10591059
component_test_asan_remove_peer_certificate () {
10601060
msg "build: default config with MBEDTLS_SSL_KEEP_PEER_CERTIFICATE disabled (ASan build)"
1061-
scripts/config.pl unset MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
1061+
scripts/config.py unset MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
10621062
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
10631063
make
10641064

@@ -1074,9 +1074,9 @@ component_test_asan_remove_peer_certificate () {
10741074

10751075
component_test_no_max_fragment_length_small_ssl_out_content_len () {
10761076
msg "build: no MFL extension, small SSL_OUT_CONTENT_LEN (ASan build)"
1077-
scripts/config.pl unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1078-
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 16384
1079-
scripts/config.pl set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
1077+
scripts/config.py unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
1078+
scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 16384
1079+
scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 4096
10801080
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
10811081
make
10821082

@@ -1155,9 +1155,9 @@ component_test_aes_fewer_tables_and_rom_tables () {
11551155

11561156
component_test_ctr_drbg_aes_256_sha_256 () {
11571157
msg "build: full + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
1158-
scripts/config.pl full
1159-
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
1160-
scripts/config.pl set MBEDTLS_ENTROPY_FORCE_SHA256
1158+
scripts/config.py full
1159+
scripts/config.py unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
1160+
scripts/config.py set MBEDTLS_ENTROPY_FORCE_SHA256
11611161
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
11621162
make
11631163

@@ -1167,9 +1167,9 @@ component_test_ctr_drbg_aes_256_sha_256 () {
11671167

11681168
component_test_ctr_drbg_aes_128_sha_512 () {
11691169
msg "build: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY (ASan build)"
1170-
scripts/config.pl full
1171-
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
1172-
scripts/config.pl set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
1170+
scripts/config.py full
1171+
scripts/config.py unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
1172+
scripts/config.py set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
11731173
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
11741174
make
11751175

@@ -1179,10 +1179,10 @@ component_test_ctr_drbg_aes_128_sha_512 () {
11791179

11801180
component_test_ctr_drbg_aes_128_sha_256 () {
11811181
msg "build: full + MBEDTLS_CTR_DRBG_USE_128_BIT_KEY + MBEDTLS_ENTROPY_FORCE_SHA256 (ASan build)"
1182-
scripts/config.pl full
1183-
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
1184-
scripts/config.pl set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
1185-
scripts/config.pl set MBEDTLS_ENTROPY_FORCE_SHA256
1182+
scripts/config.py full
1183+
scripts/config.py unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
1184+
scripts/config.py set MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
1185+
scripts/config.py set MBEDTLS_ENTROPY_FORCE_SHA256
11861186
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
11871187
make
11881188

@@ -1403,7 +1403,7 @@ component_build_armcc () {
14031403

14041404
component_test_allow_sha1 () {
14051405
msg "build: allow SHA1 in certificates by default"
1406-
scripts/config.pl set MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
1406+
scripts/config.py set MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
14071407
make CFLAGS='-Werror -Wall -Wextra'
14081408
msg "test: allow SHA1 in certificates by default"
14091409
make test

tests/scripts/key-exchanges.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ sub abort {
4747
print "******************************************\n";
4848

4949
# full config with all key exchanges disabled except one
50-
system( "scripts/config.pl full" ) and abort "Failed config full\n";
50+
system( "scripts/config.py full" ) and abort "Failed config full\n";
5151
for my $k (@kexes) {
5252
next if $k eq $kex;
53-
system( "scripts/config.pl unset $k" )
53+
system( "scripts/config.py unset $k" )
5454
and abort "Failed to disable $k\n";
5555
}
5656

tests/ssl-opt.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ requires_not_i686() {
296296
}
297297

298298
# Calculate the input & output maximum content lengths set in the config
299-
MAX_CONTENT_LEN=$( ../scripts/config.pl get MBEDTLS_SSL_MAX_CONTENT_LEN || echo "16384")
300-
MAX_IN_LEN=$( ../scripts/config.pl get MBEDTLS_SSL_IN_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
301-
MAX_OUT_LEN=$( ../scripts/config.pl get MBEDTLS_SSL_OUT_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
299+
MAX_CONTENT_LEN=$( ../scripts/config.py get MBEDTLS_SSL_MAX_CONTENT_LEN || echo "16384")
300+
MAX_IN_LEN=$( ../scripts/config.py get MBEDTLS_SSL_IN_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
301+
MAX_OUT_LEN=$( ../scripts/config.py get MBEDTLS_SSL_OUT_CONTENT_LEN || echo "$MAX_CONTENT_LEN")
302302

303303
if [ "$MAX_IN_LEN" -lt "$MAX_CONTENT_LEN" ]; then
304304
MAX_CONTENT_LEN="$MAX_IN_LEN"
@@ -2846,7 +2846,7 @@ run_test "Authentication: client no cert, ssl3" \
28462846
# default value (8)
28472847

28482848
MAX_IM_CA='8'
2849-
MAX_IM_CA_CONFIG=$( ../scripts/config.pl get MBEDTLS_X509_MAX_INTERMEDIATE_CA)
2849+
MAX_IM_CA_CONFIG=$( ../scripts/config.py get MBEDTLS_X509_MAX_INTERMEDIATE_CA)
28502850

28512851
if [ -n "$MAX_IM_CA_CONFIG" ] && [ "$MAX_IM_CA_CONFIG" -ne "$MAX_IM_CA" ]; then
28522852
printf "The ${CONFIG_H} file contains a value for the configuration of\n"

0 commit comments

Comments
 (0)