Skip to content

Commit 5f88993

Browse files
authored
Merge pull request #70 from tomi-font/bump_to_3.6.3
update to 3.6.3
2 parents 3bc59ad + b518728 commit 5f88993

File tree

1,194 files changed

+97192
-50560
lines changed

Some content is hidden

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

1,194 files changed

+97192
-50560
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ massif-*
3535

3636
# Unix-like build artifacts:
3737
*.o
38+
*.s
3839

3940
# MSVC build artifacts:
4041
*.exe

.mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[mypy]
2-
mypy_path = scripts
2+
mypy_path = framework/scripts:scripts
33
namespace_packages = True
44
warn_unused_configs = True

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[MASTER]
2-
init-hook='import sys; sys.path.append("scripts")'
2+
init-hook='import sys; sys.path.append("scripts"); sys.path.append("framework/scripts")'
33
min-similarity-lines=10
44

55
[BASIC]

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build:
1717
python: "3.9"
1818
jobs:
1919
pre_build:
20-
- ./scripts/apidoc_full.sh
20+
- ./framework/scripts/apidoc_full.sh
2121
- breathe-apidoc -o docs/api apidoc/xml
2222
post_build:
2323
- |

3rdparty/everest/include/everest/kremlin/c_endianness.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include <string.h>
88
#include <inttypes.h>
99

10+
#include "kremlin/internal/callconv.h"
11+
1012
/******************************************************************************/
1113
/* Implementing C.fst (part 2: endian-ness macros) */
1214
/******************************************************************************/

3rdparty/everest/include/everest/kremlin/internal/callconv.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
/* Since KreMLin emits the inline keyword unconditionally, we follow the
2828
* guidelines at https://gcc.gnu.org/onlinedocs/gcc/Inline.html and make this
2929
* __inline__ to ensure the code compiles with -std=c90 and earlier. */
30-
#ifdef __GNUC__
30+
#if defined(__GNUC__)
3131
# define inline __inline__
32+
#elif defined(_MSC_VER)
33+
# define inline __inline
3234
#endif
3335

