From 2324a02602591efd48c6d11df86879061b2f1310 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 29 Aug 2025 08:51:00 +0200 Subject: [PATCH 1/3] Create threading_internal.h This is meant to hold threading-related definitions that are not public, but are used in the test framework. To be populated later. Signed-off-by: Gilles Peskine --- library/threading.c | 2 +- library/threading_internal.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 library/threading_internal.h diff --git a/library/threading.c b/library/threading.c index fde7cea1d6..ff8183ed15 100644 --- a/library/threading.c +++ b/library/threading.c @@ -17,7 +17,7 @@ #if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" +#include "threading_internal.h" #if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_PLATFORM_GMTIME_R_ALT) diff --git a/library/threading_internal.h b/library/threading_internal.h new file mode 100644 index 0000000000..aba729dfd8 --- /dev/null +++ b/library/threading_internal.h @@ -0,0 +1,28 @@ +/** + * \file threadinginternal.h + * + * \brief Threading interfaces used by the test framework + */ +/* + * Copyright The Mbed TLS Contributors + * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + */ + +#ifndef MBEDTLS_THREADING_INTERNAL_H +#define MBEDTLS_THREADING_INTERNAL_H + +#include "common.h" + +#include + +/* A version number for the internal threading interface. + * This is meant to allow the framework to remain compatible with + * multiple versions, to facilitate transitions. + * + * Conventionally, this is the Mbed TLS version number when the + * threading interface was last changed in a way that may impact the + * test framework, with the lower byte incremented as necessary + *if multiple changes happened between releases. */ +#define MBEDTLS_THREADING_INTERNAL_VERSION 0x03060000 + +#endif /* MBEDTLS_THREADING_INTERNAL_H */ From 7e43145bac0729e54dddb4b0ab1cd4995ecabde1 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 29 Aug 2025 09:35:29 +0200 Subject: [PATCH 2/3] Typo Signed-off-by: Gilles Peskine --- library/threading_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/threading_internal.h b/library/threading_internal.h index aba729dfd8..354d6cb5e7 100644 --- a/library/threading_internal.h +++ b/library/threading_internal.h @@ -1,5 +1,5 @@ /** - * \file threadinginternal.h + * \file threading_internal.h * * \brief Threading interfaces used by the test framework */ From 9f7ac0371f5fa4e237b3f423704b6ad01a59e8d0 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 29 Aug 2025 10:46:52 +0200 Subject: [PATCH 3/3] Fix code style Signed-off-by: Gilles Peskine --- library/threading_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/threading_internal.h b/library/threading_internal.h index 354d6cb5e7..21b57c97c8 100644 --- a/library/threading_internal.h +++ b/library/threading_internal.h @@ -22,7 +22,7 @@ * Conventionally, this is the Mbed TLS version number when the * threading interface was last changed in a way that may impact the * test framework, with the lower byte incremented as necessary - *if multiple changes happened between releases. */ + * if multiple changes happened between releases. */ #define MBEDTLS_THREADING_INTERNAL_VERSION 0x03060000 #endif /* MBEDTLS_THREADING_INTERNAL_H */