Tspi_P...rIndex(3)

πŸ’– Tspi_PcrComposite_SelectPcrIndex(3) πŸ’–

okay so bestie, welcome to the TCG Software Stack Developer's Reference, section 3, and today's main character is Tspi_PcrComposite_SelectPcrIndex β€” yes the header truncates it to Tspi_P...rIndex(3) because apparently even manpages have a character limit, but we know her full name and we respect it. πŸŽ€


✨ NAME ✨

Tspi_PcrComposite_SelectPcrIndex β€” select a PCR index inside a PCR composite object. That's it. That's the whole job. She picks one (1) PCR index and puts it in the composite. Slay.


🌸 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_PcrComposite_SelectPcrIndex(TSS_HPCRS hPcrComposite, UINT32 ulPcrIndex);

like yes you have to include all seven of those headers, no we're not skipping any, the TSS does not do minimalism. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So Tspi_PcrComposite_SelectPcrIndex selects a PCR index inside a PCR composite object. That's the vibe. That's the whole plot.

But here's the tea, and it's important tea: that PCR composite object has to already exist, and you create it with the function Tspi_Context_CreateObject(). No object, no index selection, no nothing. πŸ™ˆ

And if you want a real-life example of when you'd even do this? The classic one is selecting PCR registers before you call Tspi_TPM_Quote(). So like β€” you pick your PCRs, then you quote. Order matters bestie, we don't freestyle the sequence. ✨


πŸ’œ PARAMETERS πŸ’œ

hPcrComposite

Handle of the PCR composite object instance where the index should be selected. Basically: which composite are we decorating today? πŸŽ€

ulPcrIndex

This parameter indicates the index of the PCR to select. Which PCR are we pulling into the group chat. That's the number you drop here. πŸ”₯


πŸ‘‘ RETURN CODES πŸ‘‘

Tspi_PcrComposite_SelectPcrIndex returns TSS_SUCCESS when it goes off without a hitch. Otherwise, one of these lil guys comes back at you:

  • TSS_E_INVALID_HANDLE β€” Either hPcrComposite or ulPcrIndex is an invalid handle. (yes, the PCR index being called a "handle" here is a little cursed, but that's what the spec says, and we do not argue with the spec.) 😭
  • TSS_E_INTERNAL_ERROR β€” An error occurred internal to the TSS. Not your fault, not our fault, it's giving "the stack is having a moment." πŸ’€

🌈 CONFORMING TO 🌈

Tspi_PcrComposite_SelectPcrIndex conforms to the Trusted Computing Group Software Specification version 1.1 Golden. Golden!! As in the golden version!! We love a certified queen. ⭐


🫢 SEE ALSO 🫢

go read those next, iykyk 🧚


TSS 1.1 Β· 2004-05-26

and that's the page!! this one came from TSS 1.1, dated 2004-05-26 β€” a true elder icon serving documentation since the mid-aughts, and she's still out here helping us select PCR indices. obsessed. bye bestie, go pick your PCRs responsibly πŸ’–πŸŒΈβœ¨