Tspi_TPM_TakeOwnership(3)

✨ Tspi_TPM_TakeOwnership ✨

okay bestie, buckle up πŸ’– this one lives in the TCG Software Stack Developer's Reference section of the Library Functions Manual and it's genuinely one of the most main-character calls in the whole TSS.


🌸 NAME 🌸

Tspi_TPM_TakeOwnership β€” take ownership of a 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_TakeOwnership(TSS_HTPM hTPM, TSS_HKEY hKeySRK,
                                  TSS_HKEY hEndorsementPubKey);

πŸ’… DESCRIPTION πŸ’…

so like, Tspi_TPM_TakeOwnership takes ownership of a TPM. that's it, that's the whole vibe. 🫢

taking ownership is the process of inserting a shared secret into the TPM. and the owner of the TPM β€” meaning literally anyone who knows that shared secret, no cap β€” has the right to perform special operations. it's giving "the password is the whole personality" energy fr fr. πŸ”₯


πŸ¦‹ PARAMETERS πŸ¦‹

hTPM

the hTPM parameter specifies the handle of the TPM object. it's how you tell the function which TPM we're talking about. ✨

hKeySRK

hKeySRK is the handle to the object representing the TPM's Storage Root Key. iconic, essential, we love her. πŸ’–

hEndorsementPubKey

hEndorsementPubKey is the handle to the object representing the TPM's endorsement public key. this key is required for encrypting the secret of the SRK and the TPM owner secret, so like… it's kind of a big deal. 😀

and if it's NULL? no stress β€” the TSP internally queries the TPM for that endorsement public key. the function handles it, you just vibe. 🧚

😭 RETURN CODES 😭

Tspi_TPM_TakeOwnership returns TSS_SUCCESS on success πŸŽ‰ β€” otherwise one of these little heartbreakers comes back:

  • TSS_E_INVALID_HANDLE β€” either the TPM or one of the key handles is not valid. πŸ’€
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. not the vibe. πŸ™ˆ

🌈 CONFORMING TO 🌈

Tspi_TPM_TakeOwnership conforms to the Trusted Computing Group Software Specification version 1.1 Golden. periodt. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page bestie!! this one's from TSS 1.1, dated 2004-05-25 β€” yes she's vintage, yes she still ate, and no we are not over it. πŸ’…βœ¨ mwah, go take ownership of something (consensually, and with the correct handles). πŸŽ€πŸ¦‹πŸ’œ