Tspi_G...ibData(3)

✨ Tspi_GetAttribData ✨</p>

okay bestie, welcome to the TCG Software Stack Developer's Reference πŸ’… this one lives in section 3 of the manual, and it's all about pulling a non-32-bit attribute out of an object. yes, the 32-bit ones have their own whole thing going on. this is for the other ones. πŸŽ€


NAME πŸ¦‹

Tspi_GetAttribData β€” get a non 32bit attribute of the object.


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_GetAttribData(TSS_HOBJECT hObject, TSS_FLAG attribFlag,
                              TSS_FLAG    subFlag, UINT32*  pulAttribDataSize,
                              BYTE**      prgbAttribData);

like, look at all those headers. she's thorough. πŸ’–


DESCRIPTION πŸ’œ

so Tspi_GetAttribData is the function you call when you want the value of a particular attribute that's attached to a particular object β€” but specifically when that attribute is not a UINT32. the 32-bit girlies have their own function, this is not that.

and the way the data is structured? the way the size works? it literally depends on the attribute. so don't come in here expecting one shape. it's giving "it depends". πŸ€·β™€οΈ


PARAMETERS πŸ“

hObject

the handle of the object where you wanna retrieve the attribute from. that's your girl. that's who you're asking. 🫢

attribFlag

a flag indicating the attribute to query. which one are we looking at, bestie? πŸ‘€

subFlag

a sub flag indicating the attribute to query. yes, there's a sub flag. it's a whole layered situation. ✨

pulAttribDataSize

receives the length (in bytes) of the prgbAttribData parameter. so it tells you how big the thing is. πŸ”₯

prgbAttribData

on successful completion of the command, this parameter points to a buffer containing the actual data of the specified attribute. that's the payload. that's the main character. πŸ‘‘


RETURN CODES πŸ’€

Tspi_GetAttribData returns TSS_SUCCESS on success, otherwise one of the following values are returned:

  • TSS_E_INVALID_HANDLE β€” either hObject, attribFlag, or subFlag are invalid.
  • TSS_E_ATTRIB_FLAG
  • TSS_E_ATTRIB_SUBFLAG
  • TSS_E_ATTRIB_DATA
  • TSS_E_BAD_PARAMETER
  • TSS_E_INTERNAL_ERROR β€” an error occurred internal to the TSS.
ngl if you're getting one of these, check your handles and flags first. TSS_E_INVALID_HANDLE is right there telling you something in that trio is off. πŸ™ˆ

CONFORMING TO 🌈

Tspi_GetAttribData conforms to the Trusted Computing Group Software Specification version 1.1 Golden. yes, Golden. iconic behavior only. ⭐


SEE ALSO 🧚


and that's the whole page, bestie!! πŸ’– this was TSS 1.1, dated 2004-05-26, from the TCG Software Stack Developer's Reference. slay, go get that attribute data. no cap. πŸ’…βœ¨