Tspi_E...ssBlob(3)
Tspi_E...ssBlob π β¨
okay bestie, welcome to the TCG Software Stack Developer's Reference page for Tspi_EncodeDER_TssBlob β it lives in manual section 3, so it's a library call, and it's about to make your raw blob glow up into a DER-encoded one. no cap. π¦
β¨ NAME β¨
Tspi_EncodeDER_TssBlob β generate a DER encoded TSS blob. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
#include <tss/tspi.h>
TSS_RESULT Tspi_EncodeDER_TssBlob(UINT32 rawBlobSize, BYTE* rawBlob,
UINT32 blobType, UINT32* derBlobSize,
BYTE* derBlob);
look at that signature. five arguments, zero drama. we love a consistent queen π
β¨ DESCRIPTION β¨
so basically, Tspi_EncodeDER_TssBlob is the function you call when you need to generate a DER-encoded blob. and not just any DER encoding β it follows the ASN.1 data definitions from the Portable Data section of the Trusted Computing Group Software Stack Specification Version 1.2. literally the spec said "here's the format" and this function said "bet" π₯
β¨ PARAMETERS β¨
rawBlobSize
the size of the unwrapped blob. how big is your baby before the glow-up? that number goes here π«
rawBlob
a pointer to the unwrapped blob. yes, the raw one. the before picture πΈ
blobType
the type of blob being wrapped β go check the TSS_BLOB_TYPE_* constants for your options, iykyk π
derBlobSize
okay this one is doing the MOST and honestly? respect.
- On input, this parameter contains a pointer to the maximum size of the supplied
derBlobbuffer. - On output, this parameter contains a pointer to the actual size of the DER-encoded blob.
- 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 DER-encoded blob without writing to thederBlobbuffer. so it's like a lil sizing preview, no commitment, we love a low-stakes vibe check π
Note: If the raw data blob length is less than2^16bytes then the DER-encoding may add no more than20bytes. tiny overhead, tiny slay π
derBlob
a pointer to a buffer to hold the DER-encoded blob. this is where the after picture goes β¨
β¨ RETURN CODES β¨
Tspi_EncodeDER_TssBlob returns TSS_SUCCESS on success π otherwise one of the following values are returned:
TSS_E_BAD_PARAMETERβ something in your args was giving chaos πTSS_E_INTERNAL_ERRORβ An error occurred internal to the TSS. not your fault bestie, the stack is going through it π
β¨ CONFORMING TO β¨
Tspi_EncodeDER_TssBlob conforms to the Trusted Computing Group Software Specification Version 1.2. she's certified, she's official, she read the spec and she IS the spec ππ
β¨ SEE ALSO β¨
Tspi_DecodeBER_TssBlob(3)β the reverse queen, for when you need to go the other way π
and that's the whole page, bestie!! π«Ά this little icon comes to you from TSS 1.2, dated 2007-06-12 β an absolute vintage era for the TCG Software Stack, and honestly the docs still ate πβ¨π
π¦ where this page comes from
- debian bookworm: libtspi-dev 0.3.15-0.3 Β· BSD-3-Clause
- debian trixie: libtspi-dev 0.3.15-0.4 Β· BSD-3-Clause
- epel 10: trousers-devel 0.3.15-11.el10_0 Β· BSD
- epel 9: trousers-devel 0.3.15-5.el9 Β· BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: trousers 0.3.15
- nixpkgs unstable: netbsd-source 11.0
- nixpkgs unstable: trousers 0.3.15
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libtspi-dev 0.3.15-0.2 Β· BSD-3-Clause
- ubuntu noble: libtspi-dev 0.3.15-0.3build2 Β· BSD-3-Clause
- ubuntu questing: libtspi-dev 0.3.15-0.4
- ubuntu resolute: libtspi-dev 0.3.15-1 Β· BSD-3-Clause
- ubuntu stonking: libtspi-dev 0.3.15-1ubuntu2 Β· BSD-3-Clause
- Copyright (C) 2007 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms