Jamie Fox | e7f8b4e | 2023-05-30 18:03:20 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2023, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef __DPE_LOG_H__ |
| 9 | #define __DPE_LOG_H__ |
| 10 | |
| 11 | #include "dice_protection_environment.h" |
| 12 | #include "tfm_sp_log.h" |
| 13 | |
| 14 | #ifdef __cplusplus |
| 15 | extern "C" { |
| 16 | #endif |
| 17 | |
| 18 | #if (TFM_PARTITION_LOG_LEVEL >= TFM_PARTITION_LOG_LEVEL_DEBUG) |
| 19 | |
| 20 | /** |
| 21 | * \brief Log the derive child command parameters. |
| 22 | */ |
| 23 | void log_derive_child(int context_handle, |
| 24 | bool retain_parent_context, |
| 25 | bool allow_child_to_derive, |
| 26 | bool create_certificate, |
| 27 | const DiceInputValues *dice_inputs); |
| 28 | |
| 29 | /** |
| 30 | * \brief Log the certify key command parameters. |
| 31 | */ |
| 32 | void log_certify_key(int context_handle, |
| 33 | bool retain_context, |
| 34 | const uint8_t *public_key, |
| 35 | size_t public_key_size, |
| 36 | const uint8_t *label, |
| 37 | size_t label_size); |
| 38 | |
| 39 | #else /* TFM_PARTITION_LOG_LEVEL */ |
| 40 | |
| 41 | #define log_derive_child(...) |
| 42 | #define log_certify_key(...) |
| 43 | |
| 44 | #endif /* TFM_PARTITION_LOG_LEVEL */ |
| 45 | |
| 46 | #ifdef __cplusplus |
| 47 | } |
| 48 | #endif |
| 49 | |
| 50 | #endif /* __DPE_LOG_H__ */ |