Tspi_Polic...gnToObject(3)
π Tspi_Policy_AssignToObject(3) π
okay bestie, gather round, because this one is from the TCG Software Stack Developers Reference (the TSS girlies know) and it's literally about giving a policy to an object so the object knows how to behave. it's giving "here's your hall pass" energy. π
β¨ NAME β¨
Tspi_Policy_AssignToObject β assign a policy to an object. that's it, that's the whole job. π
πΈ 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_Policy_AssignToObject(TSS_HPOLICY hPolicy, TSS_HOBJECT hObject);
like yes, that's a lot of includes. do not skip them. they are load-bearing. π
π¦ DESCRIPTION π¦
so Tspi_Policy_AssignToObject assigns a given object to a certain policy. that's the whole vibe. once it's assigned, the object then uses its assigned policy to process an authorized TPM command. main character object, doing main character things, but only because its policy said so. β¨
here's the tea tho: when each new object is initialized, it gets assigned to the default policy, and that default policy is created when a context object is created. so nobody starts out policy-less, bestie, everyone has a vibe from day one. π«Ά
and when an object is assigned to a policy, a reference is added to the list of assigned objects stored in the policy, and a reference to the policy is stored in the object by internal object functions. so it's a mutual thing. both sides are keeping receipts. π lowkey romantic.
π PARAMETERS π
π hPolicy
the hPolicy parameter is the handle of the policy object to be assigned to. it's the one doing the adopting. π
π hObject
the hObject parameter is the object that will be assigned to hPolicy. it's the one getting adopted. π₯Ί
π₯ RETURN CODES π₯
Tspi_Policy_AssignToObject returns TSS_SUCCESS on success. slay. otherwise one of these lil guys comes back at you:
TSS_E_INVALID_HANDLEβhPolicyis not a valid handle. bestie that handle is not real, no cap. πTSS_E_INTERNAL_ERRORβ an internal SW error has been detected. not your fault, not our fault, it's just an internal situation. π
π CONFORMING TO π
Tspi_Policy_AssignToObject conforms to the Trusted Computing Group Software Specification version 1.1 Golden. iconic, certified, periodt. β
π SEE ALSO π
ngl if you're assigning policies you're probably gonna wanna know about setting and flushing secrets too, so go read those next. iykyk. π
and that's the whole page, bestie! this one's from TSS 1.1, dated 2004-05-25 β yes she's an elder but she's still serving. mwah, go assign some policies. π§ββοΈπ π
π¦ 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