DPE: Log certificate buffer size
Change-Id: I82febcc159cd1bf3cf0b03ab717e60d0eeb18fd2
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
diff --git a/partitions/dice_protection_environment/dpe_context_mngr.c b/partitions/dice_protection_environment/dpe_context_mngr.c
index 238c715..99dd3f3 100644
--- a/partitions/dice_protection_environment/dpe_context_mngr.c
+++ b/partitions/dice_protection_environment/dpe_context_mngr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, Arm Limited. All rights reserved.
+ * Copyright (c) 2023-2024, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -880,7 +880,8 @@
psa_status_t status;
struct layer_context_t *layer_ctx;
- log_get_certificate_chain(input_ctx_handle, retain_context, clear_from_context);
+ log_get_certificate_chain(input_ctx_handle, retain_context,
+ clear_from_context, certificate_chain_buf_size);
/* Validate input handle */
if (!is_input_handle_valid(input_ctx_handle)) {
diff --git a/partitions/dice_protection_environment/dpe_log.c b/partitions/dice_protection_environment/dpe_log.c
index ce5e454..4986432 100644
--- a/partitions/dice_protection_environment/dpe_log.c
+++ b/partitions/dice_protection_environment/dpe_log.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, Arm Limited. All rights reserved.
+ * Copyright (c) 2023-2024, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -101,13 +101,15 @@
void log_get_certificate_chain(int context_handle,
bool retain_context,
- bool clear_from_context)
+ bool clear_from_context,
+ size_t cert_chain_buf_size)
{
LOG_DBGFMT("DPE GetCertificateChain:\r\n");
LOG_DBGFMT(" - context_handle index = %d\r\n", GET_IDX(context_handle));
LOG_DBGFMT(" - context_handle nonce = %d\r\n", GET_NONCE(context_handle));
LOG_DBGFMT(" - retain_context = %d\r\n", retain_context);
LOG_DBGFMT(" - clear_from_context = %d\r\n", clear_from_context);
+ LOG_DBGFMT(" - cert_chain_buf_size = %d\r\n", cert_chain_buf_size);
}
void log_intermediate_certificate(uint16_t layer_idx,
diff --git a/partitions/dice_protection_environment/dpe_log.h b/partitions/dice_protection_environment/dpe_log.h
index 5532684..f7b207c 100644
--- a/partitions/dice_protection_environment/dpe_log.h
+++ b/partitions/dice_protection_environment/dpe_log.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, Arm Limited. All rights reserved.
+ * Copyright (c) 2023-2024, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -53,7 +53,8 @@
*/
void log_get_certificate_chain(int context_handle,
bool retain_context,
- bool clear_from_context);
+ bool clear_from_context,
+ size_t cert_chain_buf_size);
/**
* \brief Log intermediate layer certificate contents.