TSPI_PCRCOMPOSITE_SETPCRVALUE(3)

πŸ’… Tspi_PcrComposite_SetPcrValue β€” a TCG Software Stack Developer's Reference moment

okay bestie, so this is a page from the TCG Software Stack Developer's Reference, and we're talking about Tspi_PcrComposite_SetPcrValue(3). It's giving PCR composite energy, it's giving digest-setting, it's lowkey iconic. Let's get into it. πŸ¦‹


✨ NAME ✨

Tspi_PcrComposite_SetPcrValue β€” set the digest for a given PCR index inside a PCR composite object. fr fr that's the whole job. πŸŽ€


🌸 SYNOPSIS 🌸

First you gotta invite the headers to the party:

#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>

and then, the main character herself:

TSS_RESULT Tspi_PcrComposite_SetPcrValue(TSS_HPCRS hPcrComposite,    UINT32 ulPcrIndex,
                                         UINT32    ulPcrValueLength, BYTE*  rgbPcrValue);

πŸ’– DESCRIPTION πŸ’–

So Tspi_PcrComposite_SetPcrValue sets the digest for a given PCR index inside the PCR composite object. That's it, that's the vibe. You hand it a PCR composite, you hand it an index, you hand it a value, and it sets it. no cap. ✨


🫢 PARAMETERS 🫢

hPcrComposite

Handle of the PCR composite object instance where a PCR value should be set. It's the lil container you're working inside, bestie. πŸŽ€

ulPcrIndex

This parameter indicates the index of the PCR to set. Which PCR are we setting? This one. periodt. πŸ“

ulPcrValueLength

The length (in bytes) of the rgbPcrValue parameter. Gotta tell it how big the thing is, or it simply won't know. πŸ’…

rgbPcrValue

Pointer to memory containing the actual value which should be set for the PCR indicated by ulPcrIndex. It's the actual goods, the payload, the moment. πŸ”₯


😭 RETURN CODES 😭

Tspi_PcrComposite_SetPcrValue returns TSS_SUCCESS on success β€” slay β€” otherwise one of the following values are returned:

  • TSS_E_INVALID_HANDLE β€” Either hPcrComposite or ulPcrIndex is an invalid parameter.
  • TSS_E_INTERNAL_ERROR β€” An error occurred internal to the TSS. πŸ˜”
ngl if you're seeing TSS_E_INTERNAL_ERROR that's a TSS-internal situation, not a you situation. still, vibe check your inputs. πŸ’€

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_PcrComposite_SetPcrValue conforms to the Trusted Computing Group Software Specification version 1.1 Golden. certified, official, ate. ⭐


🌈 SEE ALSO 🌈

go read those too, they're the besties in this friend group. πŸ¦‹


and that's the whole page, babe! πŸŽ€ This one's from TSS 1.1, dated 2004-05-26 β€” vintage, honestly, but still serving. take care of your PCR composites and they'll take care of you. mwah. πŸ’–βœ¨