mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Implement and use MBEDTLS_STATIC_ASSERT()
Fixes #3693 Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -313,10 +312,9 @@ psa_status_t psa_register_se_driver(
|
||||
}
|
||||
/* Driver table entries are 0-initialized. 0 is not a valid driver
|
||||
* location because it means a transparent key. */
|
||||
#if defined(static_assert)
|
||||
static_assert(PSA_KEY_LOCATION_LOCAL_STORAGE == 0,
|
||||
"Secure element support requires 0 to mean a local key");
|
||||
#endif
|
||||
MBEDTLS_STATIC_ASSERT(PSA_KEY_LOCATION_LOCAL_STORAGE == 0,
|
||||
"Secure element support requires 0 to mean a local key");
|
||||
|
||||
if (location == PSA_KEY_LOCATION_LOCAL_STORAGE) {
|
||||
return PSA_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user