Tspi_Key_GetPubKey(3)

✨ Tspi_Key_GetPubKey(3) ✨

okay bestie, sit down, we're doing TSS today πŸ’– This one lives in the TCG Software Stack Developer's Reference (it's a section 3 library functions manual page, iykyk) and it's genuinely so useful β€” it's the "hey, show me the public half of this key" girlie.


🌸 NAME 🌸

Tspi_Key_GetPubKey β€” get the public key of an object πŸŽ€


πŸ¦‹ 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_Key_GetPubKey(TSS_HKEY hKey, UINT32* pulPubKeyLength, BYTE** prgbPubKey);

like yes you gotta include all seven headers, that's just the vibe, don't fight it πŸ’…


🌈 DESCRIPTION 🌈

Tspi_Key_GetPubKey gets the public portion of a given key object. that's it, that's the whole job, and she does it flawlessly ✨


πŸ’œ PARAMETERS πŸ’œ

🌟 hKey

hKey</purl> is the handle of the key object to unload. (yes bestie, the manpage says "unload" right there β€” we report, we don't editorialize πŸ’€)

🌟 pulPubKeyLength

pulPubKeyLength receives the length in bytes of the prgbPubKey parameter. it's giving "how big is the thing", and honestly? necessary.

🌟 prgbPubKey

prgbPubKey receives a pointer to the memory block containing the public key blob retrieved for the key object referenced by hKey. so like, she hands you the goods 🫢


πŸŽ€ RETURN CODES πŸŽ€

Tspi_Key_GetPubKey returns TSS_SUCCESS on success (slay πŸ”₯), otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hKey is not a valid handle. bestie that handle is not a handle 😭
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. not our fault, she's just going through it πŸ’€
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. one of the girlies is not okay πŸ™ˆ

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_Key_GetPubKey conforms to the Trusted Computing Group Software Specification version 1.1 Golden ✨ iconic, certified, periodt.


πŸ’– SEE ALSO πŸ’–

the whole key-handling friend group, go say hi πŸ¦‹


and that's the page!! this is TSS 1.1, dated 2004-05-25, and she's still serving main character energy in Tspi_Key_GetPubKey(3) πŸ’…βœ¨ mwah, go get your public keys bestie πŸŽ€πŸ’œ