Skip to content

Commit bc2d83e

Browse files
committed
Correct rebase error
1 parent 4c74e32 commit bc2d83e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/image.c

+9-8
Original file line numberDiff line numberDiff line change
@@ -965,18 +965,19 @@ static int TPM2_IoCb(TPM2_CTX* ctx, const byte* txBuf, byte* rxBuf,
965965

966966
#ifdef WOLFBOOT_MEASURED_BOOT
967967
#define measure_boot(hash) wolfBoot_tpm2_extend((hash), __LINE__)
968-
static int wolfBoot_tpm2_extend(uint8_t* hash, int line)
969-
970968
/**
971-
* @brief Measure the boot state using TPM2 PCR extend operation.
969+
* @brief Extends a PCR in the TPM with a hash.
972970
*
973-
* This function measures the boot state by extending the SHA-256 digest of
974-
* the image into the TPM2 Platform Configuration Registers (PCRs).
971+
* Extends a specified PCR's value in the TPM with a given hash. Uses
972+
* TPM2_PCR_Extend. Optionally, if DEBUG_WOLFTPM or WOLFBOOT_DEBUG_TPM defined,
973+
* prints debug info.
974+
*
975+
* @param[in] hash Pointer to the hash value to extend into the PCR.
976+
* @param[in] line Line number where the function is called (for debugging).
977+
* @return 0 on success, an error code on failure.
975978
*
976-
* @param img The pointer to the wolfBoot_image structure representing the image.
977-
* @return 0 on success, -1 on error.
978979
*/
979-
static int measure_boot(struct wolfBoot_image *img)
980+
static int wolfBoot_tpm2_extend(uint8_t* hash, int line)
980981
{
981982
int rc;
982983
PCR_Extend_In pcrExtend;

0 commit comments

Comments
 (0)