Tspi_GetPolicyObject(3)
β¨ Tspi_GetPolicyObject(3) β¨
okay bestie, welcome to the TCG Software Stack Developers Reference π this one's a library function in section 3 of the manual, and it's literally just "hey what policy is on this thing" β no cap.
πΈ NAME πΈ
Tspi_GetPolicyObject β get a policy object assigned to a working 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_GetPolicyObject(TSS_HOBJECT hObject, TSS_FLAG policyType,
TSS_HPOLICY* phPolicy);
like yes, that's a whole lot of includes, but you need them all, don't @ me π«Ά
π¦ DESCRIPTION π¦
So Tspi_GetPolicyObject returns a policy object that's currently assigned to a working object. That's it. That's the whole vibe. π
And the way that this is actually useful is: if you figure out that the policy is different from what you require, you can swap it out β create a new one and hit it with Tspi_Policy_AssignToObject. iconic behavior honestly.
π PARAMETERS π
hObject
The hObject parameter is the handle of the object. main character energy tbh β
policyType
The policyType parameter tells you which policy type you're interested in. The types are TSS_POLICY_USAGE and TSS_POLICY_MIGRATION. pick your fighter π₯
phPolicy
The phPolicy parameter receives the handle to the assigned policy object. it's giving "here, hold this" π
π RETURN CODES π
Tspi_GetPolicyObject returns TSS_SUCCESS on success β slay β¨ β otherwise one of these lil guys shows up:
TSS_E_INVALID_HANDLEβhContextis not a valid handle. πTSS_E_INTERNAL_ERRORβ an internal SW error has been detected. an oopsie fr fr πTSS_E_BAD_PARAMETERβ one or more parameters is bad. not the vibe.
π CONFORMING TO π
Tspi_GetPolicyObject conforms to the Trusted Computing Group Software Specification version 1.1 Golden. periodt.
π₯ SEE ALSO π₯
Tspi_Context_GetTpmObject(3)Tspi_Context_LoadKeyByUUID(3)Tspi_SetAttribUint32(3)Tspi_Policy_AssignToObject(3)
TSS 1.1 Β· 2004-05-25 β ok that's a whole vintage date bestie, this page is old enough to have its own license but it still ate π mwah, go read the SEE ALSOs, ily, bye ππ¦β¨
π¦ 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