Tspi_T...lfTest(3)

πŸ’– Tspi_TPM_CertifySelfTest(3) πŸ’–

okay bestie, so this one lives in the TCG Software Stack Developer's Reference (that's the manual name, cute right? the page itself is Tspi_T...lfTest(3) if you were wondering where the header went πŸ‘€). It's a section 3 page, it's a function, and it's about making the TPM sign its own self-test receipts. slay behavior honestly πŸŽ€


✨ NAME ✨

Tspi_TPM_CertifySelfTest β€” have the TPM sign its self test data. that's it, that's the whole vibe. it runs the test, and if the test passes, it hands you back a signed, authenticated value. no cap πŸ’…


🌸 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_CertifySelfTest(TSS_HTPM        hTPM, TSS_HKEY hKey,
                                    TSS_VALIDATION* pValidationData );

like yes, all seven includes, don't skip any of them, they're all main characters here 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

Tspi_TPM_CertifySelfTest performs a self-test of each internal TPM function, and if that test has passed, it returns an authenticated value β€” a signature. literally the TPM checking itself and then signing off on the result like "yeah I'm good, here's my signature proving it" ⭐


πŸ’œ PARAMETERS πŸ’œ

🌈 hTPM

Handle of the TPM object. your TPM's little ID badge, basically πŸ‘‘

🌈 hKey

Handle of the signature key object. this is the key doing the signing, so it's lowkey the one holding the pen here ✍️

🌈 pValidationData

Validation data structure. she's doing double duty:

  • [IN] β€” you provide the externalData information that's required to compute the signature.
  • [OUT] β€” on successful completion of the command, the structure provides a buffer containing the validation data, plus a buffer containing the data that the validation data was computed from. two buffers, one glow-up ✨

πŸ”₯ RETURN CODES πŸ”₯

Tspi_TPM_CertifySelfTest returns TSS_SUCCESS on success. otherwise, one of these little gremlins comes back at you 😭

  • TSS_E_INVALID_HANDLE β€” hTPM is not a valid handle to a TPM object. the badge didn't scan, bestie πŸ’€
  • TSS_E_INTERNAL_ERROR β€” an error occurred internal to the TSS. something went sideways inside the stack, not your fault fr fr πŸ™ˆ

πŸŽ€ CONFORMING TO πŸŽ€

Tspi_TPM_CertifySelfTest conforms to the Trusted Computing Group Software Specification version 1.1 Golden. golden!! as in the version name. iconic behavior honestly πŸ‘‘


🌟 SEE ALSO 🌟


and that's the whole page, you ate it πŸ’… This little reference is from TSS 1.1, dated 2004-05-26 β€” yes she's vintage, and yes she still serves. bye bestie, go certify something πŸ’–βœ¨