mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
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>
This commit is contained in:
@ -34,13 +34,6 @@ class CoverageTask(outcome_analysis.CoverageTask):
|
||||
re.DOTALL)
|
||||
|
||||
IGNORED_TESTS = {
|
||||
'handshake-generated': [
|
||||
# Temporary disable Handshake defragmentation tests until mbedtls
|
||||
# pr #10011 has been merged.
|
||||
'Handshake defragmentation on client: len=4, TLS 1.2',
|
||||
'Handshake defragmentation on client: len=5, TLS 1.2',
|
||||
'Handshake defragmentation on client: len=13, TLS 1.2'
|
||||
],
|
||||
'ssl-opt': [
|
||||
# We don't run ssl-opt.sh with Valgrind on the CI because
|
||||
# it's extremely slow. We don't intend to change this.
|
||||
|
Reference in New Issue
Block a user