Skip to content

Commit

Permalink
Update Mbed TLS to v3.6.0 (#2992)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Jul 30, 2024
1 parent ab76b7f commit fe88b98
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/All/Dockerfile.All
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-all:v2.50
FROM ghcr.io/nanoframework/dev-container-all:v2.51
2 changes: 1 addition & 1 deletion .devcontainer/All/Dockerfile.All.SRC
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RUN git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx
&& git clone --branch v6.3.0_rel --recursive https://github.com/eclipse-threadx/netxduo.git --depth 1 ./sources/NetxDuo

# Clone dependent repos (mbedtls, fatfs and littlefs)
RUN git clone --branch mbedtls-3.5.2 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
RUN git clone --branch mbedtls-3.6.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
&& git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
&& git clone --branch v2.9.3 https://github.com/littlefs-project/littlefs --depth 1 ./sources/littlefs

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/All/scripts/git-pull-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHE
cd /sources/ChibiOs-Contrib
git pull origin chibios-21.11.x
cd /sources/mbedtls
git pull origin mbedtls-3.5.2
git pull origin mbedtls-3.6.0
cd /sources/fatfs
git pull origin R0.15
cd /sources/FreeRTOS
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/AzureRTOS/Dockerfile.AzureRTOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.28
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.29
2 changes: 1 addition & 1 deletion .devcontainer/AzureRTOS/Dockerfile.AzureRTOS.SRC
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx
&& git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx/netxduo.git --depth 1 ./sources/NetxDuo

# Clone dependent repos (mbedtls, fatfs and littlefs)
RUN git clone --branch mbedtls-3.5.2 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
RUN git clone --branch mbedtls-3.6.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
&& git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
&& git clone --branch v2.9.3 https://github.com/littlefs-project/littlefs --depth 1 ./sources/littlefs

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/ChibiOS/Dockerfile.ChibiOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-chibios:v1.29
FROM ghcr.io/nanoframework/dev-container-chibios:v1.30
2 changes: 1 addition & 1 deletion .devcontainer/ChibiOS/Dockerfile.ChibiOS.SRC
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git
&& git clone --branch chibios-21.11.x https://github.com/ChibiOS/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib

# Clone dependent repos (mbedtls, fatfs and littlefs etc.)
RUN git clone --branch mbedtls-3.5.2 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
RUN git clone --branch mbedtls-3.6.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
&& git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
&& git clone --branch v2.9.3 https://github.com/littlefs-project/littlefs --depth 1 ./sources/littlefs \
&& git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.02
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.01
2 changes: 1 addition & 1 deletion .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP.SRC
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN apt-get update \
RUN mkdir -p /usr/local/bin/gcc

# Clone libs mbedtls and fatfs etc.
RUN git clone --branch mbedtls-3.5.2 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
RUN git clone --branch mbedtls-3.6.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
&& git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
&& git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip

Expand Down
2 changes: 1 addition & 1 deletion CMake/binutils.common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ function(nf_add_mbedtls_library)

# set tag for currently supported version
# WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS
set(MBEDTLS_GIT_TAG "mbedtls-3.5.2")
set(MBEDTLS_GIT_TAG "mbedtls-3.6.0")

# set options for Mbed TLS
option(ENABLE_TESTING "no testing when building Mbed TLS." OFF)
Expand Down
6 changes: 6 additions & 0 deletions src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,9 @@ time_t nf_get_unix_epoch()

return mktime(&time);
}

mbedtls_ms_time_t mbedtls_ms_time(void)
{
// convert to milliseconds
return nf_get_unix_epoch() * 1000;
}

0 comments on commit fe88b98

Please sign in to comment.