diff --git a/.astyleignore b/.astyleignore index 6cdfd57e4f..d334f138fd 100644 --- a/.astyleignore +++ b/.astyleignore @@ -4,6 +4,7 @@ ^components/TARGET_PSA/services/attestation/attestation.h ^components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl ^components/TARGET_PSA/services/attestation/qcbor +^components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/crypto_struct_ipc.h ^components/TARGET_PSA/TARGET_TFM ^components/TARGET_PSA/TESTS ^features/cryptocell diff --git a/components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/crypto_struct_ipc.h b/components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/crypto_struct_ipc.h index 6d94034788..cf2693f1c9 100644 --- a/components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/crypto_struct_ipc.h +++ b/components/TARGET_PSA/services/crypto/COMPONENT_PSA_SRV_IPC/crypto_struct_ipc.h @@ -2,6 +2,16 @@ * \file psa/crypto_struct.h * * \brief PSA cryptography module: Mbed TLS structured type implementations + * + * \note This file may not be included directly. Applications must + * include psa/crypto.h. + * + * This file contains the definitions of some data structures with + * implementation-specific definitions. + * + * In implementations with isolation between the application and the + * cryptography module, it is expected that the front-end and the back-end + * would have different versions of this file. */ /* * Copyright (C) 2018, ARM Limited, All Rights Reserved @@ -27,60 +37,65 @@ #include "psa/client.h" -struct psa_hash_operation_s { +struct psa_hash_operation_s +{ psa_handle_t handle; }; #define PSA_HASH_OPERATION_INIT { PSA_NULL_HANDLE } -static inline struct psa_hash_operation_s psa_hash_operation_init(void) +static inline struct psa_hash_operation_s psa_hash_operation_init( void ) { const struct psa_hash_operation_s v = PSA_HASH_OPERATION_INIT; - return (v); + return( v ); } -struct psa_mac_operation_s { +struct psa_mac_operation_s +{ psa_handle_t handle; }; #define PSA_MAC_OPERATION_INIT { PSA_NULL_HANDLE } -static inline struct psa_mac_operation_s psa_mac_operation_init(void) +static inline struct psa_mac_operation_s psa_mac_operation_init( void ) { const struct psa_mac_operation_s v = PSA_MAC_OPERATION_INIT; - return (v); + return( v ); } -struct psa_cipher_operation_s { +struct psa_cipher_operation_s +{ psa_handle_t handle; }; #define PSA_CIPHER_OPERATION_INIT { PSA_NULL_HANDLE } -static inline struct psa_cipher_operation_s psa_cipher_operation_init(void) +static inline struct psa_cipher_operation_s psa_cipher_operation_init( void ) { const struct psa_cipher_operation_s v = PSA_CIPHER_OPERATION_INIT; - return (v); + return( v ); } -struct psa_crypto_generator_s { +struct psa_crypto_generator_s +{ psa_handle_t handle; }; #define PSA_CRYPTO_GENERATOR_INIT { PSA_NULL_HANDLE } -static inline struct psa_crypto_generator_s psa_crypto_generator_init(void) +static inline struct psa_crypto_generator_s psa_crypto_generator_init( void ) { const struct psa_crypto_generator_s v = PSA_CRYPTO_GENERATOR_INIT; - return (v); + return( v ); } -struct psa_key_policy_s { +struct psa_key_policy_s +{ psa_key_usage_t usage; psa_algorithm_t alg; }; #define PSA_KEY_POLICY_INIT {0, 0} -static inline struct psa_key_policy_s psa_key_policy_init(void) +static inline struct psa_key_policy_s psa_key_policy_init( void ) { const struct psa_key_policy_s v = PSA_KEY_POLICY_INIT; - return (v); + return( v ); } #endif /* PSA_CRYPTO_STRUCT_H */