summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-libs/mbedtls/files/mbedtls-2.19.1-zlib.patch29
-rw-r--r--net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild1
2 files changed, 30 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" ) );
diff --git a/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild b/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild
index a18fc891988..55ffc2164a7 100644
--- a/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild
+++ b/net-libs/mbedtls/mbedtls-2.19.1-r2.ebuild
@@ -39,6 +39,7 @@ enable_mbedtls_option() {
PATCHES=(
"${FILESDIR}"/${PN}-dont-overwrite-headers.patch
"${FILESDIR}"/${PN}-un-pebcak-705038-wrong-file.patch
+ "${FILESDIR}"/${PN}-2.19.1-zlib.patch #706112
)
src_prepare() {