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 β€” The ESYS_CONTEXT.
  • parentHandle β€” The handle of the new parent for the object.
  • shandle1 β€” Session handle for authorization of parentHandle
  • shandle2 β€” Second session handle.
  • shandle3 β€” Third session handle.
  • encryptionKey β€” The optional symmetric encryption key used as the inner wrapper for duplicate.
  • 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 of parentHandle. (callee-allocated)

Return values

  • TSS2_RC_SUCCESS if the function call was a success. πŸŽ‰
  • TSS2_ESYS_RC_BAD_REFERENCE if the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT if esysContext corruption is detected.
  • TSS2_ESYS_RC_MEMORY if the ESAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_ESYS_RC_BAD_SEQUENCE if the context has an asynchronous operation already pending.
  • TSS2_ESYS_RC_INSUFFICIENT_RESPONSE if the TPM's response does not at least contain the tag, response length, and response code.
  • TSS2_ESYS_RC_MALFORMED_RESPONSE if the TPM's response is corrupted.
  • TSS2_ESYS_RC_RSP_AUTH_FAILED if the response HMAC from the TPM did not verify.
  • TSS2_ESYS_RC_MULTIPLE_DECRYPT_SESSIONS if more than one session has the 'decrypt' attribute bit set.
  • TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONS if more than one session has the 'encrypt' attribute bit set.
  • TSS2_ESYS_RC_BAD_TR if any of the ESYS_TR objects are unknown to the ESYS_CONTEXT or are of the wrong type or if required ESYS_TR objects are ESYS_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 β€” The ESYS_CONTEXT.
  • parentHandle β€” The handle of the new parent for the object.
  • shandle1 β€” Session handle for authorization of parentHandle
  • shandle2 β€” Second session handle.
  • shandle3 β€” Third session handle.
  • encryptionKey β€” The optional symmetric encryption key used as the inner wrapper for duplicate.
  • 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_SUCCESS if the function call was a success. πŸŽ€
  • TSS2_ESYS_RC_BAD_REFERENCE if the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT if esysContext corruption is detected.
  • TSS2_ESYS_RC_MEMORY if 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_SESSIONS if more than one session has the 'decrypt' attribute bit set.
  • TSS2_ESYS_RC_MULTIPLE_ENCRYPT_SESSIONS if more than one session has the 'encrypt' attribute bit set.
  • TSS2_ESYS_RC_BAD_TR if any of the ESYS_TR objects are unknown to the ESYS_CONTEXT or are of the wrong type or if required ESYS_TR objects are ESYS_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 β€” The ESYS_CONTEXT.
  • outPrivate β€” The sensitive area encrypted with the symmetric key of parentHandle. (callee-allocated)

Return values

  • TSS2_RC_SUCCESS on success
  • ESYS_RC_SUCCESS if the function call was a success.
  • TSS2_ESYS_RC_BAD_REFERENCE if the esysContext or required input pointers or required output handle references are NULL.
  • TSS2_ESYS_RC_BAD_CONTEXT if esysContext corruption is detected.
  • TSS2_ESYS_RC_MEMORY if the ESAPI cannot allocate enough memory for internal operations or return parameters.
  • TSS2_ESYS_RC_BAD_SEQUENCE if the context has an asynchronous operation already pending.
  • TSS2_ESYS_RC_TRY_AGAIN if the timeout counter expires before the TPM response is received.
  • TSS2_ESYS_RC_INSUFFICIENT_RESPONSE if the TPM's response does not at least contain the tag, response length, and response code.
  • TSS2_ESYS_RC_RSP_AUTH_FAILED if the response HMAC from the TPM did not verify.
  • TSS2_ESYS_RC_MALFORMED_RESPONSE if 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