Gilles Peskine cc856a2c0e 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:03:20 +01:00
..
all.sh Define FRAMEWORK 2024-11-27 13:21:53 +00:00
analyze_outcomes.py Handshake defragmentation: reassemble incrementally 2025-03-05 17:03:20 +01:00
audit-validity-dates.py Simplify path in audit-validity-dates.py 2024-07-08 15:36:48 +01:00
basic-build-test.sh Adapt paths for output_env.sh 2024-12-09 15:37:49 +00:00
check-generated-files.sh New generated file: tests/opt-testcases/handshake-generated.sh 2025-03-03 20:58:32 +01:00
components-basic-checks.sh component-basic-checks: fix paths of files moved to framework 2025-01-09 17:05:21 +01:00
components-build-system.sh Update paths for moved dlopen_demo.sh 2025-02-20 14:51:26 +00:00
components-compiler.sh Update path for moved test_zeroize.gdb script 2025-02-20 14:51:26 +00:00
components-compliance.sh components-compliance.sh: update references to test_psa_compliance.py 2025-02-05 12:07:25 +01:00
components-configuration-crypto.sh Disable test hooks when checking missing symbols 2024-11-14 14:19:49 +00:00
components-configuration-platform.sh Extract configuration-platform components into a separate file. 2024-08-05 12:01:53 +01:00
components-configuration-tls.sh Move config-thread.h testing to separate all.sh components 2024-09-19 18:56:01 +02:00
components-configuration-x509.sh Refactor scripts to use config.py instead of config.pl 2024-12-05 10:55:31 +00:00
components-configuration.sh components-configuration.sh: update references to test_psa_constant_names.py 2025-02-05 12:07:25 +01:00
components-platform.sh Merge pull request #9737 from mpg/drop-armcc5-3.6 2024-10-30 12:29:55 +00:00
components-sanitizers.sh Update references to test helpers 2024-11-14 14:19:40 +00:00
depends.py Update old class names 2024-09-19 10:51:59 +02: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:05:21 +01:00
list-identifiers.sh component-basic-checks: fix paths of files moved to framework 2025-01-09 17:05:21 +01:00
psa_collect_statuses.py Revert "Add ability to pass make variables to psa_collect_statuses.py" 2023-12-22 13:16:59 +01:00
run_demos.py Pacify Pylint 2023-07-25 19:40:35 +02:00
run-metatests.sh Readability improvement 2023-11-15 16:56:26 +01:00
run-test-suites.pl update headers 2023-11-02 19:47:20 +00:00
scripts_path.py Add framework/scripts to scripts_path.py 2024-05-13 14:44:37 +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