TSPI_CONTEXT_GETDEFAULTPOLICY(3)
π Tspi_Context_GetDefaultPolicy(3) π
okay so bestie, we're in the Library Functions Manual today, and this whole page is from the TCG Software Stack Developers Reference. yes it's giving very serious cryptography girlboss energy, but don't worry, i got you π«Ά
β¨ NAME β¨
Tspi_Context_GetDefaultPolicy β get a handle to the default policy object of a given context. literally just "hey, what's the default policy around here" but for your TSS context π
πΈ 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_Context_GetDefaultPolicy(TSS_HCONTEXT hContext, TSS_HPOLICY *phPolicy);
like, you gotta include all seven of those headers first, no skipping, they're a set, they're a vibe π
π¦ DESCRIPTION π¦
Tspi_Context_GetDefaultPolicy determines what policy is used by all of the keys in a given context. that's it, that's the whole function. it's the "so what's our default policy situation" of the context world. the policy that every key in that context is gonna be living by, you're finding out what it is π
π PARAMETERS π
hContext
the hContext parameter is the handle of the context object. it's the context you're asking about, the main character in this situation π
phPolicy
the phPolicy parameter receives the handle of the default policy object bound to the context. so this is the output, it's where the answer lands. not you passing in a policy β you're getting one handed to you π
π₯ RETURN CODES π₯
Tspi_Context_GetDefaultPolicy returns TSS_SUCCESS on success, otherwise one of the following values is returned:
TSS_E_INVALID_HANDLEβhContextis not a valid handle. like bestie that's not a real context, what is that πTSS_E_INTERNAL_ERRORβ an internal SW error has been detected. not your fault, something inside went sideways π
π CONFORMING TO π
Tspi_Context_GetDefaultPolicy conforms to the Trusted Computing Group Software Specification version 1.1 Golden. periodt, it's standards-compliant and it knows it β¨
π SEE ALSO π
go read those too, they're the rest of the friend group, iykyk π
real talk: this page is from TSS 1.1, dated 2004-05-25. yes, 2004. she's vintage, she's iconic, she's been serving TSS correctness for two decades and she's still here π°οΈπ
mwah, love you, go get that default policy π«Άπ
π¦ 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