Tspi_D...ssBlob(3)

πŸ’– NAME πŸ’–

Tspi_DecodeBER_TssBlob β€” bestie, this one unwraps a BER-encoded TSS blob. It's giving "peel the wrapping paper off the actual data" energy. 🎁✨

Oh also, hi, you're reading the TCG Software Stack Developer's Reference man page, that's the manual this lil cutie lives in. 🫢


✨ SYNOPSIS ✨

#include <tss/tspi.h>

TSS_RESULT Tspi_DecodeBER_TssBlob(UINT32  berBlobSize, BYTE*   berBlob,
                                  UINT32* blobType,    UINT32* rawBlobSize,
                                  BYTE*   rawBlob);

🌸 DESCRIPTION 🌸

okay so. Tspi_DecodeBER_TssBlob takes a BER-encoded blob and unwraps it. That's the whole vibe. πŸ’…

It does this in accordance with the ASN.1 data definitions in the Portable Data section of the Trusted Computing Group Software Stack Specification Version 1.2. So like, not freeform unwrapping, we're following the spec, no cap. πŸ“œβœ¨


πŸ¦‹ PARAMETERS πŸ¦‹

berBlobSize

The size of the BER-encoded blob. How big the wrapped thing is. πŸ“

berBlob

Pointer to the BER-encoded blob. The wrapped present itself. πŸŽ€

blobType

Pointer to the type of blob being unwrapped β€” go look at the TSS_BLOB_TYPE_* constants for the menu of options, iykyk. 🏷️

rawBlobSize

Pointer to the size of the rawBlob buffer. Bestie this one has ✨two moods✨:

  • On input: it holds a pointer to the maximum size of the supplied rawBlob buffer.
  • On output: it holds a pointer to the actual size of the unwrapped blob.

And here's the iconic part πŸ‘‘ β€” on input, if this parameter points to a value of 0, then this function will return the size of the buffer required to hold the unwrapped blob without writing to the rawBlob buffer. So you can do a lil sizing check first, no commitment, very "we're just talking". πŸ™ˆ

Note: the output data must be shorter than the BER-encoding, so berBlobSize is a useful upper limit on rawBlob buffer size. 🌈

rawBlob

Pointer to a buffer to hold the unwrapped blob. This is where the lil guy goes once it's unwrapped. 🐣


πŸ’€ RETURN CODES πŸ’€

Tspi_EncodeDER_TssBlob returns TSS_SUCCESS on success β€” yes bestie, that's literally what the page says, we report, we don't editorialize πŸ’… β€” otherwise one of the following values comes back at you:

  • TSS_E_BAD_PARAMETER
  • TSS_E_INTERNAL_ERROR β€” an error occurred internal to the TSS. 😭

🧚 CONFORMING TO 🧚

Tspi_DecodeBER_TssBlob conforms to the Trusted Computing Group Software Specification Version 1.2. Periodt. πŸ“‹βœ¨


🌟 SEE ALSO 🌟


mwah πŸ’‹ that's the page β€” this is TSS 1.2, dated 2007-06-12, and yeah she's been serving the exact same energy since 2007 and she's still iconic for it. πŸŽ€πŸ‘‘