Skip to content

Commit

Permalink
fix: mbedTLS recommended version. (#819)
Browse files Browse the repository at this point in the history
The latest  mbedTLS version does not work out of the box with V3 CSDK.

This fix will make sure that V3 CSDK will work out of box with mbedTLS
LTS release 2.16.
  • Loading branch information
abhidixi11 committed Mar 10, 2020
1 parent 1c027cf commit b0602a1
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ install:
- rm external_libs/mbedTLS/*

# Get mbedtls.
- wget -qO- https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.18.1.tar.gz | tar xvz -C external_libs/mbedTLS --strip-components=1
- wget -qO- https://github.com/ARMmbed/mbed-crypto/archive/mbedcrypto-1.1.1.tar.gz | tar xvz -C external_libs/mbedTLS/crypto --strip-components=1
- wget -qO- https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.16.5.tar.gz | tar xvz -C external_libs/mbedTLS --strip-components=1

# Get CppUTest.
- wget -qO- https://github.com/cpputest/cpputest/archive/v3.6.tar.gz | tar xvz -C external_libs/CppUTest --strip-components=1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Beginning with Release v2.2.0 of the SDK, AWS collects usage metrics indicating
## How to get started ?
Ensure you understand the AWS IoT platform and create the necessary certificates and policies. For more information on the AWS IoT platform please visit the [AWS IoT developer guide](http://docs.aws.amazon.com/iot/latest/developerguide/iot-security-identity.html).

In order to quickly get started with the AWS IoT platform, we have ported the SDK for POSIX type Operating Systems like Ubuntu, OS X and RHEL. The SDK is configured for the mbedTLS library and can be built out of the box with *GCC* using *make utility*. You'll need to download mbedTLS from the official ARMmbed repository. We recommend that you pick the latest version in order to have up-to-date security fixes.
In order to quickly get started with the AWS IoT platform, we have ported the SDK for POSIX type Operating Systems like Ubuntu, OS X and RHEL. The SDK is configured for the mbedTLS library and can be built out of the box with *GCC* using *make utility*. You'll need to download mbedTLS from the official ARMmbed repository. We recommend that you pick the latest version of 2.16 LTS release in order to have up-to-date security fixes.

## Installation
This section explains the individual steps to retrieve the necessary files and be able to build your first application using the AWS IoT device SDK for embedded C.
Expand Down
4 changes: 2 additions & 2 deletions external_libs/mbedTLS/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copy source code for mbedTLS into this directory
#
# You'll need to download mbedTLS from the official ARMmbed repository and
# place the files here. We recommend that you pick the latest version in
# order to have up-to-date security fixes.
# place the files here. We recommend that you pick the latest version of 2.16
# LTS release in order to have up-to-date security fixes.
2 changes: 1 addition & 1 deletion samples/linux/jobs_sample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
#TLS - mbedtls
MBEDTLS_DIR = $(IOT_CLIENT_DIR)/external_libs/mbedTLS
TLS_LIB_DIR = $(MBEDTLS_DIR)/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/crypto/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/library
TLS_INCLUDE_DIR = -I $(MBEDTLS_DIR)/include
EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
Expand Down
2 changes: 1 addition & 1 deletion samples/linux/shadow_sample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
#TLS - mbedtls
MBEDTLS_DIR = $(IOT_CLIENT_DIR)/external_libs/mbedTLS
TLS_LIB_DIR = $(MBEDTLS_DIR)/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/crypto/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/library
TLS_INCLUDE_DIR = -I $(MBEDTLS_DIR)/include
EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
Expand Down
2 changes: 1 addition & 1 deletion samples/linux/shadow_sample_console_echo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
#TLS - mbedtls
MBEDTLS_DIR = $(IOT_CLIENT_DIR)/external_libs/mbedTLS
TLS_LIB_DIR = $(MBEDTLS_DIR)/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/crypto/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/library
TLS_INCLUDE_DIR = -I $(MBEDTLS_DIR)/include
EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
Expand Down
2 changes: 1 addition & 1 deletion samples/linux/subscribe_publish_library_sample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
#TLS - mbedtls
MBEDTLS_DIR = $(IOT_CLIENT_DIR)/external_libs/mbedTLS
TLS_LIB_DIR = $(MBEDTLS_DIR)/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/crypto/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/library
TLS_INCLUDE_DIR = -I $(MBEDTLS_DIR)/include
EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
Expand Down
2 changes: 1 addition & 1 deletion samples/linux/subscribe_publish_sample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ IOT_SRC_FILES += $(shell find $(PLATFORM_COMMON_DIR)/ -name '*.c')
#TLS - mbedtls
MBEDTLS_DIR = $(IOT_CLIENT_DIR)/external_libs/mbedTLS
TLS_LIB_DIR = $(MBEDTLS_DIR)/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/crypto/library
CRYPTO_LIB_DIR = $(MBEDTLS_DIR)/library
TLS_INCLUDE_DIR = -I $(MBEDTLS_DIR)/include
EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
LD_FLAG += -Wl,-rpath,$(TLS_LIB_DIR)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PLATFORM_DIR = $(IOT_CLIENT_DIR)/platform/linux
#MbedTLS directory
TEMP_MBEDTLS_SRC_DIR = $(IOT_CLIENT_DIR)/external_libs/mbedTLS
TLS_LIB_DIR = $(TEMP_MBEDTLS_SRC_DIR)/library
CRYPTO_LIB_DIR = $(TEMP_MBEDTLS_SRC_DIR)/crypto/library
CRYPTO_LIB_DIR = $(TEMP_MBEDTLS_SRC_DIR)/library
TLS_INCLUDE_DIR = -I $(TEMP_MBEDTLS_SRC_DIR)/include

EXTERNAL_LIBS += -L$(TLS_LIB_DIR)
Expand Down

0 comments on commit b0602a1

Please sign in to comment.