blob: bd5a0c3923c041978f1312d7b642171e3abd60de [file] [log] [blame]
Gilles Peskinec4672fd2019-09-11 13:39:11 +02001/**
2 * \file common.h
3 *
4 * \brief Utility macros for internal use in the library
5 */
6/*
Bence Szépkúti1e148272020-08-07 13:07:28 +02007 * Copyright The Mbed TLS Contributors
Dave Rodgman16799db2023-11-02 19:47:20 +00008 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
Gilles Peskinec4672fd2019-09-11 13:39:11 +02009 */
10
11#ifndef MBEDTLS_LIBRARY_COMMON_H
12#define MBEDTLS_LIBRARY_COMMON_H
13
Bence Szépkútic662b362021-05-27 11:25:03 +020014#include "mbedtls/build_info.h"
Dave Rodgmanfbc23222022-11-24 18:07:37 +000015#include "alignment.h"
Gilles Peskinec4672fd2019-09-11 13:39:11 +020016
Tom Cosgrove6ef9bb32023-03-08 14:19:51 +000017#include <assert.h>
Gilles Peskine42649d92022-11-23 14:15:57 +010018#include <stddef.h>
Joe Subbiani2194dc42021-07-14 12:31:31 +010019#include <stdint.h>
Dave Rodgmanc3d80412022-11-22 15:01:39 +000020#include <stddef.h>
Joe Subbiani2194dc42021-07-14 12:31:31 +010021
Dave Rodgman3f47b3f2023-05-23 16:11:22 +010022#if defined(__ARM_NEON)
Dave Rodgman6f40f8b2023-05-22 18:21:20 +010023#include <arm_neon.h>
24#endif /* __ARM_NEON */
25
Jerry Yu92787e42023-11-29 16:30:38 +080026
27#if defined(__GNUC__) && !defined(__ARMCC_VERSION) && !defined(__clang__) \
28 && !defined(__llvm__) && !defined(__INTEL_COMPILER)
29/* Defined if the compiler really is gcc and not clang, etc */
30#define MBEDTLS_COMPILER_IS_GCC
31#define MBEDTLS_GCC_VERSION \
32 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
33#endif
34
Gilles Peskinec4672fd2019-09-11 13:39:11 +020035/** Helper to define a function as static except when building invasive tests.
36 *
37 * If a function is only used inside its own source file and should be
38 * declared `static` to allow the compiler to optimize for code size,
39 * but that function has unit tests, define it with
40 * ```
41 * MBEDTLS_STATIC_TESTABLE int mbedtls_foo(...) { ... }
42 * ```
43 * and declare it in a header in the `library/` directory with
44 * ```
45 * #if defined(MBEDTLS_TEST_HOOKS)
46 * int mbedtls_foo(...);
47 * #endif
48 * ```
49 */
50#if defined(MBEDTLS_TEST_HOOKS)
51#define MBEDTLS_STATIC_TESTABLE
52#else
53#define MBEDTLS_STATIC_TESTABLE static
54#endif
55
TRodziewicz7871c2e2021-07-07 17:29:43 +020056#if defined(MBEDTLS_TEST_HOOKS)
Gilles Peskine449bd832023-01-11 14:50:10 +010057extern void (*mbedtls_test_hook_test_fail)(const char *test, int line, const char *file);
58#define MBEDTLS_TEST_HOOK_TEST_ASSERT(TEST) \
59 do { \
60 if ((!(TEST)) && ((*mbedtls_test_hook_test_fail) != NULL)) \
61 { \
62 (*mbedtls_test_hook_test_fail)( #TEST, __LINE__, __FILE__); \
63 } \
64 } while (0)
TRodziewicz7871c2e2021-07-07 17:29:43 +020065#else
Gilles Peskine449bd832023-01-11 14:50:10 +010066#define MBEDTLS_TEST_HOOK_TEST_ASSERT(TEST)
TRodziewicz7871c2e2021-07-07 17:29:43 +020067#endif /* defined(MBEDTLS_TEST_HOOKS) */
68
Andrzej Kurekb22b9772023-05-30 09:44:20 -040069/** \def ARRAY_LENGTH
70 * Return the number of elements of a static or stack array.
71 *
72 * \param array A value of array (not pointer) type.
73 *
74 * \return The number of elements of the array.
75 */
76/* A correct implementation of ARRAY_LENGTH, but which silently gives
77 * a nonsensical result if called with a pointer rather than an array. */
78#define ARRAY_LENGTH_UNSAFE(array) \
79 (sizeof(array) / sizeof(*(array)))
80
81#if defined(__GNUC__)
82/* Test if arg and &(arg)[0] have the same type. This is true if arg is
83 * an array but not if it's a pointer. */
84#define IS_ARRAY_NOT_POINTER(arg) \
85 (!__builtin_types_compatible_p(__typeof__(arg), \
86 __typeof__(&(arg)[0])))
87/* A compile-time constant with the value 0. If `const_expr` is not a
88 * compile-time constant with a nonzero value, cause a compile-time error. */
89#define STATIC_ASSERT_EXPR(const_expr) \
90 (0 && sizeof(struct { unsigned int STATIC_ASSERT : 1 - 2 * !(const_expr); }))
91
92/* Return the scalar value `value` (possibly promoted). This is a compile-time
93 * constant if `value` is. `condition` must be a compile-time constant.
94 * If `condition` is false, arrange to cause a compile-time error. */
95#define STATIC_ASSERT_THEN_RETURN(condition, value) \
96 (STATIC_ASSERT_EXPR(condition) ? 0 : (value))
97
98#define ARRAY_LENGTH(array) \
99 (STATIC_ASSERT_THEN_RETURN(IS_ARRAY_NOT_POINTER(array), \
100 ARRAY_LENGTH_UNSAFE(array)))
101
102#else
103/* If we aren't sure the compiler supports our non-standard tricks,
104 * fall back to the unsafe implementation. */
105#define ARRAY_LENGTH(array) ARRAY_LENGTH_UNSAFE(array)
106#endif
Mateusz Starzyk57d1d192021-05-27 14:39:53 +0200107/** Allow library to access its structs' private members.
Mateusz Starzyk2c09c9b2021-05-14 22:20:10 +0200108 *
109 * Although structs defined in header files are publicly available,
110 * their members are private and should not be accessed by the user.
111 */
112#define MBEDTLS_ALLOW_PRIVATE_ACCESS
113
Tom Cosgroveca8c61b2023-07-17 15:17:40 +0100114/**
115 * \brief Securely zeroize a buffer then free it.
116 *
Tom Cosgrove3a11bb82023-07-18 16:26:29 +0100117 * Similar to making consecutive calls to
118 * \c mbedtls_platform_zeroize() and \c mbedtls_free(), but has
Tom Cosgroveca8c61b2023-07-17 15:17:40 +0100119 * code size savings, and potential for optimisation in the future.
120 *
Tom Cosgrove3a11bb82023-07-18 16:26:29 +0100121 * Guaranteed to be a no-op if \p buf is \c NULL and \p len is 0.
122 *
123 * \param buf Buffer to be zeroized then freed.
Tom Cosgroveca8c61b2023-07-17 15:17:40 +0100124 * \param len Length of the buffer in bytes
125 */
126void mbedtls_zeroize_and_free(void *buf, size_t len);
127
Gilles Peskine42649d92022-11-23 14:15:57 +0100128/** Return an offset into a buffer.
129 *
130 * This is just the addition of an offset to a pointer, except that this
131 * function also accepts an offset of 0 into a buffer whose pointer is null.
Gilles Peskine7d237782022-11-25 13:34:59 +0100132 * (`p + n` has undefined behavior when `p` is null, even when `n == 0`.
133 * A null pointer is a valid buffer pointer when the size is 0, for example
134 * as the result of `malloc(0)` on some platforms.)
Gilles Peskine42649d92022-11-23 14:15:57 +0100135 *
136 * \param p Pointer to a buffer of at least n bytes.
137 * This may be \p NULL if \p n is zero.
138 * \param n An offset in bytes.
139 * \return Pointer to offset \p n in the buffer \p p.
140 * Note that this is only a valid pointer if the size of the
141 * buffer is at least \p n + 1.
142 */
143static inline unsigned char *mbedtls_buffer_offset(
Gilles Peskine449bd832023-01-11 14:50:10 +0100144 unsigned char *p, size_t n)
Gilles Peskine42649d92022-11-23 14:15:57 +0100145{
Gilles Peskine449bd832023-01-11 14:50:10 +0100146 return p == NULL ? NULL : p + n;
Gilles Peskine42649d92022-11-23 14:15:57 +0100147}
148
149/** Return an offset into a read-only buffer.
150 *
Gilles Peskine7d237782022-11-25 13:34:59 +0100151 * Similar to mbedtls_buffer_offset(), but for const pointers.
Gilles Peskine42649d92022-11-23 14:15:57 +0100152 *
153 * \param p Pointer to a buffer of at least n bytes.
154 * This may be \p NULL if \p n is zero.
155 * \param n An offset in bytes.
156 * \return Pointer to offset \p n in the buffer \p p.
157 * Note that this is only a valid pointer if the size of the
158 * buffer is at least \p n + 1.
159 */
160static inline const unsigned char *mbedtls_buffer_offset_const(
Gilles Peskine449bd832023-01-11 14:50:10 +0100161 const unsigned char *p, size_t n)
Gilles Peskine42649d92022-11-23 14:15:57 +0100162{
Gilles Peskine449bd832023-01-11 14:50:10 +0100163 return p == NULL ? NULL : p + n;
Gilles Peskine42649d92022-11-23 14:15:57 +0100164}
165
Dave Rodgmanc3d80412022-11-22 15:01:39 +0000166/**
167 * Perform a fast block XOR operation, such that
168 * r[i] = a[i] ^ b[i] where 0 <= i < n
169 *
170 * \param r Pointer to result (buffer of at least \p n bytes). \p r
171 * may be equal to either \p a or \p b, but behaviour when
172 * it overlaps in other ways is undefined.
173 * \param a Pointer to input (buffer of at least \p n bytes)
174 * \param b Pointer to input (buffer of at least \p n bytes)
175 * \param n Number of bytes to process.
176 */
Jerry Yu5b96b812023-11-29 10:25:00 +0800177inline void mbedtls_xor(unsigned char *r, const unsigned char *a, const unsigned char *b, size_t n)
Dave Rodgmanc3d80412022-11-22 15:01:39 +0000178{
Dave Rodgmanb9cd19b2022-12-30 21:32:03 +0000179 size_t i = 0;
180#if defined(MBEDTLS_EFFICIENT_UNALIGNED_ACCESS)
Jerry Yu71fada12023-11-29 10:38:07 +0800181#if defined(__ARM_NEON) && \
Jerry Yue743aa72023-11-29 15:54:32 +0800182 (!defined(MBEDTLS_COMPILER_IS_GCC) || \
Jerry Yu92787e42023-11-29 16:30:38 +0800183 (defined(MBEDTLS_COMPILER_IS_GCC) && MBEDTLS_GCC_VERSION >= 70300))
Dave Rodgman6f40f8b2023-05-22 18:21:20 +0100184 for (; (i + 16) <= n; i += 16) {
Dave Rodgmanf32176c2023-06-09 16:25:49 +0100185 uint8x16_t v1 = vld1q_u8(a + i);
186 uint8x16_t v2 = vld1q_u8(b + i);
Dave Rodgman2070c202023-06-07 16:25:58 +0100187 uint8x16_t x = veorq_u8(v1, v2);
Dave Rodgmanf32176c2023-06-09 16:25:49 +0100188 vst1q_u8(r + i, x);
Dave Rodgman6f40f8b2023-05-22 18:21:20 +0100189 }
190#elif defined(__amd64__) || defined(__x86_64__) || defined(__aarch64__)
Dave Rodgman0805ad12023-05-19 11:48:10 +0100191 /* This codepath probably only makes sense on architectures with 64-bit registers */
192 for (; (i + 8) <= n; i += 8) {
193 uint64_t x = mbedtls_get_unaligned_uint64(a + i) ^ mbedtls_get_unaligned_uint64(b + i);
194 mbedtls_put_unaligned_uint64(r + i, x);
195 }
Dave Rodgman5c394ff2023-06-09 20:10:36 +0100196#else
Dave Rodgmanb9cd19b2022-12-30 21:32:03 +0000197 for (; (i + 4) <= n; i += 4) {
Gilles Peskine449bd832023-01-11 14:50:10 +0100198 uint32_t x = mbedtls_get_unaligned_uint32(a + i) ^ mbedtls_get_unaligned_uint32(b + i);
199 mbedtls_put_unaligned_uint32(r + i, x);
Dave Rodgmanc3d80412022-11-22 15:01:39 +0000200 }
Dave Rodgmanb9cd19b2022-12-30 21:32:03 +0000201#endif
Dave Rodgman5c394ff2023-06-09 20:10:36 +0100202#endif
Gilles Peskine449bd832023-01-11 14:50:10 +0100203 for (; i < n; i++) {
Dave Rodgmanc3d80412022-11-22 15:01:39 +0000204 r[i] = a[i] ^ b[i];
205 }
206}
207
Dave Rodgman03bb5262023-06-15 18:43:24 +0100208/**
209 * Perform a fast block XOR operation, such that
210 * r[i] = a[i] ^ b[i] where 0 <= i < n
211 *
212 * In some situations, this can perform better than mbedtls_xor (e.g., it's about 5%
213 * better in AES-CBC).
214 *
215 * \param r Pointer to result (buffer of at least \p n bytes). \p r
216 * may be equal to either \p a or \p b, but behaviour when
217 * it overlaps in other ways is undefined.
218 * \param a Pointer to input (buffer of at least \p n bytes)
219 * \param b Pointer to input (buffer of at least \p n bytes)
220 * \param n Number of bytes to process.
221 */
Dave Rodgman2dd15b32023-06-15 20:27:53 +0100222static inline void mbedtls_xor_no_simd(unsigned char *r,
223 const unsigned char *a,
224 const unsigned char *b,
225 size_t n)
Dave Rodgman03bb5262023-06-15 18:43:24 +0100226{
227 size_t i = 0;
228#if defined(MBEDTLS_EFFICIENT_UNALIGNED_ACCESS)
229#if defined(__amd64__) || defined(__x86_64__) || defined(__aarch64__)
230 /* This codepath probably only makes sense on architectures with 64-bit registers */
231 for (; (i + 8) <= n; i += 8) {
232 uint64_t x = mbedtls_get_unaligned_uint64(a + i) ^ mbedtls_get_unaligned_uint64(b + i);
233 mbedtls_put_unaligned_uint64(r + i, x);
234 }
235#else
236 for (; (i + 4) <= n; i += 4) {
237 uint32_t x = mbedtls_get_unaligned_uint32(a + i) ^ mbedtls_get_unaligned_uint32(b + i);
238 mbedtls_put_unaligned_uint32(r + i, x);
239 }
240#endif
241#endif
242 for (; i < n; i++) {
243 r[i] = a[i] ^ b[i];
244 }
245}
246
Jerry Yu6c983522021-09-24 12:45:36 +0800247/* Fix MSVC C99 compatible issue
248 * MSVC support __func__ from visual studio 2015( 1900 )
249 * Use MSVC predefine macro to avoid name check fail.
250 */
Gilles Peskine449bd832023-01-11 14:50:10 +0100251#if (defined(_MSC_VER) && (_MSC_VER <= 1900))
Jerry Yud52398d2021-09-28 16:13:44 +0800252#define /*no-check-names*/ __func__ __FUNCTION__
Jerry Yu6c983522021-09-24 12:45:36 +0800253#endif
254
Dave Rodgmanfa960262023-01-10 11:14:02 +0000255/* Define `asm` for compilers which don't define it. */
256/* *INDENT-OFF* */
257#ifndef asm
Agathiyan Bragadeesh789e50e2023-07-14 16:59:36 +0100258#if defined(__IAR_SYSTEMS_ICC__)
259#define asm __asm
260#else
Dave Rodgmanfa960262023-01-10 11:14:02 +0000261#define asm __asm__
262#endif
Agathiyan Bragadeesh789e50e2023-07-14 16:59:36 +0100263#endif
Dave Rodgmanfa960262023-01-10 11:14:02 +0000264/* *INDENT-ON* */
265
Dave Rodgman0400ae22023-06-21 16:14:46 +0100266/*
Dave Rodgman28e2ca52023-06-27 15:25:38 +0100267 * Define the constraint used for read-only pointer operands to aarch64 asm.
Dave Rodgman0400ae22023-06-21 16:14:46 +0100268 *
269 * This is normally the usual "r", but for aarch64_32 (aka ILP32,
270 * as found in watchos), "p" is required to avoid warnings from clang.
Dave Rodgmane6c99962023-06-21 21:16:23 +0100271 *
272 * Note that clang does not recognise '+p' or '=p', and armclang
Dave Rodgman28e2ca52023-06-27 15:25:38 +0100273 * does not recognise 'p' at all. Therefore, to update a pointer from
274 * aarch64 assembly, it is necessary to use something like:
275 *
276 * uintptr_t uptr = (uintptr_t) ptr;
277 * asm( "ldr x4, [%x0], #8" ... : "+r" (uptr) : : )
278 * ptr = (void*) uptr;
279 *
280 * Note that the "x" in "%x0" is neccessary; writing "%0" will cause warnings.
Dave Rodgman0400ae22023-06-21 16:14:46 +0100281 */
282#if defined(__aarch64__) && defined(MBEDTLS_HAVE_ASM)
283#if UINTPTR_MAX == 0xfffffffful
284/* ILP32: Specify the pointer operand slightly differently, as per #7787. */
285#define MBEDTLS_ASM_AARCH64_PTR_CONSTRAINT "p"
286#elif UINTPTR_MAX == 0xfffffffffffffffful
287/* Normal case (64-bit pointers): use "r" as the constraint for pointer operands to asm */
288#define MBEDTLS_ASM_AARCH64_PTR_CONSTRAINT "r"
289#else
Antonio de Angelis1ee4d122023-08-16 12:26:37 +0100290#error "Unrecognised pointer size for aarch64"
Dave Rodgman0400ae22023-06-21 16:14:46 +0100291#endif
292#endif
293
Tom Cosgrove6ef9bb32023-03-08 14:19:51 +0000294/* Always provide a static assert macro, so it can be used unconditionally.
Tom Cosgrove57f04b82023-03-14 12:03:47 +0000295 * It will expand to nothing on some systems.
Tom Cosgrove6ef9bb32023-03-08 14:19:51 +0000296 * Can be used outside functions (but don't add a trailing ';' in that case:
297 * the semicolon is included here to avoid triggering -Wextra-semi when
298 * MBEDTLS_STATIC_ASSERT() expands to nothing).
299 * Can't use the C11-style `defined(static_assert)` on FreeBSD, since it
300 * defines static_assert even with -std=c99, but then complains about it.
301 */
302#if defined(static_assert) && !defined(__FreeBSD__)
303#define MBEDTLS_STATIC_ASSERT(expr, msg) static_assert(expr, msg);
Tom Cosgrove6ef9bb32023-03-08 14:19:51 +0000304#else
305#define MBEDTLS_STATIC_ASSERT(expr, msg)
306#endif
307
Dave Rodgman360e04f2023-06-09 17:18:32 +0100308#if defined(__has_builtin)
Dave Rodgman9ba640d2023-10-31 23:30:09 +0000309#define MBEDTLS_HAS_BUILTIN(x) __has_builtin(x)
310#else
311#define MBEDTLS_HAS_BUILTIN(x) 0
312#endif
313
314/* Define compiler branch hints */
315#if MBEDTLS_HAS_BUILTIN(__builtin_expect)
Dave Rodgmane9fcffd2023-07-19 15:42:19 +0100316#define MBEDTLS_LIKELY(x) __builtin_expect(!!(x), 1)
317#define MBEDTLS_UNLIKELY(x) __builtin_expect(!!(x), 0)
Dave Rodgman9ba640d2023-10-31 23:30:09 +0000318#else
Dave Rodgman360e04f2023-06-09 17:18:32 +0100319#define MBEDTLS_LIKELY(x) x
320#define MBEDTLS_UNLIKELY(x) x
321#endif
322
Dave Rodgmanfb24a842023-07-12 13:16:49 +0100323/* MBEDTLS_ASSUME may be used to provide additional information to the compiler
324 * which can result in smaller code-size. */
Dave Rodgman9ba640d2023-10-31 23:30:09 +0000325#if MBEDTLS_HAS_BUILTIN(__builtin_assume)
Dave Rodgman52e70522023-10-31 23:26:44 +0000326/* clang provides __builtin_assume */
Dave Rodgmanfb24a842023-07-12 13:16:49 +0100327#define MBEDTLS_ASSUME(x) __builtin_assume(x)
Dave Rodgman9ba640d2023-10-31 23:30:09 +0000328#elif MBEDTLS_HAS_BUILTIN(__builtin_unreachable)
Dave Rodgmane91d7c52023-11-02 10:36:38 +0000329/* gcc and IAR can use __builtin_unreachable */
Dave Rodgmanfb24a842023-07-12 13:16:49 +0100330#define MBEDTLS_ASSUME(x) do { if (!(x)) __builtin_unreachable(); } while (0)
Dave Rodgman9ba640d2023-10-31 23:30:09 +0000331#elif defined(_MSC_VER)
Dave Rodgman90c8ac22023-10-31 23:27:24 +0000332/* Supported by MSVC since VS 2005 */
333#define MBEDTLS_ASSUME(x) __assume(x)
334#else
Dave Rodgman64bdeb82023-10-31 23:27:04 +0000335#define MBEDTLS_ASSUME(x) do { } while (0)
Dave Rodgmanfb24a842023-07-12 13:16:49 +0100336#endif
337
Dave Rodgman9bb7e6f2023-06-16 09:41:21 +0100338/* For gcc -Os, override with -O2 for a given function.
339 *
340 * This will not affect behaviour for other optimisation settings, e.g. -O0.
341 */
Dave Rodgmanb055f752023-06-15 18:42:59 +0100342#if defined(MBEDTLS_COMPILER_IS_GCC) && defined(__OPTIMIZE_SIZE__)
Dave Rodgman9bb7e6f2023-06-16 09:41:21 +0100343#define MBEDTLS_OPTIMIZE_FOR_PERFORMANCE __attribute__((optimize("-O2")))
Dave Rodgmanb055f752023-06-15 18:42:59 +0100344#else
Dave Rodgman9bb7e6f2023-06-16 09:41:21 +0100345#define MBEDTLS_OPTIMIZE_FOR_PERFORMANCE
Dave Rodgmanb055f752023-06-15 18:42:59 +0100346#endif
347
Dave Rodgman1ec1a0f2023-10-04 13:50:54 +0100348/* Suppress compiler warnings for unused functions and variables. */
Dave Rodgman2457bcd2023-10-13 12:31:45 +0100349#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__has_attribute)
350# if __has_attribute(unused)
351# define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
352# endif
353#endif
354#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__GNUC__)
355# define MBEDTLS_MAYBE_UNUSED __attribute__((unused))
Dave Rodgmanfeadcaf2023-10-04 15:27:33 +0100356#endif
Dave Rodgman749f2222023-10-04 15:38:58 +0100357#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(__IAR_SYSTEMS_ICC__) && defined(__VER__)
Dave Rodgmanf8428682023-10-24 14:18:38 +0100358/* IAR does support __attribute__((unused)), but only if the -e flag (extended language support)
359 * is given; the pragma always works.
Dave Rodgmand1c4fb02023-10-25 15:07:35 +0100360 * Unfortunately the pragma affects the rest of the file where it is used, but this is harmless.
361 * Check for version 5.2 or later - this pragma may be supported by earlier versions, but I wasn't
362 * able to find documentation).
363 */
364# if (__VER__ >= 5020000)
Dave Rodgmanf8428682023-10-24 14:18:38 +0100365# define MBEDTLS_MAYBE_UNUSED _Pragma("diag_suppress=Pe177")
Dave Rodgman2457bcd2023-10-13 12:31:45 +0100366# endif
Dave Rodgman749f2222023-10-04 15:38:58 +0100367#endif
368#if !defined(MBEDTLS_MAYBE_UNUSED) && defined(_MSC_VER)
Dave Rodgman2457bcd2023-10-13 12:31:45 +0100369# define MBEDTLS_MAYBE_UNUSED __pragma(warning(suppress:4189))
Dave Rodgman749f2222023-10-04 15:38:58 +0100370#endif
371#if !defined(MBEDTLS_MAYBE_UNUSED)
Dave Rodgman2457bcd2023-10-13 12:31:45 +0100372# define MBEDTLS_MAYBE_UNUSED
Dave Rodgman1ec1a0f2023-10-04 13:50:54 +0100373#endif
374
Gilles Peskinec4672fd2019-09-11 13:39:11 +0200375#endif /* MBEDTLS_LIBRARY_COMMON_H */