Minos Galanakis | 6aab5b7 | 2024-07-25 14:24:37 +0100 | [diff] [blame] | 1 | # components-configuration-tls.sh |
| 2 | # |
| 3 | # Copyright The Mbed TLS Contributors |
| 4 | # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 5 | |
Minos Galanakis | 609f749 | 2024-07-31 16:39:28 +0100 | [diff] [blame] | 6 | # This file contains test components that are executed by all.sh |
Minos Galanakis | 6aab5b7 | 2024-07-25 14:24:37 +0100 | [diff] [blame] | 7 | |
| 8 | ################################################################ |
| 9 | #### Configuration Testing - TLS |
| 10 | ################################################################ |
| 11 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 12 | component_test_no_renegotiation () { |
| 13 | msg "build: Default + !MBEDTLS_SSL_RENEGOTIATION (ASan build)" # ~ 6 min |
| 14 | scripts/config.py unset MBEDTLS_SSL_RENEGOTIATION |
| 15 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 16 | make |
| 17 | |
| 18 | msg "test: !MBEDTLS_SSL_RENEGOTIATION - main suites (inc. selftests) (ASan build)" # ~ 50s |
| 19 | make test |
| 20 | |
| 21 | msg "test: !MBEDTLS_SSL_RENEGOTIATION - ssl-opt.sh (ASan build)" # ~ 6 min |
| 22 | tests/ssl-opt.sh |
| 23 | } |
| 24 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 25 | component_test_tls1_2_default_stream_cipher_only () { |
| 26 | msg "build: default with only stream cipher use psa" |
| 27 | |
| 28 | scripts/config.py set MBEDTLS_USE_PSA_CRYPTO |
| 29 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 30 | # Disable AEAD (controlled by the presence of one of GCM_C, CCM_C, CHACHAPOLY_C) |
| 31 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CCM |
| 32 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CCM_STAR_NO_TAG |
| 33 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_GCM |
| 34 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CHACHA20_POLY1305 |
| 35 | # Note: The three unsets below are to be removed for Mbed TLS 4.0 |
| 36 | scripts/config.py unset MBEDTLS_GCM_C |
| 37 | scripts/config.py unset MBEDTLS_CCM_C |
| 38 | scripts/config.py unset MBEDTLS_CHACHAPOLY_C |
| 39 | #Disable TLS 1.3 (as no AEAD) |
| 40 | scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 |
| 41 | # Disable CBC. Note: When implemented, PSA_WANT_ALG_CBC_MAC will also need to be unset here to fully disable CBC |
| 42 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CBC_NO_PADDING |
| 43 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CBC_PKCS7 |
| 44 | # Disable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES)) |
| 45 | # Note: The unset below is to be removed for 4.0 |
| 46 | scripts/config.py unset MBEDTLS_CIPHER_MODE_CBC |
| 47 | # Disable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC) |
| 48 | scripts/config.py unset MBEDTLS_SSL_ENCRYPT_THEN_MAC |
| 49 | # Enable stream (currently that's just the NULL pseudo-cipher (controlled by MBEDTLS_CIPHER_NULL_CIPHER)) |
| 50 | scripts/config.py set MBEDTLS_CIPHER_NULL_CIPHER |
| 51 | # Modules that depend on AEAD |
| 52 | scripts/config.py unset MBEDTLS_SSL_CONTEXT_SERIALIZATION |
| 53 | scripts/config.py unset MBEDTLS_SSL_TICKET_C |
| 54 | |
| 55 | make |
| 56 | |
| 57 | msg "test: default with only stream cipher use psa" |
| 58 | make test |
| 59 | |
| 60 | # Not running ssl-opt.sh because most tests require a non-NULL ciphersuite. |
| 61 | } |
| 62 | |
| 63 | component_test_tls1_2_default_cbc_legacy_cipher_only () { |
| 64 | msg "build: default with only CBC-legacy cipher use psa" |
| 65 | |
| 66 | scripts/config.py set MBEDTLS_USE_PSA_CRYPTO |
| 67 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 68 | # Disable AEAD (controlled by the presence of one of GCM_C, CCM_C, CHACHAPOLY_C) |
| 69 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CCM |
| 70 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CCM_STAR_NO_TAG |
| 71 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_GCM |
| 72 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CHACHA20_POLY1305 |
| 73 | # Note: The three unsets below are to be removed for Mbed TLS 4.0 |
| 74 | scripts/config.py unset MBEDTLS_GCM_C |
| 75 | scripts/config.py unset MBEDTLS_CCM_C |
| 76 | scripts/config.py unset MBEDTLS_CHACHAPOLY_C |
| 77 | #Disable TLS 1.3 (as no AEAD) |
| 78 | scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 |
| 79 | # Enable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES)) |
| 80 | scripts/config.py -f $CRYPTO_CONFIG_H set PSA_WANT_ALG_CBC_NO_PADDING |
| 81 | # Disable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC) |
| 82 | scripts/config.py unset MBEDTLS_SSL_ENCRYPT_THEN_MAC |
| 83 | # Disable stream (currently that's just the NULL pseudo-cipher (controlled by MBEDTLS_CIPHER_NULL_CIPHER)) |
| 84 | scripts/config.py unset MBEDTLS_CIPHER_NULL_CIPHER |
| 85 | # Modules that depend on AEAD |
| 86 | scripts/config.py unset MBEDTLS_SSL_CONTEXT_SERIALIZATION |
| 87 | scripts/config.py unset MBEDTLS_SSL_TICKET_C |
| 88 | |
| 89 | make |
| 90 | |
| 91 | msg "test: default with only CBC-legacy cipher use psa" |
| 92 | make test |
| 93 | |
| 94 | msg "test: default with only CBC-legacy cipher use psa - ssl-opt.sh (subset)" |
| 95 | tests/ssl-opt.sh -f "TLS 1.2" |
| 96 | } |
| 97 | |
| 98 | component_test_tls1_2_default_cbc_legacy_cbc_etm_cipher_only () { |
| 99 | msg "build: default with only CBC-legacy and CBC-EtM ciphers use psa" |
| 100 | |
| 101 | scripts/config.py set MBEDTLS_USE_PSA_CRYPTO |
| 102 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 103 | # Disable AEAD (controlled by the presence of one of GCM_C, CCM_C, CHACHAPOLY_C) |
| 104 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CCM |
| 105 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CCM_STAR_NO_TAG |
| 106 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_GCM |
| 107 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_CHACHA20_POLY1305 |
| 108 | # Note: The three unsets below are to be removed for Mbed TLS 4.0 |
| 109 | scripts/config.py unset MBEDTLS_GCM_C |
| 110 | scripts/config.py unset MBEDTLS_CCM_C |
| 111 | scripts/config.py unset MBEDTLS_CHACHAPOLY_C |
| 112 | #Disable TLS 1.3 (as no AEAD) |
| 113 | scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 |
| 114 | # Enable CBC-legacy (controlled by MBEDTLS_CIPHER_MODE_CBC plus at least one block cipher (AES, ARIA, Camellia, DES)) |
| 115 | scripts/config.py -f $CRYPTO_CONFIG_H set PSA_WANT_ALG_CBC_NO_PADDING |
| 116 | # Enable CBC-EtM (controlled by the same as CBC-legacy plus MBEDTLS_SSL_ENCRYPT_THEN_MAC) |
| 117 | scripts/config.py set MBEDTLS_SSL_ENCRYPT_THEN_MAC |
| 118 | # Disable stream (currently that's just the NULL pseudo-cipher (controlled by MBEDTLS_CIPHER_NULL_CIPHER)) |
| 119 | scripts/config.py unset MBEDTLS_CIPHER_NULL_CIPHER |
| 120 | # Modules that depend on AEAD |
| 121 | scripts/config.py unset MBEDTLS_SSL_CONTEXT_SERIALIZATION |
| 122 | scripts/config.py unset MBEDTLS_SSL_TICKET_C |
| 123 | |
| 124 | make |
| 125 | |
| 126 | msg "test: default with only CBC-legacy and CBC-EtM ciphers use psa" |
| 127 | make test |
| 128 | |
| 129 | msg "test: default with only CBC-legacy and CBC-EtM ciphers use psa - ssl-opt.sh (subset)" |
| 130 | tests/ssl-opt.sh -f "TLS 1.2" |
| 131 | } |
| 132 | |
| 133 | # We're not aware of any other (open source) implementation of EC J-PAKE in TLS |
| 134 | # that we could use for interop testing. However, we now have sort of two |
| 135 | # implementations ourselves: one using PSA, the other not. At least test that |
| 136 | # these two interoperate with each other. |
Minos Galanakis | f78447f | 2024-07-26 20:49:51 +0100 | [diff] [blame] | 137 | component_test_tls1_2_ecjpake_compatibility () { |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 138 | msg "build: TLS1.2 server+client w/ EC-JPAKE w/o USE_PSA" |
| 139 | scripts/config.py set MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED |
| 140 | # Explicitly make lib first to avoid a race condition: |
| 141 | # https://github.com/Mbed-TLS/mbedtls/issues/8229 |
| 142 | make lib |
| 143 | make -C programs ssl/ssl_server2 ssl/ssl_client2 |
| 144 | cp programs/ssl/ssl_server2 s2_no_use_psa |
| 145 | cp programs/ssl/ssl_client2 c2_no_use_psa |
| 146 | |
| 147 | msg "build: TLS1.2 server+client w/ EC-JPAKE w/ USE_PSA" |
| 148 | scripts/config.py set MBEDTLS_USE_PSA_CRYPTO |
| 149 | make clean |
| 150 | make lib |
| 151 | make -C programs ssl/ssl_server2 ssl/ssl_client2 |
| 152 | make -C programs test/udp_proxy test/query_compile_time_config |
| 153 | |
| 154 | msg "test: server w/o USE_PSA - client w/ USE_PSA, text password" |
| 155 | P_SRV=../s2_no_use_psa tests/ssl-opt.sh -f "ECJPAKE: working, TLS" |
| 156 | msg "test: server w/o USE_PSA - client w/ USE_PSA, opaque password" |
| 157 | P_SRV=../s2_no_use_psa tests/ssl-opt.sh -f "ECJPAKE: opaque password client only, working, TLS" |
| 158 | msg "test: client w/o USE_PSA - server w/ USE_PSA, text password" |
| 159 | P_CLI=../c2_no_use_psa tests/ssl-opt.sh -f "ECJPAKE: working, TLS" |
| 160 | msg "test: client w/o USE_PSA - server w/ USE_PSA, opaque password" |
| 161 | P_CLI=../c2_no_use_psa tests/ssl-opt.sh -f "ECJPAKE: opaque password server only, working, TLS" |
| 162 | |
| 163 | rm s2_no_use_psa c2_no_use_psa |
| 164 | } |
| 165 | |
Gilles Peskine | 063fb8c | 2024-09-14 11:10:05 +0200 | [diff] [blame^] | 166 | component_test_tls1_2_ccm_psk_legacy () { |
| 167 | msg "build: configs/config-ccm-psk-tls1_2.h" |
| 168 | cp configs/config-ccm-psk-tls1_2.h "$CONFIG_H" |
| 169 | # test-ref-configs works by overwriting mbedtls_config.h; this makes cmake |
| 170 | # want to re-generate generated files that depend on it, quite correctly. |
| 171 | # However this doesn't work as the generation script expects a specific |
| 172 | # format for mbedtls_config.h, which the other files don't follow. Also, |
| 173 | # cmake can't know this, but re-generation is actually not necessary as |
| 174 | # the generated files only depend on the list of available options, not |
| 175 | # whether they're on or off. So, disable cmake's (over-sensitive here) |
| 176 | # dependency resolution for generated files and just rely on them being |
| 177 | # present (thanks to pre_generate_files) by turning GEN_FILES off. |
| 178 | CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan . |
| 179 | make |
| 180 | |
| 181 | msg "test: configs/config-ccm-psk-tls1_2.h - unit tests" |
| 182 | make test |
| 183 | |
| 184 | msg "test: configs/config-ccm-psk-tls1_2.h - compat.sh" |
| 185 | tests/compat.sh -m tls12 -f '^TLS_PSK_WITH_AES_..._CCM_8' |
| 186 | } |
| 187 | |
| 188 | component_test_tls1_2_ccm_psk_psa () { |
| 189 | msg "build: configs/config-ccm-psk-tls1_2.h + USE_PSA_CRYPTO" |
| 190 | cp configs/config-ccm-psk-tls1_2.h "$CONFIG_H" |
| 191 | scripts/config.py set MBEDTLS_PSA_CRYPTO_C |
| 192 | scripts/config.py set MBEDTLS_USE_PSA_CRYPTO |
| 193 | # test-ref-configs works by overwriting mbedtls_config.h; this makes cmake |
| 194 | # want to re-generate generated files that depend on it, quite correctly. |
| 195 | # However this doesn't work as the generation script expects a specific |
| 196 | # format for mbedtls_config.h, which the other files don't follow. Also, |
| 197 | # cmake can't know this, but re-generation is actually not necessary as |
| 198 | # the generated files only depend on the list of available options, not |
| 199 | # whether they're on or off. So, disable cmake's (over-sensitive here) |
| 200 | # dependency resolution for generated files and just rely on them being |
| 201 | # present (thanks to pre_generate_files) by turning GEN_FILES off. |
| 202 | CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan . |
| 203 | make |
| 204 | |
| 205 | msg "test: configs/config-ccm-psk-tls1_2.h + USE_PSA_CRYPTO - unit tests" |
| 206 | make test |
| 207 | |
| 208 | msg "test: configs/config-ccm-psk-tls1_2.h + USE_PSA_CRYPTO - compat.sh" |
| 209 | tests/compat.sh -m tls12 -f '^TLS_PSK_WITH_AES_..._CCM_8' |
| 210 | } |
| 211 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 212 | component_test_small_ssl_out_content_len () { |
| 213 | msg "build: small SSL_OUT_CONTENT_LEN (ASan build)" |
| 214 | scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 16384 |
| 215 | scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 4096 |
| 216 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 217 | make |
| 218 | |
| 219 | msg "test: small SSL_OUT_CONTENT_LEN - ssl-opt.sh MFL and large packet tests" |
| 220 | tests/ssl-opt.sh -f "Max fragment\|Large packet" |
| 221 | } |
| 222 | |
| 223 | component_test_small_ssl_in_content_len () { |
| 224 | msg "build: small SSL_IN_CONTENT_LEN (ASan build)" |
| 225 | scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 4096 |
| 226 | scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 16384 |
| 227 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 228 | make |
| 229 | |
| 230 | msg "test: small SSL_IN_CONTENT_LEN - ssl-opt.sh MFL tests" |
| 231 | tests/ssl-opt.sh -f "Max fragment" |
| 232 | } |
| 233 | |
| 234 | component_test_small_ssl_dtls_max_buffering () { |
| 235 | msg "build: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #0" |
| 236 | scripts/config.py set MBEDTLS_SSL_DTLS_MAX_BUFFERING 1000 |
| 237 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 238 | make |
| 239 | |
| 240 | msg "test: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #0 - ssl-opt.sh specific reordering test" |
| 241 | tests/ssl-opt.sh -f "DTLS reordering: Buffer out-of-order hs msg before reassembling next, free buffered msg" |
| 242 | } |
| 243 | |
| 244 | component_test_small_mbedtls_ssl_dtls_max_buffering () { |
| 245 | msg "build: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #1" |
| 246 | scripts/config.py set MBEDTLS_SSL_DTLS_MAX_BUFFERING 190 |
| 247 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 248 | make |
| 249 | |
| 250 | msg "test: small MBEDTLS_SSL_DTLS_MAX_BUFFERING #1 - ssl-opt.sh specific reordering test" |
| 251 | tests/ssl-opt.sh -f "DTLS reordering: Buffer encrypted Finished message, drop for fragmented NewSessionTicket" |
| 252 | } |
| 253 | |
| 254 | # Common helper for component_full_without_ecdhe_ecdsa() and |
| 255 | # component_full_without_ecdhe_ecdsa_and_tls13() which: |
| 256 | # - starts from the "full" configuration minus the list of symbols passed in |
| 257 | # as 1st parameter |
| 258 | # - build |
| 259 | # - test only TLS (i.e. test_suite_tls and ssl-opt) |
| 260 | build_full_minus_something_and_test_tls () { |
| 261 | symbols_to_disable="$1" |
| 262 | |
| 263 | msg "build: full minus something, test TLS" |
| 264 | |
| 265 | scripts/config.py full |
| 266 | for sym in $symbols_to_disable; do |
| 267 | echo "Disabling $sym" |
| 268 | scripts/config.py unset $sym |
| 269 | done |
| 270 | |
| 271 | make |
| 272 | |
| 273 | msg "test: full minus something, test TLS" |
| 274 | ( cd tests; ./test_suite_ssl ) |
| 275 | |
| 276 | msg "ssl-opt: full minus something, test TLS" |
| 277 | tests/ssl-opt.sh |
| 278 | } |
| 279 | |
| 280 | component_full_without_ecdhe_ecdsa () { |
| 281 | build_full_minus_something_and_test_tls "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED" |
| 282 | } |
| 283 | |
| 284 | component_full_without_ecdhe_ecdsa_and_tls13 () { |
| 285 | build_full_minus_something_and_test_tls "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 286 | MBEDTLS_SSL_PROTO_TLS1_3" |
| 287 | } |
| 288 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 289 | component_build_no_ssl_srv () { |
| 290 | msg "build: full config except SSL server, make, gcc" # ~ 30s |
| 291 | scripts/config.py full |
| 292 | scripts/config.py unset MBEDTLS_SSL_SRV_C |
Minos Galanakis | a368c8a | 2024-08-06 12:06:51 +0100 | [diff] [blame] | 293 | make CC=gcc CFLAGS='-Werror -Wall -Wextra -O1 -Wmissing-prototypes' |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 294 | } |
| 295 | |
| 296 | component_build_no_ssl_cli () { |
| 297 | msg "build: full config except SSL client, make, gcc" # ~ 30s |
| 298 | scripts/config.py full |
| 299 | scripts/config.py unset MBEDTLS_SSL_CLI_C |
Minos Galanakis | a368c8a | 2024-08-06 12:06:51 +0100 | [diff] [blame] | 300 | make CC=gcc CFLAGS='-Werror -Wall -Wextra -O1 -Wmissing-prototypes' |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 301 | } |
| 302 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 303 | component_test_no_max_fragment_length () { |
| 304 | # Run max fragment length tests with MFL disabled |
| 305 | msg "build: default config except MFL extension (ASan build)" # ~ 30s |
| 306 | scripts/config.py unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
| 307 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 308 | make |
| 309 | |
| 310 | msg "test: ssl-opt.sh, MFL-related tests" |
| 311 | tests/ssl-opt.sh -f "Max fragment length" |
| 312 | } |
| 313 | |
| 314 | component_test_asan_remove_peer_certificate () { |
| 315 | msg "build: default config with MBEDTLS_SSL_KEEP_PEER_CERTIFICATE disabled (ASan build)" |
| 316 | scripts/config.py unset MBEDTLS_SSL_KEEP_PEER_CERTIFICATE |
| 317 | scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 |
| 318 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 319 | make |
| 320 | |
| 321 | msg "test: !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE" |
| 322 | make test |
| 323 | |
| 324 | msg "test: ssl-opt.sh, !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE" |
| 325 | tests/ssl-opt.sh |
| 326 | |
| 327 | msg "test: compat.sh, !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE" |
| 328 | tests/compat.sh |
| 329 | |
| 330 | msg "test: context-info.sh, !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE" |
| 331 | tests/context-info.sh |
| 332 | } |
| 333 | |
| 334 | component_test_no_max_fragment_length_small_ssl_out_content_len () { |
| 335 | msg "build: no MFL extension, small SSL_OUT_CONTENT_LEN (ASan build)" |
| 336 | scripts/config.py unset MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
| 337 | scripts/config.py set MBEDTLS_SSL_IN_CONTENT_LEN 16384 |
| 338 | scripts/config.py set MBEDTLS_SSL_OUT_CONTENT_LEN 4096 |
| 339 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 340 | make |
| 341 | |
| 342 | msg "test: MFL tests (disabled MFL extension case) & large packet tests" |
| 343 | tests/ssl-opt.sh -f "Max fragment length\|Large buffer" |
| 344 | |
| 345 | msg "test: context-info.sh (disabled MFL extension case)" |
| 346 | tests/context-info.sh |
| 347 | } |
| 348 | |
| 349 | component_test_variable_ssl_in_out_buffer_len () { |
| 350 | msg "build: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled (ASan build)" |
| 351 | scripts/config.py set MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH |
| 352 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 353 | make |
| 354 | |
| 355 | msg "test: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled" |
| 356 | make test |
| 357 | |
| 358 | msg "test: ssl-opt.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled" |
| 359 | tests/ssl-opt.sh |
| 360 | |
| 361 | msg "test: compat.sh, MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH enabled" |
| 362 | tests/compat.sh |
| 363 | } |
| 364 | |
| 365 | component_test_dtls_cid_legacy () { |
| 366 | msg "build: MBEDTLS_SSL_DTLS_CONNECTION_ID (legacy) enabled (ASan build)" |
| 367 | scripts/config.py set MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT 1 |
| 368 | |
| 369 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 370 | make |
| 371 | |
| 372 | msg "test: MBEDTLS_SSL_DTLS_CONNECTION_ID (legacy)" |
| 373 | make test |
| 374 | |
| 375 | msg "test: ssl-opt.sh, MBEDTLS_SSL_DTLS_CONNECTION_ID (legacy) enabled" |
| 376 | tests/ssl-opt.sh |
| 377 | |
| 378 | msg "test: compat.sh, MBEDTLS_SSL_DTLS_CONNECTION_ID (legacy) enabled" |
| 379 | tests/compat.sh |
| 380 | } |
| 381 | |
| 382 | component_test_ssl_alloc_buffer_and_mfl () { |
| 383 | msg "build: default config with memory buffer allocator and MFL extension" |
| 384 | scripts/config.py set MBEDTLS_MEMORY_BUFFER_ALLOC_C |
| 385 | scripts/config.py set MBEDTLS_PLATFORM_MEMORY |
| 386 | scripts/config.py set MBEDTLS_MEMORY_DEBUG |
| 387 | scripts/config.py set MBEDTLS_SSL_MAX_FRAGMENT_LENGTH |
| 388 | scripts/config.py set MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH |
| 389 | cmake -DCMAKE_BUILD_TYPE:String=Release . |
| 390 | make |
| 391 | |
| 392 | msg "test: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH, MBEDTLS_MEMORY_BUFFER_ALLOC_C, MBEDTLS_MEMORY_DEBUG and MBEDTLS_SSL_MAX_FRAGMENT_LENGTH" |
| 393 | make test |
| 394 | |
| 395 | msg "test: MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH, MBEDTLS_MEMORY_BUFFER_ALLOC_C, MBEDTLS_MEMORY_DEBUG and MBEDTLS_SSL_MAX_FRAGMENT_LENGTH" |
| 396 | tests/ssl-opt.sh -f "Handshake memory usage" |
| 397 | } |
| 398 | |
| 399 | component_test_when_no_ciphersuites_have_mac () { |
| 400 | msg "build: when no ciphersuites have MAC" |
| 401 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 402 | scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_CBC_NO_PADDING |
| 403 | scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_CBC_PKCS7 |
| 404 | scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_CMAC |
| 405 | scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128 |
| 406 | |
| 407 | scripts/config.py unset MBEDTLS_CIPHER_NULL_CIPHER |
| 408 | scripts/config.py unset MBEDTLS_CIPHER_MODE_CBC |
| 409 | scripts/config.py unset MBEDTLS_CMAC_C |
| 410 | |
| 411 | make |
| 412 | |
| 413 | msg "test: !MBEDTLS_SSL_SOME_SUITES_USE_MAC" |
| 414 | make test |
| 415 | |
| 416 | msg "test ssl-opt.sh: !MBEDTLS_SSL_SOME_SUITES_USE_MAC" |
| 417 | tests/ssl-opt.sh -f 'Default\|EtM' -e 'without EtM' |
| 418 | } |
| 419 | |
| 420 | component_test_tls12_only () { |
| 421 | msg "build: default config without MBEDTLS_SSL_PROTO_TLS1_3, cmake, gcc, ASan" |
| 422 | scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 |
| 423 | CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 424 | make |
| 425 | |
| 426 | msg "test: main suites (inc. selftests) (ASan build)" |
| 427 | make test |
| 428 | |
| 429 | msg "test: ssl-opt.sh (ASan build)" |
| 430 | tests/ssl-opt.sh |
| 431 | |
| 432 | msg "test: compat.sh (ASan build)" |
| 433 | tests/compat.sh |
| 434 | } |
| 435 | |
| 436 | component_test_tls13_only () { |
| 437 | msg "build: default config without MBEDTLS_SSL_PROTO_TLS1_2" |
| 438 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
| 439 | scripts/config.py set MBEDTLS_SSL_RECORD_SIZE_LIMIT |
| 440 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 441 | |
| 442 | msg "test: TLS 1.3 only, all key exchange modes enabled" |
| 443 | make test |
| 444 | |
| 445 | msg "ssl-opt.sh: TLS 1.3 only, all key exchange modes enabled" |
| 446 | tests/ssl-opt.sh |
| 447 | } |
| 448 | |
| 449 | component_test_tls13_only_psk () { |
| 450 | msg "build: TLS 1.3 only from default, only PSK key exchange mode" |
| 451 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED |
| 452 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 453 | scripts/config.py unset MBEDTLS_X509_CRT_PARSE_C |
| 454 | scripts/config.py unset MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 455 | scripts/config.py unset MBEDTLS_SSL_SERVER_NAME_INDICATION |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 456 | scripts/config.py unset MBEDTLS_PKCS7_C |
| 457 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 458 | |
| 459 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 460 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_ECDH |
| 461 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_ECDSA |
| 462 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_DETERMINISTIC_ECDSA |
| 463 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_OAEP |
| 464 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_PSS |
| 465 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_FFDH |
| 466 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_KEY_TYPE_DH_PUBLIC_KEY |
| 467 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_KEY_TYPE_DH_KEY_PAIR_BASIC |
| 468 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_KEY_TYPE_DH_KEY_PAIR_IMPORT |
| 469 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_KEY_TYPE_DH_KEY_PAIR_EXPORT |
| 470 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_KEY_TYPE_DH_KEY_PAIR_GENERATE |
| 471 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_DH_RFC7919_2048 |
| 472 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_DH_RFC7919_3072 |
| 473 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_DH_RFC7919_4096 |
| 474 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_DH_RFC7919_6144 |
| 475 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_DH_RFC7919_8192 |
Ronald Cron | 4153ebb | 2024-09-11 15:32:48 +0200 | [diff] [blame] | 476 | # Note: The four unsets below are to be removed for Mbed TLS 4.0 |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 477 | scripts/config.py unset MBEDTLS_ECDH_C |
| 478 | scripts/config.py unset MBEDTLS_ECDSA_C |
| 479 | scripts/config.py unset MBEDTLS_PKCS1_V21 |
| 480 | scripts/config.py unset MBEDTLS_DHM_C |
| 481 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 482 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 483 | |
| 484 | msg "test_suite_ssl: TLS 1.3 only, only PSK key exchange mode enabled" |
| 485 | cd tests; ./test_suite_ssl; cd .. |
| 486 | |
| 487 | msg "ssl-opt.sh: TLS 1.3 only, only PSK key exchange mode enabled" |
| 488 | tests/ssl-opt.sh |
| 489 | } |
| 490 | |
| 491 | component_test_tls13_only_ephemeral () { |
| 492 | msg "build: TLS 1.3 only from default, only ephemeral key exchange mode" |
| 493 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED |
| 494 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED |
| 495 | scripts/config.py unset MBEDTLS_SSL_EARLY_DATA |
| 496 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 497 | |
| 498 | msg "test_suite_ssl: TLS 1.3 only, only ephemeral key exchange mode" |
| 499 | cd tests; ./test_suite_ssl; cd .. |
| 500 | |
| 501 | msg "ssl-opt.sh: TLS 1.3 only, only ephemeral key exchange mode" |
| 502 | tests/ssl-opt.sh |
| 503 | } |
| 504 | |
| 505 | component_test_tls13_only_ephemeral_ffdh () { |
| 506 | msg "build: TLS 1.3 only from default, only ephemeral ffdh key exchange mode" |
| 507 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED |
| 508 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED |
| 509 | scripts/config.py unset MBEDTLS_SSL_EARLY_DATA |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 510 | |
| 511 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 512 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_ECDH |
Ronald Cron | 4153ebb | 2024-09-11 15:32:48 +0200 | [diff] [blame] | 513 | # Note: The unset below is to be removed for Mbed TLS 4.0 |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 514 | scripts/config.py unset MBEDTLS_ECDH_C |
| 515 | |
| 516 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 517 | |
| 518 | msg "test_suite_ssl: TLS 1.3 only, only ephemeral ffdh key exchange mode" |
| 519 | cd tests; ./test_suite_ssl; cd .. |
| 520 | |
| 521 | msg "ssl-opt.sh: TLS 1.3 only, only ephemeral ffdh key exchange mode" |
| 522 | tests/ssl-opt.sh |
| 523 | } |
| 524 | |
| 525 | component_test_tls13_only_psk_ephemeral () { |
| 526 | msg "build: TLS 1.3 only from default, only PSK ephemeral key exchange mode" |
| 527 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED |
| 528 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED |
| 529 | scripts/config.py unset MBEDTLS_X509_CRT_PARSE_C |
| 530 | scripts/config.py unset MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 531 | scripts/config.py unset MBEDTLS_SSL_SERVER_NAME_INDICATION |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 532 | scripts/config.py unset MBEDTLS_PKCS7_C |
| 533 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 534 | |
| 535 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 536 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_ECDSA |
| 537 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_DETERMINISTIC_ECDSA |
| 538 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_OAEP |
| 539 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_PSS |
Ronald Cron | 4153ebb | 2024-09-11 15:32:48 +0200 | [diff] [blame] | 540 | # Note: The two unsets below are to be removed for Mbed TLS 4.0 |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 541 | scripts/config.py unset MBEDTLS_ECDSA_C |
| 542 | scripts/config.py unset MBEDTLS_PKCS1_V21 |
| 543 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 544 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 545 | |
| 546 | msg "test_suite_ssl: TLS 1.3 only, only PSK ephemeral key exchange mode" |
| 547 | cd tests; ./test_suite_ssl; cd .. |
| 548 | |
| 549 | msg "ssl-opt.sh: TLS 1.3 only, only PSK ephemeral key exchange mode" |
| 550 | tests/ssl-opt.sh |
| 551 | } |
| 552 | |
| 553 | component_test_tls13_only_psk_ephemeral_ffdh () { |
| 554 | msg "build: TLS 1.3 only from default, only PSK ephemeral ffdh key exchange mode" |
| 555 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED |
| 556 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED |
| 557 | scripts/config.py unset MBEDTLS_X509_CRT_PARSE_C |
| 558 | scripts/config.py unset MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 559 | scripts/config.py unset MBEDTLS_SSL_SERVER_NAME_INDICATION |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 560 | scripts/config.py unset MBEDTLS_PKCS7_C |
| 561 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 562 | |
| 563 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 564 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_ECDH |
| 565 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_ECDSA |
| 566 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_DETERMINISTIC_ECDSA |
| 567 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_OAEP |
| 568 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_PSS |
| 569 | # Note: The three unsets below are to be removed for Mbed TLS 4.0 |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 570 | scripts/config.py unset MBEDTLS_ECDH_C |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 571 | scripts/config.py unset MBEDTLS_ECDSA_C |
| 572 | scripts/config.py unset MBEDTLS_PKCS1_V21 |
| 573 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 574 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 575 | |
| 576 | msg "test_suite_ssl: TLS 1.3 only, only PSK ephemeral ffdh key exchange mode" |
| 577 | cd tests; ./test_suite_ssl; cd .. |
| 578 | |
| 579 | msg "ssl-opt.sh: TLS 1.3 only, only PSK ephemeral ffdh key exchange mode" |
| 580 | tests/ssl-opt.sh |
| 581 | } |
| 582 | |
| 583 | component_test_tls13_only_psk_all () { |
| 584 | msg "build: TLS 1.3 only from default, without ephemeral key exchange mode" |
| 585 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED |
| 586 | scripts/config.py unset MBEDTLS_X509_CRT_PARSE_C |
| 587 | scripts/config.py unset MBEDTLS_X509_RSASSA_PSS_SUPPORT |
| 588 | scripts/config.py unset MBEDTLS_SSL_SERVER_NAME_INDICATION |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 589 | scripts/config.py unset MBEDTLS_PKCS7_C |
| 590 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 591 | |
| 592 | scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG |
| 593 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_ECDSA |
| 594 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_DETERMINISTIC_ECDSA |
| 595 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_OAEP |
| 596 | scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_RSA_PSS |
Ronald Cron | 4153ebb | 2024-09-11 15:32:48 +0200 | [diff] [blame] | 597 | # Note: The two unsets below are to be removed for Mbed TLS 4.0 |
Ronald Cron | a9511bc | 2024-09-06 09:21:10 +0200 | [diff] [blame] | 598 | scripts/config.py unset MBEDTLS_ECDSA_C |
| 599 | scripts/config.py unset MBEDTLS_PKCS1_V21 |
| 600 | |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 601 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 602 | |
| 603 | msg "test_suite_ssl: TLS 1.3 only, PSK and PSK ephemeral key exchange modes" |
| 604 | cd tests; ./test_suite_ssl; cd .. |
| 605 | |
| 606 | msg "ssl-opt.sh: TLS 1.3 only, PSK and PSK ephemeral key exchange modes" |
| 607 | tests/ssl-opt.sh |
| 608 | } |
| 609 | |
| 610 | component_test_tls13_only_ephemeral_all () { |
| 611 | msg "build: TLS 1.3 only from default, without PSK key exchange mode" |
| 612 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED |
| 613 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
| 614 | make CFLAGS="'-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/tls13-only.h\"'" |
| 615 | |
| 616 | msg "test_suite_ssl: TLS 1.3 only, ephemeral and PSK ephemeral key exchange modes" |
| 617 | cd tests; ./test_suite_ssl; cd .. |
| 618 | |
| 619 | msg "ssl-opt.sh: TLS 1.3 only, ephemeral and PSK ephemeral key exchange modes" |
| 620 | tests/ssl-opt.sh |
| 621 | } |
| 622 | |
| 623 | component_test_tls13_no_padding () { |
| 624 | msg "build: default config plus early data minus padding" |
| 625 | scripts/config.py set MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY 1 |
| 626 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
| 627 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 628 | make |
| 629 | msg "test: default config plus early data minus padding" |
| 630 | make test |
| 631 | msg "ssl-opt.sh (TLS 1.3 no padding)" |
| 632 | tests/ssl-opt.sh |
| 633 | } |
| 634 | |
| 635 | component_test_tls13_no_compatibility_mode () { |
| 636 | msg "build: default config plus early data minus middlebox compatibility mode" |
| 637 | scripts/config.py unset MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE |
| 638 | scripts/config.py set MBEDTLS_SSL_EARLY_DATA |
| 639 | CC=$ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 640 | make |
| 641 | msg "test: default config plus early data minus middlebox compatibility mode" |
| 642 | make test |
| 643 | msg "ssl-opt.sh (TLS 1.3 no compatibility mode)" |
| 644 | tests/ssl-opt.sh |
| 645 | } |
| 646 | |
Minos Galanakis | f78447f | 2024-07-26 20:49:51 +0100 | [diff] [blame] | 647 | component_test_full_minus_session_tickets () { |
Minos Galanakis | 7665a93 | 2024-07-26 15:45:11 +0100 | [diff] [blame] | 648 | msg "build: full config without session tickets" |
| 649 | scripts/config.py full |
| 650 | scripts/config.py unset MBEDTLS_SSL_SESSION_TICKETS |
| 651 | scripts/config.py unset MBEDTLS_SSL_EARLY_DATA |
| 652 | CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan . |
| 653 | make |
| 654 | msg "test: full config without session tickets" |
| 655 | make test |
| 656 | msg "ssl-opt.sh (full config without session tickets)" |
| 657 | tests/ssl-opt.sh |
| 658 | } |
| 659 | |
Minos Galanakis | 4b6ee64 | 2024-08-01 11:20:02 +0100 | [diff] [blame] | 660 | component_test_depends_py_kex () { |
| 661 | msg "test/build: depends.py kex (gcc)" |
| 662 | tests/scripts/depends.py kex --unset-use-psa |
| 663 | } |
| 664 | |
| 665 | component_test_depends_py_kex_psa () { |
| 666 | msg "test/build: depends.py kex (gcc) with MBEDTLS_USE_PSA_CRYPTO defined" |
| 667 | tests/scripts/depends.py kex |
| 668 | } |
| 669 | |
Minos Galanakis | 6aab5b7 | 2024-07-25 14:24:37 +0100 | [diff] [blame] | 670 | |