3436
/* GCC-specific attribute syntax; everyone else gets the standard C inline

3rdparty/everest/include/everest/vs2013/inttypes.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

3rdparty/everest/include/everest/vs2013/stdbool.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

BRANCHES.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ The following branches are currently maintained:
107107
- [`development`](https://github.com/Mbed-TLS/mbedtls/)
108108
- [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6)
109109
maintained until March 2027, see
110-
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.6.2>.
111-
- [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28)
112-
maintained until the end of 2024, see
113-
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.9>.
110+
<https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.6.3>.
111+
112+
> Note: [**`mbedtls-2.28.10`**](https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.10)
113+
is the last release of the 2.28 LTS and won't receive bug fixes or security fixes anymore.
114+
Users are advised to upgrade to a maintained version.
114115

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

CMakeLists.txt

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ cmake_policy(SET CMP0012 NEW)
4040
if(TEST_CPP)
4141
project("Mbed TLS"
4242
LANGUAGES C CXX
43-
VERSION 3.6.2
43+
VERSION 3.6.3
4444
)
4545
else()
4646
project("Mbed TLS"
4747
LANGUAGES C
48-
VERSION 3.6.2
48+
VERSION 3.6.3
4949
)
5050
endif()
5151

@@ -61,6 +61,7 @@ endif()
6161

6262
# Set the project root directory.
6363
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
64+
set(MBEDTLS_FRAMEWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/framework)
6465

6566
option(ENABLE_PROGRAMS "Build Mbed TLS programs." ON)
6667

@@ -229,7 +230,21 @@ if(CMAKE_COMPILER_IS_GNU)
229230
set(CMAKE_C_FLAGS_RELEASE "-O2")
230231
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
231232
set(CMAKE_C_FLAGS_COVERAGE "-O0 -g3 --coverage")
232-
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3")
233+
# Old GCC versions hit a performance problem with test_suite_pkwrite
234+
# "Private keey write check EC" tests when building with Asan+UBSan
235+
# and -O3: those tests take more than 100x time than normal, with
236+
# test_suite_pkwrite taking >3h on the CI. Observed with GCC 5.4 on
237+
# Ubuntu 16.04 x86_64 and GCC 6.5 on Ubuntu 18.04 x86_64.
238+
# GCC 7.5 and above on Ubuntu 18.04 appear fine.
239+
# To avoid the performance problem, we use -O2 when GCC version is lower than 7.0.
240+
# It doesn't slow down much even with modern compiler versions.
241+
if (GCC_VERSION VERSION_LESS 7.0)
242+
message(STATUS "USING O2")
243+
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O2")
244+
else()
245+
message(STATUS "USING O3")
246+
set(CMAKE_C_FLAGS_ASAN "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3")
247+
endif()
233248
set(CMAKE_C_FLAGS_ASANDBG "-fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls")
234249
set(CMAKE_C_FLAGS_TSAN "-fsanitize=thread -O3")
235250
set(CMAKE_C_FLAGS_TSANDBG "-fsanitize=thread -O1 -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls")
@@ -309,7 +324,7 @@ add_subdirectory(library)
309324
add_subdirectory(pkgconfig)
310325

311326
#
312-
# The C files in tests/src directory contain test code shared among test suites
327+
# The C files in framework/tests/src directory contain test code shared among test suites
313328
# and programs. This shared test code is compiled and linked to test suites and
314329
# programs objects as a set of compiled objects. The compiled objects are NOT
315330
# built into a library that the test suite and program objects would link
@@ -325,23 +340,24 @@ add_subdirectory(pkgconfig)
325340
if(ENABLE_TESTING OR ENABLE_PROGRAMS)
326341
file(GLOB MBEDTLS_TEST_FILES
327342
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/*.c
328-
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/drivers/*.c)
343+
${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/src/*.c
344+
${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/src/drivers/*.c)
329345
add_library(mbedtls_test OBJECT ${MBEDTLS_TEST_FILES})
330346
if(GEN_FILES)
331347
add_custom_command(
332348
OUTPUT
333-
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_keys.h
349+
${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include/test/test_keys.h
334350
WORKING_DIRECTORY
335351
${CMAKE_CURRENT_SOURCE_DIR}/tests
336352
COMMAND
337353
"${MBEDTLS_PYTHON_EXECUTABLE}"
338354
"${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py"
339355
"--output"
340-
"${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_keys.h"
356+
"${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include/test/test_keys.h"
341357
DEPENDS
342358
${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py
343359
)
344-
add_custom_target(test_keys_header DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_keys.h)
360+
add_custom_target(test_keys_header DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include/test/test_keys.h)
345361
add_custom_command(
346362
OUTPUT
347363
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_certs.h
@@ -359,6 +375,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
359375
add_dependencies(mbedtls_test test_keys_header test_certs_header)
360376
endif()
361377
target_include_directories(mbedtls_test
378+
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include
362379
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests/include
363380
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
364381
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library)
@@ -369,6 +386,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
369386
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_helpers/*.c)
370387
add_library(mbedtls_test_helpers OBJECT ${MBEDTLS_TEST_HELPER_FILES})
371388
target_include_directories(mbedtls_test_helpers
389+
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include
372390
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests/include
373391
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
374392
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
@@ -390,6 +408,9 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
390408
endif()
391409

392410
if(ENABLE_PROGRAMS)
411+
set(ssl_opt_target "${MBEDTLS_TARGET_PREFIX}ssl-opt")
412+
add_custom_target(${ssl_opt_target})
413+
393414
add_subdirectory(programs)
394415
endif()
395416

@@ -444,7 +465,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
444465
write_basic_package_version_file(
445466
"cmake/MbedTLSConfigVersion.cmake"
446467
COMPATIBILITY SameMajorVersion
447-
VERSION 3.6.2)
468+
VERSION 3.6.3)
448469

449470
install(
450471
FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake"

0 commit comments

Comments
 (0)