Skip to content

Commit 6a3af31

Browse files
committed
Fix compilation with emscripten 4.0.9
Patch MbedTLS to fix a legit compilation error Also bump mbedtls to 3.6.3.1 Signed-off-by: Paul Guyot <pguyot@kallisys.net>
1 parent c54cc84 commit 6a3af31

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CMakeModules/FetchMbedTLS.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ include(FetchContent)
2222

2323
FetchContent_Declare(
2424
mbedtls
25+
PATCH_COMMAND git apply "${CMAKE_CURRENT_LIST_DIR}/mbedtls.patch"
2526
GIT_REPOSITORY http://github.com/mbed-TLS/mbedtls.git
26-
GIT_TAG v3.6.2
27+
GIT_TAG v3.6.3.1
2728
GIT_SHALLOW 1
2829
)
2930

CMakeModules/mbedtls.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2025 Paul Guyot <pguyot@kallisys.net>
2+
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
3+
diff --git a/framework/tests/src/psa_exercise_key.c b/framework/tests/src/psa_exercise_key.c
4+
index b92c1f75..eaa35527 100644
5+
--- a/framework/tests/src/psa_exercise_key.c
6+
+++ b/framework/tests/src/psa_exercise_key.c
7+
@@ -184,7 +184,7 @@ static int exercise_cipher_key(mbedtls_svc_key_id_t key,
8+
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
9+
psa_key_type_t key_type;
10+
const unsigned char plaintext[16] = "Hello, world...";
11+
- unsigned char ciphertext[32] = "(wabblewebblewibblewobblewubble)";
12+
+ unsigned char ciphertext[33] = "(wabblewebblewibblewobblewubble)";
13+
size_t ciphertext_length = sizeof(ciphertext);
14+
unsigned char decrypted[sizeof(ciphertext)];
15+
size_t part_length;

0 commit comments

Comments
 (0)