Merge pull request #10998 from jan-bruckner/mbedtls-3.6

Backport 3.6: Add linkage guard to constant_time.h
This commit is contained in:
Manuel Pégourié-Gonnard 2026-10-16 07:20:38 +00:00 committed by GitHub
commit 8a04fc0861
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Bugfix
* Add extern "C" guard to constant_time.h. Fixes
https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/930.

View File

@ -11,6 +11,10 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Constant-time buffer comparison without branches.
*
* This is equivalent to the standard memcmp function, but is likely to be
@ -33,4 +37,8 @@ int mbedtls_ct_memcmp(const void *a,
const void *b,
size_t n);
#ifdef __cplusplus
}
#endif
#endif /* MBEDTLS_CONSTANT_TIME_H */