summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch')
-rw-r--r--net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch b/net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch
new file mode 100644
index 00000000000..ba4559cfc9b
--- /dev/null
+++ b/net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch
@@ -0,0 +1,29 @@
+From 9f25b8deff8e5b8fad8493db421b4639f14d2e5d Mon Sep 17 00:00:00 2001
+From: jiblime <47689567+jiblime@users.noreply.github.com>
+Date: Wed, 18 Dec 2019 21:40:01 -0800
+Subject: [PATCH] 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
+---
+ library/ssl_tls.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/library/ssl_tls.c b/library/ssl_tls.c
+index 6cf7781f2a..51ae9da3c6 100644
+--- a/library/ssl_tls.c
++++ b/library/ssl_tls.c
+@@ -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" ) );