From ce6fc9c0252e94f0bac8e38a918da6d0c0cff755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Duda?= Date: Wed, 23 Apr 2025 22:35:19 +0200 Subject: [PATCH] [crypto] PSA API: set platform key references for PSA automatically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit configures the OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE based on the chosen crypto library. Signed-off-by: Ɓukasz Duda --- src/core/config/platform.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/config/platform.h b/src/core/config/platform.h index f00bef8ca..dfaed451b 100644 --- a/src/core/config/platform.h +++ b/src/core/config/platform.h @@ -34,7 +34,7 @@ #ifndef OT_CORE_CONFIG_PLATFORM_H_ #define OT_CORE_CONFIG_PLATFORM_H_ -#include "config/srp_server.h" +#include "config/crypto.h" /** * @addtogroup config-platform @@ -154,9 +154,13 @@ * @def OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE * * Define to 1 if you want to enable key ref usage support as defined by platform. + * + * This config is enabled by default for PSA Crypto backend. + * */ #ifndef OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE -#define OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE 0 +#define OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE \ + (OPENTHREAD_CONFIG_CRYPTO_LIB == OPENTHREAD_CONFIG_CRYPTO_LIB_PSA) #endif /**