Tspi_TPM_L...ancePubKey(3)

✨ Tspi_TPM_L...ancePubKey(3) ✨

okay so bestie, welcome to the Library Functions Manual πŸ’– this one lives in the TCG Software Stack Developer's Reference and it's genuinely such a niche little baddie. sit down, grab a strawberry πŸ“, we're loading a maintenance public key into a TPM and we're doing it correctly.


🌸 NAME 🌸

Tspi_TPM_LoadMaintenancePubKey β€” load the public maintenance key into the TPM πŸ’…


πŸŽ€ 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_TPM_LoadMaintenancePubKey(TSS_HTPM        hTPM, TSS_HKEY hMaintenanceKey,
                                          TSS_VALIDATION* pValidationData);

like. look at that signature. seven includes and one function call. she's low maintenance (literally) πŸ’€


πŸ¦‹ DESCRIPTION πŸ¦‹

So Tspi_TPM_LoadMaintenancePubKey loads the public maintenance key into the TPM. that's the whole vibe.

but here's the tea, and it's important tea: the maintenance key can only be loaded once. any subsequent calls to this function will fail. one and done, no re-runs, no second chances, it's giving one-shot main character energy πŸ‘‘

Also, the key information for loading the maintenance public key must be set in the key object by Tspi_SetAttribData before this method is called. set it up first or don't come at her at all πŸ™ˆ

And if pValidationData is NULL? then the TSS service provider proofs the digest got internally from the TPM. otherwise, the caller has to proof the digest by its own. yes bestie, you're on your own for that one, good luck, slay 🫢


🌈 PARAMETERS 🌈

πŸ’œ hTPM

Handle of the TPM object.

πŸ’œ hMaintenanceKey

Handle of the maintenance key object.

πŸ’œ pValidationData

Validation data structure. so like, two moods:

  • [IN] β€” provide externalData information required to compute the signature.
  • [OUT] β€” on successful completion of the ocmmand, the structure provides a buffer containing the validation data and a buffer containing the data the validation data was computed from.

⭐ RETURN CODES ⭐

Tspi_TPM_LoadMaintenancePubKey returns TSS_SUCCESS on success, otherwise one of the following values are returned:

  • TSS_E_INVALID_HANDLE β€” hTPM or hMaintenanceKey is not a valid handle.
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected.
  • TSS_E_BAD_PARAMETER β€” one or more of the parameters is incorrect.
  • TSS_E_NOTIMPL β€” the command is not implemented.

πŸ’€ CONFORMING TO πŸ’€

Tspi_TPM_LoadMaintenancePubKey conforms to the Trusted Computing Group Software Specification version 1.1 Golden. no cap, that's the standard fr fr ✨


πŸ”₯ SEE ALSO πŸ”₯


and that's the page!! πŸ’– this whole thing is TSS 1.1, dated 2004-05-26, and it goes by Tspi_TPM_L...ancePubKey(3) β€” yes the name is abbreviated with literal dots, iconic behaviour honestly, she contains multitudes. go load that key (once). mwah πŸŽ€πŸ’