1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2018-2020, Linaro Limited 4 */ 5 6 #ifndef PKCS11_HELPERS_H 7 #define PKCS11_HELPERS_H 8 9 #include <stdint.h> 10 #include <stddef.h> 11 12 /* 13 * TEE invocation parameter#0 is an in/out buffer of at least 32bit 14 * to store the TA PKCS#11 compliant return value. 15 */ 16 #define TEE_PARAM0_SIZE_MIN sizeof(uint32_t) 17 18 #if CFG_TEE_TA_LOG_LEVEL > 0 19 /* Id-to-string conversions only for trace support */ 20 const char *id2str_ta_cmd(uint32_t id); 21 const char *id2str_rc(uint32_t id); 22 const char *id2str_slot_flag(uint32_t id); 23 const char *id2str_token_flag(uint32_t id); 24 #endif /* CFG_TEE_TA_LOG_LEVEL > 0 */ 25 #endif /*PKCS11_HELPERS_H*/ 26