From edcf0e069a24e6545f7bd7692cee187003ad972f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Wed, 19 Dec 2018 00:32:28 +0000 Subject: [PATCH] Update mbedTLS to v2.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update CMake with tag (for builds pulling the source from GitHub repo). - Add build flag to work around a build warning from a source file. Signed-off-by: José Simões --- CMake/Modules/FindmbedTLS.cmake | 2 ++ CMake/mbedTLS.CMakeLists.cmake.in | 10 ++++++---- CMakeLists.txt | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMake/Modules/FindmbedTLS.cmake b/CMake/Modules/FindmbedTLS.cmake index 3995e27029..039d37f948 100644 --- a/CMake/Modules/FindmbedTLS.cmake +++ b/CMake/Modules/FindmbedTLS.cmake @@ -119,6 +119,8 @@ foreach(SRC_FILE ${src_crypto}) list(APPEND mbedTLS_SOURCES ${MBEDTLS_SRC_FILE}) endforeach() +# unset this warning as error required for this source file +SET_SOURCE_FILES_PROPERTIES( ${PROJECT_BINARY_DIR}/mbedTLS_Source/library/hmac_drbg.c PROPERTIES COMPILE_FLAGS -Wno-maybe-uninitialized) foreach(SRC_FILE ${src_x509}) set(MBEDTLS_SRC_FILE SRC_FILE -NOTFOUND) diff --git a/CMake/mbedTLS.CMakeLists.cmake.in b/CMake/mbedTLS.CMakeLists.cmake.in index c1e99ba1c0..1e3b1810d1 100644 --- a/CMake/mbedTLS.CMakeLists.cmake.in +++ b/CMake/mbedTLS.CMakeLists.cmake.in @@ -1,17 +1,19 @@ -cmake_minimum_required(VERSION 2.8.2) +# +# Copyright (c) 2018 The nanoFramework project contributors +# See LICENSE file in the project root for full license information. +# project(mbedTLS-download NONE) include(ExternalProject) -# download mbedTLS source from official SVN repo +# download mbedTLS source from official GitHub repo ExternalProject_Add( mbedTLS PREFIX mbedTLS SOURCE_DIR ${CMAKE_BINARY_DIR}/mbedTLS_Source - GIT_REPOSITORY https://github.com/nanoframework/mbedtls + GIT_REPOSITORY https://github.com/ARMmbed/mbedtls GIT_TAG ${MBEDTLS_GIT_TAG} # target specified branch - GIT_SHALLOW 1 # download only the tip of the branch, not the complete history TIMEOUT 10 LOG_DOWNLOAD 1 # Disable all other steps diff --git a/CMakeLists.txt b/CMakeLists.txt index 719ab91b5a..decba0b9d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -701,7 +701,7 @@ if(RTOS_CHIBIOS_CHECK) endif() # set tag for currently supported version - set(MBEDTLS_GIT_TAG "mbedtls-2.11.0") + set(MBEDTLS_GIT_TAG "mbedtls-2.14.1") # need to setup a separate CMake project to download the code from the GitHub repository # otherwise it won't be available before the actual build step