MCUX CLNS
MCUX Crypto Library Normal Secure
mcuxClPsaDriver.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------*/
2 /* Copyright 2022-2023 NXP */
3 /* */
4 /* NXP Confidential. This software is owned or controlled by NXP and may */
5 /* only be used strictly in accordance with the applicable license terms. */
6 /* By expressly accepting such terms or by downloading, installing, */
7 /* activating and/or otherwise using the software, you are agreeing that */
8 /* you have read, and that you agree to comply with and are bound by, such */
9 /* license terms. If you do not agree to be bound by the applicable license */
10 /* terms, then you may not retain, install, activate or otherwise use the */
11 /* software. */
12 /*--------------------------------------------------------------------------*/
13 
18 #ifndef MCUXCLPSADRIVER_H_
19 #define MCUXCLPSADRIVER_H_
20 
21 
22 #include <crypto.h>
23 #include <psa_crypto_driver_wrappers.h>
24 #include <mcuxClConfig.h> // Exported features flags header
25 
26 /* Include TF-M builtin key driver added from TFM v1.8 updates */
27 #if defined(PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER)
28 #include "tfm_builtin_key_loader.h"
29 #endif /* PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER */
30 
31 /* If TF-M builtin key driver is enabled (only aplicable for tfm examples) */
32 #if defined(PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER)
33 #define MCUXCLPSADRIVER_IS_LOCAL_STORAGE(location) ((location) == PSA_KEY_LOCATION_LOCAL_STORAGE || (location) == TFM_BUILTIN_KEY_LOADER_KEY_LOCATION)
34 #else
35 #define MCUXCLPSADRIVER_IS_LOCAL_STORAGE(location) ((location) == PSA_KEY_LOCATION_LOCAL_STORAGE)
36 #endif
37 
38 #define PSA_KEY_LOCATION_EXTERNAL_STORAGE ((psa_key_location_t)(PSA_KEY_LOCATION_VENDOR_FLAG | 0x00U))
39 
40 #endif /* MCUXCLPSADRIVER_H_ */