Gilles Peskine e85ece6584 Handshake defragmentation: reassemble incrementally
Reassemble handshake fragments incrementally instead of all at the end. That
is, every time we receive a non-initial handshake fragment, append it to the
initial fragment. Since we only have to deal with at most two handshake
fragments at the same time, this simplifies the code (no re-parsing of a
record) and is a little more memory-efficient (no need to store one record
header per record).

This commit also fixes a bug. The previous code did not calculate offsets
correctly when records use an explicit IV, which is the case in TLS 1.2 with
CBC (encrypt-then-MAC or not), GCM and CCM encryption (i.e. all but null and
ChachaPoly). This led to the wrong data when an encrypted handshake message
was fragmented (Finished or renegotiation). The new code handles this
correctly.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-05 17:02:18 +01:00
..
all.sh all.sh: improve wrapper error reporting 2024-11-04 11:40:44 +01:00
analyze_outcomes.py Handshake defragmentation: reassemble incrementally 2025-03-05 17:02:18 +01:00
audit-validity-dates.py Simplify path in audit-validity-dates.py 2024-07-05 15:49:28 +01:00
basic-build-test.sh Adapt paths for output_env.sh 2024-12-09 15:35:04 +00:00
check-generated-files.sh New generated file: tests/opt-testcases/handshake-generated.sh 2025-03-03 16:13:19 +01:00
components-basic-checks.sh Remove check_test_dependencies TF-PSA-Crypto test from Mbed TLS 2025-01-17 09:20:23 +00:00
components-build-system.sh Update paths for moved program files in components-build-system.sh 2025-02-19 15:30:25 +00:00
components-compiler.sh Update path for moved test_zeroize.gdb script 2025-02-19 15:30:25 +00:00
components-configuration-crypto.sh tests: remove references to DHE-RSA 2025-02-06 10:05:58 +01:00
components-configuration-platform.sh all.sh/components: Moved component_test_no_strings -> configuration. 2024-08-01 19:38:47 +01:00
components-configuration-tls.sh cmake: Remove unnecessary file generation disablement 2024-12-10 16:56:49 +01:00
components-configuration-x509.sh Refactor scripts to use config.py instead of config.pl 2024-12-02 16:23:06 +00:00
components-configuration.sh components-configuration.sh: update references to test_psa_constant_names.py 2025-02-05 12:04:36 +01:00
components-platform.sh Merge pull request #9738 from mpg/drop-armcc5-dev 2024-10-31 08:12:40 +00:00
components-psasim.sh psasim: small fixes to all.sh and test bash scripts 2024-08-06 11:52:00 +02:00
components-sanitizers.sh Remove interruptible tests from TSAN component 2024-12-19 10:55:37 +00:00
depends.py tests: remove references to DHE-RSA 2025-02-06 10:05:58 +01:00
gen_ctr_drbg.pl update headers 2023-11-02 19:47:20 +00:00
gen_gcm_decrypt.pl update headers 2023-11-02 19:47:20 +00:00
gen_gcm_encrypt.pl update headers 2023-11-02 19:47:20 +00:00
gen_pkcs1_v21_sign_verify.pl update headers 2023-11-02 19:47:20 +00:00
generate_server9_bad_saltlen.py Update license 2023-11-09 10:10:33 +08:00
generate-afl-tests.sh update headers 2023-11-02 19:47:20 +00:00
list_internal_identifiers.py component-basic-checks: fix paths of files moved to framework 2025-01-09 17:01:50 +01:00
list-identifiers.sh component-basic-checks: fix paths of files moved to framework 2025-01-09 17:01:50 +01:00
mbedtls-all.sh Define FRAMEWORK 2024-11-27 13:15:04 +00:00
psa_collect_statuses.py Fix paths for programs/psa 2024-11-20 16:20:48 +00:00
run_demos.py Concatenate program demos between Mbed TLS and TF-PSA-Crypto 2024-11-20 16:21:35 +00:00
run-metatests.sh Readability improvement 2023-11-15 16:56:26 +01:00
run-test-suites.pl Fix shared library builds 2024-09-11 16:07:09 +02:00
scripts_path.py Add framework/scripts to scripts_path.py 2024-05-13 13:48:13 +01:00
set_psa_test_dependencies.py update headers 2023-11-02 19:47:20 +00:00
test_config_script.py update headers 2023-11-02 19:47:20 +00:00