Fixes definition error when the deprecated MBEDTLS_ZLIB_SUPPORT and ENABLE_ZLIB_SUPPORT macro are defined/enabled for zlib support in mbedtls

100% tests passed, 0 tests failed out of 85

https://github.com/ARMmbed/mbedtls/blob/mbedtls-2.19.1/library/ssl_tls.c#L1842

https://github.com/ARMmbed/mbedtls/blob/mbedtls-2.19.1/library/ssl_tls.c#L1862
This commit is contained in:
jiblime 2019-12-18 21:40:01 -08:00 committed by Manuel Pégourié-Gonnard
parent dbcb44202c
commit 9f25b8deff

View file

@ -1880,7 +1880,7 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl )
/* Allocate compression buffer */
#if defined(MBEDTLS_ZLIB_SUPPORT)
if( session->compression == MBEDTLS_SSL_COMPRESS_DEFLATE &&
if( ssl->session_negotiate->compression == MBEDTLS_SSL_COMPRESS_DEFLATE &&
ssl->compress_buf == NULL )
{
MBEDTLS_SSL_DEBUG_MSG( 3, ( "Allocating compression buffer" ) );