1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2017-2020, Linaro Limited 4 */ 5 6 #ifndef TOKEN_CAPABILITIES_H 7 #define TOKEN_CAPABILITIES_H 8 9 bool mechanism_flags_complies_pkcs11(uint32_t mechanism_type, uint32_t flags); 10 11 bool mechanism_is_valid(enum pkcs11_mechanism_id id); 12 13 #if CFG_TEE_TA_LOG_LEVEL > 0 14 const char *mechanism_string_id(enum pkcs11_mechanism_id id); 15 #endif 16 17 uint32_t *tee_malloc_mechanism_list(size_t *out_count); 18 19 uint32_t mechanism_supported_flags(enum pkcs11_mechanism_id id); 20 21 static inline bool mechanism_is_supported(enum pkcs11_mechanism_id id) 22 { 23 return mechanism_supported_flags(id) != 0; 24 } 25 26 #endif /*TOKEN_CAPABILITIES_H*/ 27