1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

Remove uses of SSL compression

Remove or modify current uses of session compression.

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
Thomas Daubney
2022-06-20 15:12:19 +01:00
parent e579ece305
commit 20f89a9605
5 changed files with 11 additions and 27 deletions

View File

@@ -8046,7 +8046,6 @@ static size_t ssl_tls12_session_save( const mbedtls_ssl_session *session,
* Basic mandatory fields
*/
used += 2 /* ciphersuite */
+ 1 /* compression */
+ 1 /* id_len */
+ sizeof( session->id )
+ sizeof( session->master )
@@ -8057,8 +8056,6 @@ static size_t ssl_tls12_session_save( const mbedtls_ssl_session *session,
MBEDTLS_PUT_UINT16_BE( session->ciphersuite, p, 0 );
p += 2;
*p++ = MBEDTLS_BYTE_0( session->compression );
*p++ = MBEDTLS_BYTE_0( session->id_len );
memcpy( p, session->id, 32 );
p += 32;
@@ -8202,14 +8199,12 @@ static int ssl_tls12_session_load( mbedtls_ssl_session *session,
/*
* Basic mandatory fields
*/
if( 2 + 1 + 1 + 32 + 48 + 4 > (size_t)( end - p ) )
if( 2 + 1 + 32 + 48 + 4 > (size_t)( end - p ) )
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
session->ciphersuite = ( p[0] << 8 ) | p[1];
p += 2;
session->compression = *p++;
session->id_len = *p++;
memcpy( session->id, p, 32 );
p += 32;