Skip to content

Commit 1ec6906

Browse files
Merge pull request #1090 from Mbed-TLS/mbedtls-3.5.0rc0-pr
Mbedtls 3.5.0rc0 pr DO NOT MERGE
2 parents 3406564 + f7e81d9 commit 1ec6906

File tree

210 files changed

+140155
-1484
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+140155
-1484
lines changed

3rdparty/CMakeLists.txt

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/mbedtls_config.h get MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED RESULT_VARIABLE everest_result)
2-
execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/mbedtls_config.h get MBEDTLS_PSA_P256M_DRIVER_ENABLED RESULT_VARIABLE p256m_result)
3-
4-
if(${everest_result} EQUAL 0)
5-
add_subdirectory(everest)
6-
endif()
7-
8-
if(${p256m_result} EQUAL 0)
9-
add_subdirectory(p256-m)
10-
endif()
1+
add_subdirectory(everest)
2+
add_subdirectory(p256-m)

3rdparty/everest/CMakeLists.txt

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
1-
add_library(everest
1+
set(everest_target "${MBEDTLS_TARGET_PREFIX}everest")
2+
3+
add_library(${everest_target}
24
library/everest.c
35
library/x25519.c
46
library/Hacl_Curve25519_joined.c)
57

6-
target_include_directories(everest
8+
target_include_directories(${everest_target}
79
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
810
$<BUILD_INTERFACE:${MBEDTLS_DIR}/include>
911
$<INSTALL_INTERFACE:include>
1012
PRIVATE include/everest
1113
include/everest/kremlib
1214
${MBEDTLS_DIR}/library/)
1315

16+
# Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
17+
# This must be duplicated from library/CMakeLists.txt because
18+
# everest is not directly linked against any mbedtls targets
19+
# so does not inherit the compile definitions.
20+
if(MBEDTLS_CONFIG_FILE)
21+
target_compile_definitions(everest
22+
PUBLIC MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}")
23+
endif()
24+
if(MBEDTLS_USER_CONFIG_FILE)
25+
target_compile_definitions(everest
26+
PUBLIC MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}")
27+
endif()
28+
1429
if(INSTALL_MBEDTLS_HEADERS)
1530

1631
install(DIRECTORY include/everest
@@ -21,7 +36,7 @@ if(INSTALL_MBEDTLS_HEADERS)
2136

2237
endif(INSTALL_MBEDTLS_HEADERS)
2338

24-
install(TARGETS everest
39+
install(TARGETS ${everest_target}
2540
EXPORT MbedTLSTargets
2641
DESTINATION ${CMAKE_INSTALL_LIBDIR}
2742
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)

3rdparty/p256-m/CMakeLists.txt

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
add_library(p256m
1+
set(p256m_target ${MBEDTLS_TARGET_PREFIX}p256m)
2+
3+
add_library(${p256m_target}
24
p256-m_driver_entrypoints.c
35
p256-m/p256-m.c)
46

5-
target_include_directories(p256m
7+
target_include_directories(${p256m_target}
68
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
79
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/p256-m>
810
$<BUILD_INTERFACE:${MBEDTLS_DIR}/include>
911
$<INSTALL_INTERFACE:include>
1012
PRIVATE ${MBEDTLS_DIR}/library/)
1113

14+
# Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE
15+
# This must be duplicated from library/CMakeLists.txt because
16+
# p256m is not directly linked against any mbedtls targets
17+
# so does not inherit the compile definitions.
18+
if(MBEDTLS_CONFIG_FILE)
19+
target_compile_definitions(p256m
20+
PUBLIC MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}")
21+
endif()
22+
if(MBEDTLS_USER_CONFIG_FILE)
23+
target_compile_definitions(p256m
24+
PUBLIC MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}")
25+
endif()
26+
1227
if(INSTALL_MBEDTLS_HEADERS)
1328

1429
install(DIRECTORY :${CMAKE_CURRENT_SOURCE_DIR}
@@ -19,7 +34,7 @@ if(INSTALL_MBEDTLS_HEADERS)
1934

2035
endif(INSTALL_MBEDTLS_HEADERS)
2136

22-
install(TARGETS p256m
37+
install(TARGETS ${p256m_target}
2338
EXPORT MbedTLSTargets
2439
DESTINATION ${CMAKE_INSTALL_LIBDIR}
2540
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)

BRANCHES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ The following branches are currently maintained:
106106
- [`development`](https://github.com/Mbed-TLS/mbedtls/)
107107
- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28)
108108
maintained until at least the end of 2024, see
109-
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.3>.
109+
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.5>.
110110

111111
Users are urged to always use the latest version of a maintained branch.

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if(CMAKE_HOST_WIN32)
6262
# CMakeLists.txt.
6363
option(GEN_FILES "Generate the auto-generated files as needed" OFF) # off in development
6464
else()
65-
option(GEN_FILES "Generate the auto-generated files as needed" ON)
65+
option(GEN_FILES "Generate the auto-generated files as needed" OFF)
6666
endif()
6767

6868
option(DISABLE_PACKAGE_CONFIG_AND_INSTALL "Disable package configuration, target export and installation" ${MBEDTLS_AS_SUBPROJECT})
@@ -377,7 +377,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
377377
write_basic_package_version_file(
378378
"cmake/MbedTLSConfigVersion.cmake"
379379
COMPATIBILITY SameMajorVersion
380-
VERSION 3.4.1)
380+
VERSION 3.5.0)
381381

382382
install(
383383
FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake"

0 commit comments

Comments
 (0)