Esys_Import(3)
π Esys_Import β the tea on importing your fave object into a new parent
okay so bestie, you're in the Library Functions Manual section, page Esys_Import(3), and this is the ESAPI function for the TPM2_Import command. That's the whole vibe. Let's get into it π«Ά
β¨ NAME β¨
Esys_Import β the ESAPI function for the TPM2_Import command. no cap, that's literally it π
πΈ SYNOPSIS πΈ
Functions
TSS2_RC Esys_Import_Async (ESYS_CONTEXT *esysContext, ESYS_TR
parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3,
const TPM2B_DATA *encryptionKey, const TPM2B_PUBLIC *objectPublic,
const TPM2B_PRIVATE *duplicate, const TPM2B_ENCRYPTED_SECRET
*inSymSeed, const TPMT_SYM_DEF_OBJECT *symmetricAlg)
TSS2_RC Esys_Import (ESYS_CONTEXT *esysContext, ESYS_TR parentHandle,
ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const
TPM2B_DATA *encryptionKey, const TPM2B_PUBLIC *objectPublic, const
TPM2B_PRIVATE *duplicate, const TPM2B_ENCRYPTED_SECRET *inSymSeed,
const TPMT_SYM_DEF_OBJECT *symmetricAlg, TPM2B_PRIVATE **outPrivate)
TSS2_RC Esys_Import_Finish (ESYS_CONTEXT *esysContext, TPM2B_PRIVATE
**outPrivate)
π¦ Detailed Description π¦
It's the ESAPI function that lets you invoke the TPM2_Import command β and you get to pick your fighter: one-call mode, or asynchronous mode. choose your own adventure, honestly π
π Function Documentation π
π TSS2_RC Esys_Import (ESYS_CONTEXT * esysContext, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA * encryptionKey, const TPM2B_PUBLIC * objectPublic, const TPM2B_PRIVATE * duplicate, const TPM2B_ENCRYPTED_SECRET * inSymSeed, const TPMT_SYM_DEF_OBJECT * symmetricAlg, TPM2B_PRIVATE ** outPrivate)
One-Call function for TPM2_Import π₯
This one invokes the TPM2_Import command in its one-call variant. Translation? The function will block until the TPM response is available β like it's waiting for the group chat to finally answer π. All input parameters are const. And the memory for non-simple output parameters? The function implementation allocates it for you, so you don't have to lift a finger, bestie β¨
Parameters
esysContextβ TheESYS_CONTEXT.parentHandleβ The handle of the new parent for the object.shandle1β Session handle for authorization ofparentHandleshandle2β Second session handle.shandle3β Third session handle.encryptionKeyβ The optional symmetric encryption key used as the inner wrapper forduplicate.objectPublicβ The public area of the object to be imported.duplicateβ The symmetrically encrypted duplicate object that may contain an inner symmetric wrapper.inSymSeedβ The seed for the symmetric key and HMAC key.symmetricAlgβ Definition for the symmetric algorithm to use for the inner wrapper.outPrivateβ The sensitive area encrypted with the symmetric key ofparentHandle. (callee-allocated)
Return values
TSS2_RC_SUCCESSif the function call was a success. πTSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYif the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.TSS2_ESYS_RC_INSUFFICIENT_RESPONSEif the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_MALFORMED_RESPONSEif the TPM's response is corrupted.TSS2_ESYS_RC_RSP_AUTH_FAILEDif the response HMAC from the TPM did not verify.TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSif more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSif more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRif any of theESYS_TRobjects are unknown to theESYS_CONTEXTor are of the wrong type or if requiredESYS_TRobjects areESYS_TR_NONE.TSS2_RCs produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.
πΈ TSS2_RC Esys_Import_Async (ESYS_CONTEXT * esysContext, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA * encryptionKey, const TPM2B_PUBLIC * objectPublic, const TPM2B_PRIVATE * duplicate, const TPM2B_ENCRYPTED_SECRET * inSymSeed, const TPMT_SYM_DEF_OBJECT * symmetricAlg)
Asynchronous function for TPM2_Import π«
This one invokes the TPM2_Import command in an asynchronous variant, which means it's gonna return as soon as the command has been sent downwards the stack to the TPM β no waiting around, very main character energy π§. All input parameters are const. And when you're ready to actually get the TPM's response? Call Esys_Import_Finish. periodt.
Parameters
esysContextβ TheESYS_CONTEXT.parentHandleβ The handle of the new parent for the object.shandle1β Session handle for authorization ofparentHandleshandle2β Second session handle.shandle3β Third session handle.encryptionKeyβ The optional symmetric encryption key used as the inner wrapper forduplicate.objectPublicβ The public area of the object to be imported.duplicateβ The symmetrically encrypted duplicate object that may contain an inner symmetric wrapper.inSymSeedβ The seed for the symmetric key and HMAC key.symmetricAlgβ Definition for the symmetric algorithm to use for the inner wrapper.
Return values
ESYS_RC_SUCCESSif the function call was a success. πTSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYif the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_RCs produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONSif more than one session has the'decrypt'attribute bit set.TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONSif more than one session has the'encrypt'attribute bit set.TSS2_ESYS_RC_BAD_TRif any of theESYS_TRobjects are unknown to theESYS_CONTEXTor are of the wrong type or if requiredESYS_TRobjects areESYS_TR_NONE.
π TSS2_RC Esys_Import_Finish (ESYS_CONTEXT * esysContext, TPM2B_PRIVATE ** outPrivate)
Asynchronous finish function for TPM2_Import β
This function returns the results of a TPM2_Import command invoked via Esys_Import_Finish. All non-simple output parameters are allocated by the function's implementation. And here's the icon behaviour: NULL can be passed for every output parameter if the value is not required. lowkey freeing, honestly π
Parameters
esysContextβ TheESYS_CONTEXT.outPrivateβ The sensitive area encrypted with the symmetric key ofparentHandle. (callee-allocated)
Return values
TSS2_RC_SUCCESSon successESYS_RC_SUCCESSif the function call was a success.TSS2_ESYS_RC_BAD_REFERENCEif theesysContextor required input pointers or required output handle references areNULL.TSS2_ESYS_RC_BAD_CONTEXTifesysContextcorruption is detected.TSS2_ESYS_RC_MEMORYif the ESAPI cannot allocate enough memory for internal operations or return parameters.TSS2_ESYS_RC_BAD_SEQUENCEif the context has an asynchronous operation already pending.TSS2_ESYS_RC_TRY_AGAINif the timeout counter expires before the TPM response is received.TSS2_ESYS_RC_INSUFFICIENT_RESPONSEif the TPM's response does not at least contain the tag, response length, and response code.TSS2_ESYS_RC_RSP_AUTH_FAILEDif the response HMAC from the TPM did not verify.TSS2_ESYS_RC_MALFORMED_RESPONSEif the TPM's response is corrupted.TSS2_RCs produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally.
π Author π
Generated automatically by Doxygen for tpm2-tss from the source code. (not me writing this by hand at 2am, promise π)
okay that's the whole page bestie, go import something iconic π
later, legend π¦ β this was tpm2-tss, Version 4.1.5, Esys_Import(3), and yes I memorised all of it π
β¨
π¦ where this page comes from
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms