Tspi_TPM_SetStatus(3)

✨ Tspi_TPM_SetStatus ✨

okay bestie, welcome to the Library Functions Manual corner of the TCG Software Stack Developer's Reference πŸ’… this one's Tspi_TPM_SetStatus(3) and she's here to mess with your TPM's status. let's get into it πŸŽ€


🌸 NAME 🌸

Tspi_TPM_SetStatus β€” modify the TPM's status


πŸ¦‹ 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_SetStatus(TSS_HTPM hTPM, TSS_FLAG statusFlag,
                              TSS_BOOL fTpmState);

like yes, that's a LOT of includes, but that's just how the TSS girlies roll πŸ™ˆ


πŸ’– DESCRIPTION πŸ’–

so Tspi_TPM_SetStatus alters the status of the TPM. iconic. depending on which statusFlag you picked, fTpmState may or may not get ignored β€” the way that some flags just don't care about your little boolean is honestly so real of them.

for this command to work, the TPM has to be on and the handle to the TPM has to be available. no handle, no service, periodt. πŸ‘‘

⚠️ bestie heads up: this command is not currently implemented. i know. i know. we were all rooting for her. 😭

✨ PARAMETERS ✨

🌟 hTPM

the hTPM parameter is what you use to specify the handle of the TPM object. it's literally the little name tag that tells the function which TPM we're talking to 🫢

🌟 statusFlag

the statusFlag parameter is what the TPM status should be set to. it's giving "which vibe are we locking in" πŸ’…

🌟 fTpmState

the fTpmState parameter is the status value to set. for some states, this flag is just ignored β€” not her moment, and that's fine πŸŽ€


πŸ”₯ RETURN CODES πŸ”₯

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

  • TSS_E_INVALID_HANDLE β€” hTPM is not a valid handle. the handle said "not today" πŸ’€
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. something deep inside is going through it 😭
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. not bad as in slay, bad as in wrong πŸ™ˆ

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_TPM_SetStatus conforms to the Trusted Computing Group Software Specification version 1.1 Golden ✨ main character certification fr fr


🌈 SEE ALSO 🌈


and that's the whole page bestie, no notes πŸ’œ this was TSS 1.1, dated 2004-05-25 β€” yeah she's vintage, she's archival, she's lowkey a time capsule, and honestly? ate. 🫢✨