TSPI_CONTEXT_GETREGISTEREDKEYSBYUUID2(3)

πŸ’– Tspi_Context_GetRegisteredKeysByUUID2(3) πŸ’–

okay bestie, welcome to the TCG Software Stack Developer's Reference πŸŽ€ β€” yes we're really doing this, and yes it's gonna slay


✨ NAME ✨

Tspi_Context_GetRegisteredKeysByUUID2 β€” bestie it gets you an array of TSS_KM_KEYINFO2 structures, based on the state of persistent storage πŸ’…


🌸 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_GetRegisteredKeysByUUID2(TSS_HCONTEXT     hContext,  TSS_FLAG persistentStorageType,
                                                TSS_UUID*        pUuidData, UINT32*  pulKeyHierarchySize,
                                                TSS_KM_KEYINFO2** ppKeyHierarchy);

πŸ¦‹ DESCRIPTION πŸ¦‹

TSS_Context_GetRegisteredKeysByUUID2 gets an array of TSS_KM_KEYINFO2 structures. This info reflects the state of the registered key hierarchy.

and here's the tea πŸ«– β€” the keys stored in the persistent storage are totally independent from either the context you passed in the function call or the context that was provided while processing the key registration. like, they don't know each other. no cap. 😭


πŸŽ€ PARAMETERS πŸŽ€

πŸ’œ hContext

The handle of the context object. that's it. that's the whole vibe.

πŸ’œ persistentStorageType

Flag indicating the persistent storage the key is registered in πŸ”‘

πŸ’œ pUuidData

The UUID the key was registered in the persistent storage (TSP or connected TCS) ⭐

so here's the situation, bestie:

  • If no key UUID is provided β€” meaning KeyUUID is NULL β€” the returned array of the TSS_KM_KEYINFO2 structure contains data reflecting the whole key hierarchy starting with root key πŸ‘‘
  • If a certain key UUID is provided, the returned array of TSS_KM_KEYINFO2 structures only contains data reflecting the path of the key hierarchy regarding that key. The first array entry is the key addressed by the given UUID, followed by its parent key up to the root key 🌈

πŸ’œ pulKeyHierarchySize

Receives the length (number of array entries) of the ppKeyHierarchy parameter πŸ“

πŸ’œ ppKeyHierarchy

On successful completion of the command, this parameter points to a buffer containing the actual key hierarchy data. it's giving main character energy, honestly ✨


πŸ”₯ RETURN CODES πŸ”₯

Tspi_Context_GetRegisteredKeysByUUID2 returns TSS_SUCCESS on success πŸŽ‰ otherwise one of these lil guys comes back:

  • TSS_E_INVALID_HANDLE β€” hContext is an invalid handle πŸ’€
  • TSS_E_BAD_PARAMETER
  • TSS_E_INTERNAL_ERROR β€” an error occurred internal to the TSS 😭

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_Context_GetRegisteredKeysByUUID2 conforms to the Trusted Computing Group Software Specification version 1.2 🫢


🌈 SEE ALSO 🌈

Tspi_Context_LoadKeyByUUID(3) β€” go read that one next, iykyk πŸ’…


ngl bestie, that's the whole page. every flag, every struct, every error code, all of it. you're literally gonna pass your vibe check on the TSS API fr fr πŸ’–

TSS 1.2 Β· 2007-07-06 Β· sending you so much love from the TCG Software Stack Developer's Reference, mwah πŸŽ€πŸ’–βœ¨