+++ /dev/null
-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" ) );
+++ /dev/null
-From de35f31091b7e6cb20ebc8d8c0afc3b20bc57098 Mon Sep 17 00:00:00 2001
-From: Mihai Moldovan <ionic@ionic.de>
-Date: Thu, 16 Jan 2020 08:59:39 +0100
-Subject: [PATCH] Avoid overwriting tls headers in submodule mode
-
-When crypto is embedded as a submodule and the cmake build system is
-used, it would previously overwrite some header files installed by tls.
-Most of them are harmless (since they should be identical), but config.h
-is a special case.
-
-tls's and crypto's config.h files differ widely in scope and overwriting
-the more general, bigger config.h file from tls with crypto's smaller
-one will make a lot of features unavailable in programs using tls.
-
-Let's just avoid overwriting any tls header in submodule mode.
-
-Note that this will not fix the potential issue that crypto might be
-using a different configuration than tls in the submodule case.
-
-Fixes ARMmbed/mbedtls#2965
----
- include/CMakeLists.txt | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
-index 02f924df4..92229a221 100644
---- a/include/CMakeLists.txt
-+++ b/include/CMakeLists.txt
-@@ -5,6 +5,19 @@ if(INSTALL_MBEDTLS_HEADERS)
- file(GLOB headers "mbedtls/*.h")
- file(GLOB psa_headers "psa/*.h")
-
-+ if(USE_CRYPTO_SUBMODULE)
-+ # Don't overwrite mbedtls's header files!
-+ # config.h is supposed to be automatically checked for compatibility
-+ # in automatic builds, while the other files should not just be
-+ # compatible, but also identical in theory.
-+ # Practically, we don't check that in crypto but just assume that the
-+ # submodule configuration is sane and trust tls's headers.
-+ list(REMOVE_ITEM headers "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/compat-1.3.h"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/config.h"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/error.h"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/version.h")
-+ endif(USE_CRYPTO_SUBMODULE)
-+
- install(FILES ${headers}
- DESTINATION include/mbedtls
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+++ /dev/null
-Fix https://bugs.gentoo.org/705038
-
-Thanks Greg Turner <gmt@be-evil.net>
-
-diff -urpN mbedtls-mbedtls-2.19.1.orig/crypto/include/CMakeLists.txt mbedtls-mbedtls-2.19.1/crypto/include/CMakeLists.txt
---- mbedtls-mbedtls-2.19.1.orig/crypto/include/CMakeLists.txt 2020-01-26 09:01:50.324231295 -0800
-+++ mbedtls-mbedtls-2.19.1/crypto/include/CMakeLists.txt 2020-01-26 09:04:26.498880873 -0800
-@@ -5,6 +5,19 @@ if(INSTALL_MBEDTLS_HEADERS)
- file(GLOB headers "mbedtls/*.h")
- file(GLOB psa_headers "psa/*.h")
-
-+ if(USE_CRYPTO_SUBMODULE)
-+ # Don't overwrite mbedtls's header files!
-+ # config.h is supposed to be automatically checked for compatibility
-+ # in automatic builds, while the other files should not just be
-+ # compatible, but also identical in theory.
-+ # Practically, we don't check that in crypto but just assume that the
-+ # submodule configuration is sane and trust tls's headers.
-+ list(REMOVE_ITEM headers "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/compat-1.3.h"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/config.h"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/error.h"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/version.h")
-+ endif(USE_CRYPTO_SUBMODULE)
-+
- install(FILES ${headers}
- DESTINATION include/mbedtls
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
-diff -urpN mbedtls-mbedtls-2.19.1.orig/include/CMakeLists.txt mbedtls-mbedtls-2.19.1/include/CMakeLists.txt
---- mbedtls-mbedtls-2.19.1.orig/include/CMakeLists.txt 2020-01-26 09:01:50.320231227 -0800
-+++ mbedtls-mbedtls-2.19.1/include/CMakeLists.txt 2020-01-26 09:03:45.761189288 -0800
-@@ -4,19 +4,6 @@ if(INSTALL_MBEDTLS_HEADERS)
-
- file(GLOB headers "mbedtls/*.h")
-
-- if(USE_CRYPTO_SUBMODULE)
-- # Don't overwrite mbedtls's header files!
-- # config.h is supposed to be automatically checked for compatibility
-- # in automatic builds, while the other files should not just be
-- # compatible, but also identical in theory.
-- # Practically, we don't check that in crypto but just assume that the
-- # submodule configuration is sane and trust tls's headers.
-- list(REMOVE_ITEM headers "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/compat-1.3.h"
-- "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/config.h"
-- "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/error.h"
-- "${CMAKE_CURRENT_SOURCE_DIR}/mbedtls/version.h")
-- endif(USE_CRYPTO_SUBMODULE)
--
- install(FILES ${headers}
- DESTINATION include/mbedtls
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)