Skip to content

Commit

Permalink
Correct rebase error
Browse files Browse the repository at this point in the history
  • Loading branch information
tmael authored and danielinux committed Aug 22, 2023
1 parent 6e1c249 commit c1ccb5c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,18 +965,19 @@ static int TPM2_IoCb(TPM2_CTX* ctx, const byte* txBuf, byte* rxBuf,

#ifdef WOLFBOOT_MEASURED_BOOT
#define measure_boot(hash) wolfBoot_tpm2_extend((hash), __LINE__)
static int wolfBoot_tpm2_extend(uint8_t* hash, int line)

/**
* @brief Measure the boot state using TPM2 PCR extend operation.
* @brief Extends a PCR in the TPM with a hash.
*
* This function measures the boot state by extending the SHA-256 digest of
* the image into the TPM2 Platform Configuration Registers (PCRs).
* Extends a specified PCR's value in the TPM with a given hash. Uses
* TPM2_PCR_Extend. Optionally, if DEBUG_WOLFTPM or WOLFBOOT_DEBUG_TPM defined,
* prints debug info.
*
* @param[in] hash Pointer to the hash value to extend into the PCR.
* @param[in] line Line number where the function is called (for debugging).
* @return 0 on success, an error code on failure.
*
* @param img The pointer to the wolfBoot_image structure representing the image.
* @return 0 on success, -1 on error.
*/
static int measure_boot(struct wolfBoot_image *img)
static int wolfBoot_tpm2_extend(uint8_t* hash, int line)
{
int rc;
PCR_Extend_In pcrExtend;
Expand Down

0 comments on commit c1ccb5c

Please sign in to comment.