@@ -1305,6 +1305,7 @@ component_test_default_psa_crypto_client_without_crypto_provider () {
1305
1305
scripts/config.py unset MBEDTLS_PSA_CRYPTO_C
1306
1306
scripts/config.py unset MBEDTLS_PSA_CRYPTO_STORAGE_C
1307
1307
scripts/config.py unset MBEDTLS_PSA_ITS_FILE_C
1308
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
1308
1309
scripts/config.py set MBEDTLS_PSA_CRYPTO_CLIENT
1309
1310
scripts/config.py unset MBEDTLS_LMS_C
1310
1311
@@ -1843,6 +1844,8 @@ component_test_tls1_2_default_stream_cipher_only () {
1843
1844
scripts/config.py unset MBEDTLS_GCM_C
1844
1845
scripts/config.py unset MBEDTLS_CCM_C
1845
1846
scripts/config.py unset MBEDTLS_CHACHAPOLY_C
1847
+ # Disable TLS 1.3 (as no AEAD)
1848
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
1846
1849
# Disable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES))
1847
1850
scripts/config.py unset MBEDTLS_CIPHER_MODE_CBC
1848
1851
# Disable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC)
@@ -1869,6 +1872,8 @@ component_test_tls1_2_default_stream_cipher_only_use_psa () {
1869
1872
scripts/config.py unset MBEDTLS_GCM_C
1870
1873
scripts/config.py unset MBEDTLS_CCM_C
1871
1874
scripts/config.py unset MBEDTLS_CHACHAPOLY_C
1875
+ # Disable TLS 1.3 (as no AEAD)
1876
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
1872
1877
# Disable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES))
1873
1878
scripts/config.py unset MBEDTLS_CIPHER_MODE_CBC
1874
1879
# Disable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC)
@@ -1894,6 +1899,8 @@ component_test_tls1_2_default_cbc_legacy_cipher_only () {
1894
1899
scripts/config.py unset MBEDTLS_GCM_C
1895
1900
scripts/config.py unset MBEDTLS_CCM_C
1896
1901
scripts/config.py unset MBEDTLS_CHACHAPOLY_C
1902
+ # Disable TLS 1.3 (as no AEAD)
1903
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
1897
1904
# Enable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES))
1898
1905
scripts/config.py set MBEDTLS_CIPHER_MODE_CBC
1899
1906
# Disable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC)
@@ -1921,6 +1928,8 @@ component_test_tls1_2_deafult_cbc_legacy_cipher_only_use_psa () {
1921
1928
scripts/config.py unset MBEDTLS_GCM_C
1922
1929
scripts/config.py unset MBEDTLS_CCM_C
1923
1930
scripts/config.py unset MBEDTLS_CHACHAPOLY_C
1931
+ # Disable TLS 1.3 (as no AEAD)
1932
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
1924
1933
# Enable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES))
1925
1934
scripts/config.py set MBEDTLS_CIPHER_MODE_CBC
1926
1935
# Disable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC)
@@ -1947,6 +1956,8 @@ component_test_tls1_2_default_cbc_legacy_cbc_etm_cipher_only () {
1947
1956
scripts/config.py unset MBEDTLS_GCM_C
1948
1957
scripts/config.py unset MBEDTLS_CCM_C
1949
1958
scripts/config.py unset MBEDTLS_CHACHAPOLY_C
1959
+ # Disable TLS 1.3 (as no AEAD)
1960
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
1950
1961
# Enable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES))
1951
1962
scripts/config.py set MBEDTLS_CIPHER_MODE_CBC
1952
1963
# Enable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC)
@@ -1974,6 +1985,8 @@ component_test_tls1_2_default_cbc_legacy_cbc_etm_cipher_only_use_psa () {
1974
1985
scripts/config.py unset MBEDTLS_GCM_C
1975
1986
scripts/config.py unset MBEDTLS_CCM_C
1976
1987
scripts/config.py unset MBEDTLS_CHACHAPOLY_C
1988
+ # Disable TLS 1.3 (as no AEAD)
1989
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
1977
1990
# Enable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES))
1978
1991
scripts/config.py set MBEDTLS_CIPHER_MODE_CBC
1979
1992
# Enable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC)
@@ -2609,7 +2622,6 @@ component_test_psa_crypto_config_accel_ecdsa () {
2609
2622
2610
2623
# Start from default config (no USE_PSA) + TLS 1.3
2611
2624
helper_libtestdriver1_adjust_config " default"
2612
- scripts/config.py set MBEDTLS_SSL_PROTO_TLS1_3
2613
2625
2614
2626
# Disable the module that's accelerated
2615
2627
scripts/config.py unset MBEDTLS_ECDSA_C
@@ -2650,7 +2662,7 @@ component_test_psa_crypto_config_accel_ecdh () {
2650
2662
# Configure
2651
2663
# ---------
2652
2664
2653
- # Start from default config (no TLS 1.3, no USE_PSA)
2665
+ # Start from default config (no USE_PSA)
2654
2666
helper_libtestdriver1_adjust_config " default"
2655
2667
2656
2668
# Disable the module that's accelerated
@@ -3643,7 +3655,7 @@ component_test_psa_crypto_config_accel_hash () {
3643
3655
# Configure
3644
3656
# ---------
3645
3657
3646
- # Start from default config (no TLS 1.3, no USE_PSA)
3658
+ # Start from default config (no USE_PSA)
3647
3659
helper_libtestdriver1_adjust_config " default"
3648
3660
3649
3661
# Disable the things that are being accelerated
@@ -3687,7 +3699,7 @@ component_test_psa_crypto_config_accel_hash_keep_builtins () {
3687
3699
ALG_SHA_224 ALG_SHA_256 ALG_SHA_384 ALG_SHA_512 \
3688
3700
ALG_SHA3_224 ALG_SHA3_256 ALG_SHA3_384 ALG_SHA3_512"
3689
3701
3690
- # Start from default config (no TLS 1.3, no USE_PSA)
3702
+ # Start from default config (no USE_PSA)
3691
3703
helper_libtestdriver1_adjust_config " default"
3692
3704
3693
3705
helper_libtestdriver1_make_drivers " $loc_accel_list "
@@ -4182,7 +4194,6 @@ component_build_psa_accel_alg_hkdf() {
4182
4194
msg " build: full - MBEDTLS_USE_PSA_CRYPTO + PSA_WANT_ALG_HKDF without MBEDTLS_HKDF_C"
4183
4195
scripts/config.py full
4184
4196
scripts/config.py unset MBEDTLS_USE_PSA_CRYPTO
4185
- scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
4186
4197
scripts/config.py unset MBEDTLS_HKDF_C
4187
4198
# Make sure to unset TLS1_3 since it requires HKDF_C and will not build properly without it.
4188
4199
scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
@@ -4645,6 +4656,7 @@ component_test_no_max_fragment_length () {
4645
4656
component_test_asan_remove_peer_certificate () {
4646
4657
msg " build: default config with MBEDTLS_SSL_KEEP_PEER_CERTIFICATE disabled (ASan build)"
4647
4658
scripts/config.py unset MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
4659
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
4648
4660
CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
4649
4661
make
4650
4662
@@ -5860,8 +5872,24 @@ support_build_armcc () {
5860
5872
(check_tools " $armc5_cc " " $armc6_cc " > /dev/null 2>&1 )
5861
5873
}
5862
5874
5875
+ component_test_tls12_only () {
5876
+ msg " build: default config without MBEDTLS_SSL_PROTO_TLS1_3, cmake, gcc, ASan"
5877
+ scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
5878
+ CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
5879
+ make
5880
+
5881
+ msg " test: main suites (inc. selftests) (ASan build)"
5882
+ make test
5883
+
5884
+ msg " test: ssl-opt.sh (ASan build)"
5885
+ tests/ssl-opt.sh
5886
+
5887
+ msg " test: compat.sh (ASan build)"
5888
+ tests/compat.sh
5889
+ }
5890
+
5863
5891
component_test_tls13_only () {
5864
- msg " build: default config with MBEDTLS_SSL_PROTO_TLS1_3, without MBEDTLS_SSL_PROTO_TLS1_2"
5892
+ msg " build: default config without MBEDTLS_SSL_PROTO_TLS1_2"
5865
5893
scripts/config.py set MBEDTLS_SSL_EARLY_DATA
5866
5894
scripts/config.py set MBEDTLS_SSL_RECORD_SIZE_LIMIT
5867
5895
make CFLAGS=" '-DMBEDTLS_USER_CONFIG_FILE=\" ../tests/configs/tls13-only.h\" '"
@@ -5998,29 +6026,25 @@ component_test_tls13_only_ephemeral_all () {
5998
6026
tests/ssl-opt.sh
5999
6027
}
6000
6028
6001
- component_test_tls13 () {
6002
- msg " build: default config with MBEDTLS_SSL_PROTO_TLS1_3 enabled, without padding"
6003
- scripts/config.py set MBEDTLS_SSL_PROTO_TLS1_3
6004
- scripts/config.py set MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
6029
+ component_test_tls13_no_padding () {
6030
+ msg " build: default config plus early data minus padding"
6005
6031
scripts/config.py set MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY 1
6006
6032
scripts/config.py set MBEDTLS_SSL_EARLY_DATA
6007
6033
CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
6008
6034
make
6009
- msg " test: default config with MBEDTLS_SSL_PROTO_TLS1_3 enabled, without padding"
6035
+ msg " test: default config plus early data minus padding"
6010
6036
make test
6011
- msg " ssl-opt.sh (TLS 1.3)"
6037
+ msg " ssl-opt.sh (TLS 1.3 no padding )"
6012
6038
tests/ssl-opt.sh
6013
6039
}
6014
6040
6015
6041
component_test_tls13_no_compatibility_mode () {
6016
- msg " build: default config with MBEDTLS_SSL_PROTO_TLS1_3 enabled, without padding"
6017
- scripts/config.py set MBEDTLS_SSL_PROTO_TLS1_3
6042
+ msg " build: default config plus early data minus middlebox compatibility mode"
6018
6043
scripts/config.py unset MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
6019
- scripts/config.py set MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY 1
6020
6044
scripts/config.py set MBEDTLS_SSL_EARLY_DATA
6021
6045
CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
6022
6046
make
6023
- msg " test: default config with MBEDTLS_SSL_PROTO_TLS1_3 enabled, without padding "
6047
+ msg " test: default config plus early data minus middlebox compatibility mode "
6024
6048
make test
6025
6049
msg " ssl-opt.sh (TLS 1.3 no compatibility mode)"
6026
6050
tests/ssl-opt.sh
0 commit comments