Skip to content

Commit

Permalink
Use TLS module in HTTPS
Browse files Browse the repository at this point in the history
 * Removed the curl dependency
 * Updated the mbedtls configuration
 * Removed the code duplications of HTTP and HTTPS modules
 * Updated the related test files

IoT.js-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
  • Loading branch information
LaszloLango committed Apr 3, 2018
1 parent b944e04 commit fb5f2c3
Show file tree
Hide file tree
Showing 32 changed files with 979 additions and 1,610 deletions.
14 changes: 13 additions & 1 deletion cmake/mbedtls.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@ set(DEPS_MBEDTLS_BUILD_DIR ${CMAKE_BINARY_DIR}/${DEPS_MBEDTLS}/library)
set(MODULE_NAME "tls")
set(MODULE_BINARY_DIR ${DEPS_MBEDTLS_BUILD_DIR})

if("${TARGET_OS}" STREQUAL "TIZEN")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-cpp")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-conversion")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${ROOT_DIR}/config/mbedtls")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -DMBEDTLS_CONFIG_FILE='<config-for-iotjs.h>'")

#message(FATAL_ERROR "${CMAKE_C_FLAGS}")
# FIXME:
# Remove this workaround when the related bug is fixed in
# mbedtls. https://github.com/ARMmbed/mbedtls/issues/1550
set(CMAKE_C_FLAGS_BCK "${CMAKE_C_FLAGS}")
string(REPLACE "-fsanitize=address" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})

ExternalProject_Add(mbedtls
PREFIX ${DEPS_MBEDTLS}
Expand Down Expand Up @@ -74,3 +81,8 @@ set_property(DIRECTORY APPEND PROPERTY

set(MBEDTLS_LIBS libmbedtls libmbedx509 libmbedcrypto)
set(MBEDTLS_INCLUDE_DIR ${DEPS_MBEDTLS}/include)

# FIXME:
# Remove this workaround when the related bug is fixed in
# mbedtls. https://github.com/ARMmbed/mbedtls/issues/1550
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BCK}")
Loading

0 comments on commit fb5f2c3

Please sign in to comment.