Tspi_TPM_PcrExtend(3)

πŸ’– Tspi_TPM_PcrExtend(3) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about a little icon from the Library Functions Manual β€” this is the TCG Software Stack Developer's Reference, and today's main character is Tspi_TPM_PcrExtend. she extends a PCR register and, if you hand her one, writes the PCR event log too. no cap. πŸŽ€


✨ NAME ✨

Tspi_TPM_PcrExtend β€” extend a PCR register and optionally write the PCR event log.


🌸 SYNOPSIS 🌸

#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>

TSS_RESULT Tspi_TPM_PcrExtend(TSS_HTPM       hTPM,              UINT32 ulPcrIndex,
                              UINT32         ulPcrDataLength,   BYTE*  pbPcrData,
                              TSS_PCR_EVENT* pPcrEvent,
                              UINT32*        pulPcrValueLength, BYTE** prgbPcrValue);

like. look at her. seven includes and one function call. she's lowkey efficient and I'm obsessed. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Tspi_TPM_PcrExtend extends a PCR register and writes the PCR event log if one is supplied by the user. that's it, that's the whole vibe. extend the register, and if you brought an event log along for the ride, she'll log it too. 🫢


πŸ‘‘ PARAMETERS πŸ‘‘

hTPM

the hTPM parameter is used to specify the handle of the TPM object. the command to get the TPM to test itself will be sent here. ✨

ulPcrIndex

the ulPcrIndex parameter is the index of the PCR to extend. tell her which one, bestie, she's not a mind reader. πŸ’œ

ulPcrDataLength

the ulPcrDataLength parameter is the length in bytes of the pbPcrData parameter. yes, in bytes. always bytes. πŸ“

pbPcrData

the pbPcrData parameter is a pointer to data which will be used in the extend operation. it's giving "the actual payload." πŸ”₯

pPcrEvent

the pPcrEvent parameter is the TSS_PCR_EVENT structure to be passed to the TCS to record the extend event. if pPcrEvent is not NULL, the application should fill out the members of the structure that it cares about. like β€” you only fill in what you care about, she's not gonna make you do homework on every single field. πŸ™ˆ

pulPcrValueLength

the pulPcrValueLength parameter receives the length in bytes of the prgbPcrValue parameter. output parameter moment. ⭐

prgbPcrValue

the prgbPcrValue receives a pointer to the memory block containing the PCR data after the extend operation. after. post-extend. the new you. 🌈


πŸ’€ RETURN CODES πŸ’€

Tspi_TPM_PcrExtend returns TSS_SUCCESS on success, otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hTPM is not a valid handle. 🚩
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. 😭
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad.
fr fr, check your handles and your params before you come crying to the return code. the return code is not the villain here. πŸ’…

🧚 CONFORMING TO 🧚

Tspi_TPM_PcrExtend conforms to the Trusted Computing Group Software Specification version 1.1 Golden. periodt. πŸ‘‘


🌟 SEE ALSO 🌟


and that's the whole page, bestie!! πŸŽ€ this one's from TSS 1.1, dated 2004-05-25, which means she's been iconic since before some of us were even born and she's still out here extending PCR registers. legacy behavior. mwah. πŸ’–πŸ¦‹βœ¨