---
name: "Esys_Clear"
section: "3"
platform: "linux"
package: "tpm2-tss"
version: "4.2.0-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Esys_Clear"
---

# Esys\_Clear(3)

The ESAPI function for the TPM2\_Clear command.

## NAME

Esys\_Clear - The ESAPI function for the TPM2\_Clear command.

## SYNOPSIS

### Functions

TSS2\_RC **Esys\_Clear\_Async** (**ESYS\_CONTEXT** \*esysContext, **ESYS\_TR** authHandle, **ESYS\_TR** shandle1, **ESYS\_TR** shandle2, **ESYS\_TR** shandle3)\

## Detailed Description

ESAPI function to invoke the TPM2\_Clear command either as a one-call or in an asynchronous manner.

## Function Documentation

### TSS2\_RC Esys\_Clear\_Async (ESYS\_CONTEXT \* esysContext, ESYS\_TR authHandle, ESYS\_TR shandle1, ESYS\_TR shandle2, ESYS\_TR shandle3)

Asynchronous function for TPM2\_Clear

This function invokes the TPM2\_Clear command in a asynchronous variant. This means the function will return as soon as the command has been sent downwards the stack to the TPM. All input parameters are const. In order to retrieve the TPM's response call Esys\_Clear\_Finish.

**Parameters**

*esysContext* The **ESYS\_CONTEXT**. \
 *authHandle* TPM2\_RH\_LOCKOUT or TPM2\_RH\_PLATFORM+{PP}. \
 *shandle1* Session handle for authorization of authHandle \
 *shandle2* Second session handle. \
 *shandle3* Third session handle.

**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\_ESYS\_RC\_NO\_DECRYPT\_PARAM* if one of the sessions has the 'decrypt' attribute set and the command does not support encryption of the first command parameter. \
 *TSS2\_ESYS\_RC\_NO\_ENCRYPT\_PARAM* if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter.

## Author

Generated automatically by Doxygen for tpm2-tss from the source code.
