TSPI_TPM_CMKSETRESTRICTIONS(3)
π Tspi_TPM_CMKSetRestrictions β ok so bestie, let's talk delegated CMK restrictions
so this is a page out of the TCG Software Stack Developer's Reference, and it's a library function manual for Tspi_TPM_CMKSetRestrictions(3). yes we're getting into TPM internals, and yes it's giving main character energy. buckle up π
β¨ NAME β¨
Tspi_TPM_CMKSetRestrictions β sets restrictions on the use of delegated Certified Migratable Keys. periodt.
πΈ SYNOPSIS πΈ
#include <tss/tspi.h>
TSS_RESULT Tspi_TPM_CMKSetRestrictions(TSS_HTPM hTPM, TSS_CMK_DELEGATE CmkDelegate);
π¦ DESCRIPTION π¦
okay so here's the vibe: Tspi_TPM_CMKSetRestrictions is the function you call to set restrictions on the delegated use of Certified Migratable Keys, aka CMKs. you're basically telling the TPM "hey, when someone's operating under a delegated auth session, here's what they're allowed to do with these keys."
and lowkey important detail: use of this command itself cannot be delegated. like, you can't delegate the thing that sets up delegation. that's the rule. no cap. π₯
π PARAMETERS π
hTPM
hTPM is the handle of the TPM object you're working with. specify it, and the TPM knows which one you mean. π«
CmkDelegate
CmkDelegate is a bitmask describing the kinds of CMKs that can be used in a delegated auth session. every bit = one type of key. if the bit for a key type is set, that CMK can be used in a delegated authorization session. if it's not set? that key gets hit with a TPM_E_INVALID_KEYUSAGE return code straight from the TPM. rejected. not invited to the party. π
the possible values of CmkDelegate are any combination of these flags, logically OR'd together:
TSS_CMK_DELEGATE_SIGNINGβ allow use of signing keys. βοΈTSS_CMK_DELEGATE_STORAGEβ allow use of storage keys. π¦TSS_CMK_DELEGATE_BINDβ allow use of binding keys. πTSS_CMK_DELEGATE_LEGACYβ allow use of legacy keys. π΅TSS_CMK_DELEGATE_MIGRATEβ allow use of migratable keys. π§³
π RETURN CODES π
Tspi_TPM_CMKSetRestrictions returns TSS_SUCCESS when everything goes off without a hitch π«Ά. otherwise, one of these lil guys comes back at you:
TSS_E_INVALID_HANDLEβhTPMis not a valid handle. bestie that handle is not it πTSS_E_INTERNAL_ERRORβ an internal SW error has been detected. software said "not today" π
π CONFORMING TO π
Tspi_TPM_CMKSetRestrictions conforms to the Trusted Computing Group Software Specification version 1.2 Errata A. iconic behavior, honestly. β
π§ SEE ALSO π§
Tspi_TPM_CMKApproveMA(3)Tspi_TPM_CMKCreateTicket(3)Tspi_Key_CMKCreateBlob(3)
and that's the whole page, bestie π go forth and set those restrictions responsibly
okay bye ily, this was TSS 1.2, dated 2007-12-13 β yes she's an elder but she still slays π β¨
π¦ 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) 2007 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms