Tspi_Key_UnloadKey(3)
π Tspi_Key_UnloadKey β a manual page, but make it cute π
okay bestie, so this one lives in the Library Functions Manual of the TCG Software Stack Developer's Reference, and it's the Tspi_Key_UnloadKey(3) page β aka the "ok girl, we're done here, get out of the TPM" function. π«Ά
β¨ NAME β¨
Tspi_Key_UnloadKey β unload a key from the TPM
no cap, that's literally it. one job. iconic behavior. π
πΈ SYNOPSIS πΈ
first things first, you gotta pull in the whole header squad. all of them. yes, all seven. don't skip, that's not the vibe:
#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_Key_UnloadKey(TSS_HKEY hKey);
so like, the function itself takes exactly one (1) handle and gives you back a TSS_RESULT. simple. clean. we love a low-maintenance signature. π
π¦ DESCRIPTION π¦
okay so here's the tea β β Tspi_Key_UnloadKey unloads the key that's referenced by the given key object, from the TPM. it's giving "pack your bags, you're leaving the building."
and the way this actually goes down? this call will result in a TPM_EvictKey operation for the specified key. so the TPM is the one doing the eviction, and your key is the one getting evicted. dramatic? maybe. necessary? absolutely. π
π PARAMETERS π
hKey
the hKey parameter is the handle of the key object to unload. that's the one (1) thing you gotta hand over. that's it. that's the whole ask. π
π RETURN CODES π
Tspi_Key_UnloadKey returns TSS_SUCCESS on success β slay β otherwise one of the following values gets returned at you:
TSS_E_INVALID_HANDLEβhKeyis not a valid handle. bestie. that handle is not it. πTSS_E_INTERNAL_ERRORβ an internal SW error has been detected. something went sideways deep inside and honestly? not your fault, but also not great.TSS_E_BAD_PARAMETERβ one or more parameters is bad. something you passed in was lowkey wrong.
ngl, if you see anything other than TSS_SUCCESS, go check what you handed in before you go blaming the TPM. just saying. π
π CONFORMING TO π
Tspi_Key_UnloadKey conforms to the Trusted Computing Group Software Specification version 1.1 Golden. it's certified, it's official, it's got the credentials. π
β SEE ALSO β
go read these next, they're the whole friend group:
and that's the page fr fr π this one's from TSS 1.1, dated 2004-05-25, and it's the Tspi_Key_UnloadKey(3) entry β main character energy since 2004, no notes. 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