Tspi_SetAttribUint32(3)
β¨ Tspi_SetAttribUint32 β¨
okay bestie, so this is Tspi_SetAttribUint32(3) β it lives in the Library Functions Manual and it's part of the TCG Software Stack Developers Reference. no cap, this is the one that lets you poke a lil 32-bit value into an object's attribute slot. let's get into it π
πΈ NAME πΈ
Tspi_SetAttribUint32 β set a 32bit attribute associated with a given class or 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_SetAttribUint32(TSS_HOBJECT hObject, TSS_FLAG attribFlag,
TSS_FLAG subFlag, UINT32 ulAttrib);
like yes, that's a LOT of includes, but that's just how this whole header family rolls π keep them all, they're not decorative.
π¦ DESCRIPTION π¦
Tspi_SetAttribUint32 sets a uint32 attribute associated with a given class or object.
the way this works is: you gotta first create an object, and then go find the attributes you wanna set. that order is not optional, it's the whole vibe check. no object = nothing to set, periodt.
π PARAMETERS π
π hObject
the handle of the object or class whose attributes are being set. and ngl, this is any object handler you've got lying around β context, policy, TPM, key, hash, etc. it's giving "equal opportunity attribute setter" π
π attribFlag
indicates the specific attribute to be set. this is one half of the "which attribute tho" answer.
π subFlag
also indicates the specific attribute to be set. yes bestie, it takes two flags to name one attribute β that's just the house style here π
π ulAttrib
the value that the specified attribute will be set to. this is the actual number you're shipping off. slay.
β RETURN CODES β
Tspi_SetAttribUint32 returns TSS_SUCCESS on success π otherwise one of these lil guys comes back at you:
TSS_E_INVALID_HANDLEβhObjectis not a valid handle.TSS_E_INVALID_ATTRIB_FLAGβattribFlagis incorrect.TSS_E_INVALID_ATTRIB_SUBFLAGβsubFlagis incorrect.TSS_E_INVALID_ATTRIB_DATAβulAttribis incorrect.TSS_E_INTERNAL_ERRORβ an internal SW error has been detected. π not you, it's them.TSS_E_BAD_PARAMETERβ one or more parameters is bad.
lowkey if you're seeing more than one of these, check your params first β that's usually the main character of the problem π«Ά
π CONFORMING TO π
Tspi_SetAttribUint32 conforms to the Trusted Computing Group Software Specification version 1.1 Golden. iconic behavior honestly β
π SEE ALSO π
and that's the whole page bestie, you ate π β¨
this one's from TSS 1.1, dated 2004-05-25 β yes it's vintage, yes it still slays π
π¦ where this page comes from
- debian bookworm: libtspi-dev 0.3.15-0.3 Β· BSD-3-Clause
- debian trixie: libtspi-dev 0.3.15-0.4 Β· BSD-3-Clause
- epel 10: trousers-devel 0.3.15-11.el10_0 Β· BSD
- epel 9: trousers-devel 0.3.15-5.el9 Β· BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: trousers 0.3.15
- nixpkgs unstable: netbsd-source 11.0
- nixpkgs unstable: trousers 0.3.15
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libtspi-dev 0.3.15-0.2 Β· BSD-3-Clause
- ubuntu noble: libtspi-dev 0.3.15-0.3build2 Β· BSD-3-Clause
- ubuntu questing: libtspi-dev 0.3.15-0.4
- ubuntu resolute: libtspi-dev 0.3.15-1 Β· BSD-3-Clause
- ubuntu stonking: libtspi-dev 0.3.15-1ubuntu2 Β· BSD-3-Clause
- Copyright (C) 2004 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms