Skip to content

Commit

Permalink
Update mbedTLS to v2.14.1
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
josesimoes committed Dec 19, 2018
1 parent 5835a4b commit edcf0e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CMake/Modules/FindmbedTLS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 6 additions & 4 deletions CMake/mbedTLS.CMakeLists.cmake.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit edcf0e0

Please sign in to comment.