Tspi_C...ByUUID(3)
π Tspi_Context_LoadKeyByUUID β from the TCG Software Stack Developer's Reference β¨
okay bestie, buckle up, because this one is literally about pulling a key out of persistent storage and yeeting it into your TPM. it's giving "my key was here the whole time, I just needed the receipt." π
πΈ NAME πΈ
Tspi_Context_LoadKeyByUUID β load a key that's been registered in persistent storage. 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_Context_LoadKeyByUUID(TSS_HCONTEXT hContext, TSS_FLAG persistentStorageType,
TSS_UUID uuidData, TSS_HKEY* phKey);
look at those includes, so many headers, she's high maintenance but she's worth it π«Ά
β¨ DESCRIPTION β¨
so TSS_Context_LoadKeyByUUID (yes, that's how the original spells it, no I will not be fixing it, we respect the ancestors π) builds a key object out of the info it grabs from the manager using the UUID, and then loads that key into the TPM.
and here's the cute part: the persistent storage hands over all the info you need to load the parent keys too, like the whole family tree, so the key associated with the given UUID can actually get loaded. no cap. π
π PARAMETERS π
hContext
the handle of the context object. your main character, the one holding everything together π
persistentStorageType
a flag saying which persistent storage the key is registered in. should be either TSS_PS_TYPE_USER or TSS_PS_TYPE_SYSTEM. pick one, bestie, don't be shy β
uuidData
the UUID of the key β the one it was registered under in the persistent storage (TSP or connected TCS). it's basically the key's government name π
phKey
receives the handle of the key object that represents the loaded key. this is your souvenir from the whole trip π
π RETURN CODES π
Tspi_Context_LoadKeyByUUID returns TSS_SUCCESS on success β slay β otherwise one of these little gremlins comes back:
TSS_E_INVALID_HANDLEβhContextis an invalid handle. she does not know her. πTSS_E_BAD_PARAMETERβpersistentStorageTypeis not valid. wrong flag, wrong vibe, blocked. πTSS_E_INTERNAL_ERRORβ an error occurred internal to the TSS. not us, not you, it's internal. it's giving private drama.
π§ CONFORMING TO π§
Tspi_Context_LoadKeyByUUID conforms to the Trusted Computing Group Software Specification version 1.1 Golden. certified iconic, periodt. π
π SEE ALSO π
go read those too, iykyk π¦
and that's the whole page, bestie!! this one's from the TCG Software Stack Developer's Reference, page Tspi_C...ByUUID(3), and it's stamped TSS 1.1 from way back on 2004-05-26 πΈ she's vintage, she's valid, she ate. mwah π β¨
π¦ 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