Skip to content

Commit 01e547d

Browse files
committed
[crypto] PSA API: set platform key references for PSA automatically
This commit configures the OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE based on the chosen crypto library. Signed-off-by: Łukasz Duda <lukasz.duda@nordicsemi.no>
1 parent d1a7d5d commit 01e547d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/config/platform.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#ifndef CONFIG_PLATFORM_H_
3535
#define CONFIG_PLATFORM_H_
3636

37-
#include "config/srp_server.h"
37+
#include "config/crypto.h"
3838

3939
/**
4040
* @addtogroup config-platform
@@ -154,9 +154,13 @@
154154
* @def OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
155155
*
156156
* Define to 1 if you want to enable key ref usage support as defined by platform.
157+
*
158+
* This config is enabled by default for PSA Crypto backend.
159+
*
157160
*/
158161
#ifndef OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
159-
#define OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE 0
162+
#define OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE \
163+
(OPENTHREAD_CONFIG_CRYPTO_LIB == OPENTHREAD_CONFIG_CRYPTO_LIB_PSA)
160164
#endif
161165

162166
/**

0 commit comments

Comments
 (0)